@hraness/dawg 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -0
- package/DAWG.md +293 -31
- package/README.md +4 -4
- package/core/chords.ts +288 -7
- package/core/diff.ts +37 -12
- package/core/expression.ts +1241 -0
- package/core/loop.ts +23 -0
- package/core/master.ts +455 -0
- package/core/midi.ts +452 -0
- package/core/rhythm.ts +7 -2
- package/core/score.ts +536 -56
- package/core/sdk/eval-child.ts +38 -3
- package/core/sdk/print.ts +445 -14
- package/core/sdk/v1.ts +1709 -23
- package/core/sections.ts +2046 -0
- package/core/synth.ts +11 -1
- package/core/tempo.ts +1318 -0
- package/core/tuning.ts +1180 -0
- package/guides/audition.md +26 -0
- package/guides/automation.md +26 -0
- package/guides/chords.md +28 -0
- package/guides/effects.md +27 -0
- package/guides/faders.md +29 -0
- package/guides/files.md +28 -0
- package/guides/getting-started.md +26 -0
- package/guides/index.ts +75 -0
- package/guides/keys.md +27 -0
- package/guides/media.md +27 -0
- package/guides/mix.md +23 -0
- package/guides/music.md +14 -0
- package/guides/notes.md +26 -0
- package/guides/performance.md +26 -0
- package/guides/play.md +24 -0
- package/guides/project.md +13 -0
- package/guides/providers.md +25 -0
- package/guides/rhythm.md +26 -0
- package/guides/sessions.md +21 -0
- package/guides/sound.md +15 -0
- package/guides/sounds.md +25 -0
- package/guides/tempo.md +26 -0
- package/guides/tracks.md +25 -0
- package/guides/web-search.md +21 -0
- package/package.json +3 -1
- package/src/agent/agent.ts +2 -0
- package/src/agent/brief.ts +77 -3
- package/src/agent/chord-tools.ts +9 -1
- package/src/agent/expression-tools.ts +336 -0
- package/src/agent/master-tools.ts +299 -0
- package/src/agent/models.ts +4 -4
- package/src/agent/ops.ts +29 -4
- package/src/agent/planner.ts +45 -2
- package/src/agent/preview-tool.ts +21 -3
- package/src/agent/section-tools.ts +411 -0
- package/src/agent/time-tools.ts +290 -0
- package/src/agent/tools.ts +36 -2
- package/src/agent/tuning-tools.ts +301 -0
- package/src/agent/xcb-agent.ts +2 -0
- package/src/audio/arrange.ts +471 -0
- package/src/audio/audition.ts +16 -3
- package/src/audio/click.ts +113 -1
- package/src/audio/clock.ts +71 -5
- package/src/audio/effects/bus.ts +5 -4
- package/src/audio/effects/common.ts +30 -1
- package/src/audio/effects/dynamics.ts +2 -1
- package/src/audio/effects/filter.ts +5 -3
- package/src/audio/effects/modulation.ts +5 -1
- package/src/audio/effects/space.ts +92 -2
- package/src/audio/engine.ts +90 -20
- package/src/audio/live.ts +33 -6
- package/src/audio/loudness.ts +551 -0
- package/src/audio/master.ts +660 -0
- package/src/audio/measure-worker.ts +45 -0
- package/src/audio/measure.ts +110 -0
- package/src/audio/player.ts +11 -6
- package/src/audio/preview.ts +74 -14
- package/src/audio/render-worker.ts +6 -1
- package/src/audio/renderer.ts +7 -1
- package/src/audio/sampler.ts +108 -19
- package/src/audio/synth/voice.ts +60 -13
- package/src/audio/synth/zzfx.ts +10 -4
- package/src/audio/warp.ts +86 -0
- package/src/audio/wav.ts +301 -26
- package/src/commands/arrange.ts +949 -0
- package/src/commands/expression.ts +934 -0
- package/src/commands/help.ts +281 -24
- package/src/commands/master.ts +361 -0
- package/src/commands/music.ts +6 -1
- package/src/commands/synth.ts +11 -1
- package/src/commands/time.ts +964 -0
- package/src/commands/tuning.ts +490 -0
- package/src/main.ts +709 -33
- package/src/render.ts +109 -7
- package/src/session/daemon.ts +18 -8
- package/src/session/naming.ts +8 -1
- package/src/session/rebase.ts +21 -0
- package/src/tui/arrange-menu.ts +390 -0
- package/src/tui/audition.ts +38 -5
- package/src/tui/fader.ts +409 -0
- package/src/tui/menu-time.ts +401 -0
- package/src/tui/menu.ts +635 -14
- package/src/tui/performance-menu.ts +235 -0
- package/src/tui/play-chords.ts +3 -1
- package/src/tui/play-mode.ts +150 -6
- package/src/tui/play-session.ts +414 -41
- package/tui/app.ts +262 -13
- package/tui/arrange-strip.ts +174 -0
- package/tui/drawer.ts +478 -0
- package/tui/grammar.ts +63 -1
- package/tui/guide.ts +351 -0
- package/tui/highway.ts +87 -4
- package/tui/hits.ts +68 -0
- package/tui/input.ts +7 -0
- package/tui/keys.ts +72 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: audition
|
|
3
|
+
title: Menu and audition loop
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 5
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Ctrl-K (or `/menu`) holds every edit the agent can make. Each row shows
|
|
9
|
+
its value and, dimmed, the command it runs, so the menu teaches commands.
|
|
10
|
+
|
|
11
|
+
## Menu keys
|
|
12
|
+
|
|
13
|
+
- ↑↓ move · → or Enter open · ←→ adjust a value
|
|
14
|
+
- Enter on a number opens its fader drawer (see Faders and the mouse)
|
|
15
|
+
- `x` reset · `/` filter · Esc back
|
|
16
|
+
- `/menu effects` opens a section (sound effects rhythm chords mix project)
|
|
17
|
+
|
|
18
|
+
## Audition loop
|
|
19
|
+
|
|
20
|
+
- Space loops the focused track; changes are staged, not kept
|
|
21
|
+
- `a` A/B: committed sound against staged · `c` solo or in context
|
|
22
|
+
- Enter keeps every staged change as one undo step · Esc reverts
|
|
23
|
+
|
|
24
|
+
## Try a command
|
|
25
|
+
|
|
26
|
+
- `/try fx reverb mix 0.6` · `/try synth lpf 800` stage on the loop
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: automation
|
|
3
|
+
title: Automation
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A lane moves a value over beats. Every numeric effect parameter has one.
|
|
9
|
+
|
|
10
|
+
## Ask
|
|
11
|
+
|
|
12
|
+
- "fade the pad in over the first four bars"
|
|
13
|
+
- "open the filter slowly across the loop"
|
|
14
|
+
|
|
15
|
+
## Type it yourself
|
|
16
|
+
|
|
17
|
+
- `automate volume at 0 0.2` · `automate volume at 4 1`
|
|
18
|
+
- `automate filter points 0:400 4:6000` several points at once
|
|
19
|
+
- `automate pan at 0 -1` · `automate delay-mix at 4 0`
|
|
20
|
+
- `automate distort-drive points 0:1 8:6`
|
|
21
|
+
- `automate filter remove 4` delete one point
|
|
22
|
+
- `clear filter automation` · `clear automation`
|
|
23
|
+
|
|
24
|
+
## Menu
|
|
25
|
+
|
|
26
|
+
- Ctrl-K › Mix › automation: each lane, add points, ramp, clear lane
|
package/guides/chords.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: chords
|
|
3
|
+
title: Chords
|
|
4
|
+
parent: music
|
|
5
|
+
order: 4
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Ask
|
|
9
|
+
|
|
10
|
+
- "write a sad pop progression in A minor, two beats per chord"
|
|
11
|
+
- "arpeggiate the chords upward over two octaves"
|
|
12
|
+
|
|
13
|
+
## Play them
|
|
14
|
+
|
|
15
|
+
- `key A minor` then Ctrl-P, `q`: every key plays a chord in the key
|
|
16
|
+
- `1 2 3 4` dim min maj sus · `5 6 7 8` add 6, m7, M7, 9
|
|
17
|
+
- `- =` voicing down / up · `9` perform mode · `b` bass mode
|
|
18
|
+
- `n` play the suggested next chord · `0` clear the latches
|
|
19
|
+
|
|
20
|
+
## Type it yourself
|
|
21
|
+
|
|
22
|
+
- `/chords auto` · `/chords manual` · `/chords off`
|
|
23
|
+
- `/chords voicing 2` · `/chords spread wide` · `/chords bass chords`
|
|
24
|
+
- `/chords perform arp-up` · `/chords sevenths on` · `/chords`
|
|
25
|
+
|
|
26
|
+
## Menu
|
|
27
|
+
|
|
28
|
+
- Ctrl-K › Chords: key, voicing, bass, perform, progression, style
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: effects
|
|
3
|
+
title: Effects
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Chain: filter, auto filter, distortion, tremolo, compressor, pan,
|
|
9
|
+
chorus, delay, reverb, and more (phaser, bitcrush, vowel, leslie).
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "add a dub delay to the snare" · "more room on the keys"
|
|
14
|
+
|
|
15
|
+
## Type it yourself
|
|
16
|
+
|
|
17
|
+
- `fx` list the focused track's effects
|
|
18
|
+
- `fx delay mix 0.3` · `fx filter type hpf cutoff 300`
|
|
19
|
+
- `fx distort drive 4 tone 5000` · `fx reverb ir hall`
|
|
20
|
+
- `fx chorus on` · `fx chorus off` · `fx chorus reset`
|
|
21
|
+
- `fx compressor preset <name>` load a preset
|
|
22
|
+
- `filter 1200 0.6` · `delay 0.375 0.3` · `reverb 0.4 0.8` · `filter off`
|
|
23
|
+
|
|
24
|
+
## Menu
|
|
25
|
+
|
|
26
|
+
- Ctrl-K › Effects: core effects first, then more effects, advanced
|
|
27
|
+
- `fx filter` alone opens the filter's faders, stacked
|
package/guides/faders.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: faders
|
|
3
|
+
title: Faders and the mouse
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A fader drawer opens above the prompt to edit a value; the piano roll
|
|
9
|
+
stays visible above it. Edits are staged and heard on the loop.
|
|
10
|
+
|
|
11
|
+
## Open one
|
|
12
|
+
|
|
13
|
+
- `volume` · `pan` · `fx filter` · `fx reverb mix` (no value)
|
|
14
|
+
- Ctrl-K, then Enter on a number row · or click it twice
|
|
15
|
+
|
|
16
|
+
## Keys
|
|
17
|
+
|
|
18
|
+
- ←→ or `-` `+` step · Shift-←→ coarse · `[` `]` fine · PgUp PgDn big
|
|
19
|
+
- Home End min max · digits type a value · `0` or `d` default
|
|
20
|
+
- ↑↓ or Tab move between the device's params
|
|
21
|
+
- Enter keeps all as one undo step · Esc reverts · `?` all keys
|
|
22
|
+
|
|
23
|
+
## Mouse
|
|
24
|
+
|
|
25
|
+
- Click [−] [+] · click or drag the bar · wheel over a fader
|
|
26
|
+
- Click an option to choose it · [keep] [revert] in the title
|
|
27
|
+
- Click a list row to select, again to open · wheel scrolls lists
|
|
28
|
+
- Click ▶/⏸ BPM to play · the track name lists tracks · the model
|
|
29
|
+
- `dawg --no-mouse` or `DAWG_MOUSE=0` turns the mouse off
|
package/guides/files.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: files
|
|
3
|
+
title: Project files and SDK
|
|
4
|
+
parent: project
|
|
5
|
+
order: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
`dawg init` writes `song.ts` and one `tracks/<slug>/track.ts` per track.
|
|
9
|
+
Edit them in any editor; every open window picks up the change.
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "rewrite the drums in track.ts with a euclid kick"
|
|
14
|
+
|
|
15
|
+
## Shell
|
|
16
|
+
|
|
17
|
+
- `dawg init` · `dawg check` typecheck and evaluate, exit 1 on problems
|
|
18
|
+
- `dawg render out.wav` render the song to a WAV file
|
|
19
|
+
|
|
20
|
+
## In a track.ts
|
|
21
|
+
|
|
22
|
+
- `import { track, note, euclid, chord } from "dawg"`
|
|
23
|
+
- `notes: [note("C4", 0, 1), ...chord("Am7", 4, 4)]`
|
|
24
|
+
- `rhythm: [euclid("kick", 4, 16)]`
|
|
25
|
+
|
|
26
|
+
## In the app
|
|
27
|
+
|
|
28
|
+
- `/export loop.track.json` · `/import loop.track.json`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: getting-started
|
|
3
|
+
title: Getting started
|
|
4
|
+
order: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Run `dawg` in a folder. The highway shows notes; the prompt is below it.
|
|
8
|
+
There are three ways in: ask, play, or open the menu.
|
|
9
|
+
|
|
10
|
+
## Ask
|
|
11
|
+
|
|
12
|
+
- "make a four bar lo-fi loop at 85 bpm"
|
|
13
|
+
- "add a bass line under the chords"
|
|
14
|
+
|
|
15
|
+
## Type it yourself
|
|
16
|
+
|
|
17
|
+
- `add C4 at 0 for 1` one note on beat 0, one beat long
|
|
18
|
+
- `tempo 120` · `bars 8` · `play` · `pause`
|
|
19
|
+
- Space on an empty prompt plays and pauses
|
|
20
|
+
- `undo` · `redo` (Ctrl-Z · Ctrl-Y)
|
|
21
|
+
|
|
22
|
+
## Next
|
|
23
|
+
|
|
24
|
+
- Ctrl-P plays notes on the keyboard, Ctrl-K opens the menu
|
|
25
|
+
- `?` shows the keys for the screen you are on
|
|
26
|
+
- `/help` lists commands, `/guide` opens these guides
|
package/guides/index.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The user guides: one Markdown file per feature in this directory, each with
|
|
3
|
+
* a tiny frontmatter block (`id`, `title`, `order`, optional `parent`). The
|
|
4
|
+
* TUI's `/guide` pane and the dawg.sh docs render the same files.
|
|
5
|
+
*
|
|
6
|
+
* Only `node:fs`, `node:path` and `node:url`, so the site can import it too:
|
|
7
|
+
* `listGuides(join(process.cwd(), "..", "guides"))`.
|
|
8
|
+
*/
|
|
9
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { fileURLToPath } from "node:url";
|
|
12
|
+
|
|
13
|
+
export interface Guide {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
/** The parent guide's id; undefined for a top-level guide. */
|
|
17
|
+
parent: string | undefined;
|
|
18
|
+
/** Position among its siblings, smallest first. */
|
|
19
|
+
order: number;
|
|
20
|
+
/** Markdown after the frontmatter, without leading or trailing blank lines. */
|
|
21
|
+
body: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** This directory, where the `.md` guides live next to this file. */
|
|
25
|
+
export const GUIDES_DIR = fileURLToPath(new URL(".", import.meta.url));
|
|
26
|
+
|
|
27
|
+
/** Parse one guide file; throws with the file name on a malformed header. */
|
|
28
|
+
export function parseGuide(text: string, file = "guide"): Guide {
|
|
29
|
+
const match = text
|
|
30
|
+
.replace(/\r\n/g, "\n")
|
|
31
|
+
.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
32
|
+
if (!match) throw new Error(`${file}: missing frontmatter`);
|
|
33
|
+
const fields = new Map<string, string>();
|
|
34
|
+
for (const line of match[1]!.split("\n")) {
|
|
35
|
+
const field = line.match(/^([a-z]+):\s*(.*)$/);
|
|
36
|
+
if (!field) throw new Error(`${file}: bad frontmatter line "${line}"`);
|
|
37
|
+
fields.set(field[1]!, field[2]!.trim());
|
|
38
|
+
}
|
|
39
|
+
const id = fields.get("id");
|
|
40
|
+
const title = fields.get("title");
|
|
41
|
+
const order = Number(fields.get("order"));
|
|
42
|
+
if (!id || !/^[a-z0-9-]+$/.test(id)) throw new Error(`${file}: bad id`);
|
|
43
|
+
if (!title) throw new Error(`${file}: missing title`);
|
|
44
|
+
if (!Number.isFinite(order)) throw new Error(`${file}: bad order`);
|
|
45
|
+
return {
|
|
46
|
+
id,
|
|
47
|
+
title,
|
|
48
|
+
parent: fields.get("parent") || undefined,
|
|
49
|
+
order,
|
|
50
|
+
body: match[2]!.replace(/^\n+|\s+$/g, ""),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Every guide in tree order: each top-level guide by `order`, followed by its
|
|
56
|
+
* children by `order` (depth first).
|
|
57
|
+
*/
|
|
58
|
+
export function listGuides(dir: string = GUIDES_DIR): Guide[] {
|
|
59
|
+
const guides = readdirSync(dir)
|
|
60
|
+
.filter((name) => name.endsWith(".md"))
|
|
61
|
+
.map((name) => parseGuide(readFileSync(join(dir, name), "utf8"), name));
|
|
62
|
+
const byOrder = (a: Guide, b: Guide) =>
|
|
63
|
+
a.order - b.order || a.id.localeCompare(b.id);
|
|
64
|
+
const out: Guide[] = [];
|
|
65
|
+
const visit = (parent: string | undefined) => {
|
|
66
|
+
for (const guide of guides
|
|
67
|
+
.filter((g) => g.parent === parent)
|
|
68
|
+
.sort(byOrder)) {
|
|
69
|
+
out.push(guide);
|
|
70
|
+
visit(guide.id);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
visit(undefined);
|
|
74
|
+
return out;
|
|
75
|
+
}
|
package/guides/keys.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: keys
|
|
3
|
+
title: Keys
|
|
4
|
+
order: 5
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
`?` shows the keys for the screen you are on; any key closes it.
|
|
8
|
+
|
|
9
|
+
## Prompt
|
|
10
|
+
|
|
11
|
+
- Enter send · Shift-Enter new line · Alt-Enter queue · Ctrl-Q queue mode
|
|
12
|
+
- Space play / pause (empty prompt) · Esc cancel or close
|
|
13
|
+
- Ctrl-Z undo · Ctrl-Y redo · Ctrl-O transcript · Ctrl-L redraw
|
|
14
|
+
- Ctrl-P play mode · Ctrl-K menu · F1 guides · Ctrl-C exit
|
|
15
|
+
|
|
16
|
+
## Lists, menus and guides
|
|
17
|
+
|
|
18
|
+
- ↑↓ or `j` `k` move · Enter choose · `/` filter · Esc back
|
|
19
|
+
|
|
20
|
+
## Mouse
|
|
21
|
+
|
|
22
|
+
- Click rows, header pills, faders · wheel scrolls · `--no-mouse`
|
|
23
|
+
|
|
24
|
+
## Window
|
|
25
|
+
|
|
26
|
+
- `/theme default|high-contrast|mono` · `/motion off`
|
|
27
|
+
- `/help` · `/help all` · `/help keys` · `/guide keys`
|
package/guides/media.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: media
|
|
3
|
+
title: Samples and media tools
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Downloads land in `tracks/<slug>/downloads/`. A missing
|
|
9
|
+
helper is reported with its install command; `dawg media doctor` checks.
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "download <youtube url> and split it into stems"
|
|
14
|
+
- "transcribe the bass stem into notes" · "make a sample of the hook"
|
|
15
|
+
|
|
16
|
+
## Shell
|
|
17
|
+
|
|
18
|
+
- `dawg media download <url> --name hook`
|
|
19
|
+
- `dawg media stems <file>` vocals drums bass guitar piano other
|
|
20
|
+
- `dawg media analyze <file>` tempo, key, beat grid
|
|
21
|
+
- `dawg media notes <file> --kind bass` notes as SDK code
|
|
22
|
+
- `dawg media sample <file> hook --begin 0.2 --end 0.3`
|
|
23
|
+
- `dawg media wavetable <file> vox` · `dawg media lyrics <file>`
|
|
24
|
+
|
|
25
|
+
## In the app
|
|
26
|
+
|
|
27
|
+
- `/sample <path> as <voice>` · `/sample` lists the voices
|
package/guides/mix.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mix
|
|
3
|
+
title: Mix
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 4
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Ask
|
|
9
|
+
|
|
10
|
+
- "turn the hats down and pan them right"
|
|
11
|
+
- "sidechain the bass to the kick"
|
|
12
|
+
|
|
13
|
+
## Type it yourself
|
|
14
|
+
|
|
15
|
+
- `volume 0.7` (0..1) · `pan -0.4` (-1..1)
|
|
16
|
+
- `mute` · `unmute` · `solo` · `unsolo`
|
|
17
|
+
- `fx orbit 2` send to a bus · `fx orbit shared on` shared reverb
|
|
18
|
+
- `fx duck preset pump` on the kick: it ducks the other tracks
|
|
19
|
+
|
|
20
|
+
## Menu
|
|
21
|
+
|
|
22
|
+
- Ctrl-K › Mix: name, mute, solo, volume, pan, all tracks
|
|
23
|
+
- `volume` or `pan` alone opens a fader to drag or step
|
package/guides/music.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: music
|
|
3
|
+
title: Writing music
|
|
4
|
+
order: 2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Tracks hold instruments and notes. Each guide below shows what to ask
|
|
8
|
+
the agent and the command, key or menu row that does the same by hand.
|
|
9
|
+
|
|
10
|
+
- Tracks and instruments
|
|
11
|
+
- Notes and the highway
|
|
12
|
+
- Play mode
|
|
13
|
+
- Chords
|
|
14
|
+
- Rhythm and drums
|
package/guides/notes.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: notes
|
|
3
|
+
title: Notes and the highway
|
|
4
|
+
parent: music
|
|
5
|
+
order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Notes stream toward the hit line; sustains stretch across beats.
|
|
9
|
+
Beats count from 0. Each note has an id shown in the receipt.
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "add a melody in the last two bars"
|
|
14
|
+
- "make the second note longer and quieter"
|
|
15
|
+
|
|
16
|
+
## Type it yourself
|
|
17
|
+
|
|
18
|
+
- `add E4 at 2 for 0.5` add a note
|
|
19
|
+
- `move <id> to 2.5` · `length <id> 0.25` · `velocity <id> 0.6`
|
|
20
|
+
- `remove <id>` delete one note
|
|
21
|
+
- `bars 8` · `extend 4 bars` loop length
|
|
22
|
+
|
|
23
|
+
## View
|
|
24
|
+
|
|
25
|
+
- `/view focus` one track · `/view all` every track
|
|
26
|
+
- Ctrl-O or `/transcript` the history of requests and edits
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: performance
|
|
3
|
+
title: Performance and expression
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 7
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
How notes are played: articulation, glides, bends, pedal and feel.
|
|
9
|
+
Targets are `all` (default), `bar 3`, `bars 2-4` or note ids.
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "make the bass slide like a 303" · "ghost the off-beat hats"
|
|
14
|
+
- "pedal the piano every bar" · "humanize the drums a little"
|
|
15
|
+
|
|
16
|
+
## Type it yourself
|
|
17
|
+
|
|
18
|
+
- `art staccato|legato|accent|tenuto|marcato|ghost [target]`
|
|
19
|
+
- `glide 60ms legato` per track · `glide 60ms bar 2` per note
|
|
20
|
+
- `bend scoop|fall|doit|-200 [target]` · `vibrato 5.5 30 0.2`
|
|
21
|
+
- `pedal 0-3.5 4-7.5` (beats) · `pedal bars` · `pedal off`
|
|
22
|
+
- `velcurve soft|hard|fixed 0.7` · `humanize 8 5 10 seed 3`
|
|
23
|
+
|
|
24
|
+
## Menu
|
|
25
|
+
|
|
26
|
+
- Ctrl-K › Sound › performance (`/menu performance`)
|
package/guides/play.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: play
|
|
3
|
+
title: Play mode
|
|
4
|
+
parent: music
|
|
5
|
+
order: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Ctrl-P (or `/play`) turns the computer keyboard into a piano for the
|
|
9
|
+
focused track. Esc (or `/play off`) leaves it.
|
|
10
|
+
|
|
11
|
+
## Keys
|
|
12
|
+
|
|
13
|
+
- `a s d f g h j k l ; '` white keys · `w e t y u o p` black keys
|
|
14
|
+
- `z` `x` octave down / up · `c` `v` velocity down / up
|
|
15
|
+
- Shift + note sustains · Tab sustain latch
|
|
16
|
+
- `r` record arm · `R` record replacing · Space play (counts in)
|
|
17
|
+
- `m` metronome click · `q` chord mode · `/` type a command
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
- `/click on` · `/click off` · `/click 40%` click volume
|
|
22
|
+
- `/count-in 2` bars of click before recording (0, 1 or 2)
|
|
23
|
+
- `/grid 1/16` record quantize (1/4 1/8 1/8T 1/16 1/16T 1/32)
|
|
24
|
+
- Ctrl-Z undoes one recorded bar
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: project
|
|
3
|
+
title: Projects and sessions
|
|
4
|
+
order: 4
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Everything is local in `.dawg`. A project adds plain TypeScript files
|
|
8
|
+
you and the agent can edit; windows on one folder stay in sync.
|
|
9
|
+
|
|
10
|
+
- Project files and SDK
|
|
11
|
+
- Sessions and windows
|
|
12
|
+
- Providers and models
|
|
13
|
+
- Web search
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: providers
|
|
3
|
+
title: Providers and models
|
|
4
|
+
parent: project
|
|
5
|
+
order: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Commands work offline. Plain requests go to the agent once a provider
|
|
9
|
+
is set: AI Gateway, OpenRouter, or a Codex or Claude subscription.
|
|
10
|
+
|
|
11
|
+
## Shell
|
|
12
|
+
|
|
13
|
+
- `dawg login` finds existing setups and lets you pick
|
|
14
|
+
- `dawg login gateway` · `openrouter` · `codex` · `claude`
|
|
15
|
+
- `dawg model` pick a model with the cost per prompt
|
|
16
|
+
- `dawg auth status --check` · `dawg logout`
|
|
17
|
+
|
|
18
|
+
## In the app
|
|
19
|
+
|
|
20
|
+
- `/login` · `/model` picker · `/model <alias>` · `/logout`
|
|
21
|
+
- `/auth --check` provider and audio status
|
|
22
|
+
|
|
23
|
+
## Environment
|
|
24
|
+
|
|
25
|
+
- `DAWG_PROVIDER=gateway` · `DAWG_MODEL=<alias>` · `DAWG_AI=0` no agent
|
package/guides/rhythm.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rhythm
|
|
3
|
+
title: Rhythm and drums
|
|
4
|
+
parent: music
|
|
5
|
+
order: 5
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Ask
|
|
9
|
+
|
|
10
|
+
- "give me a house beat" · "add a swung hat, seven hits in sixteen"
|
|
11
|
+
|
|
12
|
+
## Type it yourself
|
|
13
|
+
|
|
14
|
+
- `/pattern house` a starting groove · `/pattern` picker (previews)
|
|
15
|
+
- `/kit syn909` a drum kit · `/kit` picker
|
|
16
|
+
- `hit kick at 0` · `hit snare at 1 vel 0.7`
|
|
17
|
+
- `pattern kick 0 1 2 3` · `pattern hat every 0.5 from 0.25`
|
|
18
|
+
- `euclid hat 7 16 rotate 2` hits spread over steps
|
|
19
|
+
- `euclid hat swing 0.15` · `euclid hat off` · `euclid hat freeze`
|
|
20
|
+
- `grid snare ....X.......x...` explicit steps, X accents
|
|
21
|
+
- `clear hat` remove one voice
|
|
22
|
+
|
|
23
|
+
## Editor
|
|
24
|
+
|
|
25
|
+
- `/euclid` (Ctrl-K › Rhythm): ↑↓ voice, ←→ adjust, Tab field,
|
|
26
|
+
Space loop, `x` off, Esc back
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: sessions
|
|
3
|
+
title: Sessions and windows
|
|
4
|
+
parent: project
|
|
5
|
+
order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Open `dawg` in more than one terminal on the same folder: each window
|
|
9
|
+
focuses a different track and every edit syncs to all of them.
|
|
10
|
+
|
|
11
|
+
## Type it yourself
|
|
12
|
+
|
|
13
|
+
- `/sessions` list · `/resume` picker · `/resume 2` or a name
|
|
14
|
+
- `/rename night drive` · `/rename --auto` back to auto-naming
|
|
15
|
+
- `/fork` copy the session to try an idea · `/status`
|
|
16
|
+
- `/track bass` focus another track in this window
|
|
17
|
+
|
|
18
|
+
## Shell
|
|
19
|
+
|
|
20
|
+
- `dawg --new` new session · `dawg --session <name>` open one
|
|
21
|
+
- `dawg --track bass` start focused on a track · `dawg sessions`
|
package/guides/sound.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: sound
|
|
3
|
+
title: Shaping sound
|
|
4
|
+
order: 3
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Every track has an instrument, a fixed effects chain, automation lanes
|
|
8
|
+
and a place in the mix. Try changes on a loop before you keep them.
|
|
9
|
+
|
|
10
|
+
- Sounds and presets
|
|
11
|
+
- Effects
|
|
12
|
+
- Automation
|
|
13
|
+
- Mix
|
|
14
|
+
- Menu and audition loop
|
|
15
|
+
- Samples and media tools
|
package/guides/sounds.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: sounds
|
|
3
|
+
title: Sounds and presets
|
|
4
|
+
parent: sound
|
|
5
|
+
order: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Ask
|
|
9
|
+
|
|
10
|
+
- "make the lead brighter with a slow filter sweep"
|
|
11
|
+
- "find a 909 kick in a sample pack"
|
|
12
|
+
|
|
13
|
+
## Type it yourself
|
|
14
|
+
|
|
15
|
+
- `instrument sawtooth` · sine square triangle supersaw pulse
|
|
16
|
+
- `synth preset pluck` · pad lead bass acid keys bell organ strings
|
|
17
|
+
- `synth lpf 800 lpenv 3` any parameter · `synth adsr 0.01 0.2 0.5 0.3`
|
|
18
|
+
- `synth lpf off` · `synth reset` · `synth` lists what is set
|
|
19
|
+
- `wt list` tables · `wt pwm` load one · `wt 0.5` position
|
|
20
|
+
- `/pack list` · `/pack use <pack>/<sound> as kick` · `/pack info vcsl`
|
|
21
|
+
- `/sample samples/kick.wav as kick` add a sampler voice
|
|
22
|
+
|
|
23
|
+
## Menu
|
|
24
|
+
|
|
25
|
+
- Ctrl-K › Sound: instrument, preset, envelope, filter, browse sounds
|
package/guides/tempo.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: tempo
|
|
3
|
+
title: Tempo and meter
|
|
4
|
+
parent: music
|
|
5
|
+
order: 6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
One tempo map drives playback, the click, recording and MIDI export.
|
|
9
|
+
Positions are beats from 0 or `bar <n>`.
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "slow down to 80 over the last four bars"
|
|
14
|
+
- "switch to 7/8 at bar 5" · "hold the final chord"
|
|
15
|
+
|
|
16
|
+
## Type it yourself
|
|
17
|
+
|
|
18
|
+
- `tempo 90 at bar 9` step · add `ramp` or `exp` to glide into it
|
|
19
|
+
- `rit 4 bars to 80` · `accel 8 bars to 174 at bar 9`
|
|
20
|
+
- `fermata at 31 2` hold beat 31 for 2 extra beats
|
|
21
|
+
- `meter 7/8 at bar 5` · `tempo map` show it · `tempo clear`
|
|
22
|
+
- `track rate 3/2` · `track cycle 3` · `track phasing 3` · `track time off`
|
|
23
|
+
|
|
24
|
+
## Menu
|
|
25
|
+
|
|
26
|
+
- Ctrl-K › Project › Tempo & meter (`/menu tempo`)
|
package/guides/tracks.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: tracks
|
|
3
|
+
title: Tracks and instruments
|
|
4
|
+
parent: music
|
|
5
|
+
order: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Ask
|
|
9
|
+
|
|
10
|
+
- "add a pad track playing long chords"
|
|
11
|
+
- "make the lead a pluck and the bass a sub"
|
|
12
|
+
|
|
13
|
+
## Type it yourself
|
|
14
|
+
|
|
15
|
+
- `/track drums` focus a track, creating it (drums get the kit)
|
|
16
|
+
- `/tracks` list every track
|
|
17
|
+
- `track name lead` rename the focused track
|
|
18
|
+
- `instrument piano` · `instrument supersaw` · `instrument kit`
|
|
19
|
+
- `meter 3` beats per bar · `key A minor` · `key none`
|
|
20
|
+
- `clear` remove the focused track's notes
|
|
21
|
+
|
|
22
|
+
## Menu
|
|
23
|
+
|
|
24
|
+
- Ctrl-K › Sound › instrument
|
|
25
|
+
- Ctrl-K › Mix › all tracks (choosing one focuses it)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: web-search
|
|
3
|
+
title: Web search
|
|
4
|
+
parent: project
|
|
5
|
+
order: 4
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The agent can search the web and read public pages, for example to look
|
|
9
|
+
up a song's tempo or a chord chart. Fetches never reach private hosts.
|
|
10
|
+
|
|
11
|
+
## Ask
|
|
12
|
+
|
|
13
|
+
- "look up the tempo and key of Teardrop by Massive Attack"
|
|
14
|
+
- "read this page and copy its chord chart: <url>"
|
|
15
|
+
|
|
16
|
+
## Where results come from (first match wins)
|
|
17
|
+
|
|
18
|
+
- `DAWG_WEB_SEARCH=duckduckgo|openrouter|gateway|brave` pins one
|
|
19
|
+
- `BRAVE_SEARCH_API_KEY` set: Brave Search
|
|
20
|
+
- an AI Gateway key (Exa by default), then an OpenRouter key
|
|
21
|
+
- otherwise DuckDuckGo, with no key
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hraness/dawg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"core/sdk/**",
|
|
21
21
|
"tui/**/*.ts",
|
|
22
22
|
"!tui/**/*.test.ts",
|
|
23
|
+
"guides/*.md",
|
|
24
|
+
"guides/index.ts",
|
|
23
25
|
"CHANGELOG.md",
|
|
24
26
|
"DAWG.md"
|
|
25
27
|
],
|