Skip to content

Share a Project

Your code travels with a project; a kit from your own library does not. These steps bring the sounds a piece uses into the project, or record the ones that must stay outside it. Why only some kits travel: What travels with a project.

Play the piece. The first time it loads a kit from outside the project that the project does not list, resonon warns once:

Warning: Kit 'my-breaks' lives outside this project:
/Users/you/.resonon/kits/my-breaks
It will not be there on another machine. To bring it in:
resonon collect my-breaks

In VSCode, the kit name is marked as you type it, with the same message on hover. The quick fix on that line offers both of the next two steps: Copy ‘my-breaks’ into this project and List ‘my-breaks’ under [local] in resonon.toml.

Kits in the project, kits from a package in resonon.toml, and the kits that ship with resonon are never marked: they travel already. A kit name your code computes — Kit(chosen) — cannot be marked; list it yourself, as below.

Terminal window
resonon collect my-breaks

The kit is copied into <project>/kits/, and listed under [local] in resonon.toml. Your code does not change: the project’s kits/ is searched first, so Kit("my-breaks") now finds the copy.

Running it again on a kit that is already in the project changes nothing. To take a fresh copy after you changed the original, delete <project>/kits/my-breaks and collect it again.

collect refuses a kit from a package — resonon install brings that one back — and a kit whose kit.toml points outside its own folder.

For a kit too large to send, or one you may not give away, add its name under [local] in resonon.toml:

[local]
kits = [
"my-breaks",
"field-recordings",
]

The warning stops. On a machine without the kit, the piece now stops with a message that says the project needs it, and who to ask:

Kit 'my-breaks' is listed under [local] in resonon.toml — this project depends on
it from outside itself — but it is not on this machine.
If you have it elsewhere, put it in <project>/kits; if not, ask whoever sent you
this project for it. `resonon kits list` shows everything this project depends on.
Searched:
…
Terminal window
resonon collect

With no name, collect works through every kit under [local]. It copies each one it finds on this machine, names each one it cannot find, and leaves the list as it is — so a kit you delete from kits/ later can be collected again from the same entry.

Terminal window
resonon kits list
Kits this project depends on from outside it:
Old-808 missing ask whoever sent you this project
my-breaks in this project kits/my-breaks
tape-drums on this machine /Users/you/.resonon/kits/tape-drums
→ resonon collect tape-drums
This project's own kits, in kits/ — they travel, and need no entry:
claps
StandingWhat to do
in this projectNothing: it travels.
on this machineresonon collect <name>
missingGet it from whoever sent you the project.
travels anywayNothing, but the entry is not needed: it is a package’s kit or one that ships with resonon.

Open resonon.toml in VSCode and each [local] entry shows its standing at the end of the line.

Terminal window
resonon kits remove Old-808

It takes the entry out of resonon.toml and leaves the kit’s files where they are. The quick fix on the entry in VSCode does the same.

  1. Play the piece, and note every kit resonon warns about.
  2. Run resonon collect.
  3. Run resonon kits list. A kit that is still missing is missing for the person you send it to, too.
  4. Zip the project folder. You can leave out dependencies/: resonon install restores it from resonon.toml and resonon.lock.

To share a kit with everyone rather than send it with one project, make it a package — see Publish a Package.