musicflower.loader.get_cache_file_path

musicflower.loader.get_cache_file_path(file_path, n, remove_extension=False)[source]

For a given file path and resolution, return the associated cache file path, which corresponds to the original file path appended with _<n>.pickle, where <n> is replaced with the actual resolution.

Parameters:
  • file_path (Union[str, Path]) – path to the original file

  • n (int) – resolution of the pitch scape

  • remove_extension (bool) – remove the original file extension before appending _<n>.pickle (if the same file is used with different extensions, for instance, *.mxl for a MusicXML file and *.ogg for an associated audio file, removing the extension leads to name conflicts for the cache files)

Returns:

path to the cache file