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.

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}; - {label} is dropped when the label sanitises to empty, and the [{stem id8}] disambiguator (first 8 of the stable stem id) keeps blank or duplicate labels collision-free. Every component runs through the same [sanitise_component] filter, honouring character_set.