Skip to content

armgit / nota

Public Imported from GitHub
0

Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.

(docs) Smart samples: changelog, feature list and architecture

Egor Khindikaynen351bed195849
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index f2cb925a..6115e7bf 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -110,6 +110,21 @@ Resize semantics differ by clip type: a warped clip **trims** its played window,
unwarped clip's source region moves — which is what lets a short one-shot be dragged out
to a whole bar.
+### Sample analysis (smart samples)
+
+`SampleAnalysis.cpp` measures a decoded sample off the audio path: tempo (`TempoDetect`),
+key (a chroma of spectral peaks correlated with the Krumhansl–Kessler profiles), the
+envelope facts that tell a loop from a one-shot, and a 16-value timbre fingerprint.
+`nota_sample_analyze_file` decodes only a file's head (`AudioImportJob` with a seconds
+cap), so a long file in the library costs what it analyses, not its length. On the managed
+side `ISampleIndex` (`Infrastructure/SampleStore/SampleLibraryIndex.cs`) scans the Samples
+folder on a few below-normal threads and persists the raw measurements in
+`<data>/sample-index/index.bin`, keyed by path and invalidated by size and date.
+`SampleClassifier` (Application) turns those measurements and the file's name
+(`SampleNameHints`: "Loop_124_Am", a "One Shots" folder) into what the browser shows. It
+runs again on load, so classifier changes need no re-analysis. Names win over the
+analysis, and a loop's tempo is refined from its length.
+
## Devices and instruments
Built-in instruments, audio effects, and MIDI effects are registered by an integer
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee6f8b85..d0dbb4f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,23 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
checksum before it's unpacked. Only the samples and their docs are installed, and Nota
checks there is room for a pack before downloading it. On both sides the filters and
search stay at the top while the list scrolls.
+- **Smart samples:** Nota now knows what is in your sample library. In the background it
+ works out each file's **tempo and key**, and whether it is a **loop or a one-shot**. A
+ newly installed pack goes first, and the results are kept, so each file is done once. Tempo
+ and key written in a file's name ("Loop_124_Am") come first; a loop's exact tempo comes from
+ its length. Rows in the **Files** tab show it at the right edge — `124 · Am` for a loop, the
+ note for a tuned hit. New **filter chips** narrow the list: **Loops**, **One-shots**, a
+ **BPM** range ("project tempo ±5 %" is one click away) and a **Key**. A key also shows its
+ relative, so "A minor" finds C major loops too. Right-click a sample → **Show similar
+ sounds** lists the samples that sound most like it.
+- **Project key:** a **KEY** cell in the transport bar, saved with the project.
+- **Loops fit the project when dropped:** a loop dropped on the arrangement warps to the
+ project tempo from the tempo Nota already knows, and the status bar says so ("loop warped
+ 124 → 120 BPM"). With **Transpose to project key** on (the Files tab's ⋮ menu), it moves to
+ the project key the shorter way — an A minor loop lands in C minor 3 semitones up. Over MCP,
+ an AI can search the library by kind, tempo, key and name, ask what a file is, find similar
+ sounds, and read or set the project key (`search_samples`, `get_sample_info`,
+ `find_similar_samples`, `get_project_key`, `set_project_key`).
- **Separate Stems:** right-click an audio clip → **Separate Stems…** splits it into
**Drums, Bass, Other and Vocals** — a group of four tracks right under the clip's track,
@@ -65,6 +82,8 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
projects are converted on their next save.
### Fixed
+- **One-shots dropped on the arrangement are no longer warped:** a short hit used to be
+ time-stretched whenever the tempo detector heard a pulse in it.
- **Big sample libraries in the Files tab:** the browser listed only the first 2,000 files of
the Samples folder; it now lists up to 100,000, and searching them stays fast.
diff --git a/FEATURES.md b/FEATURES.md
index 89617415..d80bdbb5 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -56,6 +56,8 @@ JUCE module; the engine core is JUCE-free.
their dates — click to select, double-click (or the arrow keys and Return) to open.
- **Quit without saving** dialog names the project and how long its changes have gone
unsaved; Return saves (right in the dialog, then quits), Escape cancels.
+- **Project key** (KEY cell in the transport bar, saved with the project): loops dropped on
+ the arrangement can be transposed to it.
- **Transport**: play / stop / record, playhead position.
- **Stop returns to the launch point** (a seek sets the start anchor).
- **Follow** — the arrangement follows the cursor (playhead stays centred).
@@ -720,7 +722,19 @@ and user presets, automation, persistence and cloning.
preview volume fader; ↑ ↓ step through files and Space plays the selected one. It stays
hidden until you use a list and tightens in a narrow browser. Space in the arrangement
always drives the project transport.
+- **Smart samples**: the Samples folder is analysed in the background — tempo, key, loop or
+ one-shot, and a timbre fingerprint — once per file (results kept across launches, a newly
+ installed pack first; the status line shows the progress). Names win over the analysis
+ ("Loop_124_Am", "Pad C#m 90bpm", a "One Shots" folder), and a loop's exact tempo comes from
+ its length (16 beats in 7.742 s is 124.0). Rows carry `124 · Am` (a tuned hit, its note).
+ **Filter chips** on the Files tab: Loops, One-shots, a BPM range (with "project tempo
+ ±5 %") and a Key (with the project key; a key also matches its relative). **Show similar
+ sounds** (right-click a sample) lists the closest samples of the same kind.
- **Drag and drop** onto a track, into the grid, or into a rack chain.
+ - A **loop** dropped on the arrangement warps to the project tempo from its known tempo
+ (⋮ → Warp loops to project tempo, on by default); a **one-shot** is never warped. With
+ ⋮ → **Transpose to project key**, a loop moves to the project key the shorter way
+ (±6 semitones, via the relative across major and minor).
- Dropping an effect onto Devices puts it between cards (an accent bar marks the spot) or
in place of the card under the pointer; effects and presets also drop onto a return
track or the master. While dragging over the arrangement, the target track is outlined
@@ -750,7 +764,7 @@ and user presets, automation, persistence and cloning.
filter chips in the header); favourited devices sort to the top of their section. The
chips keep to one line — whatever does not fit collapses into a **+N** that opens the rest.
- **Context menus**: Projects — Open / Reveal in Finder / Delete (to the Trash, with
- confirmation); Files — Reveal in Finder; Presets — Reveal in Finder.
+ confirmation); Files — Show similar sounds / Reveal in Finder; Presets — Reveal in Finder.
- **Hints for empty tabs** — explaining what the tab is and how to add content to it.
---
@@ -867,6 +881,8 @@ Coverage:
- **AI models**: `list_ai_models` (installed or not), `separate_stems` (a clip → a group of
Drums / Bass / Other / Vocals tracks), `convert_audio_to_midi` (melody or harmony with
basic-pitch → a new MIDI track). Installing models stays with the user.
+- **Sample library**: `search_samples` (kind, BPM range, key, words in the path),
+ `get_sample_info`, `find_similar_samples`, `get_project_key` / `set_project_key`.
- **MIDI devices and MIDI Learn over MCP**: list connected MIDI inputs, toggle listening,
survey the controller's CCs and notes, view and edit bindings (range, inversion,
deletion), and enter learn mode.