Skip to main content

stem_file_path

Function stem_file_path 

Source
pub fn stem_file_path(
    base: &str,
    label: &str,
    stem_id: &str,
    ext: &str,
    character_set: CharacterSet,
) -> String
Expand description

The relative path of one stem file inside a song’s stems_folder.

Named base+label+disambiguation rather than label-only, because Auto Split can mislabel stems and Advanced Split yields ~100 instruments, so blank or duplicate labels are expected. The file is {song file name} - {label} [{stem id8}].{ext}; the - {label} piece is dropped when the label sanitises to empty, and the [{stem id8}] disambiguator (the first 8 characters of the stable stem id) keeps blank or duplicate labels collision-free. Every component is run through the same [sanitise_component] filter as the rest of the library, honouring character_set.