-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add composition versions + some wavetable optimizations
* Add support for new compositions to be saved as a version of an old composition. This makes requests for the old composition resolve to the new one. * Backend support and migrations * Frontend support with dedicated button to save as new version (if editing an old version) * Optimize wavetable sampling codepaths to reduce lookups in the case of only having a single dimension * Some other fixes + refactoring
- Loading branch information
Showing
18 changed files
with
332 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
backend/migrations/2024-07-28-050006_composition-versions/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE compositions DROP COLUMN IF EXISTS composition_version; | ||
ALTER TABLE compositions DROP COLUMN IF EXISTS parent_id; |
4 changes: 4 additions & 0 deletions
4
backend/migrations/2024-07-28-050006_composition-versions/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE compositions ADD COLUMN IF NOT EXISTS composition_version INT NOT NULL DEFAULT 0; | ||
ALTER TABLE compositions ADD COLUMN IF NOT EXISTS parent_id BIGINT NULL DEFAULT NULL; | ||
|
||
ALTER TABLE compositions ADD CONSTRAINT IF NOT EXISTS parent_id_composition_version UNIQUE (parent_id, composition_version); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.