A virtual camera films an AI agent's screen while a tracker locks onto every glyph. Two fframes passes, one SkSL shader, all sound synthesized.
score: port Slab soundtrack to Rust with exact Python parity
Marcin Gasperowicz01a3f72c0dea
diff --git a/Cargo.lock b/Cargo.lockindex 829723c..901576d 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -2938,6 +2938,14 @@ version = "1.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"+[[package]]+name = "score"+version = "0.1.0"+dependencies = [+ "serde_json",+ "slabkit",+]+[[package]]name = "sctk-adwaita"version = "0.10.1"@@ -3140,6 +3148,16 @@ version = "0.4.12"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"+[[package]]+name = "slabkit"+version = "0.1.0"+source = "git+https://github.com/nooga/slabkit-rs?rev=a181e9bdbee154a9fd8de0097f0a684bf3474e13#a181e9bdbee154a9fd8de0097f0a684bf3474e13"+dependencies = [+ "serde",+ "serde_json",+ "thiserror 2.0.21",+]+[[package]]name = "slotmap"version = "1.1.1"diff --git a/Cargo.toml b/Cargo.tomlindex 6541608..45020bc 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1,6 +1,6 @@[workspace]resolver = "3"-members = ["hud", "flat", "lens"]+members = ["hud", "flat", "lens", "score"][workspace.dependencies]fframes = { version = "=1.2.0", features = ["compile-time-svgtree", "cli"] }diff --git a/README.md b/README.mdindex 5af6067..1a59460 100644--- a/README.md+++ b/README.md@@ -90,7 +90,7 @@ screen hum, a bit-crushed glitch on each cut, a click per keystroke and a pentatper lock, panned to the box. It adds a riser into the collapse and a chime with a sub hit on`Done`. Loudness is measured with ffmpeg's `ebur128` and set to -14 LUFS.-**Score** (optional): [`score/score.py`](score/score.py) is a second soundtrack, made in+**Score** (optional): [`score/src/arrangement.rs`](score/src/arrangement.rs) is a second soundtrack, made in[Slab](https://github.com/nooga/slab): a darker, heavier piece at 120 BPM, so every cut landson a beat. It reads the same `out/tracks.json`, plus `out/camera.json` from the `camera`binary, so the mix follows the lens. The tracked box pans the lock blips and keystrokes, the@@ -130,19 +130,46 @@ python3 -I tools/readme_media.py # rebuild the images in this README```bashtools/score.sh # uses the committed render, score/score.wav-SLAB=/path/to/slab tools/score.sh # renders the score again from score/score.py+SLAB=/path/to/slab tools/score.sh # renders the score again from Rust+SLAB=/path/to/slab SCORE_IMPL=python tools/score.sh # original Python reference```Rendering needs a [Slab](https://github.com/nooga/slab) checkout built with-`zig build -Doptimize=ReleaseFast`. `score/score.py` writes the project+`zig build -Doptimize=ReleaseFast`. The Rust `score` crate uses the MIT-licensed+[slabkit-rs](https://github.com/nooga/slabkit-rs) library to write the project`score/ff_tracking.slab`, which opens in Slab's arrangement and mixer, and renders it headless.The render runs past the picture for the reverb tail, so `score.sh` cuts it at 6 s and fadesit with the fade to black. It comes out around -10.7 LUFS with a -1 dBTP true peak.+Generate just the editable project, or render it separately:++```bash+SLAB=/path/to/slab cargo run -p score+SLAB=/path/to/slab cargo run -p score -- --render --stems+cargo run -p score -- --help+```++The Rust port reproduces the committed Python project's complete JSON values,+including Python's seeded random notes, note rounding, colors, clip names and+automation ordering. `cargo test -p score` checks every field against the existing+project using fixed resource fixtures; it needs neither Slab nor Python. For a+live comparison against your Slab resources, including changed camera/event+inputs and identical float32 renders, run:++```bash+SLAB=/path/to/slab python3 tools/check_score.py --render+```++Python is used only by the optional reference/comparison path; the Rust score+and `tools/score.sh` need no Python packages when `SLAB` is set. Python remains+part of the default `tools/render.sh` sound pipeline.+| File | What it is ||---|---|| `hud/src/bin/camera.rs` | writes `out/camera.json`: per frame, the zoom, tilt and roll, the tracked box's position in the output and where the filmed screen's centre lands |-| `score/score.py` | the score: reads both JSON files, writes the Slab project, renders it |+| `score/src/arrangement.rs` | the Rust score: reads camera/event data via slabkit-rs, writes the same Slab project |+| `score/score.py` | unchanged Python reference for the score |+| `tools/check_score.py` | live Python/Rust project and optional render parity check || `score/ff_tracking.slab/` | the generated Slab project (tracks, notes, automation, effects) || `score/score.wav` | the score rendered and cut to 6 s, 48 kHz, so the video builds without Slab || `tools/score.sh` | the whole pipeline with the score |@@ -157,6 +184,8 @@ is in [#2](https://github.com/mrsarac/ff-tracking/issues/2).**License note:** `score/score.py` imports `slabkit`, which ships with Slab under GPL-3.0. slabkit is notpart of this repo and Slab is needed only to re-render the score. Its author offers `score/score.py`,the project in `score/ff_tracking.slab/` and `score/score.wav` under this repo's MIT license.+The Rust score and `slabkit-rs` are MIT licensed and invoke Slab as an external+renderer. The MT19937 algorithm keeps its BSD notice in `licenses/MT19937.txt`.## Make it yours@@ -198,7 +227,7 @@ flat/ pass 1: the screen, 3840×2160lens/ pass 2: lens/shaders/lens.sksl and the camera-space trackertools/ render.sh (whole pipeline), sfx.py (sound), readme_media.py (these images),score.sh (the pipeline with the Slab score)-score/ the Slab score: score.py, the ff_tracking.slab project, score.wav+score/ the Rust Slab score crate, Python reference, ff_tracking.slab project, score.wavdocs/ design spec, prompts and decisions, fframes contributions```diff --git a/licenses/MT19937.txt b/licenses/MT19937.txtnew file mode 100644index 0000000..43f5c74--- /dev/null+++ b/licenses/MT19937.txt@@ -0,0 +1,33 @@+MT19937 algorithm copyright notice++Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:+ 1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.+ 2. Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.+ 3. The names of its contributors may not be used to endorse or promote+ products derived from this software without specific prior written+ permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+POSSIBILITY OF SUCH DAMAGE.++Reference: https://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/emt.html+CPython integer seeding and rejection-sampling reference:+https://github.com/python/cpython/blob/3.13/Modules/_randommodule.c+https://github.com/python/cpython/blob/3.13/Lib/random.pydiff --git a/score/Cargo.toml b/score/Cargo.tomlnew file mode 100644index 0000000..b0fd659--- /dev/null+++ b/score/Cargo.toml@@ -0,0 +1,12 @@+[package]+name = "score"+version = "0.1.0"+edition = "2024"+rust-version = "1.89"+publish = false+license = "MIT"+description = "The ff-tracking Slab score, written in Rust"++[dependencies]+slabkit = { git = "https://github.com/nooga/slabkit-rs", rev = "a181e9bdbee154a9fd8de0097f0a684bf3474e13" }+serde_json = { version = "1", features = ["float_roundtrip"] }diff --git a/score/src/arrangement.rs b/score/src/arrangement.rsnew file mode 100644index 0000000..728d688--- /dev/null+++ b/score/src/arrangement.rs@@ -0,0 +1,1048 @@+//! Rust port of nooga’s ff-tracking Slab score. MIT, Marcin Gasperowicz (2026).+use crate::python_random::PythonRandom;+use slabkit::video::Tracking;+use slabkit::{Clip, Effect, Instrument, Point, Result, Song, Track, TrackId};+pub fn score(t: &Tracking) -> Result<Song> {+ if t.events.cuts.len() != 12 || t.events.locks.len() < 12 || t.camera.frames.len() < 12 {+ return Err(slabkit::Error::Invalid(+ "this arrangement expects ff-tracking’s twelve-shot score".into(),+ ));+ }+ let mut song = Song::new("FF Tracking", 120., "F minor")?;+ for name in ["BOOT", "TRACE", "LOCK", "TAIL"] {+ song.section(name, 1.)?;+ }+ let mut track = Track::bus("MIX");+ track.effects = vec![+ Effect::new("era")+ .preset("sp1200")+ .param("mix", 0.0)+ .param("out", -1.5),+ ];+ let mix = song.add_track(track)?;+ let mut track = Track::bus("VERB");+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("verb2")+ .preset("big-plate-hall")+ .param("mix", 1.0)+ .param("decay", 2.6)+ .param("predelay", 0.012)+ .param("lowcut", 380.0)+ .param("tone", 9000.0)+ .param("damp", 6000.0)+ .param("width", 1.5),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 320.0)+ .param("p1_hz", 600.0)+ .param("p1_db", -2.0)+ .param("hs_hz", 9000.0)+ .param("hs_db", -3.0),+ ];+ let verb = song.add_track(track)?;+ let mut track = Track::bus("ECHO");+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("delay2")+ .param("sync", "SYNC")+ .param("div", "1/16")+ .param("mode", "PING")+ .param("fb", 0.35)+ .param("lowcut", 700.0)+ .param("damp", 6500.0)+ .param("char", "DIGITAL")+ .param("mix", 1.0)+ .param("width", 1.4),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 500.0)+ .param("p2_hz", 3000.0)+ .param("p2_db", -2.0)+ .param("hs_hz", 7000.0)+ .param("hs_db", -4.0),+ ];+ let echo = song.add_track(track)?;+ let mut track = Track::bus("DRUM BUS");+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 30.0),+ Effect::new("sat2")+ .preset("tape-slam")+ .param("drive", 11.0)+ .param("mix", 0.5)+ .param("out", -2.5),+ Effect::new("bus2")+ .preset("drum-bus")+ .param("thresh", -18.0)+ .param("makeup", 2.0)+ .param("color", 0.3)+ .param("mix", 0.8),+ ];+ let drums = song.add_track(track)?;+ let mut track = Track::new(+ "KICK",+ Instrument::new("drum2")+ .preset("909-punch")+ .param("kick_tune", 53.0)+ .param("kick_sweep", 10.0)+ .param("kick_bend", 0.03)+ .param("kick_decay", 0.28)+ .param("kick_click", 0.55)+ .param("kick_drive", 3.2)+ .param("kick_level", 1.0)+ .param("master_drive", 1.3),+ );+ track.volume = 0.7;+ track.output = Some(drums);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 30.0)+ .param("p1_hz", 330.0)+ .param("p1_db", -4.0)+ .param("p1_q", 0.8)+ .param("p2_hz", 3500.0)+ .param("p2_db", 2.0),+ ];+ let kick = song.add_track(track)?;+ let mut track = Track::new(+ "BOOM",+ Instrument::new("drum2")+ .preset("808-boom")+ .param("kick_tune", 43.65)+ .param("kick_sweep", 12.0)+ .param("kick_bend", 0.06)+ .param("kick_decay", 1.6)+ .param("kick_click", 0.4)+ .param("kick_drive", 4.5)+ .param("kick_level", 1.0)+ .param("master_drive", 1.6),+ );+ track.volume = 0.75;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 30.0)+ .param("p1_hz", 900.0)+ .param("p1_db", 3.0)+ .param("p1_q", 0.7)+ .param("hs_hz", 6000.0)+ .param("hs_db", -3.0),+ Effect::new("sat2")+ .preset("iron-bass")+ .param("drive", 10.0)+ .param("mix", 0.5)+ .param("out", -2.0),+ ];+ let boom = song.add_track(track)?;+ let mut track = Track::new(+ "CLAP",+ Instrument::new("drum2")+ .preset("gated-snare-kit")+ .param("snare_tune", 210.0)+ .param("snare_decay", 0.16)+ .param("snare_snap", 0.9)+ .param("snare_tone", 3200.0)+ .param("clap_level", 0.8)+ .param("clap_tone", 1400.0)+ .param("clap_decay", 0.2)+ .param("master_drive", 2.2),+ );+ track.volume = 0.85;+ track.output = Some(drums);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 180.0)+ .param("p1_hz", 500.0)+ .param("p1_db", -3.0)+ .param("p2_hz", 2200.0)+ .param("p2_db", 2.0)+ .param("hs_hz", 9000.0)+ .param("hs_db", -4.0),+ Effect::new("char2").preset("smush-1200").param("mix", 0.35),+ ];+ let clap = song.add_track(track)?;+ let mut track = Track::new(+ "HATS",+ Instrument::new("drum2")+ .preset("crisp-hat-kit")+ .param("hat_tone", 0.8)+ .param("hat_tune", 1.2)+ .param("hat_chdec", 0.03)+ .param("hat_ohdec", 0.16)+ .param("hat_level", 1.1),+ );+ track.volume = 1.2;+ track.output = Some(drums);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 900.0)+ .param("p2_hz", 6000.0)+ .param("p2_db", -2.0)+ .param("hs_hz", 9000.0)+ .param("hs_db", -5.0),+ ];+ let hats = song.add_track(track)?;+ let mut track = Track::new(+ "KEYS",+ Instrument::new("drum2")+ .preset("lofi-kit")+ .param("hat_tune", 1.6)+ .param("hat_tone", 1.4)+ .param("hat_chdec", 0.02)+ .param("snare_tune", 420.0)+ .param("snare_decay", 0.05)+ .param("snare_sdec", 0.03)+ .param("snare_snap", 1.0)+ .param("snare_tone", 5000.0)+ .param("master_drive", 2.5),+ );+ track.volume = 1.2;+ track.output = Some(drums);+ track.effects = vec![+ Effect::new("char2")+ .preset("smush-1200")+ .param("ltype", "80s")+ .param("lofi", 0.85)+ .param("noise", 0.0)+ .param("mix", 1.0)+ .param("makeup", 0.0),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 1000.0)+ .param("p2_hz", 4000.0)+ .param("p2_db", -2.0)+ .param("hs_hz", 10000.0)+ .param("hs_db", -6.0),+ Effect::new("comp2")+ .param("thresh", -24.0)+ .param("ratio", 10.0)+ .param("atk", 0.0002)+ .param("rel", 0.04)+ .param("makeup", 9.0),+ ];+ let ticks = song.add_track(track)?;+ let mut track = Track::new(+ "GLITCH",+ Instrument::new("concoction")+ .preset("noise-sweep")+ .param("n_level", 1.0)+ .param("n_color", 0.3)+ .param("f_mode", "BP")+ .param("f_cut", 2400.0)+ .param("f_res", 0.55)+ .param("f_key", 1.0)+ .param("e1_a", 0.0005)+ .param("e1_d", 0.07)+ .param("e1_s", 0.0)+ .param("e1_r", 0.02)+ .param("e3_a", 0.0005)+ .param("e3_d", 0.1)+ .param("e3_s", 0.0)+ .param("m1_src", "OFF")+ .param("l1_shape", "S&H")+ .param("l1_sync", "1/32")+ .param("l1_mode", "RETRIG")+ .param("m2_src", "LFO1")+ .param("m2_dst", "CUTOFF")+ .param("m2_amt", 0.8)+ .param("level", 0.8),+ );+ track.volume = 1.25;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("char2")+ .preset("smush-1200")+ .param("ltype", "80s")+ .param("lofi", 1.0)+ .param("noise", 0.0)+ .param("mix", 1.0)+ .param("makeup", 6.0),+ Effect::new("sat2")+ .preset("fold-wreck")+ .param("drive", 18.0)+ .param("mix", 0.5)+ .param("out", -1.0),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 500.0)+ .param("p2_hz", 3200.0)+ .param("p2_db", -3.0)+ .param("hs_hz", 11000.0)+ .param("hs_db", -4.0),+ ];+ let glitch = song.add_track(track)?;+ let mut track = Track::new(+ "REESE",+ Instrument::new("concoction")+ .preset("reese")+ .param("sub_on", "ON")+ .param("sub_shape", "SINE")+ .param("sub_oct", -1.0)+ .param("sub_level", 0.3)+ .param("a_pos", 0.6667)+ .param("b_pos", 0.6667)+ .param("a_fine", -18.0)+ .param("b_fine", 18.0)+ .param("f_mode", "LP24")+ .param("f_cut", 420.0)+ .param("f_res", 0.4)+ .param("f_drive", 0.9)+ .param("f_env", 0.45)+ .param("e2_a", 0.0005)+ .param("e2_d", 0.11)+ .param("e2_s", 0.1)+ .param("e2_r", 0.05)+ .param("e1_a", 0.002)+ .param("e1_d", 0.2)+ .param("e1_s", 0.7)+ .param("e1_r", 0.04)+ .param("level", 0.7),+ );+ track.volume = 0.8;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 32.0)+ .param("ls_hz", 80.0)+ .param("ls_db", -5.0)+ .param("p1_hz", 850.0)+ .param("p1_db", 6.0)+ .param("p1_q", 0.7)+ .param("p2_hz", 2500.0)+ .param("p2_db", 2.0)+ .param("hs_hz", 6000.0)+ .param("hs_db", -6.0),+ Effect::new("sat2")+ .preset("iron-bass")+ .param("drive", 16.0)+ .param("mix", 0.75)+ .param("out", 0.0),+ Effect::new("char2")+ .preset("smush-1200")+ .param("ltype", "90s")+ .param("lofi", 0.5)+ .param("noise", 0.0)+ .param("mix", 0.0),+ Effect::new("comp2")+ .sidechain(kick)+ .param("thresh", -26.0)+ .param("ratio", 6.0)+ .param("knee", 4.0)+ .param("atk", 0.001)+ .param("rel", 0.11),+ Effect::new("geq8")+ .preset("flat")+ .param("t1", "LC48")+ .param("f1", 30.0)+ .param("t5", "BELL")+ .param("f5", 1200.0)+ .param("b5", 2.0)+ .param("q5", 0.8)+ .param("t8", "HC12")+ .param("f8", 6500.0),+ ];+ let bass = song.add_track(track)?;+ let mut track = Track::new(+ "PAD",+ Instrument::new("concoction")+ .preset("vowel-pad")+ .param("e1_a", 0.25)+ .param("e1_r", 0.6)+ .param("f_mode", "LP24")+ .param("f_cut", 600.0)+ .param("f_res", 0.25)+ .param("level", 1.0),+ );+ track.volume = 1.25;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 180.0)+ .param("p1_hz", 400.0)+ .param("p1_db", -3.0)+ .param("hs_hz", 10000.0)+ .param("hs_db", -2.0),+ Effect::new("tape2")+ .preset("vhs-rental")+ .param("wear", 0.4)+ .param("hiss", 0.15)+ .param("mix", 0.7),+ Effect::new("chorus2")+ .preset("juno-ii-deep")+ .param("mix", 0.6),+ Effect::new("char2")+ .preset("smush-1200")+ .param("ltype", "80s")+ .param("lofi", 0.7)+ .param("noise", 0.0)+ .param("mix", 0.0),+ Effect::new("comp2")+ .sidechain(kick)+ .param("thresh", -30.0)+ .param("ratio", 8.0)+ .param("atk", 0.002)+ .param("rel", 0.16),+ ];+ let pad = song.add_track(track)?;+ let mut track = Track::new(+ "HUM",+ Instrument::new("concoction")+ .param("a_table", "DRIVE")+ .param("a_pos", 0.7)+ .param("b_on", "ON")+ .param("b_table", "BASIC")+ .param("b_pos", 0.3)+ .param("b_oct", 1.0)+ .param("b_fine", 7.0)+ .param("b_level", 0.35)+ .param("f_mode", "LP12")+ .param("f_cut", 700.0)+ .param("f_res", 0.35)+ .param("e1_a", 0.15)+ .param("e1_s", 1.0)+ .param("e1_r", 0.4)+ .param("l1_shape", "SINE")+ .param("l1_rate", 0.35)+ .param("l1_mode", "FREE")+ .param("m1_src", "LFO1")+ .param("m1_dst", "CUTOFF")+ .param("m1_amt", 0.35)+ .param("l2_shape", "SINE")+ .param("l2_rate", 5.5)+ .param("l2_mode", "FREE")+ .param("m2_src", "LFO2")+ .param("m2_dst", "A LVL")+ .param("m2_amt", 0.12)+ .param("level", 0.8),+ );+ track.volume = 0.55;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("tape2")+ .preset("chewed")+ .param("hum", 0.5)+ .param("hiss", 0.25)+ .param("drops", 0.35)+ .param("wow", 0.75)+ .param("flutter", 0.5)+ .param("mix", 1.0),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 100.0)+ .param("p1_hz", 300.0)+ .param("p1_db", -2.0)+ .param("p2_hz", 1800.0)+ .param("p2_db", 1.5)+ .param("hs_hz", 7000.0)+ .param("hs_db", -6.0),+ Effect::new("chorus2").preset("wide-slow").param("mix", 0.5),+ Effect::new("comp2")+ .sidechain(kick)+ .param("thresh", -30.0)+ .param("ratio", 4.0)+ .param("atk", 0.002)+ .param("rel", 0.2),+ ];+ let hum = song.add_track(track)?;+ let mut track = Track::new(+ "LOCK",+ Instrument::new("concoction")+ .param("a_table", "PWM")+ .param("a_pos", 0.35)+ .param("b_on", "ON")+ .param("b_table", "FM")+ .param("b_pos", 0.45)+ .param("b_oct", -1.0)+ .param("b_level", 0.5)+ .param("f_mode", "LP12")+ .param("f_cut", 1800.0)+ .param("f_res", 0.45)+ .param("f_env", 0.5)+ .param("e2_a", 0.0005)+ .param("e2_d", 0.05)+ .param("e2_s", 0.0)+ .param("p_amt", 12.0)+ .param("p_time", 0.012)+ .param("e1_a", 0.0005)+ .param("e1_d", 0.08)+ .param("e1_s", 0.0)+ .param("e1_r", 0.03)+ .param("level", 1.0),+ );+ track.volume = 1.0;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("era")+ .preset("sp1200")+ .param("bits", 7.0)+ .param("rate", 14000.0)+ .param("filter", 9000.0)+ .param("mix", 1.0),+ Effect::new("sat2")+ .preset("diode-drive")+ .param("drive", 14.0)+ .param("mix", 0.6)+ .param("out", 3.0),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 220.0)+ .param("p1_hz", 500.0)+ .param("p1_db", -2.0)+ .param("p2_hz", 2500.0)+ .param("p2_db", 2.0)+ .param("hs_hz", 9000.0)+ .param("hs_db", -4.0),+ ];+ let blip = song.add_track(track)?;+ let mut track = Track::new(+ "RISER",+ Instrument::new("concoction")+ .preset("noise-sweep")+ .param("e3_a", 2.5)+ .param("f_res", 0.7)+ .param("e1_a", 0.3)+ .param("e1_r", 0.3),+ );+ track.volume = 0.5;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("sat2")+ .preset("fold-buzz")+ .param("drive", 6.0)+ .param("mix", 0.25)+ .param("out", -2.0),+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 350.0)+ .param("p2_hz", 4000.0)+ .param("p2_db", -2.0)+ .param("hs_hz", 12000.0)+ .param("hs_db", -3.0),+ ];+ let riser = song.add_track(track)?;+ let mut track = Track::new(+ "FALL",+ Instrument::new("concoction")+ .preset("noise-sweep")+ .param("e1_a", 0.001)+ .param("e1_d", 1.2)+ .param("e1_s", 0.0)+ .param("e1_r", 0.4)+ .param("m1_src", "OFF")+ .param("f_mode", "BP")+ .param("f_cut", 8000.0)+ .param("f_res", 0.5)+ .param("e3_a", 0.0005),+ );+ track.volume = 0.45;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 200.0)+ .param("hs_hz", 12000.0)+ .param("hs_db", -3.0),+ ];+ let fall = song.add_track(track)?;+ let mut track = Track::new("DONE", Instrument::new("fm86").preset("slab/bells"));+ track.volume = 1.15;+ track.output = Some(mix);+ track.effects = vec![+ Effect::new("eq2")+ .param("hpf_on", "ON")+ .param("hpf_hz", 500.0)+ .param("p2_hz", 2800.0)+ .param("p2_db", -2.0)+ .param("hs_hz", 12000.0)+ .param("hs_db", 1.5),+ Effect::new("chorus2").preset("bell-widener"),+ ];+ let chime = song.add_track(track)?;+ song.master_subsonic = true;+ song.master_effects = vec![+ Effect::new("geq8")+ .preset("flat")+ .param("t1", "LC48")+ .param("f1", 30.0)+ .param("t2", "BELL")+ .param("f2", 250.0)+ .param("b2", -1.5)+ .param("q2", 0.8)+ .param("t8", "HSHLF")+ .param("f8", 12000.0)+ .param("b8", 1.5),+ Effect::new("bus2")+ .preset("mix-glue")+ .param("thresh", -16.0)+ .param("makeup", 2.0)+ .param("color", 0.25),+ Effect::new("sat2")+ .preset("tape-glue")+ .param("drive", 7.0)+ .param("mix", 0.35)+ .param("out", -1.5),+ Effect::new("limiter2")+ .param("gain", 5.5)+ .param("ceil", -2.2),+ ];+ let b = 2.;+ let fps = t.events.fps as f64;+ let nf = t.camera.frames.len();+ let shot = nf / 12;+ let collapse = t.events.collapse * b;+ let done = t.events.done * b;+ let cuts: Vec<_> = t.events.cuts.iter().map(|s| s * b).collect();+ let locks: Vec<_> = t.events.locks.iter().map(|s| s * b).collect();+ for id in [+ kick, boom, clap, hats, ticks, glitch, bass, pad, hum, blip, riser, fall, chime,+ ] {+ song.track_mut(id)?.add_clip(Clip::new("SCORE", 0., 16.))?;+ }+ song.track_mut(mix)?.automate(+ "fx0:mix",+ [+ Point::hold(0., 0.),+ Point::hold(7., 1.),+ Point::hold(8., 0.),+ ],+ )?;+ song.track_mut(mix)?.automate(+ "fx0:bits",+ [+ Point::hold(0., 12.),+ Point::curve(7., 6., -0.4),+ Point::hold(7.95, 3.),+ Point::hold(8., 12.),+ ],+ )?;+ song.track_mut(mix)?.automate(+ "fx0:rate",+ [+ Point::hold(0., 26040.),+ Point::curve(7., 11000., -0.4),+ Point::hold(7.95, 3500.),+ Point::hold(8., 26040.),+ ],+ )?;+ song.track_mut(mix)?.automate(+ "fx0:filter",+ [+ Point::hold(0., 11000.),+ Point::new(7., 6000.),+ Point::hold(7.95, 2500.),+ Point::hold(8., 11000.),+ ],+ )?;+ song.track_mut(verb)?.automate(+ "volume",+ [+ Point::new(0., 0.8),+ Point::new(collapse, 1.),+ Point::new(done, 1.2),+ ],+ )?;+ song.track_mut(echo)?.automate(+ "fx0:fb",+ [+ Point::new(0., 0.3),+ Point::new(collapse, 0.62),+ Point::hold(done, 0.25),+ ],+ )?;+ song.track_mut(echo)?.automate(+ "pan",+ lane(t, 0, nf, 2, false, |g| {+ Ok((-t.screen_pan(g, 1920.)? * 0.5).clamp(-0.5, 0.5))+ })?,+ )?;+ for beat in &cuts[1..10] {+ clip(&mut song, kick)?.note(+ "C2",+ *beat,+ 0.2,+ if [1., 5., 9.].contains(beat) {+ 124+ } else {+ 112+ },+ )?;+ }+ for i in 0..8 {+ clip(&mut song, kick)?.note("C2", collapse + i as f64 * 0.125, 0.1, 70 + i * 7)?;+ }+ song.track_mut(kick)?.automate(+ "kick_tune",+ [+ Point::hold(0., 53.),+ Point::new(collapse, 70.),+ Point::hold(done - 0.05, 40.),+ ],+ )?;+ clip(&mut song, boom)?+ .note("C2", 0., 1., 70)?+ .note("C2", done, 2., 127)?;+ song.track_mut(boom)?.automate(+ "kick_decay",+ [Point::hold(0., 0.45), Point::hold(done - 0.25, 1.4)],+ )?;+ for beat in [3., 5., 7., 9.] {+ clip(&mut song, clap)?+ .note("D2", beat, 0.2, 118)?+ .note("D#2", beat, 0.2, 100)?;+ }+ clip(&mut song, clap)?.note("D2", 8.75, 0.1, 70)?;+ song.track_mut(clap)?.send(verb, -11., false)?;+ song.track_mut(clap)?+ .automate("fx1:mix", [Point::new(0., 0.2), Point::new(collapse, 0.6)])?;+ for i in 4..40 {+ clip(&mut song, hats)?.note(+ "F#2",+ i as f64 * 0.25,+ 0.05,+ if i % 4 == 2 { 92 } else { 58 + (i % 2) * 10 },+ )?;+ }+ for beat in [5.5, 6.5, 7.5, 8.5, 9.5] {+ clip(&mut song, hats)?.note("A#2", beat, 0.2, 84)?;+ }+ song.track_mut(hats)?.automate(+ "pan",+ (4..40)+ .map(|i| {+ let g = (i as f64 * 0.25 / b * fps).round_ties_even() as usize;+ Ok(Point::hold(+ i as f64 * 0.25 - 0.01,+ ((if i % 2 == 0 { -0.45 } else { 0.45 }) - t.screen_pan(g, 1920.)? * 0.3)+ .clamp(-0.8, 0.8),+ ))+ })+ .collect::<Result<Vec<_>>>()?,+ )?;+ song.track_mut(hats)?.automate(+ "hat_tone",+ lane(t, shot, 10 * shot, 2, false, |g| {+ Ok((0.75 + (push(t, g, shot) - 1.) * 0.9).clamp(0.6, 1.4))+ })?,+ )?;+ // Preserve Python’s integer seeding and rejection sampling, including+ // consumption of the shared tick/glitch random stream.+ let mut rng = PythonRandom::new(4812);+ for (i, seconds) in t.events.keys.iter().enumerate() {+ clip(&mut song, ticks)?.note(+ if i % 3 == 0 { "D2" } else { "F#2" },+ seconds * b,+ 0.04,+ 70 + rng.below(41) as i32,+ )?;+ }+ song.track_mut(ticks)?.send(echo, -20., false)?;+ song.track_mut(ticks)?.automate(+ "pan",+ lane(t, 0, nf, 1, false, |g| {+ Ok((t.box_pan(g, 1920.)? * 1.6).clamp(-0.85, 0.85))+ })?,+ )?;+ song.track_mut(ticks)?+ .automate("fx0:lofi", [Point::new(0., 0.6), Point::new(collapse, 1.)])?;+ for (i, beat) in cuts[..10].iter().enumerate() {+ clip(&mut song, glitch)?.note(+ ["F5", "C6", "Ab5", "Eb6"][rng.below(4) as usize],+ *beat,+ 0.15,+ if i == 0 { 124 } else { 112 },+ )?;+ }+ let (mut bt, mut step, mut p) = (collapse, 0.125, 72);+ while bt < done - 0.02 {+ clip(&mut song, glitch)?.note(+ p,+ bt,+ step * 0.7,+ (96 + (40. * (bt - collapse)) as i32).min(127),+ )?;+ bt += step;+ step = (step * 0.9).max(0.0625);+ p += 1;+ }+ song.track_mut(glitch)?.send(echo, -12., false)?;+ let mut pans = vec![];+ for beat in &cuts[..10] {+ let g = ((*beat / b * fps).round_ties_even() as usize + 1).min(nf - 1);+ pans.push(Point::hold(+ (beat - 0.02).max(0.),+ (-t.screen_pan(g, 1920.)? * 1.2).clamp(-0.85, 0.85),+ ));+ }+ pans.extend(+ (0..16).map(|i| Point::hold(collapse + i as f64 / 16., 0.75 * (i as f64 * 1.9).sin())),+ );+ song.track_mut(glitch)?.automate("pan", pans)?;+ let grit = [+ (1., "TUBE", 20., 0.),+ (2., "TAPE", 24., -3.),+ (3., "XFMR", 26., 3.),+ (4., "DIODE", 18., 2.),+ (5., "FUZZ", 16., -5.),+ (6., "RAIL", 22., -4.),+ (7., "VALVE", 28., -5.5),+ (8., "FOLD", 14., 1.),+ (9., "FUZZ", 26., -6.),+ (10., "FOLD", 32., -2.),+ (11., "TUBE", 12., 0.),+ ];+ song.track_mut(bass)?.automate(+ "fx1:mode",+ grit.iter().map(|(b, m, _, _)| Point::hold(*b, *m)),+ )?;+ song.track_mut(bass)?.automate(+ "fx1:drive",+ grit.iter().map(|(b, _, d, _)| Point::hold(*b, *d)),+ )?;+ song.track_mut(bass)?.automate(+ "fx1:out",+ grit.iter().map(|(b, _, _, o)| Point::hold(*b, *o)),+ )?;+ for (i, root) in ["F1", "F1", "F1", "F1", "Db1", "Db1", "Eb1", "Eb1", "C1"]+ .iter()+ .enumerate()+ {+ let beat = i + 1;+ for (j, off) in [0.25, 0.5, 0.75].into_iter().enumerate() {+ let pitch = slabkit::note(root)?+ + if [4, 8].contains(&beat) && j == 2 {+ 12+ } else {+ 0+ };+ clip(&mut song, bass)?.note(+ pitch,+ beat as f64 + off,+ 0.2,+ if j == 0 { 112 } else { 96 },+ )?;+ }+ }+ let bc = clip(&mut song, bass)?;+ bc.note("C2", collapse, done - collapse, 118)?;+ bc.bend(+ "pitch",+ &[Point::new(0., 0.), Point::curve(0.95, -24., 0.5)],+ |n| n.start == collapse,+ )?;+ bc.note("F1", done, 1., 120)?;+ song.track_mut(bass)?.automate(+ "f_cut",+ lane(t, 0, nf, 1, false, |g| {+ let beat = g as f64 / fps * b;+ Ok(if beat >= done {+ 260.+ } else if beat >= collapse {+ 2600. * (180f64 / 2600.).powf(((beat - collapse) / (done - collapse)).powf(0.7))+ } else {+ (520.+ * (2400f64 / 520.).powf(((beat - 1.) / 8.).clamp(0., 1.).powf(1.4))+ * push(t, g, shot).powf(1.6))+ .clamp(200., 6000.)+ })+ })?,+ )?;+ let mut tears = lane(t, 0, 10 * shot, 1, true, |g| {+ Ok(if t.camera.frames[g].lock { 0.7 } else { 0. })+ })?;+ tears.extend([+ Point::new(collapse, 0.),+ Point::hold(collapse + 0.6, 1.),+ Point::hold(done, 0.),+ ]);+ song.track_mut(bass)?.automate("fx2:mix", tears)?;+ song.track_mut(bass)?.automate(+ "fx2:lofi",+ [+ Point::hold(0., 0.5),+ Point::new(collapse, 0.3),+ Point::hold(done - 0.05, 1.),+ Point::hold(done, 0.4),+ ],+ )?;+ let pc = clip(&mut song, pad)?;+ pc.chord(["F3", "Ab3", "C4", "Eb4", "G4"], 0., 5., 84, 0.)?;+ pc.chord(["Db3", "F3", "Ab3", "C4", "G4"], 5., 2., 84, 0.)?;+ pc.chord(["Eb3", "G3", "Bb3", "C4", "F4"], 7., 2., 84, 0.)?;+ pc.chord(["C3", "E3", "G3", "Bb3", "Db4"], 9., 1., 88, 0.)?;+ pc.chord(+ ["C3", "E3", "G3", "Bb3", "Db4"],+ collapse,+ done - collapse,+ 84,+ 0.,+ )?;+ pc.converge("C2", collapse, done, 0.4)?;+ pc.chord(["F3", "C4", "Eb4", "G4", "Ab4"], done, 1.5, 100, 0.)?;+ song.track_mut(pad)?+ .ramp("f_cut", 0., 10., 500., 3600., -0.5)?;+ song.track_mut(pad)?.automate(+ "pan",+ lane(t, 0, nf, 2, false, |g| {+ Ok((t.screen_pan(g, 1920.)? * 0.55).clamp(-0.6, 0.6))+ })?,+ )?;+ song.track_mut(pad)?.automate(+ "fx3:mix",+ lane(t, 0, nf, 1, true, |g| {+ Ok(if t.camera.frames[g].lock { 0.6 } else { 0. })+ })?,+ )?;+ song.track_mut(pad)?.send(verb, -5., false)?;+ clip(&mut song, hum)?+ .note("F2", 0., done + 0.5, 90)?+ .note("C3", 0., done + 0.5, 60)?;+ song.track_mut(hum)?.automate(+ "pan",+ lane(t, 0, nf, 3, false, |g| {+ Ok((t.screen_pan(g, 1920.)? * 0.4).clamp(-0.4, 0.4))+ })?,+ )?;+ song.track_mut(hum)?.automate(+ "volume",+ [+ Point::new(0., 0.35),+ Point::new(1., 0.55),+ Point::new(collapse, 0.55),+ Point::new(done - 0.1, 0.8),+ Point::hold(done, 0.),+ ],+ )?;+ let scale = [+ "F3", "G3", "Ab3", "Bb3", "C4", "Db4", "Eb4", "F4", "G4", "Ab4", "C5",+ ];+ let mut lock_rng = PythonRandom::new(180);+ for beat in &locks[..11] {+ clip(&mut song, blip)?+ .note(+ scale[lock_rng.below(scale.len() as u32) as usize],+ *beat,+ 0.1,+ 118,+ )?+ .note(+ scale[lock_rng.below(scale.len() as u32) as usize],+ beat + 2. / fps * b,+ 0.1,+ 100,+ )?;+ }+ clip(&mut song, blip)?.note("F4", locks[11], 0.12, 110)?;+ song.track_mut(blip)?.automate(+ "pan",+ lane(t, 0, nf, 1, false, |g| {+ Ok((t.box_pan(g, 1920.)? * 1.8).clamp(-0.85, 0.85))+ })?,+ )?;+ song.track_mut(blip)?.automate(+ "fx0:bits",+ [+ Point::new(0., 8.),+ Point::new(collapse, 4.),+ Point::hold(done, 9.),+ ],+ )?;+ song.track_mut(blip)?+ .send(echo, -6., false)?+ .send(verb, -14., false)?;+ clip(&mut song, riser)?+ .note("C5", 0.3, 0.7, 100)?+ .note("F4", 6., done - 6., 110)?;+ song.track_mut(riser)?.automate(+ "f_cut",+ [+ Point::curve(0.3, 400., -0.5),+ Point::hold(1., 6000.),+ Point::curve(6., 300., -0.6),+ Point::new(done, 7000.),+ ],+ )?;+ song.track_mut(riser)?.automate(+ "volume",+ [+ Point::new(0., 0.4),+ Point::new(6., 0.4),+ Point::new(collapse, 0.5),+ Point::hold(done, 0.8),+ ],+ )?;+ song.track_mut(riser)?.automate(+ "pan",+ lane(t, 0, 11 * shot, 2, false, |g| {+ Ok((t.screen_pan(g, 1920.)? * 0.7).clamp(-0.7, 0.7))+ })?,+ )?;+ song.track_mut(riser)?.send(verb, -10., false)?;+ clip(&mut song, fall)?.note("F4", 0., 1.2, 110)?;+ song.track_mut(fall)?+ .ramp("f_cut", 0., 1.2, 9000., 250., 0.5)?;+ song.track_mut(fall)?.automate(+ "pan",+ lane(t, 0, 2 * shot, 1, false, |g| {+ Ok((t.screen_pan(g, 1920.)? * 0.8).clamp(-0.8, 0.8))+ })?,+ )?;+ song.track_mut(fall)?.send(verb, -6., false)?;+ clip(&mut song, chime)?.chord(["F5", "C6", "Ab6"], done + 0.12, 1.5, 100, 0.03)?;+ song.track_mut(chime)?+ .send(verb, -6., false)?+ .send(echo, -16., false)?;+ const PALETTE: [[u8; 3]; 8] = [+ [230, 90, 120],+ [64, 206, 174],+ [150, 110, 230],+ [250, 190, 80],+ [90, 170, 250],+ [240, 130, 70],+ [120, 200, 90],+ [210, 120, 200],+ ];+ for (i, track) in song.tracks.iter_mut().enumerate() {+ track.color = PALETTE[i % PALETTE.len()];+ for clip in &mut track.clips {+ clip.name = track.name.clone();+ }+ }+ Ok(song)+}+fn clip(song: &mut Song, id: TrackId) -> Result<&mut Clip> {+ Ok(&mut song.track_mut(id)?.clips[0])+}+fn lane(+ t: &Tracking,+ start: usize,+ end: usize,+ step: usize,+ hold: bool,+ f: impl Fn(usize) -> Result<f64>,+) -> Result<Vec<Point>> {+ (start..end)+ .step_by(step)+ .map(|g| {+ let beat = g as f64 / t.events.fps as f64 * 2.;+ let value = f(g)?;+ Ok(if hold {+ Point::hold(beat, value)+ } else {+ Point::new(beat, value)+ })+ })+ .collect()+}++fn push(t: &Tracking, frame: usize, shot: usize) -> f64 {+ t.camera.frames[frame].zoom / t.camera.frames[frame - frame % shot].zoom+}diff --git a/score/src/lib.rs b/score/src/lib.rsnew file mode 100644index 0000000..27be498--- /dev/null+++ b/score/src/lib.rs@@ -0,0 +1,88 @@+mod arrangement;+mod python_random;+pub use arrangement::score;++use serde_json::Value;+use slabkit::{Catalog, Roots, Song};+use std::path::Path;++/// Keep Python's automation insertion order and serialized note precision.+/// These are part of the committed project even when they do not affect sound.+pub fn project(+ song: &Song,+ catalog: &Catalog,+ roots: &Roots,+ directory: Option<&Path>,+) -> slabkit::Result<Value> {+ let mut document = song.build(catalog, roots, directory)?;+ for track in document["tracks"].as_array_mut().unwrap() {+ let order: &[&str] = match track["name"].as_str().unwrap() {+ "MIX" => &[+ "fx0:era-mix",+ "fx0:era-bits",+ "fx0:era-rate",+ "fx0:era-filter",+ ],+ "ECHO" => &["fx0:delay-fb", "pan"],+ "HATS" => &["pan", "inst:hat-tone"],+ "KEYS" => &["pan", "fx0:char-lofi"],+ "REESE" => &[+ "fx1:sat-mode",+ "fx1:sat-drive",+ "fx1:sat-out",+ "inst:cn-f-cut",+ "fx2:char-mix",+ "fx2:char-lofi",+ ],+ "PAD" => &["inst:cn-f-cut", "pan", "fx3:char-mix"],+ "HUM" => &["pan", "volume"],+ "LOCK" => &["pan", "fx0:era-bits"],+ "RISER" => &["inst:cn-f-cut", "volume", "pan"],+ "FALL" => &["inst:cn-f-cut", "pan"],+ _ => &[],+ };+ if let Some(lanes) = track.get_mut("automation").and_then(Value::as_array_mut) {+ lanes.sort_by_key(|lane| {+ order+ .iter()+ .position(|target| lane["target"].as_str() == Some(target))+ .unwrap_or(usize::MAX)+ });+ }+ for clip in track["clips"].as_array_mut().unwrap() {+ for note in clip["notes"].as_array_mut().unwrap() {+ for field in ["start", "len"] {+ let value = note[field].as_f64().unwrap();+ // Decimal formatting, like Python round(x,5), rounds the+ // actual binary float rather than first scaling it by 1e5.+ let value = if field == "len" {+ value.max(0.01)+ } else {+ value+ };+ note[field] = serde_json::json!(format!("{value:.5}").parse::<f64>().unwrap());+ }+ }+ }+ }+ Ok(document)+}++pub fn save_project(document: &Value, directory: &Path) -> slabkit::Result<()> {+ if directory.is_file() {+ return Err(slabkit::Error::Invalid(+ "project destination is a bare file".into(),+ ));+ }+ std::fs::create_dir_all(directory)?;+ let temp = directory.join(format!(".rust-score-{}.json", std::process::id()));+ let result = (|| {+ std::fs::write(&temp, serde_json::to_vec_pretty(document)?)?;+ std::fs::rename(&temp, directory.join("project.json"))?;+ Ok(())+ })();+ if result.is_err() {+ let _ = std::fs::remove_file(temp);+ }+ result+}diff --git a/score/src/main.rs b/score/src/main.rsnew file mode 100644index 0000000..ce6405c--- /dev/null+++ b/score/src/main.rs@@ -0,0 +1,89 @@+use slabkit::{RenderOptions, Result, Slab};+use std::path::PathBuf;++#[derive(Debug)]+struct Args {+ video: PathBuf,+ project: PathBuf,+ wav: Option<PathBuf>,+ render: bool,+ stems: bool,+}+impl Args {+ fn parse() -> Result<Option<Self>> {+ let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"))+ .parent()+ .unwrap()+ .to_path_buf();+ let mut args = Self {+ video: root.clone(),+ project: root.join("score/ff_tracking.slab"),+ wav: None,+ render: false,+ stems: false,+ };+ let mut tokens = std::env::args().skip(1);+ while let Some(token) = tokens.next() {+ match token.as_str() {+ "--render" => args.render = true,+ "--stems" => args.stems = true,+ "--video" | "--project" | "--wav" => {+ let path =+ PathBuf::from(tokens.next().ok_or_else(|| {+ slabkit::Error::Invalid(format!("{token} needs a path"))+ })?);+ match token.as_str() {+ "--video" => args.video = path,+ "--project" => args.project = path,+ _ => args.wav = Some(path),+ }+ }+ "-h" | "--help" => {+ println!(+ "ff-tracking Slab score\n\nSLAB=/path/to/slab cargo run -p score -- [--video DIR] [--project DIR] [--render] [--wav FILE] [--stems]\n\nDefaults: this workspace's event exports and score/ff_tracking.slab; out/pass/score.wav.\nRendering writes the full reverb tail; tools/score.sh trims/fades for the picture."+ );+ return Ok(None);+ }+ _ => {+ return Err(slabkit::Error::Invalid(format!(+ "unknown argument {token}; use --help"+ )));+ }+ }+ }+ Ok(Some(args))+ }+}+fn main() -> Result<()> {+ let Some(args) = Args::parse()? else {+ return Ok(());+ };+ let slab = Slab::from_env()?;+ let tracking = slabkit::video::Tracking::load(&args.video)?;+ let song = score::score(&tracking)?;+ let catalog = slab.describe()?;+ let document = score::project(&song, &catalog, &slab.roots, Some(&args.project))?;+ score::save_project(&document, &args.project)?;+ println!(+ "saved {}: {} tracks, {} notes",+ args.project.display(),+ song.tracks.len(),+ song.tracks+ .iter()+ .flat_map(|t| &t.clips)+ .map(|c| c.notes.len())+ .sum::<usize>()+ );+ if args.render {+ let wav = args+ .wav+ .unwrap_or_else(|| args.video.join("out/pass/score.wav"));+ let options = RenderOptions {+ stems: args.stems.then(|| wav.with_extension("stems")),+ ..Default::default()+ };+ let rendered = slab.render(&args.project, wav, &options)?;+ println!("{}", rendered.report);+ }+ Ok(())+}diff --git a/score/src/python_random.rs b/score/src/python_random.rsnew file mode 100644index 0000000..c3bcd50--- /dev/null+++ b/score/src/python_random.rs@@ -0,0 +1,88 @@+//! Integer-seeded MT19937 with Python's getrandbits/rejection sampling.+//! Based on the public MT19937 algorithm and CPython's integer seed convention;+//! algorithm copyright and BSD notice: ../../licenses/MT19937.txt.+const N: usize = 624;+pub(crate) struct PythonRandom {+ state: [u32; N],+ position: usize,+}+impl PythonRandom {+ pub(crate) fn new(seed: u32) -> Self {+ let mut state = [0u32; N];+ state[0] = 19650218;+ for i in 1..N {+ state[i] = 1812433253u32+ .wrapping_mul(state[i - 1] ^ (state[i - 1] >> 30))+ .wrapping_add(i as u32);+ }+ let mut index = 1;+ // A positive 32-bit Python integer is a one-word init-key array.+ for _ in 0..N {+ state[index] = (state[index]+ ^ (state[index - 1] ^ (state[index - 1] >> 30)).wrapping_mul(1664525))+ .wrapping_add(seed);+ index += 1;+ if index == N {+ state[0] = state[N - 1];+ index = 1;+ }+ }+ for _ in 1..N {+ state[index] = (state[index]+ ^ (state[index - 1] ^ (state[index - 1] >> 30)).wrapping_mul(1566083941))+ .wrapping_sub(index as u32);+ index += 1;+ if index == N {+ state[0] = state[N - 1];+ index = 1;+ }+ }+ state[0] = 0x80000000;+ Self { state, position: N }+ }+ fn next_u32(&mut self) -> u32 {+ if self.position == N {+ for i in 0..N {+ let joined = (self.state[i] & 0x80000000) | (self.state[(i + 1) % N] & 0x7fffffff);+ self.state[i] = self.state[(i + 397) % N]+ ^ (joined >> 1)+ ^ if joined & 1 == 1 { 0x9908b0df } else { 0 };+ }+ self.position = 0;+ }+ let mut value = self.state[self.position];+ self.position += 1;+ value ^= value >> 11;+ value ^= (value << 7) & 0x9d2c5680;+ value ^= (value << 15) & 0xefc60000;+ value ^ (value >> 18)+ }+ /// Python randint(a,b) and choice(seq) both draw through _randbelow.+ pub(crate) fn below(&mut self, bound: u32) -> u32 {+ assert!(bound > 0);+ let bits = 32 - bound.leading_zeros();+ loop {+ let value = self.next_u32() >> (32 - bits);+ if value < bound {+ return value;+ }+ }+ }+}+#[cfg(test)]+mod tests {+ use super::PythonRandom;+ #[test]+ fn matches_python_randint_and_choice() {+ let mut random = PythonRandom::new(4812);+ let expected = [+ 72, 71, 100, 106, 97, 81, 104, 71, 86, 82, 103, 106, 80, 100, 110,+ ];+ assert_eq!(expected, std::array::from_fn(|_| 70 + random.below(41)));+ let mut random = PythonRandom::new(180);+ let expected = [+ 2, 1, 10, 0, 9, 4, 1, 9, 8, 7, 3, 9, 0, 2, 1, 0, 10, 0, 2, 3, 1, 2,+ ];+ assert_eq!(expected, std::array::from_fn(|_| random.below(11)));+ }+}diff --git a/score/tests/fixtures/README.md b/score/tests/fixtures/README.mdnew file mode 100644index 0000000..75fc503--- /dev/null+++ b/score/tests/fixtures/README.md@@ -0,0 +1,13 @@+# Score parity fixtures++`tracks.json` and `camera.json` come from the committed HUD exporters.+`resources.json` captures the score's live Slab machine control metadata and+factory preset values at Slab commit+`b8b6566dfaa7666779bd54e4c21c5b64ef2b0e9d`. It contains data, no DSP code or samples.+The expected output is the existing `score/ff_tracking.slab/project.json`,+generated by the unchanged Python score and committed in the original Slab PR.++`cargo test -p score` compares every document field, every ordered array and+every numeric value exactly (JSON integers and floats with the same value are+equivalent). The fixtures isolate this regression test from later edits to+installed presets. Live Python/Rust comparison is in `tools/check_score.py`.diff --git a/score/tests/fixtures/camera.json b/score/tests/fixtures/camera.jsonnew file mode 100644index 0000000..52c365e--- /dev/null+++ b/score/tests/fixtures/camera.json@@ -0,0 +1 @@+{"fps":30,"frames":[{"aim":[850.5,524.4],"zoom":3.3,"tilt_x":0.18,"tilt_y":0.62,"roll":-0.05,"lock":false,"focus_screen":[1082.7,532.8],"centre_screen":[1298.9,580.1]},{"aim":[850.9,524.5],"zoom":3.38,"tilt_x":0.1814,"tilt_y":0.619,"roll":-0.0494,"lock":false,"focus_screen":[1078.5,534.7],"centre_screen":[1307.1,581.0]},{"aim":[851.5,524.9],"zoom":3.448,"tilt_x":0.1828,"tilt_y":0.6181,"roll":-0.0489,"lock":false,"focus_screen":[1085.1,539.0],"centre_screen":[1312.7,580.6]},{"aim":[852.2,525.3],"zoom":3.506,"tilt_x":0.1841,"tilt_y":0.6171,"roll":-0.0484,"lock":false,"focus_screen":[1086.3,538.3],"centre_screen":[1316.8,579.9]},{"aim":[852.4,525.5],"zoom":3.554,"tilt_x":0.1854,"tilt_y":0.6162,"roll":-0.0478,"lock":false,"focus_screen":[1079.0,533.1],"centre_screen":[1321.5,579.9]},{"aim":[853.1,525.7],"zoom":3.594,"tilt_x":0.1867,"tilt_y":0.6153,"roll":-0.0473,"lock":false,"focus_screen":[1077.9,532.9],"centre_screen":[1323.7,580.2]},{"aim":[853.6,525.6],"zoom":3.625,"tilt_x":0.1879,"tilt_y":0.6144,"roll":-0.0468,"lock":false,"focus_screen":[1081.5,536.2],"centre_screen":[1325.5,580.9]},{"aim":[853.9,525.6],"zoom":3.65,"tilt_x":0.1891,"tilt_y":0.6136,"roll":-0.0464,"lock":false,"focus_screen":[1078.8,537.8],"centre_screen":[1327.2,581.5]},{"aim":[854.7,525.9],"zoom":3.669,"tilt_x":0.1901,"tilt_y":0.6129,"roll":-0.0459,"lock":false,"focus_screen":[1077.7,537.4],"centre_screen":[1326.3,580.9]},{"aim":[855.5,526.0],"zoom":3.682,"tilt_x":0.1911,"tilt_y":0.6122,"roll":-0.0455,"lock":true,"focus_screen":[1074.4,534.4],"centre_screen":[1324.9,580.8]},{"aim":[856.0,525.7],"zoom":3.691,"tilt_x":0.192,"tilt_y":0.6116,"roll":-0.0452,"lock":true,"focus_screen":[1072.1,530.0],"centre_screen":[1324.0,582.3]},{"aim":[857.1,525.6],"zoom":3.696,"tilt_x":0.1928,"tilt_y":0.611,"roll":-0.0449,"lock":false,"focus_screen":[1076.3,537.0],"centre_screen":[1320.6,582.8]},{"aim":[857.8,525.4],"zoom":3.699,"tilt_x":0.1935,"tilt_y":0.6106,"roll":-0.0446,"lock":false,"focus_screen":[1067.8,534.8],"centre_screen":[1318.5,584.0]},{"aim":[858.6,525.0],"zoom":3.7,"tilt_x":0.194,"tilt_y":0.6102,"roll":-0.0444,"lock":false,"focus_screen":[1066.2,530.7],"centre_screen":[1315.7,585.7]},{"aim":[859.3,525.3],"zoom":3.7,"tilt_x":0.1945,"tilt_y":0.6099,"roll":-0.0442,"lock":false,"focus_screen":[1063.2,538.8],"centre_screen":[1312.8,584.5]},{"aim":[718.6,509.8],"zoom":2.5,"tilt_x":0.3949,"tilt_y":-0.2304,"roll":0.0459,"lock":false,"focus_screen":[1103.3,546.6],"centre_screen":[1489.1,628.3]},{"aim":[722.3,509.9],"zoom":2.56,"tilt_x":0.3946,"tilt_y":-0.2302,"roll":0.0459,"lock":false,"focus_screen":[1098.9,547.7],"centre_screen":[1493.1,629.6]},{"aim":[754.8,509.7],"zoom":2.611,"tilt_x":0.3943,"tilt_y":-0.23,"roll":0.0457,"lock":false,"focus_screen":[1175.9,547.4],"centre_screen":[1432.0,629.0]},{"aim":[781.0,509.8],"zoom":2.654,"tilt_x":0.3938,"tilt_y":-0.2296,"roll":0.0455,"lock":false,"focus_screen":[1266.6,554.7],"centre_screen":[1380.2,628.1]},{"aim":[836.0,510.0],"zoom":2.691,"tilt_x":0.3932,"tilt_y":-0.2292,"roll":0.0453,"lock":false,"focus_screen":[1288.5,557.0],"centre_screen":[1257.1,624.1]},{"aim":[873.3,509.8],"zoom":2.72,"tilt_x":0.3924,"tilt_y":-0.2287,"roll":0.045,"lock":false,"focus_screen":[1200.1,549.6],"centre_screen":[1169.4,622.2]},{"aim":[910.1,509.9],"zoom":2.744,"tilt_x":0.3916,"tilt_y":-0.2281,"roll":0.0446,"lock":false,"focus_screen":[1259.3,552.7],"centre_screen":[1078.8,619.1]},{"aim":[964.3,510.0],"zoom":2.763,"tilt_x":0.3907,"tilt_y":-0.2275,"roll":0.0443,"lock":false,"focus_screen":[1281.3,555.8],"centre_screen":[938.2,614.5]},{"aim":[990.1,510.0],"zoom":2.776,"tilt_x":0.3896,"tilt_y":-0.2268,"roll":0.0439,"lock":false,"focus_screen":[1221.9,553.4],"centre_screen":[868.8,612.5]},{"aim":[971.1,510.3],"zoom":2.786,"tilt_x":0.3885,"tilt_y":-0.226,"roll":0.0434,"lock":true,"focus_screen":[591.6,524.7],"centre_screen":[920.1,614.0]},{"aim":[941.3,510.2],"zoom":2.793,"tilt_x":0.3874,"tilt_y":-0.2252,"roll":0.0429,"lock":true,"focus_screen":[678.1,525.0],"centre_screen":[999.7,617.2]},{"aim":[900.2,510.1],"zoom":2.797,"tilt_x":0.3861,"tilt_y":-0.2243,"roll":0.0424,"lock":false,"focus_screen":[796.3,533.4],"centre_screen":[1107.1,621.1]},{"aim":[859.0,509.8],"zoom":2.799,"tilt_x":0.3848,"tilt_y":-0.2234,"roll":0.0419,"lock":false,"focus_screen":[911.7,537.0],"centre_screen":[1212.3,625.1]},{"aim":[862.4,509.7],"zoom":2.8,"tilt_x":0.3835,"tilt_y":-0.2224,"roll":0.0414,"lock":false,"focus_screen":[899.9,537.5],"centre_screen":[1203.8,625.2]},{"aim":[866.1,509.9],"zoom":2.8,"tilt_x":0.3821,"tilt_y":-0.2215,"roll":0.0408,"lock":false,"focus_screen":[892.4,538.2],"centre_screen":[1194.9,624.3]},{"aim":[533.7,581.6],"zoom":2.1,"tilt_x":0.1162,"tilt_y":-0.5473,"roll":0.0585,"lock":false,"focus_screen":[1084.6,538.0],"centre_screen":[1579.2,506.7]},{"aim":[561.6,580.4],"zoom":2.14,"tilt_x":0.1148,"tilt_y":-0.5464,"roll":0.0579,"lock":false,"focus_screen":[1128.1,537.4],"centre_screen":[1556.2,505.1]},{"aim":[607.6,579.3],"zoom":2.174,"tilt_x":0.1136,"tilt_y":-0.5455,"roll":0.0574,"lock":false,"focus_screen":[1218.2,546.6],"centre_screen":[1507.7,501.3]},{"aim":[648.3,578.3],"zoom":2.203,"tilt_x":0.1123,"tilt_y":-0.5446,"roll":0.0569,"lock":false,"focus_screen":[1233.6,549.6],"centre_screen":[1461.2,497.9]},{"aim":[707.6,577.4],"zoom":2.227,"tilt_x":0.1112,"tilt_y":-0.5438,"roll":0.0565,"lock":false,"focus_screen":[1182.0,548.7],"centre_screen":[1384.3,492.2]},{"aim":[780.5,576.8],"zoom":2.247,"tilt_x":0.1101,"tilt_y":-0.5431,"roll":0.056,"lock":false,"focus_screen":[1271.1,554.1],"centre_screen":[1279.2,483.7]},{"aim":[830.1,576.0],"zoom":2.263,"tilt_x":0.1091,"tilt_y":-0.5424,"roll":0.0556,"lock":false,"focus_screen":[1274.5,555.2],"centre_screen":[1201.4,478.1]},{"aim":[893.9,575.2],"zoom":2.275,"tilt_x":0.1082,"tilt_y":-0.5417,"roll":0.0553,"lock":false,"focus_screen":[1251.7,554.6],"centre_screen":[1092.5,470.6]},{"aim":[948.2,574.5],"zoom":2.284,"tilt_x":0.1074,"tilt_y":-0.5412,"roll":0.0549,"lock":false,"focus_screen":[1248.5,558.4],"centre_screen":[991.6,463.5]},{"aim":[961.4,574.0],"zoom":2.291,"tilt_x":0.1067,"tilt_y":-0.5407,"roll":0.0547,"lock":true,"focus_screen":[1052.1,550.1],"centre_screen":[965.8,462.4]},{"aim":[965.7,573.5],"zoom":2.295,"tilt_x":0.1061,"tilt_y":-0.5403,"roll":0.0544,"lock":true,"focus_screen":[1046.0,549.8],"centre_screen":[957.2,462.8]},{"aim":[961.2,573.0],"zoom":2.298,"tilt_x":0.1056,"tilt_y":-0.5399,"roll":0.0543,"lock":false,"focus_screen":[1054.0,551.8],"centre_screen":[965.9,464.4]},{"aim":[947.4,572.4],"zoom":2.299,"tilt_x":0.1053,"tilt_y":-0.5397,"roll":0.0541,"lock":false,"focus_screen":[1079.3,555.0],"centre_screen":[992.7,467.9]},{"aim":[951.7,571.4],"zoom":2.3,"tilt_x":0.1051,"tilt_y":-0.5396,"roll":0.054,"lock":false,"focus_screen":[1070.5,553.6],"centre_screen":[984.0,469.4]},{"aim":[955.9,570.6],"zoom":2.3,"tilt_x":0.105,"tilt_y":-0.5395,"roll":0.054,"lock":false,"focus_screen":[1062.2,555.4],"centre_screen":[975.7,470.7]},{"aim":[636.7,453.0],"zoom":2.7,"tilt_x":-0.1339,"tilt_y":0.5097,"roll":-0.0356,"lock":false,"focus_screen":[1033.7,537.1],"centre_screen":[1961.7,813.6]},{"aim":[646.9,453.0],"zoom":2.7,"tilt_x":-0.1333,"tilt_y":0.5093,"roll":-0.0353,"lock":false,"focus_screen":[1151.7,532.9],"centre_screen":[1920.6,812.2]},{"aim":[682.5,452.9],"zoom":2.7,"tilt_x":-0.1326,"tilt_y":0.5088,"roll":-0.035,"lock":false,"focus_screen":[1205.0,529.2],"centre_screen":[1782.8,807.8]},{"aim":[712.4,453.0],"zoom":2.7,"tilt_x":-0.1318,"tilt_y":0.5083,"roll":-0.0347,"lock":false,"focus_screen":[1272.4,530.6],"centre_screen":[1673.8,803.6]},{"aim":[767.9,453.1],"zoom":2.7,"tilt_x":-0.1309,"tilt_y":0.5076,"roll":-0.0344,"lock":false,"focus_screen":[1275.0,530.1],"centre_screen":[1486.1,796.5]},{"aim":[807.9,453.0],"zoom":2.7,"tilt_x":-0.1299,"tilt_y":0.5069,"roll":-0.034,"lock":false,"focus_screen":[1321.4,526.0],"centre_screen":[1361.5,792.3]},{"aim":[863.0,453.1],"zoom":2.7,"tilt_x":-0.1288,"tilt_y":0.5062,"roll":-0.0335,"lock":false,"focus_screen":[1317.3,526.8],"centre_screen":[1202.4,786.0]},{"aim":[902.9,452.8],"zoom":2.7,"tilt_x":-0.1276,"tilt_y":0.5053,"roll":-0.033,"lock":false,"focus_screen":[1363.4,524.3],"centre_screen":[1095.4,782.7]},{"aim":[958.0,452.9],"zoom":2.7,"tilt_x":-0.1264,"tilt_y":0.5045,"roll":-0.0326,"lock":false,"focus_screen":[1363.0,529.7],"centre_screen":[957.9,777.2]},{"aim":[927.9,453.0],"zoom":2.7,"tilt_x":-0.1251,"tilt_y":0.5036,"roll":-0.032,"lock":true,"focus_screen":[640.8,550.4],"centre_screen":[1031.8,779.7]},{"aim":[888.1,453.1],"zoom":2.7,"tilt_x":-0.1238,"tilt_y":0.5026,"roll":-0.0315,"lock":true,"focus_screen":[719.0,547.8],"centre_screen":[1134.8,783.5]},{"aim":[838.2,453.5],"zoom":2.7,"tilt_x":-0.1224,"tilt_y":0.5017,"roll":-0.031,"lock":false,"focus_screen":[823.9,545.6],"centre_screen":[1272.9,788.0]},{"aim":[778.4,453.3],"zoom":2.7,"tilt_x":-0.121,"tilt_y":0.5007,"roll":-0.0304,"lock":false,"focus_screen":[959.5,538.5],"centre_screen":[1453.2,796.0]},{"aim":[778.6,453.3],"zoom":2.7,"tilt_x":-0.1196,"tilt_y":0.4997,"roll":-0.0299,"lock":false,"focus_screen":[962.1,539.4],"centre_screen":[1452.8,796.2]},{"aim":[778.6,453.4],"zoom":2.7,"tilt_x":-0.1183,"tilt_y":0.4988,"roll":-0.0293,"lock":false,"focus_screen":[958.9,541.3],"centre_screen":[1452.9,796.0]},{"aim":[498.6,541.1],"zoom":1.9,"tilt_x":0.7874,"tilt_y":0.0948,"roll":-0.117,"lock":false,"focus_screen":[1069.7,526.9],"centre_screen":[1868.2,431.7]},{"aim":[518.3,541.1],"zoom":1.96,"tilt_x":0.7886,"tilt_y":0.094,"roll":-0.1166,"lock":false,"focus_screen":[1108.7,522.5],"centre_screen":[1856.0,433.5]},{"aim":[558.8,541.0],"zoom":2.011,"tilt_x":0.7897,"tilt_y":0.0932,"roll":-0.1161,"lock":false,"focus_screen":[1265.0,503.3],"centre_screen":[1792.4,441.5]},{"aim":[613.2,540.9],"zoom":2.054,"tilt_x":0.7907,"tilt_y":0.0925,"roll":-0.1157,"lock":false,"focus_screen":[1320.6,497.5],"centre_screen":[1691.2,453.7]},{"aim":[681.1,540.7],"zoom":2.091,"tilt_x":0.7916,"tilt_y":0.0919,"roll":-0.1153,"lock":false,"focus_screen":[1342.0,494.6],"centre_screen":[1554.2,470.1]},{"aim":[756.1,540.6],"zoom":2.12,"tilt_x":0.7925,"tilt_y":0.0913,"roll":-0.115,"lock":false,"focus_screen":[1352.6,494.1],"centre_screen":[1397.1,488.7]},{"aim":[824.5,540.7],"zoom":2.144,"tilt_x":0.7932,"tilt_y":0.0908,"roll":-0.1147,"lock":false,"focus_screen":[1378.8,492.3],"centre_screen":[1251.6,505.3]},{"aim":[892.7,540.6],"zoom":2.162,"tilt_x":0.7938,"tilt_y":0.0903,"roll":-0.1145,"lock":false,"focus_screen":[1401.8,488.3],"centre_screen":[1105.0,522.3]},{"aim":[961.2,540.9],"zoom":2.176,"tilt_x":0.7943,"tilt_y":0.09,"roll":-0.1143,"lock":false,"focus_screen":[1422.9,487.6],"centre_screen":[957.1,539.0]},{"aim":[960.1,541.2],"zoom":2.186,"tilt_x":0.7946,"tilt_y":0.0897,"roll":-0.1141,"lock":true,"focus_screen":[877.2,550.7],"centre_screen":[959.5,538.2]},{"aim":[944.9,541.4],"zoom":2.193,"tilt_x":0.7949,"tilt_y":0.0896,"roll":-0.114,"lock":true,"focus_screen":[910.3,546.6],"centre_screen":[992.3,534.2]},{"aim":[916.0,541.6],"zoom":2.197,"tilt_x":0.795,"tilt_y":0.0895,"roll":-0.114,"lock":false,"focus_screen":[972.7,537.9],"centre_screen":[1055.8,526.6]},{"aim":[873.2,541.5],"zoom":2.199,"tilt_x":0.795,"tilt_y":0.0895,"roll":-0.114,"lock":false,"focus_screen":[1065.8,527.2],"centre_screen":[1150.5,515.8]},{"aim":[875.2,541.4],"zoom":2.2,"tilt_x":0.7948,"tilt_y":0.0896,"roll":-0.1141,"lock":false,"focus_screen":[1060.3,528.7],"centre_screen":[1146.0,516.4]},{"aim":[877.3,541.4],"zoom":2.2,"tilt_x":0.7945,"tilt_y":0.0898,"roll":-0.1142,"lock":false,"focus_screen":[1057.4,529.3],"centre_screen":[1141.3,517.0]},{"aim":[525.7,519.4],"zoom":1.6,"tilt_x":0.272,"tilt_y":-0.3684,"roll":0.0048,"lock":false,"focus_screen":[1031.1,540.5],"centre_screen":[1525.4,570.5]},{"aim":[545.5,519.5],"zoom":1.899,"tilt_x":0.2711,"tilt_y":-0.3678,"roll":0.0044,"lock":false,"focus_screen":[1083.5,541.5],"centre_screen":[1590.1,575.1]},{"aim":[581.0,519.4],"zoom":2.155,"tilt_x":0.2701,"tilt_y":-0.3671,"roll":0.004,"lock":false,"focus_screen":[1195.8,539.9],"centre_screen":[1610.2,579.3]},{"aim":[639.6,519.4],"zoom":2.372,"tilt_x":0.269,"tilt_y":-0.3663,"roll":0.0036,"lock":false,"focus_screen":[1351.3,541.6],"centre_screen":[1570.4,583.0]},{"aim":[706.2,519.2],"zoom":2.553,"tilt_x":0.2679,"tilt_y":-0.3655,"roll":0.0032,"lock":false,"focus_screen":[1336.3,539.7],"centre_screen":[1489.4,586.8]},{"aim":[780.6,518.8],"zoom":2.701,"tilt_x":0.2667,"tilt_y":-0.3647,"roll":0.0027,"lock":false,"focus_screen":[1380.1,539.2],"centre_screen":[1366.0,591.1]},{"aim":[855.0,518.7],"zoom":2.82,"tilt_x":0.2654,"tilt_y":-0.3638,"roll":0.0022,"lock":false,"focus_screen":[1426.0,539.4],"centre_screen":[1214.4,595.0]},{"aim":[921.6,518.7],"zoom":2.912,"tilt_x":0.2641,"tilt_y":-0.3628,"roll":0.0016,"lock":false,"focus_screen":[1478.4,542.5],"centre_screen":[1055.7,598.4]},{"aim":[975.7,518.8],"zoom":2.982,"tilt_x":0.2627,"tilt_y":-0.3619,"roll":0.0011,"lock":false,"focus_screen":[1463.9,542.1],"centre_screen":[910.4,601.0]},{"aim":[1002.8,518.9],"zoom":3.032,"tilt_x":0.2613,"tilt_y":-0.3609,"roll":0.0005,"lock":true,"focus_screen":[1255.5,538.7],"centre_screen":[830.6,602.8]},{"aim":[1014.2,519.0],"zoom":3.065,"tilt_x":0.2599,"tilt_y":-0.36,"roll":-0.0,"lock":true,"focus_screen":[1230.5,539.7],"centre_screen":[794.8,603.6]},{"aim":[1010.5,518.9],"zoom":3.085,"tilt_x":0.2586,"tilt_y":-0.359,"roll":-0.0006,"lock":false,"focus_screen":[1243.2,538.5],"centre_screen":[804.9,604.5]},{"aim":[999.2,518.8],"zoom":3.096,"tilt_x":0.2572,"tilt_y":-0.358,"roll":-0.0011,"lock":false,"focus_screen":[1272.6,540.0],"centre_screen":[838.8,604.6]},{"aim":[999.3,519.0],"zoom":3.099,"tilt_x":0.2558,"tilt_y":-0.3571,"roll":-0.0017,"lock":false,"focus_screen":[1272.9,541.0],"centre_screen":[838.3,604.2]},{"aim":[999.2,518.9],"zoom":3.1,"tilt_x":0.2545,"tilt_y":-0.3562,"roll":-0.0022,"lock":false,"focus_screen":[1271.0,538.6],"centre_screen":[838.6,604.4]},{"aim":[605.5,496.9],"zoom":2.3,"tilt_x":0.1895,"tilt_y":0.3273,"roll":0.0458,"lock":false,"focus_screen":[886.8,535.7],"centre_screen":[1851.4,693.4]},{"aim":[622.6,497.3],"zoom":2.3,"tilt_x":0.1886,"tilt_y":0.328,"roll":0.0454,"lock":false,"focus_screen":[1048.4,548.1],"centre_screen":[1802.2,688.7]},{"aim":[648.0,497.7],"zoom":2.3,"tilt_x":0.1877,"tilt_y":0.3286,"roll":0.0451,"lock":false,"focus_screen":[1096.7,548.0],"centre_screen":[1730.0,683.0]},{"aim":[689.9,497.9],"zoom":2.3,"tilt_x":0.187,"tilt_y":0.3291,"roll":0.0448,"lock":false,"focus_screen":[1212.6,550.6],"centre_screen":[1614.3,675.1]},{"aim":[748.0,498.3],"zoom":2.3,"tilt_x":0.1863,"tilt_y":0.3296,"roll":0.0445,"lock":false,"focus_screen":[1289.6,554.9],"centre_screen":[1460.8,664.5]},{"aim":[785.1,497.9],"zoom":2.3,"tilt_x":0.1858,"tilt_y":0.3299,"roll":0.0443,"lock":false,"focus_screen":[1309.1,553.7],"centre_screen":[1367.0,659.5]},{"aim":[843.0,497.9],"zoom":2.3,"tilt_x":0.1854,"tilt_y":0.3302,"roll":0.0442,"lock":false,"focus_screen":[1393.3,560.0],"centre_screen":[1226.2,650.9]},{"aim":[896.8,498.0],"zoom":2.3,"tilt_x":0.1852,"tilt_y":0.3304,"roll":0.0441,"lock":false,"focus_screen":[1432.4,561.6],"centre_screen":[1101.3,642.8]},{"aim":[947.0,497.7],"zoom":2.3,"tilt_x":0.185,"tilt_y":0.3305,"roll":0.044,"lock":false,"focus_screen":[1483.2,560.0],"centre_screen":[989.7,636.7]},{"aim":[976.0,497.7],"zoom":2.3,"tilt_x":0.185,"tilt_y":0.3305,"roll":0.044,"lock":true,"focus_screen":[1403.2,559.0],"centre_screen":[927.4,632.7]},{"aim":[988.5,497.6],"zoom":2.3,"tilt_x":0.1851,"tilt_y":0.3304,"roll":0.0441,"lock":true,"focus_screen":[1372.3,558.4],"centre_screen":[900.8,631.3]},{"aim":[988.6,497.6],"zoom":2.3,"tilt_x":0.1854,"tilt_y":0.3302,"roll":0.0442,"lock":false,"focus_screen":[1371.6,559.1],"centre_screen":[900.6,631.4]},{"aim":[976.2,497.8],"zoom":2.3,"tilt_x":0.1858,"tilt_y":0.33,"roll":0.0443,"lock":false,"focus_screen":[1403.3,559.0],"centre_screen":[926.9,632.6]},{"aim":[964.0,497.9],"zoom":2.3,"tilt_x":0.1863,"tilt_y":0.3296,"roll":0.0445,"lock":false,"focus_screen":[1433.5,562.5],"centre_screen":[952.9,633.9]},{"aim":[951.9,498.0],"zoom":2.3,"tilt_x":0.1869,"tilt_y":0.3292,"roll":0.0447,"lock":false,"focus_screen":[1466.8,563.4],"centre_screen":[979.0,635.2]},{"aim":[758.1,528.3],"zoom":3.1,"tilt_x":0.3107,"tilt_y":-0.2535,"roll":-0.0237,"lock":false,"focus_screen":[1071.6,538.3],"centre_screen":[1513.3,558.4]},{"aim":[788.7,528.1],"zoom":2.901,"tilt_x":0.3119,"tilt_y":-0.2543,"roll":-0.0233,"lock":false,"focus_screen":[1159.3,533.3],"centre_screen":[1405.9,560.2]},{"aim":[813.0,528.0],"zoom":2.73,"tilt_x":0.3131,"tilt_y":-0.2551,"roll":-0.0228,"lock":false,"focus_screen":[1257.8,533.1],"centre_screen":[1324.3,561.2]},{"aim":[867.9,527.6],"zoom":2.585,"tilt_x":0.3143,"tilt_y":-0.256,"roll":-0.0223,"lock":false,"focus_screen":[1267.1,531.2],"centre_screen":[1180.1,564.4]},{"aim":[916.2,527.7],"zoom":2.464,"tilt_x":0.3156,"tilt_y":-0.2569,"roll":-0.0217,"lock":false,"focus_screen":[1295.8,535.1],"centre_screen":[1060.5,566.2]},{"aim":[983.4,527.9],"zoom":2.366,"tilt_x":0.317,"tilt_y":-0.2579,"roll":-0.0212,"lock":false,"focus_screen":[1280.3,535.1],"centre_screen":[904.6,568.4]},{"aim":[1031.4,528.0],"zoom":2.287,"tilt_x":0.3184,"tilt_y":-0.2589,"roll":-0.0207,"lock":false,"focus_screen":[1308.9,533.9],"centre_screen":[797.5,569.8]},{"aim":[1098.7,528.4],"zoom":2.225,"tilt_x":0.3198,"tilt_y":-0.2598,"roll":-0.0201,"lock":false,"focus_screen":[1300.8,534.1],"centre_screen":[648.0,571.8]},{"aim":[1135.2,528.0],"zoom":2.179,"tilt_x":0.3211,"tilt_y":-0.2608,"roll":-0.0195,"lock":false,"focus_screen":[1227.0,531.6],"centre_screen":[570.4,573.8]},{"aim":[1111.3,527.6],"zoom":2.146,"tilt_x":0.3225,"tilt_y":-0.2618,"roll":-0.019,"lock":true,"focus_screen":[716.0,543.0],"centre_screen":[631.2,572.5]},{"aim":[1075.1,527.4],"zoom":2.123,"tilt_x":0.3239,"tilt_y":-0.2627,"roll":-0.0184,"lock":true,"focus_screen":[795.2,542.6],"centre_screen":[714.9,570.7]},{"aim":[1026.6,527.1],"zoom":2.11,"tilt_x":0.3252,"tilt_y":-0.2637,"roll":-0.0179,"lock":false,"focus_screen":[897.6,541.9],"centre_screen":[820.4,568.6]},{"aim":[978.0,527.3],"zoom":2.103,"tilt_x":0.3265,"tilt_y":-0.2645,"roll":-0.0174,"lock":false,"focus_screen":[997.7,539.5],"centre_screen":[921.7,565.9]},{"aim":[977.8,527.5],"zoom":2.1,"tilt_x":0.3277,"tilt_y":-0.2654,"roll":-0.0169,"lock":false,"focus_screen":[997.5,540.3],"centre_screen":[922.2,565.5]},{"aim":[977.7,527.5],"zoom":2.1,"tilt_x":0.3289,"tilt_y":-0.2662,"roll":-0.0164,"lock":false,"focus_screen":[997.7,538.2],"centre_screen":[922.3,565.5]},{"aim":[556.2,496.3],"zoom":2.05,"tilt_x":0.1629,"tilt_y":-0.169,"roll":0.0052,"lock":false,"focus_screen":[1028.0,546.5],"centre_screen":[1710.3,625.5]},{"aim":[579.3,495.9],"zoom":2.06,"tilt_x":0.1635,"tilt_y":-0.1695,"roll":0.0054,"lock":false,"focus_screen":[1153.3,547.7],"centre_screen":[1673.0,626.8]},{"aim":[627.3,501.0],"zoom":2.069,"tilt_x":0.1641,"tilt_y":-0.1699,"roll":0.0056,"lock":false,"focus_screen":[1237.9,539.1],"centre_screen":[1591.2,617.8]},{"aim":[666.8,497.4],"zoom":2.076,"tilt_x":0.1645,"tilt_y":-0.1702,"roll":0.0058,"lock":false,"focus_screen":[1245.0,544.0],"centre_screen":[1521.0,625.3]},{"aim":[723.4,497.4],"zoom":2.082,"tilt_x":0.1648,"tilt_y":-0.1704,"roll":0.0059,"lock":false,"focus_screen":[1224.3,540.7],"centre_screen":[1418.0,625.7]},{"aim":[790.5,494.9],"zoom":2.087,"tilt_x":0.165,"tilt_y":-0.1705,"roll":0.006,"lock":false,"focus_screen":[1349.6,550.3],"centre_screen":[1291.8,631.2]},{"aim":[856.2,500.2],"zoom":2.091,"tilt_x":0.165,"tilt_y":-0.1705,"roll":0.006,"lock":false,"focus_screen":[1309.0,536.9],"centre_screen":[1165.4,621.1]},{"aim":[918.9,494.7],"zoom":2.094,"tilt_x":0.1649,"tilt_y":-0.1704,"roll":0.006,"lock":false,"focus_screen":[1363.7,549.4],"centre_screen":[1040.3,632.5]},{"aim":[977.8,495.6],"zoom":2.096,"tilt_x":0.1647,"tilt_y":-0.1703,"roll":0.0059,"lock":false,"focus_screen":[1335.4,548.8],"centre_screen":[920.3,631.1]},{"aim":[989.7,501.6],"zoom":2.098,"tilt_x":0.1643,"tilt_y":-0.17,"roll":0.0057,"lock":true,"focus_screen":[1093.0,533.3],"centre_screen":[896.0,619.0]},{"aim":[995.7,495.5],"zoom":2.099,"tilt_x":0.1639,"tilt_y":-0.1697,"roll":0.0055,"lock":true,"focus_screen":[1080.6,546.6],"centre_screen":[883.2,631.7]},{"aim":[978.2,499.8],"zoom":2.1,"tilt_x":0.1633,"tilt_y":-0.1693,"roll":0.0053,"lock":false,"focus_screen":[1116.4,539.1],"centre_screen":[919.7,622.8]},{"aim":[964.6,500.8],"zoom":2.1,"tilt_x":0.1626,"tilt_y":-0.1688,"roll":0.005,"lock":false,"focus_screen":[1143.0,536.3],"centre_screen":[947.9,620.7]},{"aim":[957.9,495.0],"zoom":2.1,"tilt_x":0.1618,"tilt_y":-0.1682,"roll":0.0047,"lock":false,"focus_screen":[1155.8,547.1],"centre_screen":[961.4,632.6]},{"aim":[963.0,495.0],"zoom":2.1,"tilt_x":0.1608,"tilt_y":-0.1676,"roll":0.0043,"lock":false,"focus_screen":[1145.6,546.6],"centre_screen":[950.9,632.6]},{"aim":[726.9,530.0],"zoom":2.5,"tilt_x":0.226,"tilt_y":0.6158,"roll":-0.0776,"lock":false,"focus_screen":[1052.1,531.8],"centre_screen":[1545.3,524.4]},{"aim":[739.2,530.4],"zoom":2.54,"tilt_x":0.2246,"tilt_y":0.6167,"roll":-0.0781,"lock":false,"focus_screen":[1165.8,527.6],"centre_screen":[1518.4,525.2]},{"aim":[778.6,530.5],"zoom":2.574,"tilt_x":0.2233,"tilt_y":0.6177,"roll":-0.0787,"lock":false,"focus_screen":[1212.1,519.7],"centre_screen":[1409.5,532.5]},{"aim":[812.2,530.5],"zoom":2.603,"tilt_x":0.2219,"tilt_y":0.6186,"roll":-0.0792,"lock":false,"focus_screen":[1286.5,511.1],"centre_screen":[1320.3,538.9]},{"aim":[873.3,531.0],"zoom":2.627,"tilt_x":0.2205,"tilt_y":0.6196,"roll":-0.0798,"lock":false,"focus_screen":[1285.7,518.2],"centre_screen":[1163.9,548.6]},{"aim":[917.7,530.9],"zoom":2.647,"tilt_x":0.2192,"tilt_y":0.6206,"roll":-0.0803,"lock":false,"focus_screen":[1334.9,510.2],"centre_screen":[1059.0,556.5]},{"aim":[979.6,530.8],"zoom":2.663,"tilt_x":0.2178,"tilt_y":0.6216,"roll":-0.0809,"lock":false,"focus_screen":[1333.6,507.2],"centre_screen":[923.5,566.5]},{"aim":[1024.3,531.3],"zoom":2.675,"tilt_x":0.2164,"tilt_y":0.6225,"roll":-0.0814,"lock":false,"focus_screen":[1378.2,509.3],"centre_screen":[832.7,571.9]},{"aim":[1058.5,531.0],"zoom":2.684,"tilt_x":0.2151,"tilt_y":0.6235,"roll":-0.082,"lock":false,"focus_screen":[1284.1,511.5],"centre_screen":[767.5,577.7]},{"aim":[1043.7,531.0],"zoom":2.691,"tilt_x":0.2138,"tilt_y":0.6244,"roll":-0.0825,"lock":true,"focus_screen":[828.2,551.2],"centre_screen":[795.0,575.8]},{"aim":[1018.0,531.1],"zoom":2.695,"tilt_x":0.2125,"tilt_y":0.6252,"roll":-0.083,"lock":true,"focus_screen":[879.7,545.3],"centre_screen":[844.5,572.0]},{"aim":[981.6,530.7],"zoom":2.698,"tilt_x":0.2114,"tilt_y":0.626,"roll":-0.0835,"lock":false,"focus_screen":[955.5,539.5],"centre_screen":[918.9,567.5]},{"aim":[945.1,530.7],"zoom":2.699,"tilt_x":0.2103,"tilt_y":0.6268,"roll":-0.0839,"lock":false,"focus_screen":[1038.5,532.9],"centre_screen":[998.0,561.6]},{"aim":[946.4,530.8],"zoom":2.7,"tilt_x":0.2092,"tilt_y":0.6275,"roll":-0.0843,"lock":false,"focus_screen":[1034.0,535.6],"centre_screen":[995.0,561.6]},{"aim":[947.8,530.8],"zoom":2.7,"tilt_x":0.2083,"tilt_y":0.6282,"roll":-0.0847,"lock":false,"focus_screen":[1031.5,533.1],"centre_screen":[991.9,561.9]},{"aim":[427.1,627.2],"zoom":1.35,"tilt_x":0.2856,"tilt_y":0.2101,"roll":0.0242,"lock":false,"focus_screen":[698.2,575.9],"centre_screen":[1736.3,433.4]},{"aim":[427.7,626.8],"zoom":1.619,"tilt_x":0.2853,"tilt_y":0.2103,"roll":0.0241,"lock":false,"focus_screen":[652.0,580.8],"centre_screen":[1910.8,409.7]},{"aim":[430.6,626.6],"zoom":1.85,"tilt_x":0.2851,"tilt_y":0.2105,"roll":0.024,"lock":false,"focus_screen":[626.6,587.7],"centre_screen":[2060.9,388.7]},{"aim":[441.5,625.0],"zoom":2.045,"tilt_x":0.285,"tilt_y":0.2105,"roll":0.024,"lock":false,"focus_screen":[654.7,584.3],"centre_screen":[2167.6,373.4]},{"aim":[466.9,621.2],"zoom":2.208,"tilt_x":0.2851,"tilt_y":0.2105,"roll":0.024,"lock":false,"focus_screen":[739.9,572.7],"centre_screen":[2205.8,367.3]},{"aim":[516.1,613.1],"zoom":2.341,"tilt_x":0.2853,"tilt_y":0.2103,"roll":0.0241,"lock":false,"focus_screen":[914.7,541.7],"centre_screen":[2139.8,376.6]},{"aim":[596.5,599.9],"zoom":2.448,"tilt_x":0.2856,"tilt_y":0.2101,"roll":0.0242,"lock":false,"focus_screen":[1170.6,512.5],"centre_screen":[1946.4,403.3]},{"aim":[693.2,583.9],"zoom":2.531,"tilt_x":0.286,"tilt_y":0.2098,"roll":0.0244,"lock":false,"focus_screen":[1281.3,496.1],"centre_screen":[1684.1,440.0]},{"aim":[790.2,567.7],"zoom":2.594,"tilt_x":0.2866,"tilt_y":0.2094,"roll":0.0246,"lock":false,"focus_screen":[1248.0,500.8],"centre_screen":[1415.9,477.7]},{"aim":[870.5,554.9],"zoom":2.639,"tilt_x":0.2873,"tilt_y":0.2089,"roll":0.0249,"lock":true,"focus_screen":[1149.1,513.5],"centre_screen":[1197.4,507.0]},{"aim":[920.0,546.6],"zoom":2.669,"tilt_x":0.2881,"tilt_y":0.2084,"roll":0.0252,"lock":true,"focus_screen":[1059.3,526.3],"centre_screen":[1065.3,525.5]},{"aim":[945.5,542.5],"zoom":2.687,"tilt_x":0.289,"tilt_y":0.2077,"roll":0.0256,"lock":false,"focus_screen":[996.9,536.0],"centre_screen":[998.1,534.6]},{"aim":[956.3,540.6],"zoom":2.696,"tilt_x":0.2899,"tilt_y":0.207,"roll":0.026,"lock":false,"focus_screen":[969.2,537.1],"centre_screen":[969.8,538.8]},{"aim":[959.5,540.1],"zoom":2.7,"tilt_x":0.291,"tilt_y":0.2063,"roll":0.0264,"lock":false,"focus_screen":[962.2,540.0],"centre_screen":[961.2,539.9]},{"aim":[960.0,540.0],"zoom":2.7,"tilt_x":0.2922,"tilt_y":0.2055,"roll":0.0269,"lock":false,"focus_screen":[960.5,540.6],"centre_screen":[960.1,539.9]},{"aim":[948.1,540.4],"zoom":3.0,"tilt_x":0.4578,"tilt_y":-0.3184,"roll":0.0591,"lock":false,"focus_screen":[946.7,539.7],"centre_screen":[994.0,540.9]},{"aim":[947.8,540.5],"zoom":2.781,"tilt_x":0.4591,"tilt_y":-0.3194,"roll":0.0597,"lock":false,"focus_screen":[944.6,540.9],"centre_screen":[992.1,540.6]},{"aim":[947.6,540.8],"zoom":2.593,"tilt_x":0.4605,"tilt_y":-0.3204,"roll":0.0602,"lock":false,"focus_screen":[945.8,542.2],"centre_screen":[990.7,539.9]},{"aim":[947.6,541.0],"zoom":2.434,"tilt_x":0.4619,"tilt_y":-0.3214,"roll":0.0608,"lock":false,"focus_screen":[950.4,540.3],"centre_screen":[988.9,539.7]},{"aim":[947.5,541.0],"zoom":2.301,"tilt_x":0.4633,"tilt_y":-0.3223,"roll":0.0613,"lock":false,"focus_screen":[949.4,538.7],"centre_screen":[987.6,539.7]},{"aim":[947.4,540.8],"zoom":2.192,"tilt_x":0.4646,"tilt_y":-0.3233,"roll":0.0619,"lock":false,"focus_screen":[948.9,538.4],"centre_screen":[986.3,540.0]},{"aim":[947.5,540.7],"zoom":2.105,"tilt_x":0.4659,"tilt_y":-0.3242,"roll":0.0624,"lock":false,"focus_screen":[949.8,540.8],"centre_screen":[985.1,540.3]},{"aim":[947.4,540.8],"zoom":2.037,"tilt_x":0.4672,"tilt_y":-0.325,"roll":0.0629,"lock":false,"focus_screen":[950.8,541.2],"centre_screen":[984.6,540.2]},{"aim":[947.5,540.9],"zoom":1.987,"tilt_x":0.4684,"tilt_y":-0.3259,"roll":0.0634,"lock":false,"focus_screen":[951.7,540.5],"centre_screen":[983.8,539.9]},{"aim":[947.7,540.9],"zoom":1.95,"tilt_x":0.4695,"tilt_y":-0.3267,"roll":0.0638,"lock":true,"focus_screen":[951.8,538.4],"centre_screen":[983.0,539.9]},{"aim":[947.8,540.7],"zoom":1.926,"tilt_x":0.4705,"tilt_y":-0.3274,"roll":0.0642,"lock":true,"focus_screen":[951.7,539.1],"centre_screen":[982.4,540.2]},{"aim":[947.9,540.8],"zoom":1.911,"tilt_x":0.4715,"tilt_y":-0.328,"roll":0.0646,"lock":false,"focus_screen":[951.1,541.6],"centre_screen":[982.1,540.1]},{"aim":[947.7,540.6],"zoom":1.903,"tilt_x":0.4723,"tilt_y":-0.3286,"roll":0.0649,"lock":false,"focus_screen":[950.0,539.0],"centre_screen":[982.3,540.5]},{"aim":[947.8,540.6],"zoom":1.9,"tilt_x":0.4731,"tilt_y":-0.3291,"roll":0.0652,"lock":false,"focus_screen":[952.8,539.0],"centre_screen":[982.0,540.5]},{"aim":[948.0,540.7],"zoom":1.9,"tilt_x":0.4737,"tilt_y":-0.3296,"roll":0.0655,"lock":false,"focus_screen":[952.8,540.7],"centre_screen":[981.8,540.2]}]}diff --git a/score/tests/fixtures/resources.json b/score/tests/fixtures/resources.jsonnew file mode 100644index 0000000..0737b08--- /dev/null+++ b/score/tests/fixtures/resources.json@@ -0,0 +1 @@+{"catalog":{"schema":1,"machines":[{"id":"fm86","name":"FM-7.11","path":"machines/fm86/fm86.fy","kind":"instrument","voices":8,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"algo","type":"int","min":1,"max":32,"default":1},{"id":"feedback","type":"int","min":0,"max":7,"default":0},{"id":"transpose","type":"int","min":-24,"max":24,"default":0},{"id":"oks","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"volume","type":"float","min":0,"max":2,"default":1},{"id":"engine","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"MODERN","value":0},{"label":"DX7","value":1},{"label":"DX7 II","value":2}]},{"id":"op1-ol","type":"int","min":0,"max":99,"default":99},{"id":"op1-coarse","type":"int","min":0,"max":31,"default":1},{"id":"op1-fine","type":"int","min":0,"max":99,"default":0},{"id":"op1-det","type":"int","min":-7,"max":7,"default":0},{"id":"op1-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"RATIO","value":0},{"label":"FIXED","value":1}]},{"id":"op1-r1","type":"int","min":0,"max":99,"default":99},{"id":"op1-r2","type":"int","min":0,"max":99,"default":99},{"id":"op1-r3","type":"int","min":0,"max":99,"default":99},{"id":"op1-r4","type":"int","min":0,"max":99,"default":99},{"id":"op1-l1","type":"int","min":0,"max":99,"default":99},{"id":"op1-l2","type":"int","min":0,"max":99,"default":99},{"id":"op1-l3","type":"int","min":0,"max":99,"default":99},{"id":"op1-l4","type":"int","min":0,"max":99,"default":0},{"id":"op1-bp","type":"int","min":0,"max":99,"default":39},{"id":"op1-ld","type":"int","min":0,"max":99,"default":0},{"id":"op1-rd","type":"int","min":0,"max":99,"default":0},{"id":"op1-lc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op1-rc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op1-rs","type":"int","min":0,"max":7,"default":0},{"id":"op1-kvs","type":"int","min":0,"max":7,"default":0},{"id":"op1-ams","type":"int","min":0,"max":3,"default":0},{"id":"op2-ol","type":"int","min":0,"max":99,"default":0},{"id":"op2-coarse","type":"int","min":0,"max":31,"default":1},{"id":"op2-fine","type":"int","min":0,"max":99,"default":0},{"id":"op2-det","type":"int","min":-7,"max":7,"default":0},{"id":"op2-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"RATIO","value":0},{"label":"FIXED","value":1}]},{"id":"op2-r1","type":"int","min":0,"max":99,"default":99},{"id":"op2-r2","type":"int","min":0,"max":99,"default":99},{"id":"op2-r3","type":"int","min":0,"max":99,"default":99},{"id":"op2-r4","type":"int","min":0,"max":99,"default":99},{"id":"op2-l1","type":"int","min":0,"max":99,"default":99},{"id":"op2-l2","type":"int","min":0,"max":99,"default":99},{"id":"op2-l3","type":"int","min":0,"max":99,"default":99},{"id":"op2-l4","type":"int","min":0,"max":99,"default":0},{"id":"op2-bp","type":"int","min":0,"max":99,"default":39},{"id":"op2-ld","type":"int","min":0,"max":99,"default":0},{"id":"op2-rd","type":"int","min":0,"max":99,"default":0},{"id":"op2-lc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op2-rc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op2-rs","type":"int","min":0,"max":7,"default":0},{"id":"op2-kvs","type":"int","min":0,"max":7,"default":0},{"id":"op2-ams","type":"int","min":0,"max":3,"default":0},{"id":"op3-ol","type":"int","min":0,"max":99,"default":0},{"id":"op3-coarse","type":"int","min":0,"max":31,"default":1},{"id":"op3-fine","type":"int","min":0,"max":99,"default":0},{"id":"op3-det","type":"int","min":-7,"max":7,"default":0},{"id":"op3-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"RATIO","value":0},{"label":"FIXED","value":1}]},{"id":"op3-r1","type":"int","min":0,"max":99,"default":99},{"id":"op3-r2","type":"int","min":0,"max":99,"default":99},{"id":"op3-r3","type":"int","min":0,"max":99,"default":99},{"id":"op3-r4","type":"int","min":0,"max":99,"default":99},{"id":"op3-l1","type":"int","min":0,"max":99,"default":99},{"id":"op3-l2","type":"int","min":0,"max":99,"default":99},{"id":"op3-l3","type":"int","min":0,"max":99,"default":99},{"id":"op3-l4","type":"int","min":0,"max":99,"default":0},{"id":"op3-bp","type":"int","min":0,"max":99,"default":39},{"id":"op3-ld","type":"int","min":0,"max":99,"default":0},{"id":"op3-rd","type":"int","min":0,"max":99,"default":0},{"id":"op3-lc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op3-rc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op3-rs","type":"int","min":0,"max":7,"default":0},{"id":"op3-kvs","type":"int","min":0,"max":7,"default":0},{"id":"op3-ams","type":"int","min":0,"max":3,"default":0},{"id":"op4-ol","type":"int","min":0,"max":99,"default":0},{"id":"op4-coarse","type":"int","min":0,"max":31,"default":1},{"id":"op4-fine","type":"int","min":0,"max":99,"default":0},{"id":"op4-det","type":"int","min":-7,"max":7,"default":0},{"id":"op4-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"RATIO","value":0},{"label":"FIXED","value":1}]},{"id":"op4-r1","type":"int","min":0,"max":99,"default":99},{"id":"op4-r2","type":"int","min":0,"max":99,"default":99},{"id":"op4-r3","type":"int","min":0,"max":99,"default":99},{"id":"op4-r4","type":"int","min":0,"max":99,"default":99},{"id":"op4-l1","type":"int","min":0,"max":99,"default":99},{"id":"op4-l2","type":"int","min":0,"max":99,"default":99},{"id":"op4-l3","type":"int","min":0,"max":99,"default":99},{"id":"op4-l4","type":"int","min":0,"max":99,"default":0},{"id":"op4-bp","type":"int","min":0,"max":99,"default":39},{"id":"op4-ld","type":"int","min":0,"max":99,"default":0},{"id":"op4-rd","type":"int","min":0,"max":99,"default":0},{"id":"op4-lc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op4-rc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op4-rs","type":"int","min":0,"max":7,"default":0},{"id":"op4-kvs","type":"int","min":0,"max":7,"default":0},{"id":"op4-ams","type":"int","min":0,"max":3,"default":0},{"id":"op5-ol","type":"int","min":0,"max":99,"default":0},{"id":"op5-coarse","type":"int","min":0,"max":31,"default":1},{"id":"op5-fine","type":"int","min":0,"max":99,"default":0},{"id":"op5-det","type":"int","min":-7,"max":7,"default":0},{"id":"op5-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"RATIO","value":0},{"label":"FIXED","value":1}]},{"id":"op5-r1","type":"int","min":0,"max":99,"default":99},{"id":"op5-r2","type":"int","min":0,"max":99,"default":99},{"id":"op5-r3","type":"int","min":0,"max":99,"default":99},{"id":"op5-r4","type":"int","min":0,"max":99,"default":99},{"id":"op5-l1","type":"int","min":0,"max":99,"default":99},{"id":"op5-l2","type":"int","min":0,"max":99,"default":99},{"id":"op5-l3","type":"int","min":0,"max":99,"default":99},{"id":"op5-l4","type":"int","min":0,"max":99,"default":0},{"id":"op5-bp","type":"int","min":0,"max":99,"default":39},{"id":"op5-ld","type":"int","min":0,"max":99,"default":0},{"id":"op5-rd","type":"int","min":0,"max":99,"default":0},{"id":"op5-lc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op5-rc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op5-rs","type":"int","min":0,"max":7,"default":0},{"id":"op5-kvs","type":"int","min":0,"max":7,"default":0},{"id":"op5-ams","type":"int","min":0,"max":3,"default":0},{"id":"op6-ol","type":"int","min":0,"max":99,"default":0},{"id":"op6-coarse","type":"int","min":0,"max":31,"default":1},{"id":"op6-fine","type":"int","min":0,"max":99,"default":0},{"id":"op6-det","type":"int","min":-7,"max":7,"default":0},{"id":"op6-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"RATIO","value":0},{"label":"FIXED","value":1}]},{"id":"op6-r1","type":"int","min":0,"max":99,"default":99},{"id":"op6-r2","type":"int","min":0,"max":99,"default":99},{"id":"op6-r3","type":"int","min":0,"max":99,"default":99},{"id":"op6-r4","type":"int","min":0,"max":99,"default":99},{"id":"op6-l1","type":"int","min":0,"max":99,"default":99},{"id":"op6-l2","type":"int","min":0,"max":99,"default":99},{"id":"op6-l3","type":"int","min":0,"max":99,"default":99},{"id":"op6-l4","type":"int","min":0,"max":99,"default":0},{"id":"op6-bp","type":"int","min":0,"max":99,"default":39},{"id":"op6-ld","type":"int","min":0,"max":99,"default":0},{"id":"op6-rd","type":"int","min":0,"max":99,"default":0},{"id":"op6-lc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op6-rc","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"-LIN","value":0},{"label":"-EXP","value":1},{"label":"+EXP","value":2},{"label":"+LIN","value":3}]},{"id":"op6-rs","type":"int","min":0,"max":7,"default":0},{"id":"op6-kvs","type":"int","min":0,"max":7,"default":0},{"id":"op6-ams","type":"int","min":0,"max":3,"default":0},{"id":"lfo-speed","type":"int","min":0,"max":99,"default":35},{"id":"lfo-delay","type":"int","min":0,"max":99,"default":0},{"id":"lfo-pmd","type":"int","min":0,"max":99,"default":0},{"id":"lfo-amd","type":"int","min":0,"max":99,"default":0},{"id":"pms","type":"int","min":0,"max":7,"default":3},{"id":"lfo-sync","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"lfo-wave","type":"switch","min":0,"max":5,"default":0,"options":[{"label":"TRI","value":0},{"label":"SAW-","value":1},{"label":"SAW+","value":2},{"label":"SQR","value":3},{"label":"SIN","value":4},{"label":"S/H","value":5}]},{"id":"pr1","type":"int","min":0,"max":99,"default":99},{"id":"pr2","type":"int","min":0,"max":99,"default":99},{"id":"pr3","type":"int","min":0,"max":99,"default":99},{"id":"pr4","type":"int","min":0,"max":99,"default":99},{"id":"pl1","type":"int","min":0,"max":99,"default":50},{"id":"pl2","type":"int","min":0,"max":99,"default":50},{"id":"pl3","type":"int","min":0,"max":99,"default":50},{"id":"pl4","type":"int","min":0,"max":99,"default":50}]},{"id":"drum2","name":"DS-404 Drums","path":"machines/drum2/drum2.fy","kind":"instrument","voices":1,"note_pitch":true,"sidechain":false,"note_labels":[{"pitch":36,"label":"KICK"},{"pitch":38,"label":"SNARE"},{"pitch":39,"label":"CLAP"},{"pitch":42,"label":"CH"},{"pitch":45,"label":"TOM"},{"pitch":46,"label":"OH"}],"params":[{"id":"kick-tune","type":"float","min":20,"max":200,"default":50},{"id":"kick-sweep","type":"float","min":0,"max":16,"default":7},{"id":"kick-bend","type":"float","min":0.0049999999999999975,"max":0.3999999999999999,"default":0.05499999999999999},{"id":"kick-decay","type":"float","min":0.04999999999999999,"max":2.5,"default":0.41999999999999993},{"id":"kick-click","type":"float","min":0,"max":1,"default":0.34999999999999987},{"id":"kick-drive","type":"float","min":0.5,"max":6,"default":1.7999999999999998},{"id":"kick-level","type":"float","min":0,"max":1,"default":0.8999999999999999},{"id":"snare-tune","type":"float","min":110,"max":440,"default":185},{"id":"snare-decay","type":"float","min":0.04999999999999999,"max":0.7999999999999998,"default":0.17999999999999994},{"id":"snare-snap","type":"float","min":0,"max":1,"default":0.7999999999999998},{"id":"snare-sdec","type":"float","min":0.03,"max":0.5999999999999996,"default":0.09999999999999998},{"id":"snare-tone","type":"float","min":400,"max":6000,"default":1800},{"id":"snare-level","type":"float","min":0,"max":1,"default":0.8999999999999999},{"id":"clap-tone","type":"float","min":400,"max":3000,"default":1100},{"id":"clap-spread","type":"float","min":0.004,"max":0.03999999999999998,"default":0.010999999999999996},{"id":"clap-decay","type":"float","min":0.04999999999999999,"max":1.5,"default":0.28},{"id":"clap-level","type":"float","min":0,"max":1,"default":0.8999999999999999},{"id":"hat-tune","type":"float","min":0.5999999999999996,"max":1.7999999999999998,"default":1},{"id":"hat-tone","type":"float","min":0.5999999999999996,"max":1.5999999999999996,"default":1},{"id":"hat-chdec","type":"float","min":0.01999999999999999,"max":0.3999999999999999,"default":0.07},{"id":"hat-ohdec","type":"float","min":0.09999999999999998,"max":2,"default":0.5999999999999996},{"id":"hat-level","type":"float","min":0,"max":1.5,"default":0.8499999999999996},{"id":"tom-tune","type":"float","min":60,"max":360,"default":110},{"id":"tom-sweep","type":"float","min":0,"max":6,"default":1.1999999999999993},{"id":"tom-decay","type":"float","min":0.04999999999999999,"max":1.5,"default":0.2999999999999998},{"id":"tom-drive","type":"float","min":0.5,"max":6,"default":1.2999999999999998},{"id":"tom-level","type":"float","min":0,"max":1,"default":0.8499999999999996},{"id":"master-accent","type":"float","min":0,"max":1,"default":0.6999999999999997},{"id":"master-drive","type":"float","min":0.5,"max":5,"default":1},{"id":"master-level","type":"float","min":0,"max":1,"default":0.8999999999999999}]},{"id":"delay2","name":"Delay","path":"machines/delay2/delay2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":true,"note_labels":[],"params":[{"id":"delay-time","type":"float","min":0.01999999999999999,"max":1.5,"default":0.3599999999999999},{"id":"delay-sync","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"FREE","value":0},{"label":"SYNC","value":1}]},{"id":"delay-div","type":"switch","min":0,"max":6,"default":2,"options":[{"label":"1/16","value":0.25},{"label":"1/8T","value":0.3333299999999999},{"label":"1/8","value":0.5},{"label":"1/8.","value":0.75},{"label":"1/4","value":1},{"label":"1/4.","value":1.5},{"label":"1/2","value":2}]},{"id":"delay-ratio","type":"switch","min":0,"max":6,"default":0,"options":[{"label":"1:1","value":1},{"label":"3:4","value":0.75},{"label":"2:3","value":0.6666699999999999},{"label":"1:2","value":0.5},{"label":"4:3","value":1.3333299999999992},{"label":"3:2","value":1.5},{"label":"2:1","value":2}]},{"id":"delay-offset","type":"float","min":-0.01999999999999999,"max":0.01999999999999999,"default":0},{"id":"delay-fb","type":"float","min":0,"max":1.0999999999999996,"default":0.44999999999999996},{"id":"delay-lowcut","type":"float","min":20,"max":2000,"default":20},{"id":"delay-damp","type":"float","min":500,"max":16000,"default":5500},{"id":"delay-drive","type":"float","min":0,"max":1,"default":0},{"id":"delay-mode","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"STEREO","value":0},{"label":"PING","value":1},{"label":"WIDE","value":2}]},{"id":"delay-char","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"DIGITAL","value":0},{"label":"TAPE","value":1},{"label":"BBD","value":2}]},{"id":"delay-mod","type":"float","min":0,"max":1,"default":0},{"id":"delay-rate","type":"float","min":0.09999999999999998,"max":6,"default":0.7999999999999998},{"id":"delay-duck","type":"float","min":0,"max":1,"default":0},{"id":"delay-width","type":"float","min":0,"max":1.5,"default":1},{"id":"delay-mix","type":"float","min":0,"max":1,"default":0.34999999999999987},{"id":"delay-freeze","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]}]},{"id":"verb2","name":"Verb","path":"machines/verb2/verb2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":true,"note_labels":[],"params":[{"id":"verb-algo","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"PLATE","value":0},{"label":"ROOM","value":1},{"label":"HALL","value":2}]},{"id":"verb-size","type":"float","min":0.5,"max":1.5,"default":1},{"id":"verb-decay","type":"float","min":0.19999999999999996,"max":40,"default":3},{"id":"verb-diff","type":"float","min":0,"max":1,"default":1},{"id":"verb-predelay","type":"float","min":0.001,"max":0.25,"default":0.01999999999999999},{"id":"verb-pre-sync","type":"switch","min":0,"max":4,"default":0,"options":[{"label":"FREE","value":0},{"label":"1/64","value":0.0625},{"label":"1/32","value":0.125},{"label":"1/16","value":0.25},{"label":"1/8","value":0.5}]},{"id":"verb-lowcut","type":"float","min":20,"max":1000,"default":20},{"id":"verb-tone","type":"float","min":1000,"max":18000,"default":9000},{"id":"verb-damp","type":"float","min":1000,"max":16000,"default":5000},{"id":"verb-bass","type":"float","min":0.5,"max":2.5,"default":1},{"id":"verb-xover","type":"float","min":100,"max":1500,"default":400},{"id":"verb-mod","type":"float","min":0,"max":24,"default":10},{"id":"verb-mod-rate","type":"float","min":0.09999999999999998,"max":5,"default":1.1999999999999993},{"id":"verb-early","type":"float","min":0,"max":1,"default":0},{"id":"verb-width","type":"float","min":0,"max":1.5,"default":1},{"id":"verb-mix","type":"float","min":0,"max":1,"default":0.2999999999999998},{"id":"verb-mode","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"GATED","value":1}]},{"id":"verb-gate-thr","type":"float","min":-60,"max":0,"default":-30},{"id":"verb-gate-hold","type":"float","min":0.04999999999999999,"max":1,"default":0.34999999999999987},{"id":"verb-gate-shape","type":"float","min":-1,"max":1,"default":0}]},{"id":"comp2","name":"Comp","path":"machines/comp2/comp2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":true,"note_labels":[],"params":[{"id":"comp-thresh","type":"float","min":-48,"max":0,"default":-18},{"id":"comp-ratio","type":"float","min":1,"max":20,"default":4},{"id":"comp-knee","type":"float","min":0,"max":18,"default":6},{"id":"comp-atk","type":"float","min":9.999999999999999e-05,"max":0.09999999999999998,"default":0.002999999999999999},{"id":"comp-rel","type":"float","min":0.009999999999999995,"max":2,"default":0.09999999999999998},{"id":"comp-hpf","type":"float","min":20,"max":500,"default":20},{"id":"comp-det","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"PEAK","value":0},{"label":"RMS","value":1}]},{"id":"comp-makeup","type":"float","min":0,"max":24,"default":0},{"id":"comp-mix","type":"float","min":0,"max":1,"default":1}]},{"id":"bus2","name":"Bus","path":"machines/bus2/bus2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":true,"note_labels":[],"params":[{"id":"bus-thresh","type":"float","min":-36,"max":0,"default":-18},{"id":"bus-ratio","type":"switch","min":0,"max":2,"default":1,"options":[{"label":"2","value":2},{"label":"4","value":4},{"label":"10","value":10}]},{"id":"bus-atk","type":"switch","min":0,"max":5,"default":4,"options":[{"label":".1","value":9.999999999999999e-05},{"label":".3","value":0.0002999999999999999},{"label":"1","value":0.001},{"label":"3","value":0.002999999999999999},{"label":"10","value":0.009999999999999995},{"label":"30","value":0.03}]},{"id":"bus-rel","type":"switch","min":0,"max":4,"default":4,"options":[{"label":".1","value":0.09999999999999998},{"label":".3","value":0.2999999999999998},{"label":".6","value":0.5999999999999996},{"label":"1.2","value":1.1999999999999993},{"label":"AUTO","value":0}]},{"id":"bus-hpf","type":"switch","min":0,"max":4,"default":0,"options":[{"label":"OFF","value":20},{"label":"60","value":60},{"label":"90","value":90},{"label":"150","value":150},{"label":"250","value":250}]},{"id":"bus-color","type":"float","min":0,"max":1,"default":0},{"id":"bus-makeup","type":"float","min":0,"max":15,"default":0},{"id":"bus-mix","type":"float","min":0,"max":1,"default":1}]},{"id":"char2","name":"Char","path":"machines/char2/char2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":true,"note_labels":[],"params":[{"id":"char-mode","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"FET","value":0},{"label":"OPTO","value":1},{"label":"VARI","value":2},{"label":"SMUSH","value":3}]},{"id":"char-thresh","type":"float","min":-40,"max":0,"default":-18},{"id":"char-ratio","type":"float","min":1,"max":20,"default":4},{"id":"char-atk","type":"float","min":1.9999999999999998e-05,"max":0.04999999999999999,"default":0.001},{"id":"char-rel","type":"float","min":0.04999999999999999,"max":5,"default":0.2999999999999998},{"id":"char-hpf","type":"float","min":20,"max":500,"default":20},{"id":"char-drive","type":"float","min":0,"max":1,"default":0.2999999999999998},{"id":"char-makeup","type":"float","min":0,"max":24,"default":0},{"id":"char-mix","type":"float","min":0,"max":1,"default":1},{"id":"char-ltype","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"ANALOG","value":0},{"label":"90s","value":1},{"label":"80s","value":2}]},{"id":"char-lofi","type":"float","min":0,"max":1,"default":0},{"id":"char-noise","type":"float","min":0,"max":1,"default":0.2999999999999998},{"id":"char-rpm","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"33","value":0.5555555555555554},{"label":"45","value":0.75},{"label":"78","value":1.2999999999999998}]},{"id":"char-wow","type":"float","min":0,"max":1,"default":0}]},{"id":"tape2","name":"Tape","path":"machines/tape2/tape2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"tape-mode","type":"switch","min":0,"max":4,"default":0,"options":[{"label":"CASS I","value":0},{"label":"CASS II","value":1},{"label":"CASS IV","value":2},{"label":"VHS LIN","value":3},{"label":"VHS HIFI","value":4}]},{"id":"tape-wear","type":"float","min":0,"max":1,"default":0.19999999999999996},{"id":"tape-nr","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"tape-drive","type":"float","min":-12,"max":18,"default":0},{"id":"tape-bias","type":"float","min":0,"max":1,"default":0.5999999999999996},{"id":"tape-wow","type":"float","min":0,"max":1,"default":0.25},{"id":"tape-flutter","type":"float","min":0,"max":1,"default":0.25},{"id":"tape-drops","type":"float","min":0,"max":1,"default":0},{"id":"tape-hiss","type":"float","min":0,"max":1,"default":0.5},{"id":"tape-hum","type":"float","min":0,"max":1,"default":0},{"id":"tape-mains","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"50","value":50},{"label":"60","value":60}]},{"id":"tape-out","type":"float","min":-12,"max":12,"default":0},{"id":"tape-mix","type":"float","min":0,"max":1,"default":1}]},{"id":"eq2","name":"EQ","path":"machines/eq2/eq2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"eq-hpf-hz","type":"float","min":20,"max":1000,"default":20},{"id":"eq-hpf-on","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"eq-ls-hz","type":"float","min":30,"max":500,"default":100},{"id":"eq-ls-db","type":"float","min":-18,"max":18,"default":0},{"id":"eq-p1-hz","type":"float","min":100,"max":4000,"default":500},{"id":"eq-p1-db","type":"float","min":-18,"max":18,"default":0},{"id":"eq-p1-q","type":"float","min":0.2999999999999998,"max":4,"default":0.8999999999999999},{"id":"eq-p2-hz","type":"float","min":500,"max":16000,"default":3000},{"id":"eq-p2-db","type":"float","min":-18,"max":18,"default":0},{"id":"eq-p2-q","type":"float","min":0.2999999999999998,"max":4,"default":0.8999999999999999},{"id":"eq-hs-hz","type":"float","min":1500,"max":18000,"default":8000},{"id":"eq-hs-db","type":"float","min":-18,"max":18,"default":0}]},{"id":"geq8","name":"GEQ","path":"machines/geq8/geq8.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"geq-t1","type":"switch","min":0,"max":7,"default":2,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t2","type":"switch","min":0,"max":7,"default":3,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t3","type":"switch","min":0,"max":7,"default":3,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t4","type":"switch","min":0,"max":7,"default":3,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t5","type":"switch","min":0,"max":7,"default":3,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t6","type":"switch","min":0,"max":7,"default":3,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t7","type":"switch","min":0,"max":7,"default":3,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-t8","type":"switch","min":0,"max":7,"default":5,"options":[{"label":"LC48","value":0},{"label":"LC12","value":1},{"label":"LSHLF","value":2},{"label":"BELL","value":3},{"label":"NOTCH","value":4},{"label":"HSHLF","value":5},{"label":"HC12","value":6},{"label":"HC48","value":7}]},{"id":"geq-f1","type":"float","min":20,"max":20000,"default":60},{"id":"geq-f2","type":"float","min":20,"max":20000,"default":150},{"id":"geq-f3","type":"float","min":20,"max":20000,"default":350},{"id":"geq-f4","type":"float","min":20,"max":20000,"default":800},{"id":"geq-f5","type":"float","min":20,"max":20000,"default":1800},{"id":"geq-f6","type":"float","min":20,"max":20000,"default":4000},{"id":"geq-f7","type":"float","min":20,"max":20000,"default":8000},{"id":"geq-f8","type":"float","min":20,"max":20000,"default":12000},{"id":"geq-b1","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b2","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b3","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b4","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b5","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b6","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b7","type":"float","min":-15,"max":15,"default":0},{"id":"geq-b8","type":"float","min":-15,"max":15,"default":0},{"id":"geq-q1","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q2","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q3","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q4","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q5","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q6","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q7","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-q8","type":"float","min":0.09999999999999998,"max":18,"default":0.71},{"id":"geq-on1","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on2","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on3","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on4","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on5","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on6","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on7","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-on8","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-adapt","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"geq-out","type":"float","min":-12,"max":12,"default":0}]},{"id":"sat2","name":"Saturator","path":"machines/sat2/sat2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"sat-drive","type":"float","min":0,"max":48,"default":6},{"id":"sat-mode","type":"switch","min":0,"max":7,"default":0,"options":[{"label":"TUBE","value":0},{"label":"TAPE","value":1},{"label":"XFMR","value":2},{"label":"DIODE","value":3},{"label":"FUZZ","value":4},{"label":"VALVE","value":5},{"label":"RAIL","value":6},{"label":"FOLD","value":7}]},{"id":"sat-sag","type":"float","min":0,"max":1,"default":0},{"id":"sat-color","type":"float","min":0,"max":1,"default":1},{"id":"sat-tone","type":"float","min":800,"max":18000,"default":18000},{"id":"sat-mix","type":"float","min":0,"max":1,"default":1},{"id":"sat-out","type":"float","min":-24,"max":24,"default":0}]},{"id":"era","name":"Era","path":"machines/era/era.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"era-in","type":"float","min":-12,"max":24,"default":0},{"id":"era-aa","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"era-rate","type":"float","min":1000,"max":48000,"default":26040},{"id":"era-bits","type":"float","min":1,"max":16,"default":12},{"id":"era-mode","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"ROUND","value":0},{"label":"TRUNC","value":1},{"label":"MULAW","value":2}]},{"id":"era-filter","type":"float","min":1000,"max":20000,"default":12000},{"id":"era-res","type":"float","min":0,"max":1,"default":0},{"id":"era-mix","type":"float","min":0,"max":1,"default":1},{"id":"era-out","type":"float","min":-24,"max":24,"default":0}]},{"id":"limiter2","name":"Limiter","path":"machines/limiter2/limiter2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"lim-gain","type":"float","min":0,"max":24,"default":0},{"id":"lim-ceil","type":"float","min":-24,"max":0,"default":-0.2999999999999998},{"id":"lim-look","type":"float","min":0.09999999999999998,"max":10,"default":2},{"id":"lim-rel","type":"float","min":0.009999999999999995,"max":1,"default":0.19999999999999996}]},{"id":"chorus2","name":"Chorus","path":"machines/chorus2/chorus2.fy","kind":"effect","voices":1,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"chorus-mode","type":"switch","min":0,"max":2,"default":0,"options":[{"label":"I","value":0},{"label":"II","value":1},{"label":"I+II","value":2}]},{"id":"chorus-rate","type":"float","min":0.25,"max":4,"default":1},{"id":"chorus-depth","type":"float","min":0,"max":3,"default":1},{"id":"chorus-tone","type":"float","min":2000,"max":16000,"default":8000},{"id":"chorus-spread","type":"float","min":0,"max":1,"default":1},{"id":"chorus-mix","type":"float","min":0,"max":1,"default":0.5}]},{"id":"concoction","name":"Concoction","path":"machines/concoction/concoction.fy","kind":"instrument","voices":8,"note_pitch":false,"sidechain":false,"note_labels":[],"params":[{"id":"cn-a-table","type":"switch","min":0,"max":10,"default":0,"options":[{"label":"BASIC","value":0},{"label":"PWM","value":1},{"label":"SYNC","value":2},{"label":"FM","value":3},{"label":"PD","value":4},{"label":"DRIVE","value":5},{"label":"FOLD","value":6},{"label":"HARM","value":7},{"label":"RESO","value":8},{"label":"VOWEL","value":9},{"label":"USER","value":10}]},{"id":"cn-a-pos","type":"float","min":0,"max":1,"default":0},{"id":"cn-a-oct","type":"int","min":-4,"max":4,"default":0},{"id":"cn-a-semi","type":"int","min":-12,"max":12,"default":0},{"id":"cn-a-fine","type":"float","min":-100,"max":100,"default":0},{"id":"cn-a-level","type":"float","min":0,"max":1,"default":0.75},{"id":"cn-a-warp","type":"switch","min":0,"max":4,"default":0,"options":[{"label":"OFF","value":0},{"label":"SYNC","value":1},{"label":"PWM","value":2},{"label":"BEND","value":3},{"label":"FM","value":4}]},{"id":"cn-a-wamt","type":"float","min":0,"max":1,"default":0},{"id":"cn-a-phase","type":"float","min":0,"max":1,"default":0.5},{"id":"cn-a-rand","type":"float","min":0,"max":1,"default":0},{"id":"cn-a-filt","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-b-on","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-b-table","type":"switch","min":0,"max":10,"default":0,"options":[{"label":"BASIC","value":0},{"label":"PWM","value":1},{"label":"SYNC","value":2},{"label":"FM","value":3},{"label":"PD","value":4},{"label":"DRIVE","value":5},{"label":"FOLD","value":6},{"label":"HARM","value":7},{"label":"RESO","value":8},{"label":"VOWEL","value":9},{"label":"USER","value":10}]},{"id":"cn-b-pos","type":"float","min":0,"max":1,"default":0},{"id":"cn-b-oct","type":"int","min":-4,"max":4,"default":0},{"id":"cn-b-semi","type":"int","min":-12,"max":12,"default":0},{"id":"cn-b-fine","type":"float","min":-100,"max":100,"default":0},{"id":"cn-b-level","type":"float","min":0,"max":1,"default":0.75},{"id":"cn-b-warp","type":"switch","min":0,"max":4,"default":0,"options":[{"label":"OFF","value":0},{"label":"SYNC","value":1},{"label":"PWM","value":2},{"label":"BEND","value":3},{"label":"FM","value":4}]},{"id":"cn-b-wamt","type":"float","min":0,"max":1,"default":0},{"id":"cn-b-phase","type":"float","min":0,"max":1,"default":0.5},{"id":"cn-b-rand","type":"float","min":0,"max":1,"default":0},{"id":"cn-b-filt","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-sub-on","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-sub-shape","type":"switch","min":0,"max":3,"default":0,"options":[{"label":"SINE","value":0},{"label":"TRI","value":1},{"label":"SAW","value":2},{"label":"SQUARE","value":3}]},{"id":"cn-sub-oct","type":"int","min":-3,"max":1,"default":-1},{"id":"cn-sub-level","type":"float","min":0,"max":1,"default":0.75},{"id":"cn-sub-filt","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-n-level","type":"float","min":0,"max":1,"default":0},{"id":"cn-n-color","type":"float","min":-1,"max":1,"default":0},{"id":"cn-n-filt","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-f-mode","type":"switch","min":0,"max":7,"default":1,"options":[{"label":"OFF","value":0},{"label":"LP24","value":1},{"label":"LP18","value":2},{"label":"LP12","value":3},{"label":"BP","value":4},{"label":"HP12","value":5},{"label":"HP24","value":6},{"label":"NOTCH","value":7}]},{"id":"cn-f-cut","type":"float","min":20,"max":20000,"default":20000},{"id":"cn-f-res","type":"float","min":0,"max":1,"default":0},{"id":"cn-f-drive","type":"float","min":0,"max":1,"default":0},{"id":"cn-f-key","type":"float","min":0,"max":1,"default":0},{"id":"cn-f-env","type":"float","min":-1,"max":1,"default":0},{"id":"cn-e1-a","type":"float","min":0.0005,"max":10,"default":0.0005},{"id":"cn-e1-h","type":"float","min":0,"max":2,"default":0},{"id":"cn-e1-d","type":"float","min":0.001,"max":20,"default":1},{"id":"cn-e1-s","type":"float","min":0,"max":1,"default":1},{"id":"cn-e1-r","type":"float","min":0.001,"max":20,"default":0.015},{"id":"cn-e2-a","type":"float","min":0.0005,"max":10,"default":0.0005},{"id":"cn-e2-d","type":"float","min":0.001,"max":20,"default":0.2999999999999998},{"id":"cn-e2-s","type":"float","min":0,"max":1,"default":0},{"id":"cn-e2-r","type":"float","min":0.001,"max":20,"default":0.09999999999999998},{"id":"cn-e3-a","type":"float","min":0.0005,"max":10,"default":0.0005},{"id":"cn-e3-d","type":"float","min":0.001,"max":20,"default":0.5},{"id":"cn-e3-s","type":"float","min":0,"max":1,"default":0},{"id":"cn-e3-r","type":"float","min":0.001,"max":20,"default":0.09999999999999998},{"id":"cn-p-amt","type":"float","min":-48,"max":48,"default":0},{"id":"cn-p-time","type":"float","min":0.001,"max":2,"default":0.04999999999999999},{"id":"cn-p-dest","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"ALL","value":0},{"label":"A+B","value":1}]},{"id":"cn-glide","type":"float","min":0,"max":2,"default":0},{"id":"cn-g-mode","type":"switch","min":0,"max":1,"default":1,"options":[{"label":"ALWAYS","value":0},{"label":"LEGATO","value":1}]},{"id":"cn-vel","type":"float","min":0,"max":1,"default":0.2999999999999998},{"id":"cn-level","type":"float","min":0,"max":1,"default":0.6999999999999997},{"id":"cn-l1-shape","type":"switch","min":0,"max":5,"default":0,"options":[{"label":"SINE","value":0},{"label":"TRI","value":1},{"label":"SAW UP","value":2},{"label":"SAW DN","value":3},{"label":"SQUARE","value":4},{"label":"S&H","value":5}]},{"id":"cn-l1-rate","type":"float","min":0.009999999999999995,"max":40,"default":2},{"id":"cn-l1-sync","type":"switch","min":0,"max":14,"default":0,"options":[{"label":"HZ","value":0},{"label":"4 BAR","value":16},{"label":"2 BAR","value":8},{"label":"1 BAR","value":4},{"label":"1/2","value":2},{"label":"1/4","value":1},{"label":"1/8","value":0.5},{"label":"1/16","value":0.25},{"label":"1/32","value":0.125},{"label":"1/4D","value":1.5},{"label":"1/8D","value":0.75},{"label":"1/16D","value":0.375},{"label":"1/4T","value":0.6666666666666665},{"label":"1/8T","value":0.33333333333333326},{"label":"1/16T","value":0.16666666666666663}]},{"id":"cn-l1-mode","type":"switch","min":0,"max":2,"default":1,"options":[{"label":"FREE","value":0},{"label":"RETRIG","value":1},{"label":"ENV","value":2}]},{"id":"cn-l1-uni","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-l2-shape","type":"switch","min":0,"max":5,"default":0,"options":[{"label":"SINE","value":0},{"label":"TRI","value":1},{"label":"SAW UP","value":2},{"label":"SAW DN","value":3},{"label":"SQUARE","value":4},{"label":"S&H","value":5}]},{"id":"cn-l2-rate","type":"float","min":0.009999999999999995,"max":40,"default":2},{"id":"cn-l2-sync","type":"switch","min":0,"max":14,"default":0,"options":[{"label":"HZ","value":0},{"label":"4 BAR","value":16},{"label":"2 BAR","value":8},{"label":"1 BAR","value":4},{"label":"1/2","value":2},{"label":"1/4","value":1},{"label":"1/8","value":0.5},{"label":"1/16","value":0.25},{"label":"1/32","value":0.125},{"label":"1/4D","value":1.5},{"label":"1/8D","value":0.75},{"label":"1/16D","value":0.375},{"label":"1/4T","value":0.6666666666666665},{"label":"1/8T","value":0.33333333333333326},{"label":"1/16T","value":0.16666666666666663}]},{"id":"cn-l2-mode","type":"switch","min":0,"max":2,"default":1,"options":[{"label":"FREE","value":0},{"label":"RETRIG","value":1},{"label":"ENV","value":2}]},{"id":"cn-l2-uni","type":"switch","min":0,"max":1,"default":0,"options":[{"label":"OFF","value":0},{"label":"ON","value":1}]},{"id":"cn-m1-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m1-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m1-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m2-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m2-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m2-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m3-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m3-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m3-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m4-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m4-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m4-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m5-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m5-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m5-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m6-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m6-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m6-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m7-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m7-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m7-amt","type":"float","min":-1,"max":1,"default":0},{"id":"cn-m8-src","type":"switch","min":0,"max":9,"default":0,"options":[{"label":"OFF","value":0},{"label":"ENV2","value":1},{"label":"ENV3","value":2},{"label":"LFO1","value":3},{"label":"LFO2","value":4},{"label":"VEL","value":5},{"label":"NOTE","value":6},{"label":"PRESS","value":7},{"label":"SLIDE","value":8},{"label":"RAND","value":9}]},{"id":"cn-m8-dst","type":"switch","min":0,"max":17,"default":0,"options":[{"label":"OFF","value":0},{"label":"A POS","value":1},{"label":"B POS","value":2},{"label":"A WARP","value":3},{"label":"B WARP","value":4},{"label":"A PITCH","value":5},{"label":"B PITCH","value":6},{"label":"PITCH","value":7},{"label":"A LVL","value":8},{"label":"B LVL","value":9},{"label":"SUB LVL","value":10},{"label":"NOISE","value":11},{"label":"CUTOFF","value":12},{"label":"RES","value":13},{"label":"DRIVE","value":14},{"label":"AMP","value":15},{"label":"L1 RATE","value":16},{"label":"L2 RATE","value":17}]},{"id":"cn-m8-amt","type":"float","min":-1,"max":1,"default":0}]}]},"presets":{"era/sp1200":{"slab":"preset","schema":1,"machine":"era","note":"E-mu SP-1200, channels 3-6: 26.04 kHz, 12-bit, fixed output lowpass","params":{"era-in":0,"era-aa":1,"era-rate":26040,"era-bits":12,"era-mode":0,"era-filter":11000,"era-res":0.1,"era-mix":1,"era-out":0}},"verb2/big-plate-hall":{"slab":"preset","schema":1,"machine":"verb2","note":"Night-coast hall \u2014 big but not cathedral","params":{"verb-predelay":0.04,"verb-decay":11.89,"verb-damp":4500,"verb-tone":8000,"verb-mix":0.32,"verb-mod":12}},"sat2/tape-slam":{"slab":"preset","schema":1,"machine":"sat2","note":"TAPE driven hard in parallel: drums squashed and fattened, transients kept","params":{"sat-drive":18,"sat-mode":1,"sat-sag":0.2,"sat-tone":9000,"sat-mix":0.6,"sat-out":-2.0,"sat-color":1.0}},"bus2/drum-bus":{"slab":"preset","schema":1,"machine":"bus2","note":"glue a kit: 4:1, 10 ms, AUTO, SC 90 Hz, a little color","params":{"bus-thresh":-17.3,"bus-ratio":1,"bus-atk":4,"bus-rel":4,"bus-hpf":2,"bus-color":0.25,"bus-makeup":2.6,"bus-mix":1}},"drum2/909-punch":{"slab":"preset","schema":1,"machine":"drum2","note":"909 punch \u2014 fast deep sweep, clicky drive, bright tight hats","params":{"kick-tune":52,"kick-sweep":9,"kick-bend":0.045,"kick-decay":0.35,"kick-click":0.55,"kick-drive":2.6,"kick-level":0.9,"snare-tune":190,"snare-decay":0.14,"snare-snap":0.9,"snare-sdec":0.09,"snare-tone":2400,"snare-level":0.9,"clap-tone":1300,"clap-spread":0.009,"clap-decay":0.22,"clap-level":0.9,"hat-tune":1.1,"hat-tone":1.25,"hat-chdec":0.05,"hat-ohdec":0.45,"hat-level":0.95,"tom-tune":120,"tom-sweep":1.6,"tom-decay":0.28,"tom-drive":1.6,"tom-level":0.85,"master-accent":0.8,"master-drive":1.6,"master-level":0.9}},"drum2/808-boom":{"slab":"preset","schema":1,"machine":"drum2","note":"Deep 808 \u2014 long boomy kick, soft snare, dark hats","params":{"kick-tune":45,"kick-sweep":3.5,"kick-bend":0.09,"kick-decay":1.1,"kick-click":0.08,"kick-drive":1.1,"kick-level":0.95,"snare-tune":165,"snare-decay":0.22,"snare-snap":0.55,"snare-sdec":0.14,"snare-tone":1200,"snare-level":0.85,"clap-tone":1000,"clap-spread":0.013,"clap-decay":0.4,"clap-level":0.85,"hat-tune":0.95,"hat-tone":0.9,"hat-chdec":0.05,"hat-ohdec":0.8,"hat-level":0.8,"tom-tune":95,"tom-sweep":1,"tom-decay":0.45,"tom-drive":1.1,"tom-level":0.85,"master-accent":0.6,"master-drive":1.2,"master-level":0.9}},"sat2/iron-bass":{"slab":"preset","schema":1,"machine":"sat2","note":"XFMR 12 dB, 70% wet: thick bass under a clean top","params":{"sat-drive":12,"sat-mode":2,"sat-sag":0.2,"sat-tone":7000,"sat-mix":0.7,"sat-out":-1.5,"sat-color":1.0}},"drum2/gated-snare-kit":{"slab":"preset","schema":1,"machine":"drum2","note":"Euro romance: gated snare, big entries","params":{"kick-tune":50,"kick-sweep":5,"kick-bend":0.04,"kick-decay":0.28,"kick-click":0.4,"kick-drive":1.6,"kick-level":0.9,"snare-tune":185,"snare-decay":0.22,"snare-snap":0.9,"snare-sdec":0.16,"snare-tone":2200,"snare-level":0.95,"clap-tone":1200,"clap-spread":0.01,"clap-decay":0.2,"clap-level":0.8,"hat-tune":1.05,"hat-tone":1.1,"hat-chdec":0.04,"hat-ohdec":0.4,"hat-level":0.85,"tom-tune":120,"tom-sweep":1.2,"tom-decay":0.25,"tom-drive":1.4,"tom-level":0.82,"master-accent":0.7,"master-drive":1.4,"master-level":0.9}},"char2/smush-1200":{"slab":"preset","schema":1,"machine":"char2","note":"SP-1200 crunch: 12-bit 26 kHz grit under a hard SMUSH squash, no wow","params":{"char-mode":3,"char-ratio":20,"char-atk":0.001,"char-rel":0.06,"char-drive":0.2,"char-mix":1,"char-lofi":0.4,"char-ltype":2,"char-noise":0.15,"char-wow":0,"char-thresh":-19.6,"char-makeup":0.0}},"drum2/crisp-hat-kit":{"slab":"preset","schema":1,"machine":"drum2","note":"Crisp hats, medium kick, silly good","params":{"kick-tune":53,"kick-sweep":5,"kick-bend":0.04,"kick-decay":0.22,"kick-click":0.4,"kick-drive":1.6,"kick-level":0.9,"snare-tune":205,"snare-decay":0.13,"snare-snap":0.8,"snare-sdec":0.08,"snare-tone":2400,"snare-level":0.85,"clap-tone":1200,"clap-spread":0.01,"clap-decay":0.18,"clap-level":0.8,"hat-tune":1.2,"hat-tone":1.4,"hat-chdec":0.03,"hat-ohdec":0.35,"hat-level":0.95,"tom-tune":120,"tom-sweep":1.2,"tom-decay":0.25,"tom-drive":1.4,"tom-level":0.82,"master-accent":0.55,"master-drive":1.25,"master-level":0.9}},"drum2/lofi-kit":{"slab":"preset","schema":1,"machine":"drum2","note":"Soft, dark lo-fi kit","params":{"kick-tune":55,"kick-sweep":2.5,"kick-bend":0.07,"kick-decay":0.7,"kick-click":0.04,"kick-drive":1,"kick-level":0.85,"snare-tune":150,"snare-decay":0.16,"snare-snap":0.4,"snare-sdec":0.1,"snare-tone":900,"snare-level":0.75,"clap-tone":800,"clap-spread":0.016,"clap-decay":0.3,"clap-level":0.7,"hat-tune":0.85,"hat-tone":0.7,"hat-chdec":0.06,"hat-ohdec":0.6,"hat-level":0.7,"tom-tune":100,"tom-sweep":0.9,"tom-decay":0.4,"tom-drive":1,"tom-level":0.75,"master-accent":0.5,"master-drive":1.05,"master-level":0.85}},"concoction/noise-sweep":{"slab":"preset","schema":1,"machine":"concoction","note":"Filtered noise riser: the MOD envelope opens a resonant bandpass over seconds","params":{"cn-a-level":0,"cn-n-level":1,"cn-n-color":0,"cn-f-mode":4,"cn-f-cut":200,"cn-f-res":0.6,"cn-e3-a":4,"cn-e3-d":1,"cn-e3-s":1,"cn-m1-src":2,"cn-m1-dst":12,"cn-m1-amt":0.7,"cn-e1-a":0.5,"cn-e1-s":1,"cn-e1-r":1,"cn-level":0.3}},"sat2/fold-wreck":{"slab":"preset","schema":1,"machine":"sat2","note":"FOLD to shreds: metallic, alias-edged, the note barely survives","params":{"sat-drive":42,"sat-mode":7,"sat-sag":0.5,"sat-color":0.3,"sat-tone":18000,"sat-mix":1.0,"sat-out":9.0}},"concoction/reese":{"slab":"preset","schema":1,"machine":"concoction","note":"Two saws a few cents apart, LP24 breathing on a slow LFO","params":{"cn-a-pos":0.6666667,"cn-b-on":1,"cn-b-pos":0.6666667,"cn-b-fine":14,"cn-b-level":0.75,"cn-a-fine":-14,"cn-a-rand":1,"cn-b-rand":1,"cn-f-mode":1,"cn-f-cut":700,"cn-f-res":0.2,"cn-f-drive":0.3,"cn-l1-shape":1,"cn-l1-rate":0.25,"cn-l1-mode":0,"cn-m1-src":3,"cn-m1-dst":12,"cn-m1-amt":0.12,"cn-e1-a":0.003,"cn-e1-d":1,"cn-e1-s":1,"cn-e1-r":0.08,"cn-level":0.6}},"geq8/flat":{"slab":"preset","schema":1,"machine":"geq8","note":"Every band on, flat: the init layout","params":{"geq-t1":2,"geq-f1":60,"geq-q1":0.71,"geq-b1":0,"geq-on1":1,"geq-t2":3,"geq-f2":150,"geq-q2":0.71,"geq-b2":0,"geq-on2":1,"geq-t3":3,"geq-f3":350,"geq-q3":0.71,"geq-b3":0,"geq-on3":1,"geq-t4":3,"geq-f4":800,"geq-q4":0.71,"geq-b4":0,"geq-on4":1,"geq-t5":3,"geq-f5":1800,"geq-q5":0.71,"geq-b5":0,"geq-on5":1,"geq-t6":3,"geq-f6":4000,"geq-q6":0.71,"geq-b6":0,"geq-on6":1,"geq-t7":3,"geq-f7":8000,"geq-q7":0.71,"geq-b7":0,"geq-on7":1,"geq-t8":5,"geq-f8":12000,"geq-q8":0.71,"geq-b8":0,"geq-on8":1,"geq-adapt":1,"geq-out":0.0}},"concoction/vowel-pad":{"slab":"preset","schema":1,"machine":"concoction","note":"The VOWEL table walking A-E-I-O-U on a slow triangle","params":{"cn-a-table":9,"cn-a-pos":0.5,"cn-b-on":1,"cn-b-table":9,"cn-b-pos":0.5,"cn-b-oct":-1,"cn-b-level":0.5,"cn-a-rand":1,"cn-b-rand":1,"cn-l1-shape":1,"cn-l1-rate":0.12,"cn-l1-mode":0,"cn-m1-src":3,"cn-m1-dst":1,"cn-m1-amt":0.5,"cn-m2-src":3,"cn-m2-dst":2,"cn-m2-amt":-0.5,"cn-f-mode":0,"cn-e1-a":0.8,"cn-e1-d":2,"cn-e1-s":0.9,"cn-e1-r":2,"cn-level":0.4,"cn-vel":0.2}},"tape2/vhs-rental":{"schema":1,"machine":"tape2","note":"a rental VHS: mono linear track, dull, hum and head-switch buzz","params":{"tape-mode":3,"tape-wear":0.6,"tape-drive":3,"tape-hiss":0.5,"tape-hum":0.35,"tape-out":3.5,"tape-mix":1}},"chorus2/juno-ii-deep":{"slab":"preset","schema":1,"machine":"chorus2","note":"Juno II \u2014 deep obvious chorus","params":{"chorus-mode":1,"chorus-rate":1.4,"chorus-depth":1.6,"chorus-tone":7500,"chorus-spread":1,"chorus-mix":0.6}},"tape2/chewed":{"schema":1,"machine":"tape2","note":"a tape that went through the washing machine: dropouts, wander, hum","params":{"tape-mode":0,"tape-wear":1.0,"tape-drive":4,"tape-bias":0.3,"tape-wow":0.6,"tape-flutter":0.6,"tape-drops":0.7,"tape-hiss":0.6,"tape-hum":0.3,"tape-nr":1,"tape-out":1.9,"tape-mix":1}},"chorus2/wide-slow":{"slab":"preset","schema":1,"machine":"chorus2","note":"Wide, slow stereo swirl","params":{"chorus-mode":0,"chorus-rate":0.5,"chorus-depth":1.8,"chorus-tone":6000,"chorus-spread":1,"chorus-mix":0.55}},"sat2/diode-drive":{"slab":"preset","schema":1,"machine":"sat2","note":"DIODE like a pedal overdrive: lopsided hard knee, dark top","params":{"sat-drive":16,"sat-mode":3,"sat-sag":0,"sat-tone":4500,"sat-mix":1.0,"sat-out":-2.5,"sat-color":1.0}},"sat2/fold-buzz":{"slab":"preset","schema":1,"machine":"sat2","note":"FOLD 18 dB on synths: buzzy overtones that move with the level","params":{"sat-drive":18,"sat-mode":7,"sat-sag":0.0,"sat-color":1.0,"sat-tone":14000,"sat-mix":1.0,"sat-out":2.0}},"fm86/slab/bells":{"slab":"preset","schema":1,"machine":"fm86","note":"Slab: struck bells. A clangorous, inharmonic strike that fades to a nearly pure ring over several seconds; the third carrier adds a high shimmer.","params":{"op1-r1":99,"op1-r2":26,"op1-r3":18,"op1-r4":30,"op1-l1":99,"op1-l2":70,"op1-l3":0,"op1-l4":0,"op1-bp":39,"op1-ld":0,"op1-rd":0,"op1-lc":0,"op1-rc":0,"op1-rs":2,"op1-det":0,"op1-ams":0,"op1-kvs":2,"op1-ol":99,"op1-mode":0,"op1-coarse":1,"op1-fine":0,"op2-r1":99,"op2-r2":34,"op2-r3":22,"op2-r4":40,"op2-l1":99,"op2-l2":50,"op2-l3":0,"op2-l4":0,"op2-bp":39,"op2-ld":0,"op2-rd":0,"op2-lc":0,"op2-rc":0,"op2-rs":2,"op2-det":0,"op2-ams":0,"op2-kvs":4,"op2-ol":78,"op2-mode":0,"op2-coarse":3,"op2-fine":17,"op3-r1":99,"op3-r2":30,"op3-r3":18,"op3-r4":32,"op3-l1":99,"op3-l2":64,"op3-l3":0,"op3-l4":0,"op3-bp":39,"op3-ld":0,"op3-rd":0,"op3-lc":0,"op3-rc":0,"op3-rs":2,"op3-det":0,"op3-ams":0,"op3-kvs":2,"op3-ol":84,"op3-mode":0,"op3-coarse":3,"op3-fine":0,"op4-r1":99,"op4-r2":40,"op4-r3":24,"op4-r4":40,"op4-l1":99,"op4-l2":40,"op4-l3":0,"op4-l4":0,"op4-bp":39,"op4-ld":0,"op4-rd":0,"op4-lc":0,"op4-rc":0,"op4-rs":2,"op4-det":0,"op4-ams":0,"op4-kvs":4,"op4-ol":70,"op4-mode":0,"op4-coarse":1,"op4-fine":41,"op5-r1":99,"op5-r2":38,"op5-r3":22,"op5-r4":38,"op5-l1":99,"op5-l2":50,"op5-l3":0,"op5-l4":0,"op5-bp":39,"op5-ld":0,"op5-rd":0,"op5-lc":0,"op5-rc":0,"op5-rs":3,"op5-det":4,"op5-ams":0,"op5-kvs":3,"op5-ol":66,"op5-mode":0,"op5-coarse":5,"op5-fine":0,"op6-r1":99,"op6-r2":50,"op6-r3":30,"op6-r4":40,"op6-l1":99,"op6-l2":30,"op6-l3":0,"op6-l4":0,"op6-bp":39,"op6-ld":0,"op6-rd":0,"op6-lc":0,"op6-rc":0,"op6-rs":3,"op6-det":0,"op6-ams":0,"op6-kvs":4,"op6-ol":50,"op6-mode":0,"op6-coarse":7,"op6-fine":2,"pr1":99,"pl1":50,"pr2":99,"pl2":50,"pr3":99,"pl3":50,"pr4":99,"pl4":50,"algo":5,"feedback":0,"oks":1,"lfo-speed":35,"lfo-delay":0,"lfo-pmd":0,"lfo-amd":0,"lfo-sync":0,"lfo-wave":4,"pms":0,"transpose":0,"volume":0.933}},"chorus2/bell-widener":{"slab":"preset","schema":1,"machine":"chorus2","note":"FM-bell widening shimmer","params":{"chorus-mode":2,"chorus-rate":1.6,"chorus-depth":0.9,"chorus-tone":12000,"chorus-spread":1,"chorus-mix":0.5}},"bus2/mix-glue":{"slab":"preset","schema":1,"machine":"bus2","note":"the classic mix-bus setting: 2:1, 30 ms, AUTO, 2 dB on the loud parts","params":{"bus-thresh":-15.6,"bus-ratio":0,"bus-atk":5,"bus-rel":4,"bus-hpf":2,"bus-color":0.1,"bus-makeup":1.4,"bus-mix":1}},"sat2/tape-glue":{"slab":"preset","schema":1,"machine":"sat2","note":"TAPE, a light 6 dB: bus and mix glue, soft shoulder, no grit","params":{"sat-drive":6,"sat-mode":1,"sat-sag":0,"sat-tone":14000,"sat-mix":1.0,"sat-out":0.0,"sat-color":0.8}}}}diff --git a/score/tests/fixtures/tracks.json b/score/tests/fixtures/tracks.jsonnew file mode 100644index 0000000..6d5e767--- /dev/null+++ b/score/tests/fixtures/tracks.json@@ -0,0 +1 @@+{"fps":30,"frames":180,"seconds":6.0,"cuts":[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5],"locks":[0.3,0.8,1.3,1.8,2.3,2.8,3.3,3.8,4.3,4.8,5.3,5.8],"keys":[0.5667,0.6,0.6333,0.7,0.7333,1.0333,1.0667,1.1,1.1333,1.1667,1.2,1.2333,1.2667,1.5333,1.5667,1.6,1.6333,1.6667,1.7,1.7333,1.7667,2.0333,2.0667,2.1,2.1333,2.1667,2.2,2.2333,2.2667,2.5333,2.5667,2.6,2.6333,2.6667,2.7,2.7333,2.7667,3.0333,3.0667,3.1,3.1333,3.1667,3.2,3.2333,3.2667,3.5333,3.5667,3.6,3.6333,3.6667,3.7,3.7333,4.0333,4.0667,4.1,4.1333,4.1667,4.2,4.2333,4.2667,4.5333,4.5667,4.6,4.6333,4.6667,4.7,4.7333],"collapse":5.0,"done":5.5,"focus":[[894.3,524.1],[892.0,524.7],[893.8,526.3],[894.1,526.6],[891.8,525.2],[891.6,525.3],[892.8,526.1],[891.9,526.5],[892.2,526.6],[891.9,525.9],[891.9,524.4],[893.8,526.2],[892.0,525.3],[892.5,523.8],[891.9,526.2],[778.7,509.8],[779.2,510.5],[842.0,508.7],[904.6,510.1],[967.1,510.9],[966.8,509.3],[1026.5,509.7],[1089.0,510.7],[1090.4,510.8],[841.3,510.5],[841.0,509.1],[841.4,510.2],[841.3,509.5],[840.6,509.7],[841.6,510.2],[605.6,576.9],[658.2,574.2],[759.1,575.2],[807.7,575.3],[833.2,575.5],[960.6,575.1],[1011.2,574.9],[1059.5,574.5],[1111.4,575.8],[1010.2,576.3],[1011.0,575.8],[1010.9,576.0],[1011.0,576.3],[1010.4,574.9],[1010.2,575.0],[667.3,452.9],[723.7,452.9],[779.2,452.1],[833.4,453.5],[889.8,453.4],[945.9,452.4],[999.6,452.7],[1055.2,452.0],[1110.2,453.8],[778.6,453.1],[778.2,453.2],[778.3,454.0],[778.2,452.7],[779.5,453.1],[778.2,453.8],[556.7,541.0],[594.5,541.0],[709.8,540.2],[787.4,540.5],[862.3,540.0],[939.7,540.2],[1017.9,541.1],[1094.7,540.1],[1171.4,541.3],[921.5,542.0],[921.9,541.9],[921.9,541.1],[921.6,541.1],[921.0,541.5],[921.8,541.7],[574.1,519.6],[617.1,520.1],[704.2,518.9],[831.9,519.5],[877.4,518.6],[962.8,518.0],[1050.6,518.0],[1135.0,519.3],[1177.4,519.4],[1113.6,518.3],[1114.1,518.9],[1114.5,518.4],[1114.3,518.9],[1114.5,519.5],[1113.4,518.7],[571.5,496.4],[662.5,499.1],[709.3,498.5],[800.9,497.6],[890.9,498.4],[935.8,497.2],[1027.4,498.2],[1096.5,498.4],[1166.2,496.4],[1164.3,497.5],[1164.7,497.7],[1164.5,497.9],[1164.5,497.5],[1164.2,498.5],[1164.9,498.3],[795.9,528.7],[861.7,527.3],[930.8,528.0],[996.3,526.8],[1064.4,528.7],[1130.3,528.8],[1197.7,528.6],[1265.5,528.9],[1267.0,526.4],[997.6,526.9],[996.6,527.2],[996.3,527.5],[996.6,527.4],[996.4,528.0],[996.4,526.9],[590.2,499.4],[676.4,499.3],[767.1,499.8],[810.0,498.5],[855.5,497.0],[987.4,498.9],[1031.1,497.6],[1122.5,498.2],[1166.4,498.9],[1054.6,498.0],[1054.8,498.4],[1054.9,498.9],[1054.4,498.5],[1054.4,498.0],[1054.4,497.8],[770.7,529.6],[831.2,531.8],[888.4,530.4],[949.5,529.4],[1008.6,532.5],[1070.0,531.0],[1130.8,530.0],[1189.9,532.5],[1191.0,530.3],[979.8,531.1],[980.1,530.6],[979.6,530.4],[980.1,530.5],[979.3,531.5],[979.8,530.5],[219.9,661.1],[223.1,659.3],[235.8,659.5],[280.8,652.5],[361.0,639.7],[496.1,614.3],[682.4,586.4],[818.0,563.5],[899.9,549.9],[942.2,542.9],[957.8,540.4],[959.5,540.6],[959.8,539.4],[960.4,540.0],[960.2,540.2],[943.4,540.6],[942.2,541.3],[942.1,542.1],[943.5,541.4],[942.5,540.7],[942.0,540.4],[942.5,541.5],[942.8,541.7],[943.2,541.5],[943.1,540.2],[943.2,540.5],[943.2,542.1],[942.1,540.4],[943.7,540.2],[944.1,541.4]]}diff --git a/score/tests/parity.rs b/score/tests/parity.rsnew file mode 100644index 0000000..9683530--- /dev/null+++ b/score/tests/parity.rs@@ -0,0 +1,121 @@+//! The entire generated document must match the committed Python project.+//! Resource fixtures capture only the controls/preset data needed by this score,+//! so this test runs on any Rust platform without Slab, Python or a sound device.+use serde_json::Value;+use slabkit::{Catalog, Roots};+use std::{+ path::PathBuf,+ sync::atomic::{AtomicU64, Ordering},+};+static NEXT: AtomicU64 = AtomicU64::new(1);+struct Fixture {+ directory: PathBuf,+ catalog: Catalog,+ roots: Roots,+}+impl Fixture {+ fn new() -> Self {+ let directory = std::env::temp_dir().join(format!(+ "ff-score-parity-{}-{}",+ std::process::id(),+ NEXT.fetch_add(1, Ordering::Relaxed)+ ));+ std::fs::create_dir_all(&directory).unwrap();+ let resources: Value =+ serde_json::from_str(include_str!("fixtures/resources.json")).unwrap();+ for (key, preset) in resources["presets"].as_object().unwrap() {+ let (machine, name) = key.split_once('/').unwrap();+ let path = directory+ .join("machines")+ .join(machine)+ .join("presets")+ .join(format!("{name}.preset"));+ std::fs::create_dir_all(path.parent().unwrap()).unwrap();+ std::fs::write(path, serde_json::to_vec(preset).unwrap()).unwrap();+ }+ let catalog =+ Catalog::from_json(&serde_json::to_vec(&resources["catalog"]).unwrap()).unwrap();+ let roots = Roots {+ factory: directory.clone(),+ home: directory.join("home"),+ library: directory.join("home/Library"),+ };+ Self {+ directory,+ catalog,+ roots,+ }+ }+}+impl Drop for Fixture {+ fn drop(&mut self) {+ let _ = std::fs::remove_dir_all(&self.directory);+ }+}+fn equal(actual: &Value, expected: &Value, path: &str) {+ match (actual, expected) {+ (Value::Number(a), Value::Number(e)) => assert_eq!(a.as_f64(), e.as_f64(), "{path}"),+ (Value::Object(a), Value::Object(e)) => {+ assert_eq!(+ a.keys().collect::<Vec<_>>(),+ e.keys().collect::<Vec<_>>(),+ "{path}"+ );+ for (key, v) in a {+ equal(v, &e[key], &format!("{path}/{key}"));+ }+ }+ (Value::Array(a), Value::Array(e)) => {+ assert_eq!(a.len(), e.len(), "{path}");+ for (i, (a, e)) in a.iter().zip(e).enumerate() {+ equal(a, e, &format!("{path}/{i}"));+ }+ }+ _ => assert_eq!(actual, expected, "{path}"),+ }+}+#[test]+fn reproduces_every_field_of_the_python_project() {+ let fixture = Fixture::new();+ let tracking = slabkit::video::Tracking::from_json(+ include_bytes!("fixtures/tracks.json"),+ include_bytes!("fixtures/camera.json"),+ )+ .unwrap();+ let song = score::score(&tracking).unwrap();+ let project = score::project(&song, &fixture.catalog, &fixture.roots, None).unwrap();+ let expected: Value =+ serde_json::from_str(include_str!("../ff_tracking.slab/project.json")).unwrap();+ equal(&project, &expected, "");+ assert_eq!(song.tracks.len(), 17);+ assert_eq!(+ song.tracks+ .iter()+ .flat_map(|t| &t.clips)+ .map(|c| c.notes.len())+ .sum::<usize>(),+ 249+ );+}+#[test]+fn camera_and_event_changes_drive_the_rust_score() {+ let tracking = slabkit::video::Tracking::from_json(+ include_bytes!("fixtures/tracks.json"),+ include_bytes!("fixtures/camera.json"),+ )+ .unwrap();+ let original = score::score(&tracking).unwrap();+ let mut changed = tracking.clone();+ changed.events.keys[0] += 0.01;+ changed.camera.frames[0].focus_screen[0] += 240.;+ changed.camera.frames[0].centre_screen[0] -= 120.;+ let changed = score::score(&changed).unwrap();+ let a = original.tracks.iter().find(|t| t.name == "KEYS").unwrap();+ let b = changed.tracks.iter().find(|t| t.name == "KEYS").unwrap();+ assert_eq!(b.clips[0].notes[0].start, a.clips[0].notes[0].start + 0.02);+ assert_ne!(a.automation["pan"], b.automation["pan"]);+ assert_ne!(+ original.tracks[2].automation["pan"],+ changed.tracks[2].automation["pan"]+ );+}diff --git a/tools/check_score.py b/tools/check_score.pynew file mode 100644index 0000000..2186d7a--- /dev/null+++ b/tools/check_score.py@@ -0,0 +1,99 @@+#!/usr/bin/env python3+"""Compare the unchanged Python score and Rust score using the same Slab resources.++ SLAB=/path/to/slab python3 tools/check_score.py --render++Runs in temporary directories: the committed project, WAV and event exports+are never rewritten. Python slabkit's usual numpy dependency is required.+"""+import argparse+import json+import os+from pathlib import Path+import shutil+import struct+import subprocess+import sys+import tempfile+++def compare(actual, expected, path=""):+ if isinstance(expected, dict):+ assert isinstance(actual, dict) and actual.keys() == expected.keys(), f"{path}: object keys differ"+ for key in expected:+ compare(actual[key], expected[key], f"{path}/{key}")+ elif isinstance(expected, list):+ assert isinstance(actual, list) and len(actual) == len(expected), f"{path}: array lengths differ"+ for i, (a, e) in enumerate(zip(actual, expected)):+ compare(a, e, f"{path}/{i}")+ else:+ assert actual == expected, f"{path}: {actual!r} != {expected!r}"+++def wav_payload(path):+ data = path.read_bytes()+ assert data[:4] == b"RIFF" and data[8:12] == b"WAVE"+ chunks = {}+ offset = 12+ while offset + 8 <= len(data):+ kind, size = struct.unpack_from("<4sI", data, offset)+ chunks[kind] = data[offset + 8:offset + 8 + size]+ offset += 8 + size + size % 2+ return chunks[b"fmt "], chunks[b"data"]+++def main():+ root = Path(__file__).resolve().parent.parent+ parser = argparse.ArgumentParser(description=__doc__)+ parser.add_argument("--slab", type=Path, default=os.environ.get("SLAB"), help="built Slab checkout (with tools/slabkit)")+ parser.add_argument("--video", type=Path, default=root, help="checkout with out/tracks.json and out/camera.json")+ parser.add_argument("--render", action="store_true", help="also compare float32 render samples exactly")+ args = parser.parse_args()+ if args.slab is None:+ parser.error("set SLAB or use --slab to name a built Slab checkout")+ slab = Path(args.slab).resolve()+ binary = slab / "zig-out/bin/slab"+ if not binary.is_file():+ parser.error(f"{binary} is missing; build Slab first")+ events = json.loads((args.video / "out/tracks.json").read_text())+ camera = json.loads((args.video / "out/camera.json").read_text())+ env = dict(os.environ, SLAB=str(slab), PYTHONPATH=str(slab / "tools"))+ with tempfile.TemporaryDirectory(prefix="ff-score-parity-") as temp:+ temp = Path(temp)+ # Exercise original inputs and changed timing/positions/zoom. A copied+ # Python script puts its default project next to that copy, safely.+ for scenario in ["original", "changed"]:+ directory = temp / scenario+ out = directory / "out"+ out.mkdir(parents=True)+ ev = json.loads(json.dumps(events))+ cam = json.loads(json.dumps(camera))+ if scenario == "changed":+ ev["keys"][0] += 0.01+ ev["cuts"][2] += 0.01+ ev["locks"][1] += 1.0 / ev["fps"]+ for i, frame in enumerate(cam["frames"]):+ frame["focus_screen"][0] += 90+ frame["centre_screen"][0] -= 45+ frame["zoom"] *= 1 + i % 15 * 0.01+ (out / "tracks.json").write_text(json.dumps(ev))+ (out / "camera.json").write_text(json.dumps(cam))+ shutil.copyfile(root / "score/score.py", directory / "score.py")+ subprocess.run([sys.executable, str(directory / "score.py"), "--video", str(directory)], env=env, check=True, cwd=root)+ rust = directory / "rust.slab"+ subprocess.run(["cargo", "run", "--locked", "-p", "score", "--", "--video", str(directory), "--project", str(rust)], env=env, check=True, cwd=root)+ python = directory / "ff_tracking.slab"+ compare(json.loads((rust / "project.json").read_text()), json.loads((python / "project.json").read_text()))+ print(f"{scenario}: Python and Rust projects match exactly", flush=True)+ if args.render:+ paths = []+ for name, project in [("python", python), ("rust", rust)]:+ wav = directory / f"{name}.wav"+ subprocess.run([str(binary), str(project), "--render", str(wav), "--bits", "32f", "--no-dither"], env=env, check=True, cwd=slab)+ paths.append(wav)+ assert wav_payload(paths[0]) == wav_payload(paths[1]), f"{scenario}: rendered samples differ"+ print(f"{scenario}: float32 render samples match exactly", flush=True)+++if __name__ == "__main__":+ main()diff --git a/tools/score.sh b/tools/score.shindex 4e588df..bd0437a 100755--- a/tools/score.sh+++ b/tools/score.sh@@ -1,8 +1,9 @@#!/usr/bin/env bash-# The whole pipeline with the Slab score (score/score.py) in place of tools/sfx.py:+# The whole pipeline with the Rust Slab score (score/src/arrangement.rs) in place of tools/sfx.py:# tracks + camera -> flat pass -> Slab render -> trim to 6 s -> lens pass -> out/tracking.mp4.# With a built Slab checkout (Apple silicon, zig >= 0.16) it renders the score:# SLAB=/path/to/slab tools/score.sh+# The unchanged Python reference can be selected with SCORE_IMPL=python.# Without SLAB it uses the committed render, score/score.wav.set -euo pipefailcd "$(dirname "$0")/.."@@ -12,7 +13,11 @@ target/release/trackstarget/release/cameratarget/release/flat render -o out/pass/flat.mp4if [[ -n "${SLAB:-}" ]]; then- PYTHONPATH="$SLAB/tools" python3 score/score.py --render+ case "${SCORE_IMPL:-rust}" in+ rust) cargo run --locked --release -p score -- --render ;;+ python) PYTHONPATH="$SLAB/tools" python3 score/score.py --render ;;+ *) echo "SCORE_IMPL must be rust or python" >&2; exit 1 ;;+ esac# The render runs past the picture for the reverb tail: cut at 6 s, fade with the fade to black.ffmpeg -v error -y -i out/pass/score.wav -af "atrim=0:6,afade=t=out:st=5.75:d=0.25" \-ar 48000 -c:a pcm_s16le out/pass/sfx.wav