Saving Modules
Learn how to export your compositions as reusable module files.
Saving Your Work
Quick Save
- Click the Menu (☰) in the top bar
- Click Save Module
- A JSON file downloads to your computer
The filename includes a timestamp (e.g., module-2024-01-15-143022.json).
What Gets Saved
When you save a module, the JSON file contains:
| Component | Description |
|---|---|
| baseNote | BaseNote properties (frequency, tempo, etc.) |
| notes | All notes with their expressions |
| measures | Measure bar positions (if any) |
Expressions Are Preserved
The raw expressions are saved, not evaluated values:
{
"frequency": "module.baseNote.getVariable('frequency').mul(new Fraction(3, 2))"
}This means:
- Dependencies are preserved
- Loading in a different context works correctly
- Changing BaseNote after loading affects all notes
File Location
The saved file goes to your browser's default download location:
- Windows: Usually
Downloadsfolder - macOS: Usually
Downloadsfolder - Linux: Usually
~/Downloads
Adding to Module Bar
To make your module appear in the Module Bar:
Method 1: UI Upload
- Open the Module Bar
- Find the category where you want the module
- Click the + placeholder
- Select your saved JSON file
- The module appears in that category
Method 2: Manual Installation (Local Development)
Copy your JSON file to a category folder:
public/modules/custom/my-module.jsonEdit the category's
index.json:json{ "custom": [ { "file": "my-module.json", "label": "My Module" } ] }Restart the dev server or refresh
Best Practices
Naming
Choose descriptive names for your modules:
- ✓
major-seventh-chord.json - ✓
chromatic-melody-dmaj.json - ✗
test.json - ✗
asdfasdf.json
Organization
Keep modules organized:
- Use categories meaningfully
- Group related modules together
- Delete old/unused modules
Documentation
Consider adding comments in your module (JSON doesn't support comments, but you can add a _description field):
{
"_description": "A major seventh chord in just intonation",
"baseNote": { ... },
"notes": [ ... ]
}Sharing Modules
Modules are portable JSON files that can be shared:
Email
Attach the JSON file to an email.
Cloud Storage
Upload to Google Drive, Dropbox, etc., and share the link.
GitHub
Create a repository of your modules for public sharing.
Direct Loading
Recipients can load your module via:
- Menu > Load Module > Load from file
- Or add to their Module Bar
No special software or account required - just the JSON file!
Versioning
For modules you iterate on:
- Save with version numbers:
my-song-v1.json,my-song-v2.json - Keep backups: Don't overwrite previous versions
- Use git: Version control for serious module development
Export vs Save UI
| Feature | Save Module | Save UI |
|---|---|---|
| Saves | Current composition | Module Bar layout |
| Format | Single module JSON | UI state JSON |
| Use case | Share/archive a piece | Preserve your library organization |
Save Module: Exports what's in the workspace. Save UI: Exports your Module Bar organization.
Tips
- Save frequently - There's no auto-save
- Use descriptive names - You'll thank yourself later
- Keep backups - Especially for important compositions
- Test after saving - Load the file to verify it works
- Simplify before sharing - Use "Evaluate to BaseNote" to reduce dependencies