Creating a Module Library
Learn how to build, organize, and maintain a personal library of reusable modules.
Why Build a Module Library?
A well-organized module library lets you:
- Reuse patterns: Save common chord progressions, scales, or rhythms
- Experiment faster: Start from templates instead of scratch
- Share work: Export modules for others to use
- Learn: Study interesting modules you create or collect
Module Library Structure
Modules are organized in the Module Bar by category:
Module Bar
├── Category 1
│ ├── Module A
│ ├── Module B
│ └── Module C
├── Category 2
│ └── Module D
└── Category 3
├── Module E
└── Module FCreating Your First Module
Step 1: Build the Composition
Create notes with the patterns you want to save:
// Example: Major Triad module
// Root
frequency: module.baseNote.getVariable('frequency')
startTime: new Fraction(0)
duration: new Fraction(1)
// Major Third
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(5, 4))
startTime: module.getNoteById(1).getVariable('startTime')
duration: module.getNoteById(1).getVariable('duration')
// Perfect Fifth
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(3, 2))
startTime: module.getNoteById(1).getVariable('startTime')
duration: module.getNoteById(1).getVariable('duration')Step 2: Save the Module
- Click File in the top bar
- Select Save Module
- Enter a descriptive name: "Major Triad (Just)"
- Choose or create a category
- Click Save
Step 3: Test the Module
- Clear the workspace
- Open the Module Bar
- Find your saved module
- Drag it onto the workspace
- Verify all notes and dependencies load correctly
Organizing Categories
Suggested Category Structure
Scales
├── Major Scales
├── Minor Scales
├── Modes
├── Pentatonic
└── Microtonal
Chords
├── Triads
├── Seventh Chords
├── Extended
└── Clusters
Progressions
├── Jazz
├── Classical
├── Pop
└── Custom
Rhythms
├── Basic
├── Syncopated
└── Polyrhythmic
TET Systems
├── 12-TET
├── 19-TET
├── 31-TET
└── Bohlen-Pierce
Templates
├── Song Structures
├── Accompaniment
└── Solo FrameworksCreating a New Category
- Open Module Bar settings
- Click Add Category
- Enter category name
- Drag modules into the new category
Building Useful Templates
Scale Template
Create a reusable scale that can be transposed:
// All notes depend on BaseNote.frequency
// Transposing is as simple as changing BaseNote
// Note 1: Root (unison)
frequency: module.baseNote.getVariable('frequency')
// Note 2: Second
frequency: module.baseNote.getVariable('frequency').mul(new Fraction(9, 8))
// Note 3: Third
frequency: module.baseNote.getVariable('frequency').mul(new Fraction(5, 4))
// ... continue for full scaleWhy this works: Changing BaseNote's frequency transposes the entire scale.
Chord Progression Template
// Chord 1: I (root position)
// Notes 1-3: Triad based on BaseNote
// Chord 2: IV (subdominant)
// Notes 4-6: Triad based on 4/3 × BaseNote.frequency
// Chord 3: V (dominant)
// Notes 7-9: Triad based on 3/2 × BaseNote.frequency
// Chord 4: I (return to tonic)
// Notes 10-12: Copy of Chord 1 structureRhythm Template
// Create beat references that other notes can follow
// Beat 1 marker
startTime: new Fraction(0)
duration: new Fraction(60).div(module.findTempo(module.baseNote))
// Beat 2 marker
startTime: module.getNoteById(1).getVariable('startTime')
.add(module.getNoteById(1).getVariable('duration'))
duration: new Fraction(60).div(module.findTempo(module.baseNote))
// ... continue for full measureBest Practices for Module Design
1. Use BaseNote as the Root
Always reference BaseNote for primary values:
// Good: Inherits from BaseNote (easy to customize)
frequency: module.baseNote.getVariable('frequency').mul(...)
// Less flexible: Hard-coded value
frequency: new Fraction(440).mul(...)2. Create Self-Contained Dependencies
Modules should work independently:
// Good: Note 2 depends on Note 1 within the same module
frequency: module.getNoteById(1).getVariable('frequency').mul(...)
// Problematic: Depends on external note ID that may not exist
frequency: module.getNoteById(50).getVariable('frequency').mul(...)3. Document Complex Modules
Add a description when saving:
- What the module does
- How to customize it
- Any special notes
4. Test Before Saving
- Play through the module
- Try changing BaseNote values
- Verify all dependencies update correctly
Combining Modules
Drag and Drop
You can load multiple modules into one workspace:
- Drag Module A onto workspace
- Drag Module B onto workspace
- Both coexist (note IDs are reassigned to avoid conflicts)
Connecting Modules
After loading multiple modules, create dependencies between them:
// Module A's note
frequency: module.baseNote.getVariable('frequency') // ID assigned: 1
// Module B's note (wants to follow Module A)
// After B loads, find its new ID (e.g., 5)
// Edit to reference Module A's note:
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(3, 2))Exporting and Sharing
Export a Module
- Right-click the module in the Module Bar
- Select Export
- Save the
.jsonfile
Import a Module
- Click File → Import Module
- Select the
.jsonfile - Choose a category
- The module appears in your library
Module File Format
Modules are saved as JSON:
{
"name": "Major Triad (Just)",
"baseNote": {
"frequency": "new Fraction(440)",
"startTime": "new Fraction(0)",
"duration": "new Fraction(1)"
},
"notes": [
{
"id": 1,
"frequency": "module.baseNote.getVariable('frequency')",
"startTime": "new Fraction(0)",
"duration": "new Fraction(1)"
}
]
}Module Maintenance
Updating a Module
- Load the module
- Make changes
- Save with the same name (overwrites)
Versioning
For significant changes, consider saving as a new module:
- "Major Scale v1"
- "Major Scale v2 (with rhythm)"
Cleaning Up
Periodically review your library:
- Remove duplicates
- Consolidate similar modules
- Update outdated patterns
Example: Building a Complete Library
Day 1: Basic Intervals
Create modules for each pure interval:
- Unison (1/1)
- Minor Second (16/15)
- Major Second (9/8)
- Minor Third (6/5)
- Major Third (5/4)
- Perfect Fourth (4/3)
- Tritone (45/32)
- Perfect Fifth (3/2)
- Minor Sixth (8/5)
- Major Sixth (5/3)
- Minor Seventh (9/5)
- Major Seventh (15/8)
- Octave (2/1)
Day 2: Triads
- Major Triad (1, 5/4, 3/2)
- Minor Triad (1, 6/5, 3/2)
- Diminished Triad (1, 6/5, 64/45)
- Augmented Triad (1, 5/4, 25/16)
Day 3: Seventh Chords
- Major 7th
- Dominant 7th
- Minor 7th
- Half-Diminished 7th
- Fully Diminished 7th
Day 4: Scales
- Major Scale (all modes)
- Natural Minor Scale
- Harmonic Minor Scale
- Pentatonic Scales
Day 5: TET Systems
- 12-TET Chromatic Scale
- 19-TET Scale
- 31-TET Scale
- Bohlen-Pierce Scale
Tips for Library Growth
1. Save Early, Save Often
Don't wait until something is perfect. Save works-in-progress.
2. Name Descriptively
"Chord 1" → "Major 7th (Root Position, Just)"
3. Group Related Modules
Keep inversions together, related progressions together, etc.
4. Experiment
Your library should grow from exploration. Save interesting accidents!
Next Steps
- Interval Exploration - Systematically study intervals
- Microtonal Experiments - Build a microtonal collection
- Module Format Reference - Technical module details