drumscript.audio_processor.stem_splitter.mix_stems

mix_stems(stems_dict, stems_to_mix, output_path, fmt='wav')[source]

Uses soundfile + numpy so the WAV output path is ffmpeg-free. MP3 output still passes through pydub/ffmpeg via the _write_audio helper.

Parameters:
  • stems_dict (dict) – Dictionary mapping stem names to file paths.

  • stems_to_mix (list) – List of stem names to combine.

  • output_path (Path) – Destination path, if provided by user, otherwise assumes cwd

  • fmt (str) – Output format (‘wav’ or ‘mp3’).