Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Catalogue Browser #48

Open
tim-janik opened this issue Feb 14, 2024 · 4 comments
Open

Audio Catalogue Browser #48

tim-janik opened this issue Feb 14, 2024 · 4 comments
Assignees
Milestone

Comments

@tim-janik
Copy link
Owner

Anklang needs a facility to index, browse and select audio files that can be used in samplers like LiquidSFZ, with fluidsynth or for audio tracks.

Here are some design considerations:

  • We need an indexer that scans directories for sample files, ideally out of process, so scanning can operate in the background (reniced).
  • We could use LMDB to store indexed files in ~/.cache/anklang/indexer.db, that takes care of robustness and we avoid needing another IPC layer.
  • Locations of interest:
    • XDG_DATA_HOME: /anklang/samples /sounds
    • [CFG] $(prefix)/share/sounds $(prefix)/share/anklang/samples /usr/share/sounds /usr/local/share/sounds
    • [CFG] XDG_MUSIC_DIR, XDG_AUDIO_DIR[*], XDG_DOWNLOAD_DIR
    • [CFG] XDG_DATA_DIRS + /sounds
    • XDG_SAMPLE_DIRS[*], XDG_AUDIO_DIRS[*]
    • $ANKLANG_SAMPLE_DIRS, $ANKLANG_AUDIO_DIRS
  • Sample packs provided by Anklang should probably end up in $XDG_DATA_HOME/anklang/sounds or similar and be unconditionally scanned.
  • The indexer might need to read anklangrc.json in order to honor user settings.
  • The indexer should be started in the background when the Anklang GUI is running and possibly via AnklangEngine --crawl or so.
  • Is there a clever way to avoid re-indexing all directory hierarchies upon restart? For Anklang packages we can make sure to trigger invalidation as needed, but for paths like/usr/share/sounds or ~/Music/ that are potentially huge, I wonder if it is good enough to to carry out rescans with only maxdepth=2 or so.
  • In cases where the user knows that new content has been added deep in some ~/Music/ hierarchy, it makes sense to add a [Rescan] button.
  • I have looked at some sample packages by other DAWs and /usr/share/sounds, there are a lot of tags or categories that can be extracted from just crawling file and directory names, without having to inspect file contents. One trick here is to cross match dir/filename strings against /usr/share/dict/words to yield meaningful tag and category names.
  • Content scanning is a whole different can of worms that we might want to not open just yet.
  • Just the dir + file name already yields file type, short name, in many cases genre, sometimes BPM. For a WAVE selection dialog with content filtering based on tags, that is good enough for a start.
  • The current file browser could be extended with another pane (left side) to select tags from a list, and the current filename input field could become a search bar when in catalogue selection mode. The new pane could serve as bookmark list for ordinary file selection.
  • We might even want to support users actively switching between file-sector and catalogue-browser mode (via notebook tabs?), depending on where they need to pick an audio snippet from.

[*]: Note that $XDG_AUDIO_DIR and related search paths are not in the official spec, but it would make sense to introduce this. With ~/Music for music to listen to, ~/Videos for movies to watch, it could make sense to have ~/Audio for sample files, and MIDI clips, multisample files, etc.
[CFG]: Some of these dirs could potentially span large hierarchies, it could make sense to allow users to configure automatic scanning of these via the preferences.

@tim-janik tim-janik added this to the v0.4.0 milestone Feb 14, 2024
@tim-janik
Copy link
Owner Author

Cubase MediaBay Window
mediabay_window_cubase_home

@tim-janik
Copy link
Owner Author

FL Studio Browser

browser

@tim-janik
Copy link
Owner Author

@tim-janik tim-janik self-assigned this Feb 14, 2024
@Reaper10
Copy link

you have icons for the all audio file formats?

@tim-janik tim-janik modified the milestones: v0.4.0, vFuture Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants