[FEAT(extract_stems)]: tidy up bass guitar extraction from demucs

Open
#319 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
54/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend

Research direction

Start at the extract_stems entry point and trace how mute=["bass"] determines the returned keys and output filename. Check the related tests or add a focused regression test for this call; done means the bass-muted extraction no longer raises KeyError when accessing the documented result and its saved output has a consistent name.

Written by the indexing model from the issue text.

Description

feature good first issue help wanted

testing issue forms, for a real issue

Summary

It's not clear how to access the bass only stem from current syntax

# (IN PROG) TEST EXTRACT BASS
# results = ds.extract_stems(AUDIO_FILE_11, verbose=True)

# Extract all stems
stem_result = ds.extract_stems(
    AUDIO_FILE_11,
    all_stems=True,
    output_dir="stems",
    # full=True,  # LEGACY (v0.1.5)
    verbose=True,
)

#print(f"Bassless track: {stem_result['bass']}")

## BASS BACKING TRACK

results = ds.extract_stems(AUDIO_FILE_12, mute=["bass"], verbose=True)
print(f"Bassless track: {results['mix']}")

NOTE: the argument mute=["bass"] works, but it saves as {song_name}_no bass

results[mix] renders an error

KeyError                                  Traceback (most recent call last)
Cell In[11], [line 4](vscode-notebook-cell:?execution_count=11&line=4)
      1 ## BASS BACKING TRACK, MAN IN THE BOX
      2 
      3 results = ds.extract_stems(AUDIO_FILE_12, mute=["bass"], verbose=True)
----> [4](vscode-notebook-cell:?execution_count=11&line=4) print(f"Bassless track: {results['mix']}")
Dominant language
Python
Stars
61
Forks
5
Avg merge
1d 19h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DrumScript/DrumScript

All issues in DrumScript/DrumScript

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.