From f49c35bb01ab042aca7a9ca2d53385c8e8d9d830 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 15:27:19 -0500 Subject: [PATCH 01/33] docs: design spec for the ADR-0020 device profile seam --- .../2026-09-03-device-profile-seam-design.md | 334 ++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 docs/superpowers/specs/2026-09-03-device-profile-seam-design.md diff --git a/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md b/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md new file mode 100644 index 0000000..95d619d --- /dev/null +++ b/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md @@ -0,0 +1,334 @@ +# Device profile seam - design + +Date: 2026-09-03. Implements ADR-0020. Status: approved in discussion, awaiting +review of this document. + +## What this builds + +A connection resolves which device profile it is talking to before the handshake, +and the profile decides everything that differs by firmware or model. Today the +library has one profile, Quad Cortex on CorOS 4.0.1, and it is not written down +as one. After this work it has one real profile, two stubs that show how the +next ones arrive, and a mechanism that makes "does this operation work on my +unit" a fact the library states rather than a guess it makes. + +What ships: + +- `QuadCortex` is the 4.0.1 profile and the base class. Unchanged behaviour. +- `QuadCortex41` and `QuadCortexMini` are stubs that guide their own completion. +- `connect()` reads the unit's identity, resolves a class, and refuses the unknown. +- Generated constants live in per-firmware snapshot packages; the old import paths + keep working as the baseline. +- Every operation a profile has not verified refuses by default and runs with a + warning when the caller asks for `Support.EXPERIMENTAL`. +- The hardware suite reports, per profile, which operations passed. +- `set_block` checks the model id against the live catalog before sending. + +What does not ship: `QuadCortex41`'s catalog snapshot and verified set. Those +need a 4.1 unit and belong to PR #44 once this lands. + +## Decisions taken, and why + +These were settled in discussion on 2026-09-03; the record is here so the +plan does not reopen them. + +1. **The client class is the profile (option C).** `QuadCortex` stays the base + and stays 4.0.1; there is no abstract layer between it and the first + extension, because nothing older than 4.0.1 has ever been supported and none + is expected. `QuadCortex41` is a subclass with overrides only. Firmware + variants share one type, so callers annotate `QuadCortex` and need not know + which they got. A Mini may need its own type because its hardware differs; + that decision waits for a Mini. Rejected: a separate profile object the + client delegates to (one more indirection whose hooks exist only to be + called), and version checks in method bodies (the smell polymorphism removes). +2. **The class name tracks the firmware line, not the patch.** `QuadCortex41`, + not `QuadCortex410`. If a 4.1.1 needs its own class, rename then. The class + carries `MEASURED_ON`, the exact CorOS strings it has been run against, so an + unlisted patch release still refuses until someone adds it after a suite run. +3. **Strict by default, lenient by explicit choice.** An inherited operation + the profile has not verified refuses. The unit accepts a wrong write + silently and offers no capability negotiation, so the safety net lenient + libraries rely on does not exist here; the verified set is its substitute. + The lenient mode exists because the hardware suite needs it to measure a + new profile. +4. **The user-facing name is `Support`.** `connect(support=Support.VERIFIED)` + is the default; `Support.EXPERIMENTAL` opts in. "Unmeasured" is our internal + rule and stays internal (`VERIFIED` set, `MEASURED_ON` tuple on the class). + Rejected names: `Compatibility.BEST_EFFORT`, `Verified.ASSUMED`, + `Operations.ALL`. +5. **Snapshot packages per firmware (option A).** One package per generated + catalog, named by CorOS version. Rejected: one module with version-tagged + names, because a caller could import a constant their unit lacks and two + names would point at one id. +6. **Both known future profiles are stubbed.** They mean different things: the + Mini cannot connect (nothing measured); 4.1 connects and verifies nothing + (the connection is known to work from a contributor's full suite run, the + operations are not known per name). + +## Section 1: the registry and connect + +### Module + +`pyquadcortex/protocol/profiles.py`: + +- `class Support(Enum)`: `VERIFIED`, `EXPERIMENTAL`. +- `class Evidence(Enum)`: `MAINTAINER` (measured on the maintainer's unit), + `CONTRIBUTED` (measured by a contributor, not reproduced by the maintainer), + `STUB` (nothing measured). +- `class UnsupportedDevice(Exception)`: raised when resolution fails. Carries + `device_type`, `coros_version`, and the registered profiles, and its message + names what the unit said and what is registered, without offering a fallback. +- `REGISTRY`: mapping `(DeviceType, coros_version: str) -> type[QuadCortex]`, + built by each class registering itself in `__init_subclass__` (and `QuadCortex` + registering explicitly at module end, since it has no subclass hook of its + own). One entry per `MEASURED_ON` string. +- `resolve(version_message) -> type[QuadCortex]`: reads `device_type` and + `zenos_git_hash` from the reply, looks up the pair, raises `UnsupportedDevice` + otherwise. A class with `Evidence.STUB` and empty `MEASURED_ON` is never + matched, so the Mini resolves to a refusal that names it. + +Import direction: `profiles.py` imports `client.py` (it needs the classes); +`session.py` imports `profiles.py`. `client.py` does not import `profiles.py`; +the `Support` enum lives in `profiles.py` and `client.py` receives a value, so +the dependency stays one way. `pyquadcortex.protocol` re-exports `Support`, +`Evidence`, `UnsupportedDevice`, `QuadCortex41`, `QuadCortexMini`. + +### Class attributes every profile declares + +On `QuadCortex` (values for 4.0.1): + +| attribute | value on `QuadCortex` | meaning | +|---|---|---| +| `DEVICE_TYPE` | `DeviceType.QC` | the `Version.device_type` this class serves | +| `MEASURED_ON` | `("4.0.1",)` | exact `zenos_git_hash` strings a suite run has been done against | +| `CC_VERSION` | `"4.0.1"` (exists today) | the announce string the handshake sends | +| `EVIDENCE` | `Evidence.MAINTAINER` | how well the profile is known | +| `models`, `params`, `options` | the `coros_4_0_1` modules | the constants snapshot (section 2) | +| `HARDWARE` | `Hardware(footswitches=8, expression_ports=2)` | facts the model layer needs; a frozen dataclass, extended only when a measurement needs a new field | +| `VERIFIED` | `EVERYTHING` (a sentinel) | operation names verified on this profile (section 3) | + +`QuadCortex41` declares: `MEASURED_ON = ("4.1.0",)`, `EVIDENCE = +Evidence.CONTRIBUTED`, `VERIFIED = frozenset()`, and the three snapshot +attributes bound to `NoSnapshot("coros_4_1_0")`. Everything else inherits. + +`QuadCortexMini` declares: `DEVICE_TYPE = DeviceType.ATMA`, `MEASURED_ON = ()`, +`EVIDENCE = Evidence.STUB`, `VERIFIED = frozenset()`, `HARDWARE = +Hardware(footswitches=4, expression_ports=2)` with a comment naming the product +page as the source, snapshots `NoSnapshot("coros_mini")`. Its docstring is the +outline for a contributor: pass `profile=QuadCortexMini` and +`support=Support.EXPERIMENTAL`, run the hardware suite, send the report. + +### connect + +`protocol.connect(*, timeout, settle, handshake_patience, before_handshake, +profile=None, support=Support.VERIFIED)`: + +1. Open the device and start the transport, as today. +2. Call `before_handshake(transport)` if given, as today. +3. Read `Version` through a bare `QuadCortex(transport)` using the identity + predicate from PR #51. This is the same pre-handshake read the CLI's + `version` subcommand has always used. +4. Resolve: `cls = profile or resolve(reply)`. When `profile` is given, check + `reply.device_type == cls.DEVICE_TYPE`; a mismatch raises `UnsupportedDevice` + ("you asked for QuadCortexMini and the unit says QC"). `profile=` does not + check `MEASURED_ON`; that is its purpose. +5. Instantiate `cls(transport, _owned_resources=owned, support=support)` and + run its `_hello()`, which announces `cls.CC_VERSION`. Retry logic unchanged. +6. Any failure closes what was opened, as today. + +`pyquadcortex.connect()` (the model layer) gains the same two keywords and +passes them through; it returns a `Device` around whichever client came back. +`Device.from_client` is unchanged. + +### Errors + +- Unknown pair, no `profile=`: `UnsupportedDevice`, message: "the unit reports + device_type QC, CorOS 4.2.0; this library has profiles for QC 4.0.1 + (verified on the maintainer's unit) and QC 4.1.0 (contributed). Pass + `profile=QuadCortex41` to treat it as 4.1 while you measure it, with + `support=Support.EXPERIMENTAL`." The nearest profile is named as a choice for + the caller, never taken for them. +- Mini: `UnsupportedDevice` naming the stub and the how-to-start. +- `profile=` with the wrong `device_type`: `UnsupportedDevice`. + +## Section 2: constants snapshots + +### Layout + +``` +pyquadcortex/protocol/catalogs/__init__.py +pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py +pyquadcortex/protocol/catalogs/coros_4_0_1/models.py (moved, unchanged content) +pyquadcortex/protocol/catalogs/coros_4_0_1/params.py +pyquadcortex/protocol/catalogs/coros_4_0_1/options.py +pyquadcortex/protocol/models.py (shim: re-exports coros_4_0_1.models) +pyquadcortex/protocol/params.py (shim) +pyquadcortex/protocol/options.py (shim) +``` + +- The three generators take `--snapshot NAME` and write into + `catalogs/NAME/`. The generated header records the snapshot name and the + `zenos_git_hash` of the unit it was read from. `--out` is removed; one way to + place a file. +- Each shim is hand-written, three lines: a docstring saying it is the + maintainer's baseline per ADR-0020, `from .catalogs.coros_4_0_1.models import + *`, and `from .catalogs.coros_4_0_1.models import ALL, __all__` (the names + `import *` does not carry). `tests/test_translation.py`'s `BOUNDARY_MODULES` + and any test that reads these files by path are updated to the new paths, and + the packaging check proves the snapshot packages reach the wheel. +- `NoSnapshot(name)` is a small object whose `__getattr__` raises + `AttributeError` with "no catalog snapshot for yet; run + `scripts/generate_*.py --snapshot ` against that unit". It is what the + two stubs bind. +- `QuadCortex.models`, `.params`, `.options` are class attributes bound to the + `coros_4_0_1` modules. `qc.models` therefore follows the connection. +- The `params.py` module docstring example uses a constant present in every + snapshot (`models.Reverb.SPRING_REVERB` or another the generator can prove + exists); the generator template no longer hard-codes a bass cab that was + renamed. + +### Hardware comparison + +`tests/hardware/test_generated_constants.py` renders from the connected unit +and compares against `profile.models`, `.params`, `.options`. On a profile bound +to `NoSnapshot`, the test fails with the generator command to run, which is the +correct outcome: it is the instruction for the person holding that unit. + +## Section 3: enforcing "verified" without scattered checks + +### Vocabulary + +An **operation** is a public method of `QuadCortex` that sends to or waits on +the unit. `ALWAYS` is the explicit set of public methods that must work on any +profile because connecting and cleaning up depend on them: `version`, +`catalog`, `close`, `disconnect`, `add_listener`, `remove_listener`, and the +handshake (`_hello` is private and not an operation). Each entry carries a +one-line reason beside it. Everything public and not in `ALWAYS` is an +operation. `OPERATIONS` is computed from the class, not maintained by hand. + +`EVERYTHING` is a sentinel value for `VERIFIED` meaning "all operations"; +`QuadCortex` uses it. + +### Mechanism + +`QuadCortex.__init_subclass__(cls, **kw)`: + +1. Registers `cls` in `profiles.REGISTRY` for each string in `cls.MEASURED_ON`. +2. If `cls.VERIFIED is EVERYTHING`, stops. +3. For every operation name defined on `QuadCortex` that `cls` inherits without + overriding and that is not in `cls.VERIFIED`, replaces the attribute on `cls` + with a guard wrapping the inherited function. + +The guard, `_guarded(name, inherited)`, at call time reads `self._support`: + +- `Support.VERIFIED`: raises `ControlNotDrivable(control=name, + evidence=f"not yet verified on {cls.__name__} (CorOS {', '.join(MEASURED_ON)})", + workaround=f"connect(support=Support.EXPERIMENTAL) to try it, or run + `pytest tests/hardware --hardware -m 'verifies({name})'` on your unit and add + the result to {cls.__name__}.VERIFIED")`. `ControlNotDrivable` is the refusal + type CLAUDE.md requires; all three fields are set. +- `Support.EXPERIMENTAL`: logs one `WARNING` per operation name per instance + ("{name} is not yet verified on {cls}; running it anyway") and calls the + inherited function. + +The message text comes from one function, `_unverified_text(cls, name)`, used +by both branches and by `UnsupportedDevice`, so wording cannot drift. + +`QuadCortex.__init__` gains `support: Support = Support.VERIFIED` and stores it. +`qc.support` reads it back. `qc.unverified_operations` returns the set of +guarded names on `type(self)`: empty on `QuadCortex`. + +A method the subclass overrides is left alone: an override is the subclass's +own measured behaviour. If a subclass overrides an operation, that name is +implicitly verified; the offline test below asserts it is also listed in +`VERIFIED`, so the set stays the single statement of what the class knows. + +### Tests (offline) + +- `tests/test_profiles.py`: + - Every public method of `QuadCortex` is either in `ALWAYS` or is guarded on a + throwaway subclass with `VERIFIED = frozenset()`. Catches a new method that + slips past the mechanism. + - `ALWAYS` holds only the lifecycle names, each with a reason (source-reading, + like `BOUNDARY_MODULES`). + - A guarded call under `VERIFIED` raises `ControlNotDrivable` with all three + fields; under `EXPERIMENTAL` it runs the inherited function and logs once + per name. + - An override on a subclass is not guarded and must appear in `VERIFIED`. + - `resolve()` maps `(QC, "4.0.1")` to `QuadCortex`, `(QC, "4.1.0")` to + `QuadCortex41`, refuses `(QC, "4.2.0")` naming both, refuses `(ATMA, *)` + naming the Mini stub and how to start. + - `connect()` with a fake transport whose `Version` reply says 4.1.0 returns a + `QuadCortex41` whose `set_scene_label` refuses and whose `version()` works; + with `profile=QuadCortexMini` against a QC reply, raises. + - `NoSnapshot` raises the pointed message on attribute access. +- `tests/test_typing.py` gains a case that `connect()` is typed as returning + `QuadCortex` and that `Support.EXPERIMENTAL` is accepted where a `Support` is + expected and a bare string is not. +- Existing suites pass unchanged except for import-path updates in the tests + that read the generated files by path. + +## Section 4: the hardware suite measures + +- The session fixture connects with `support=Support.EXPERIMENTAL` and exposes + `profile` (the connected class) beside `qc`. On `QuadCortex` this changes + nothing. +- A marker `@pytest.mark.verifies("op", ...)` names the operations a hardware + test exercises. Names are checked against `OPERATIONS` at collection; an + unknown name is a collection error. +- At session end the conftest prints a report: profile, `MEASURED_ON`, + operations whose marked tests all passed, operations whose marked tests + failed or skipped, `passed - VERIFIED` (candidates to add) and + `VERIFIED - passed` (verified operations that did not pass this run, named). + On a stub or contributed profile the first difference is the content of that + profile's PR. +- An offline test in `tests/test_hardware_gate.py`'s style asserts every + operation is named by at least one hardware test's marker, with an explicit + list of exceptions and a reason for each (operations that cannot be run + state-neutrally, or that no test covers yet). +- Every existing hardware test is marked in this work. It is mechanical: the + test already names the method it drives. +- A `scratch_preset` fixture copies the loaded preset into a free User slot + under a fixed name, recalls it, yields its address, and on teardown recalls + the original and deletes the copy. Tests that need a disposable preset use + it instead of an environment variable naming one of the owner's slots. The + PR #42 hardware test would use it once merged. + +## Section 5: the stubs, the catalog check, the docs + +- `QuadCortex41` and `QuadCortexMini` live in `profiles.py` beside the + registry, each about eight lines plus a docstring that is the outline for + finishing it. What a contributor adds for 4.1: the `coros_4_1_0` package, + three attribute bindings, and `VERIFIED` filled from the report. +- `set_block` checks `cell.model_id in self.catalog` before sending and raises + `ControlNotDrivable(control=model name or id, evidence="not in this unit's + catalog (CorOS X)", workaround=names the profile whose snapshot has it, if + any)`. The existing `UNPLACEABLE_MODELS` check stays first. +- Docs in the same PR: STEERING ยง5 gains a "Profile is the class" row and the + change log an entry; CLAUDE.md's ADR-0020 bullet drops "the seam is not built + yet" and states the mechanism; protocol.md's header names the profile + classes; architecture.md's checklist becomes "adding a device profile"; + contributing.md gains that section; changelog names `Support`, `profile=`, + `UnsupportedDevice`, `catalogs`, `qc.models` as new public surface, and the + `--out` to `--snapshot` generator change as BREAKING for anyone scripting the + generators. + +## Error handling summary + +- Unknown unit: `UnsupportedDevice` at connect, before any handshake. +- Known unit, unverified operation, default support: `ControlNotDrivable` at + the call, before any bytes are sent. +- Known unit, unverified operation, experimental: one warning, then the + inherited behaviour. +- Missing snapshot: `AttributeError` with the generator command, at attribute + access. +- Model id the unit lacks: `ControlNotDrivable` before sending. +- Nothing here swallows an error or falls back to another profile. + +## Out of scope + +- `QuadCortex41`'s snapshot and verified set (PR #44, after this). +- Any Mini behaviour beyond the stub. +- A `MiniDevice` model type. +- Moving `protocol.models` off the 4.0.1 baseline. +- The `RecallPreset` retry and the other PR #44 observations. From 6e7d07e67aeca31cd6770f05c06221658755e63f Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 15:28:08 -0500 Subject: [PATCH 02/33] docs: spec self-review - one-way imports, generated example, --verifies option --- .../2026-09-03-device-profile-seam-design.md | 63 ++++++++++++------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md b/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md index 95d619d..a3b04cc 100644 --- a/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md +++ b/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md @@ -67,31 +67,43 @@ plan does not reopen them. ## Section 1: the registry and connect -### Module +### Modules -`pyquadcortex/protocol/profiles.py`: +Two new modules, so the import graph stays one-way. `client.py` needs the +vocabulary (to guard methods and store `support`); the stubs need `client.py` +(they subclass it); `session.py` needs both. + +`pyquadcortex/protocol/support.py` - vocabulary only, imports nothing from +the package: - `class Support(Enum)`: `VERIFIED`, `EXPERIMENTAL`. - `class Evidence(Enum)`: `MAINTAINER` (measured on the maintainer's unit), `CONTRIBUTED` (measured by a contributor, not reproduced by the maintainer), `STUB` (nothing measured). +- `EVERYTHING`: the sentinel `VERIFIED` value meaning "all operations". +- `class Hardware` (frozen dataclass): `footswitches`, `expression_ports`. +- `class NoSnapshot`: the placeholder described in section 2. +- `unverified_text(cls, name)`: the one function that words a refusal, a + warning, and the `UnsupportedDevice` hint. + +`pyquadcortex/protocol/profiles.py` - imports `client.py`: + +- `class QuadCortex41(QuadCortex)` and `class QuadCortexMini(QuadCortex)`, the + stubs (section 5). - `class UnsupportedDevice(Exception)`: raised when resolution fails. Carries `device_type`, `coros_version`, and the registered profiles, and its message names what the unit said and what is registered, without offering a fallback. -- `REGISTRY`: mapping `(DeviceType, coros_version: str) -> type[QuadCortex]`, - built by each class registering itself in `__init_subclass__` (and `QuadCortex` - registering explicitly at module end, since it has no subclass hook of its - own). One entry per `MEASURED_ON` string. +- `registry() -> dict[(DeviceType, str), type[QuadCortex]]`: built from + `QuadCortex` plus `QuadCortex._PROFILES`, the list `QuadCortex.__init_subclass__` + appends every subclass to. One entry per `MEASURED_ON` string; a class with + an empty `MEASURED_ON` (the Mini) has no entry but is kept in a separate + `stubs()` list so the refusal can name it. - `resolve(version_message) -> type[QuadCortex]`: reads `device_type` and - `zenos_git_hash` from the reply, looks up the pair, raises `UnsupportedDevice` - otherwise. A class with `Evidence.STUB` and empty `MEASURED_ON` is never - matched, so the Mini resolves to a refusal that names it. + `zenos_git_hash` from the reply, looks the pair up, raises `UnsupportedDevice` + otherwise, naming a matching stub when the `device_type` has one. -Import direction: `profiles.py` imports `client.py` (it needs the classes); -`session.py` imports `profiles.py`. `client.py` does not import `profiles.py`; -the `Support` enum lives in `profiles.py` and `client.py` receives a value, so -the dependency stays one way. `pyquadcortex.protocol` re-exports `Support`, -`Evidence`, `UnsupportedDevice`, `QuadCortex41`, `QuadCortexMini`. +`session.py` imports `profiles.py`. `pyquadcortex.protocol` re-exports +`Support`, `Evidence`, `UnsupportedDevice`, `QuadCortex41`, `QuadCortexMini`. ### Class attributes every profile declares @@ -182,10 +194,10 @@ pyquadcortex/protocol/options.py (shim) two stubs bind. - `QuadCortex.models`, `.params`, `.options` are class attributes bound to the `coros_4_0_1` modules. `qc.models` therefore follows the connection. -- The `params.py` module docstring example uses a constant present in every - snapshot (`models.Reverb.SPRING_REVERB` or another the generator can prove - exists); the generator template no longer hard-codes a bass cab that was - renamed. +- The `params.py` module docstring example is rendered from the catalog being + generated: the generator picks the first cab model in that catalog and writes + its constant name into the example, so the name exists in that snapshot by + construction. The template no longer hard-codes a bass cab that was renamed. ### Hardware comparison @@ -213,7 +225,7 @@ operation. `OPERATIONS` is computed from the class, not maintained by hand. `QuadCortex.__init_subclass__(cls, **kw)`: -1. Registers `cls` in `profiles.REGISTRY` for each string in `cls.MEASURED_ON`. +1. Appends `cls` to `QuadCortex._PROFILES`, which `profiles.registry()` reads. 2. If `cls.VERIFIED is EVERYTHING`, stops. 3. For every operation name defined on `QuadCortex` that `cls` inherits without overriding and that is not in `cls.VERIFIED`, replaces the attribute on `cls` @@ -224,15 +236,17 @@ The guard, `_guarded(name, inherited)`, at call time reads `self._support`: - `Support.VERIFIED`: raises `ControlNotDrivable(control=name, evidence=f"not yet verified on {cls.__name__} (CorOS {', '.join(MEASURED_ON)})", workaround=f"connect(support=Support.EXPERIMENTAL) to try it, or run - `pytest tests/hardware --hardware -m 'verifies({name})'` on your unit and add - the result to {cls.__name__}.VERIFIED")`. `ControlNotDrivable` is the refusal + `pytest tests/hardware --hardware --verifies {name}` on your unit and add + the result to {cls.__name__}.VERIFIED")`. `--verifies NAME` is a conftest + option that selects the tests marked with that operation (pytest's `-m` + cannot match a marker's arguments). `ControlNotDrivable` is the refusal type CLAUDE.md requires; all three fields are set. - `Support.EXPERIMENTAL`: logs one `WARNING` per operation name per instance ("{name} is not yet verified on {cls}; running it anyway") and calls the inherited function. -The message text comes from one function, `_unverified_text(cls, name)`, used -by both branches and by `UnsupportedDevice`, so wording cannot drift. +The message text comes from `support.unverified_text(cls, name)`, used by both +branches and by `UnsupportedDevice`, so wording cannot drift. `QuadCortex.__init__` gains `support: Support = Support.VERIFIED` and stores it. `qc.support` reads it back. `qc.unverified_operations` returns the set of @@ -275,7 +289,8 @@ implicitly verified; the offline test below asserts it is also listed in nothing. - A marker `@pytest.mark.verifies("op", ...)` names the operations a hardware test exercises. Names are checked against `OPERATIONS` at collection; an - unknown name is a collection error. + unknown name is a collection error. `--verifies NAME` selects the tests that + carry that name. - At session end the conftest prints a report: profile, `MEASURED_ON`, operations whose marked tests all passed, operations whose marked tests failed or skipped, `passed - VERIFIED` (candidates to add) and From b381fbb9bd2cac35fd2aa1dd889ebca79e8c92a6 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 16:53:24 -0500 Subject: [PATCH 03/33] docs: implementation plan for the device profile seam --- .../plans/2026-09-03-device-profile-seam.md | 1637 +++++++++++++++++ 1 file changed, 1637 insertions(+) create mode 100644 docs/superpowers/plans/2026-09-03-device-profile-seam.md diff --git a/docs/superpowers/plans/2026-09-03-device-profile-seam.md b/docs/superpowers/plans/2026-09-03-device-profile-seam.md new file mode 100644 index 0000000..3affdff --- /dev/null +++ b/docs/superpowers/plans/2026-09-03-device-profile-seam.md @@ -0,0 +1,1637 @@ +# Device Profile Seam Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Make `connect()` resolve a device profile from the unit's own `Version` reply, refuse unknown profiles, and make every operation a profile has not verified refuse by default - with one real profile (Quad Cortex 4.0.1), two stubs (4.1, Mini), per-firmware constants snapshots, and a hardware suite that reports which operations passed per profile. + +**Architecture:** The client class IS the profile (ADR-0020, spec decision 1). `QuadCortex` stays the 4.0.1 base; subclasses declare class attributes and override only what a measurement showed differs. `QuadCortex.__init_subclass__` guards every inherited operation a subclass has not listed in `VERIFIED`. A new `support.py` holds the vocabulary (imports nothing from the package); a new `profiles.py` holds the stubs and the registry (imports the client); `session.py` resolves through it. Generated constants move to `protocol/catalogs/coros_4_0_1/`, with three-line shims at the old import paths. + +**Tech Stack:** Python >= 3.11, protobuf bindings already committed, pytest, mypy (blocking CI job). Run tests with `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q` from the worktree (the worktree has no venv of its own; `PYTHONPATH` is what makes the run test THIS checkout). Never pass `--hardware`; nothing in this plan needs the unit. + +**Spec:** `docs/superpowers/specs/2026-09-03-device-profile-seam-design.md` + +## Global Constraints + +- CLAUDE.md governs. Read it before Task 1. In particular: a refusal is `ControlNotDrivable(control, evidence, workaround)` with all three fields; `import hid` appears exactly once, in `session.open_device()`; nothing under `pyquadcortex/protocol/` imports from `pyquadcortex/device/`; docstrings state their evidence. +- The default test suite runs fully offline. Every test in this plan runs with no unit attached. +- mypy over `pyquadcortex/` must stay clean: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex`. +- `protocol.models`, `protocol.params`, `protocol.options` keep importing and keep meaning the CorOS 4.0.1 snapshot (spec section 2). +- Names fixed by the spec: `Support.VERIFIED` / `Support.EXPERIMENTAL`; `Evidence.MAINTAINER` / `CONTRIBUTED` / `STUB`; `EVERYTHING`; `Hardware`; `NoSnapshot`; `unverified_text`; `UnsupportedDevice`; `QuadCortex41`; `QuadCortexMini`; class attributes `DEVICE_TYPE`, `MEASURED_ON`, `CC_VERSION`, `EVIDENCE`, `HARDWARE`, `VERIFIED`, `models`, `params`, `options`; `qc.support`, `qc.unverified_operations`; `connect(profile=, support=)`; generator flag `--snapshot`; marker `verifies`; option `--verifies`. +- Commit after every task with a message in the repo's style (`feat:`, `fix:`, `docs:`, `test:`). Never add a co-author line. +- Never call the work "reverse engineering" anywhere. + +## File structure + +Created: +- `pyquadcortex/protocol/support.py` - `Support`, `Evidence`, `EVERYTHING`, `Hardware`, `NoSnapshot`, `unverified_text`. Imports only the standard library. +- `pyquadcortex/protocol/profiles.py` - `QuadCortex41`, `QuadCortexMini`, `UnsupportedDevice`, `registry()`, `stubs()`, `resolve()`. Imports `client.py`. +- `pyquadcortex/protocol/catalogs/__init__.py`, `pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py` - the snapshot package. +- `pyquadcortex/protocol/catalogs/coros_4_0_1/{models,params,options}.py` - moved from `pyquadcortex/protocol/`. +- `tests/test_support.py`, `tests/test_profiles.py`, `tests/test_generators.py`, `tests/test_hardware_markers.py`. + +Modified: +- `pyquadcortex/protocol/{models,params,options}.py` - become three-line shims. +- `pyquadcortex/protocol/client.py` - profile class attributes, `support` in `__init__`, `__init_subclass__`, `ALWAYS`, `operations()`, `unverified_operations`, `set_block` catalog check. +- `pyquadcortex/protocol/session.py` - `connect(profile=, support=)` resolves before the handshake. +- `pyquadcortex/protocol/__init__.py` - re-exports. +- `pyquadcortex/device/device.py` - `connect(profile=, support=)` pass-through. +- `scripts/generate_models.py`, `scripts/generate_options.py`, `scripts/generate_params.py` - `--snapshot`. +- `scripts/check_artifacts.py` - snapshot package in `REQUIRED`. +- `tests/conftest.py` - `verifies` marker and `--verifies` option. +- `tests/hardware/conftest.py` - `support=Support.EXPERIMENTAL`, `profile` fixture, `scratch_preset` fixture, `--verifies` selection, session report. +- `tests/hardware/test_generated_constants.py` - compares against the profile's snapshot. +- Every `tests/hardware/test_*.py` - `verifies` markers. +- `tests/test_values.py:197`, `tests/test_client.py` (connect tests), `tests/test_session.py`, `tests/typing/wrong_units.py`, `tests/test_typing.py`. +- Docs: `docs/STEERING.md`, `CLAUDE.md`, `docs/protocol.md`, `docs/architecture.md`, `contributing.md`, `changelog.md`, `docs/api.md`. + +--- + +### Task 1: The vocabulary module `support.py` + +**Files:** +- Create: `pyquadcortex/protocol/support.py` +- Test: `tests/test_support.py` + +**Interfaces:** +- Produces: `Support` (Enum: `VERIFIED`, `EXPERIMENTAL`), `Evidence` (Enum: `MAINTAINER`, `CONTRIBUTED`, `STUB`), `EVERYTHING` (sentinel; `name in EVERYTHING` is always True), `Hardware(footswitches: int, expression_ports: int)` frozen dataclass, `NoSnapshot(name: str)` whose attribute access raises `AttributeError`, `unverified_text(cls, name) -> tuple[str, str]` returning `(evidence, workaround)`. + +- [ ] **Step 1: Write the failing tests** + +```python +# tests/test_support.py +"""The vocabulary every profile speaks (spec section 1, "Modules").""" +import dataclasses + +import pytest + +from pyquadcortex.protocol import support + + +def test_support_has_exactly_the_two_modes_the_spec_names(): + assert {m.name for m in support.Support} == {"VERIFIED", "EXPERIMENTAL"} + + +def test_evidence_has_exactly_the_three_levels_the_spec_names(): + assert {e.name for e in support.Evidence} == {"MAINTAINER", "CONTRIBUTED", "STUB"} + + +def test_everything_contains_any_name_and_says_what_it_is(): + assert "set_scene_label" in support.EVERYTHING + assert "anything_at_all" in support.EVERYTHING + assert repr(support.EVERYTHING) == "EVERYTHING" + + +def test_hardware_is_frozen_and_takes_the_two_facts(): + hw = support.Hardware(footswitches=8, expression_ports=2) + assert (hw.footswitches, hw.expression_ports) == (8, 2) + with pytest.raises(dataclasses.FrozenInstanceError): + hw.footswitches = 4 # type: ignore[misc] + + +def test_no_snapshot_refuses_every_attribute_and_names_the_generator(): + missing = support.NoSnapshot("coros_4_1_0") + with pytest.raises(AttributeError) as caught: + missing.Delay + text = str(caught.value) + assert "coros_4_1_0" in text + assert "--snapshot coros_4_1_0" in text + assert repr(missing) == "NoSnapshot('coros_4_1_0')" + + +class _Fake: + __name__ = "QuadCortex41" + MEASURED_ON = ("4.1.0",) + + +def test_unverified_text_names_the_profile_the_firmware_and_both_ways_out(): + evidence, workaround = support.unverified_text(_Fake, "set_scene_label") + assert evidence == "not yet verified on QuadCortex41 (CorOS 4.1.0)" + assert "connect(support=Support.EXPERIMENTAL)" in workaround + assert "pytest tests/hardware --hardware --verifies set_scene_label" in workaround + assert "QuadCortex41.VERIFIED" in workaround +``` + +- [ ] **Step 2: Run the tests to verify they fail** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_support.py -q` +Expected: FAIL with `ModuleNotFoundError: No module named 'pyquadcortex.protocol.support'` + +- [ ] **Step 3: Write the module** + +```python +# pyquadcortex/protocol/support.py +"""The words a device profile is described in (ADR-0020). + +A PROFILE is a client class: ``QuadCortex`` for a Quad Cortex on CorOS 4.0.1, +a subclass for each other unit somebody has measured. This module holds the +vocabulary those classes declare themselves with and the one function that +words a refusal, so the text cannot drift between the places that use it. + +It imports nothing from the package on purpose: ``client.py`` needs these +names to guard its methods, and the profile classes need ``client.py``, so +this is the module both can import without a cycle. +""" +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum + + +class Support(Enum): + """How a connection treats an operation its profile has not verified. + + ``VERIFIED`` (the default) refuses it with ``ControlNotDrivable``. + ``EXPERIMENTAL`` runs the inherited behaviour and logs one warning per + operation. The hardware suite always connects ``EXPERIMENTAL``: on a new + profile it is the thing doing the verifying. + """ + + VERIFIED = "verified" + EXPERIMENTAL = "experimental" + + +class Evidence(Enum): + """How well a profile is known. + + ``MAINTAINER``: measured on the maintainer's own unit. ``CONTRIBUTED``: + measured by a contributor and not reproduced by the maintainer. ``STUB``: + nothing measured; the class exists to show where the measurements go. + """ + + MAINTAINER = "maintainer" + CONTRIBUTED = "contributed" + STUB = "stub" + + +class _Everything: + """The ``VERIFIED`` value meaning "every operation" - ``QuadCortex`` uses it.""" + + def __contains__(self, name: object) -> bool: + return True + + def __repr__(self) -> str: + return "EVERYTHING" + + +EVERYTHING = _Everything() + + +@dataclass(frozen=True) +class Hardware: + """Facts about the unit's hardware that the model layer needs. + + Extended only when a measurement needs a new field; a fact nobody reads + is a guess with a name. + """ + + footswitches: int + expression_ports: int + + +class NoSnapshot: + """What a profile binds instead of a constants snapshot it does not have yet. + + Binding a stub to the 4.0.1 snapshot would hand a 4.1 user names their + unit does not use, so the stub binds this and the first attribute access + says how to generate the real thing. + """ + + def __init__(self, name: str): + self._name = name + + def __getattr__(self, attr: str) -> object: + raise AttributeError( + f"no catalog snapshot {self._name!r} yet; run " + f"`scripts/generate_models.py --snapshot {self._name}` (and the " + f"params and options generators) against a unit on that firmware " + f"and bind the result on the profile class") + + def __repr__(self) -> str: + return f"NoSnapshot({self._name!r})" + + +def unverified_text(cls: type, name: str) -> tuple[str, str]: + """The evidence and the workaround for an operation ``cls`` has not verified. + + One function, used by the refusal, the experimental-mode warning and the + connect-time hint, so they cannot say three different things. + """ + firmware = ", ".join(cls.MEASURED_ON) or "no firmware measured" + evidence = f"not yet verified on {cls.__name__} (CorOS {firmware})" + workaround = ( + f"connect(support=Support.EXPERIMENTAL) to try it, or run " + f"`pytest tests/hardware --hardware --verifies {name}` on your unit " + f"and add the result to {cls.__name__}.VERIFIED") + return evidence, workaround +``` + +- [ ] **Step 4: Run the tests to verify they pass, and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_support.py -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: `6 passed`; `Success: no issues found` + +- [ ] **Step 5: Commit** + +```bash +git add pyquadcortex/protocol/support.py tests/test_support.py +git commit -m "feat: the vocabulary a device profile is described in (ADR-0020)" +``` + +--- + +### Task 2: Move the generated constants into a snapshot package, with shims + +**Files:** +- Create: `pyquadcortex/protocol/catalogs/__init__.py`, `pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py` +- Move: `pyquadcortex/protocol/models.py` -> `pyquadcortex/protocol/catalogs/coros_4_0_1/models.py` (same for `params.py`, `options.py`) +- Modify: `pyquadcortex/protocol/models.py`, `params.py`, `options.py` (new shim content); `tests/test_values.py:197`; `scripts/check_artifacts.py:22-33` +- Test: `tests/test_profiles.py` (first tests; the file grows in Tasks 3-5) + +**Interfaces:** +- Produces: importable `pyquadcortex.protocol.catalogs.coros_4_0_1.models` / `.params` / `.options` with the same content as before; `pyquadcortex.protocol.models` etc. re-export them. + +- [ ] **Step 1: Write the failing tests** + +```python +# tests/test_profiles.py +"""The device profile seam (ADR-0020, spec 2026-09-03).""" +import importlib + +from pyquadcortex.protocol import models, options, params +from pyquadcortex.protocol.catalogs import coros_4_0_1 + + +def test_the_baseline_shims_re_export_the_4_0_1_snapshot(): + """`protocol.models` keeps meaning CorOS 4.0.1 until an ADR moves it.""" + assert models.ALL is coros_4_0_1.models.ALL + assert params.BY_MODEL is coros_4_0_1.params.BY_MODEL + assert options.OPTION_LABELS is coros_4_0_1.options.OPTION_LABELS + assert set(models.__all__) == set(coros_4_0_1.models.__all__) + + +def test_the_old_import_paths_still_resolve_as_modules(): + for name in ("models", "params", "options"): + importlib.import_module(f"pyquadcortex.protocol.{name}") + importlib.import_module(f"pyquadcortex.protocol.catalogs.coros_4_0_1.{name}") +``` + +Check before writing the shims which public names each generated module defines beyond `import *`: run `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -c "import pyquadcortex.protocol.models as m; print(m.__all__[:3], hasattr(m,'ALL'))"` and the same for `params` (`BY_MODEL`) and `options` (`OPTION_LABELS`). If a module has no `__all__`, the shim's second import line names the module-level containers explicitly instead. + +- [ ] **Step 2: Run the tests to verify they fail** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_profiles.py -q` +Expected: FAIL with `ModuleNotFoundError: No module named 'pyquadcortex.protocol.catalogs'` + +- [ ] **Step 3: Move the files and write the package and shims** + +```bash +mkdir -p pyquadcortex/protocol/catalogs/coros_4_0_1 +git mv pyquadcortex/protocol/models.py pyquadcortex/protocol/catalogs/coros_4_0_1/models.py +git mv pyquadcortex/protocol/params.py pyquadcortex/protocol/catalogs/coros_4_0_1/params.py +git mv pyquadcortex/protocol/options.py pyquadcortex/protocol/catalogs/coros_4_0_1/options.py +``` + +```python +# pyquadcortex/protocol/catalogs/__init__.py +"""Generated constants, one package per firmware the catalog was read from. + +A snapshot is named by the CorOS version it came from (``coros_4_0_1``) and +belongs to the profile class that binds it (ADR-0020). The unversioned +``pyquadcortex.protocol.models`` / ``params`` / ``options`` are shims over the +maintainer's baseline, ``coros_4_0_1``, and stay that way until a decision +record moves them. +""" +``` + +```python +# pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py +"""The Quad Cortex catalog on CorOS 4.0.1, read from the maintainer's unit.""" +from pyquadcortex.protocol.catalogs.coros_4_0_1 import models, options, params # noqa: F401 + +__all__ = ["models", "params", "options"] +``` + +```python +# pyquadcortex/protocol/models.py (the shim; params.py and options.py are the same three lines with their names) +"""The maintainer's baseline: the CorOS 4.0.1 snapshot (ADR-0020). Import a +profile's own snapshot from ``pyquadcortex.protocol.catalogs`` when the +connection decides.""" +from pyquadcortex.protocol.catalogs.coros_4_0_1.models import * # noqa: F401,F403 +from pyquadcortex.protocol.catalogs.coros_4_0_1.models import ALL, __all__ # noqa: F401 +``` + +For `params.py` the second line imports `BY_MODEL, __all__`; for `options.py` it imports `OPTION_LABELS, __all__`. If Step 1's check showed any other module-level container a test or caller uses (grep `tests/` for `params.` and `options.` attribute access to be sure), import it there too. + +The moved files' import lines: each generated module imports from `pyquadcortex.protocol.values` (params) or nothing package-relative; grep each moved file for `from pyquadcortex.protocol import` and confirm the absolute imports still resolve from the new location. They are absolute, so they do. + +- [ ] **Step 4: Update the two places that read the generated files by path** + +`tests/test_values.py:197`: +```python +PARAMS_PY = (pathlib.Path(__file__).parent.parent / "pyquadcortex" / "protocol" + / "catalogs" / "coros_4_0_1" / "params.py") +``` + +`scripts/check_artifacts.py`, add to `REQUIRED` after the `.pyi` entries, with a comment: +```python + # The constants snapshots are packages the profile classes bind (ADR-0020). + # A wheel that dropped one would import and then fail on first attribute. + "pyquadcortex/protocol/catalogs/__init__.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/models.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/params.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/options.py", +``` + +`tests/hardware/test_generated_constants.py:45` changes in Task 7; leave it now. + +- [ ] **Step 5: Run the whole offline suite and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: everything passes (2540 before this plan plus the 2 new); mypy clean. If `tests/test_translation.py` or `tests/test_import_cleanliness.py` fails, read its message: both walk the package and name the file they object to; the fix is the path they print, never a widening of their allowlists. + +- [ ] **Step 6: Commit** + +```bash +git add -A +git commit -m "feat: generated constants live in a per-firmware snapshot package; the old paths are shims" +``` + +--- + +### Task 3: `QuadCortex` declares itself as the 4.0.1 profile and guards subclasses + +**Files:** +- Modify: `pyquadcortex/protocol/client.py` (imports near line 37; class body at line 257; `__init__` at 260; `CC_VERSION` at 390) +- Test: `tests/test_profiles.py` + +**Interfaces:** +- Consumes: Task 1's `Support`, `Evidence`, `EVERYTHING`, `Hardware`, `unverified_text`; Task 2's `coros_4_0_1` package. +- Produces: class attributes `DEVICE_TYPE`, `MEASURED_ON`, `EVIDENCE`, `HARDWARE`, `VERIFIED`, `models`, `params`, `options`; `QuadCortex.ALWAYS` (dict name -> reason); `QuadCortex.operations() -> frozenset[str]`; `QuadCortex._PROFILES: list[type]`; `QuadCortex.__init__(transport, _owned_resources=None, support=Support.VERIFIED)`; `qc.support`; `qc.unverified_operations -> frozenset[str]`; the guard. + +- [ ] **Step 1: Write the failing tests (append to `tests/test_profiles.py`)** + +```python +import logging + +import pytest + +from pyquadcortex.protocol import client, errors, support +from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa +from tests.test_client import FakeTransport # the offline transport double + + +def test_quadcortex_declares_the_4_0_1_profile(): + qc = client.QuadCortex + assert qc.DEVICE_TYPE == pa.VersionMessage.QC + assert qc.MEASURED_ON == ("4.0.1",) + assert qc.CC_VERSION == "4.0.1" + assert qc.EVIDENCE is support.Evidence.MAINTAINER + assert qc.HARDWARE == support.Hardware(footswitches=8, expression_ports=2) + assert qc.VERIFIED is support.EVERYTHING + assert qc.models is coros_4_0_1.models + assert qc.params is coros_4_0_1.params + assert qc.options is coros_4_0_1.options + + +def test_always_holds_only_the_lifecycle_and_each_entry_has_a_reason(): + assert set(client.QuadCortex.ALWAYS) == { + "version", "catalog", "close", "disconnect", "add_listener", "remove_listener"} + for name, reason in client.QuadCortex.ALWAYS.items(): + assert isinstance(reason, str) and len(reason) > 20, name + + +def test_operations_are_every_public_method_not_in_always(): + ops = client.QuadCortex.operations() + public = {n for n, v in vars(client.QuadCortex).items() + if not n.startswith("_") and (callable(v) or isinstance(v, property))} + assert ops == frozenset(public - set(client.QuadCortex.ALWAYS)) + assert "set_scene_label" in ops and "version" not in ops + assert len(ops) > 100 + + +def _profile(verified=frozenset(), name="Probe"): + """A throwaway subclass; deleted from _PROFILES afterwards by the fixture.""" + return type(name, (client.QuadCortex,), { + "MEASURED_ON": ("9.9.9",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": verified}) + + +@pytest.fixture +def forget_probes(): + yield + client.QuadCortex._PROFILES[:] = [ + c for c in client.QuadCortex._PROFILES if c.__name__ != "Probe"] + + +def test_a_subclass_registers_itself_and_inherits_what_it_does_not_declare(forget_probes): + Probe = _profile() + assert Probe in client.QuadCortex._PROFILES + assert Probe.CC_VERSION == "4.0.1" and Probe.DEVICE_TYPE == pa.VersionMessage.QC + + +def test_every_operation_is_guarded_on_a_subclass_that_verifies_nothing(forget_probes): + Probe = _profile() + for name in client.QuadCortex.operations(): + assert getattr(getattr(Probe, name), "_unverified", False), name + for name in client.QuadCortex.ALWAYS: + assert not getattr(getattr(Probe, name), "_unverified", False), name + + +def test_a_guarded_operation_refuses_under_verified_with_all_three_fields(forget_probes): + Probe = _profile() + fake = FakeTransport() + qc = Probe(fake) + with pytest.raises(errors.ControlNotDrivable) as caught: + qc.set_scene_label(0, "x") + err = caught.value + assert err.control == "set_scene_label" + assert err.evidence == "not yet verified on Probe (CorOS 9.9.9)" + assert "--verifies set_scene_label" in err.workaround + assert fake.sent == [] # nothing reached the wire + + +def test_a_guarded_operation_runs_and_warns_once_under_experimental(forget_probes, caplog): + Probe = _profile() + fake = FakeTransport() + qc = Probe(fake, support=support.Support.EXPERIMENTAL) + with caplog.at_level(logging.WARNING, logger="pyquadcortex.protocol.client"): + qc.switch_scene(1) + qc.switch_scene(2) + assert len(fake.sent) == 2, "the inherited method ran both times" + warnings = [r for r in caplog.records if "switch_scene" in r.getMessage()] + assert len(warnings) == 1, "one warning per operation name per instance" + assert "not yet verified on Probe" in warnings[0].getMessage() + + +def test_a_verified_operation_is_not_guarded_and_an_override_is_left_alone(forget_probes): + class Probe(client.QuadCortex): + MEASURED_ON = ("9.9.9",) + EVIDENCE = support.Evidence.STUB + VERIFIED = frozenset({"switch_scene", "set_scene_label"}) + + def set_scene_label(self, scene, label): + return "mine" + + assert not getattr(Probe.switch_scene, "_unverified", False) + assert Probe(FakeTransport()).set_scene_label(0, "x") == "mine" + + +def test_an_override_must_also_be_listed_in_verified(forget_probes): + """An override IS the subclass's measured behaviour, so the set must say so: + VERIFIED stays the single statement of what the class knows.""" + with pytest.raises(TypeError, match="overrides set_scene_label but does not list it"): + type("Probe", (client.QuadCortex,), { + "MEASURED_ON": ("9.9.9",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset(), + "set_scene_label": lambda self, scene, label: None}) + + +def test_unverified_operations_is_empty_on_the_base_and_full_on_a_stub(forget_probes): + assert client.QuadCortex(FakeTransport()).unverified_operations == frozenset() + Probe = _profile(verified=frozenset({"switch_scene"})) + got = Probe(FakeTransport()).unverified_operations + assert got == client.QuadCortex.operations() - {"switch_scene"} + + +def test_support_defaults_to_verified_and_is_readable(): + assert client.QuadCortex(FakeTransport()).support is support.Support.VERIFIED + qc = client.QuadCortex(FakeTransport(), support=support.Support.EXPERIMENTAL) + assert qc.support is support.Support.EXPERIMENTAL +``` + +`from tests.test_client import FakeTransport` works because pytest puts `tests/` on `sys.path` (CLAUDE.md notes three modules already rely on that). If the import fails, copy the seven-method `FakeTransport` class from `tests/test_client.py` into `tests/test_profiles.py` instead. + +- [ ] **Step 2: Run the tests to verify they fail** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_profiles.py -q` +Expected: the two Task 2 tests pass; the rest FAIL with `AttributeError: type object 'QuadCortex' has no attribute 'DEVICE_TYPE'` and similar. + +- [ ] **Step 3: Add the declarations, the guard, and the constructor change to `client.py`** + +Imports (add near line 37-40; `logging` and `functools` may already be imported - check the top of the file and add only what is missing): + +```python +import functools +import logging + +from pyquadcortex.protocol.catalogs import coros_4_0_1 +from pyquadcortex.protocol.support import (EVERYTHING, Evidence, Hardware, + Support, unverified_text) + +log = logging.getLogger(__name__) +``` + +Module-level guard factory (place just above `class QuadCortex:`): + +```python +def _guarded(name, inherited): + """Wrap an inherited operation a profile has not verified (ADR-0020). + + Under ``Support.VERIFIED`` it refuses before any bytes are sent; under + ``Support.EXPERIMENTAL`` it warns once per operation per connection and + runs the inherited behaviour. The decision is the caller's, made at + connect, and the wording comes from one place. + """ + @functools.wraps(inherited) + def guard(self, *args, **kwargs): + evidence, workaround = unverified_text(type(self), name) + if self._support is Support.VERIFIED: + raise errors.ControlNotDrivable(name, evidence, workaround) + if name not in self._warned: + self._warned.add(name) + log.warning("%s is %s; running it anyway", name, evidence) + return inherited(self, *args, **kwargs) + guard._unverified = True # type: ignore[attr-defined] + return guard +``` + +(`errors` is already imported in `client.py` as the home of `ControlNotDrivable`; confirm with `grep -n "^from pyquadcortex.protocol import\|errors" pyquadcortex/protocol/client.py | head`.) + +Class body, directly under the class docstring at line 258: + +```python + # -- the profile this class IS (ADR-0020) ----------------------------------- + #: The `Version.device_type` this class serves. + DEVICE_TYPE = pa.VersionMessage.QC + #: Exact `zenos_git_hash` strings a hardware-suite run has been done against. + #: A patch release not listed here refuses to connect until someone adds it + #: after a run - "probably only bug fixes" is the guess the rule stops. + MEASURED_ON = ("4.0.1",) + #: How well this profile is known. This one is the maintainer's own unit. + EVIDENCE = Evidence.MAINTAINER + #: Facts the model layer needs. Eight footswitches, two expression ports. + HARDWARE = Hardware(footswitches=8, expression_ports=2) + #: Operation names verified on this profile. Every method this class has + #: carries 4.0.1 evidence, so the base verifies everything; a subclass + #: starts from an empty set and grows it from the hardware suite's report. + VERIFIED = EVERYTHING + #: The constants snapshot read from this firmware. A subclass rebinds these. + #: Dynamic on purpose: `qc.models` follows the connection, at the price of + #: mypy seeing `Any` through it - import a snapshot module directly for + #: static unit checking (ADR-0018). + models = coros_4_0_1.models + params = coros_4_0_1.params + options = coros_4_0_1.options + #: Public methods that must work on ANY profile, because connecting and + #: cleaning up depend on them. Everything public and not here is an + #: OPERATION and is guarded on a subclass that has not verified it. Each + #: entry says why, because this list is the one place a guess could hide. + ALWAYS = { + "version": "resolving the profile reads it before any class is chosen", + "catalog": "the live catalog is how set_block checks an id on any firmware", + "close": "releasing the device must never depend on what was measured", + "disconnect": "saying goodbye must never depend on what was measured", + "add_listener": "subscribing to pushes is transport plumbing, not a unit operation", + "remove_listener": "unsubscribing is transport plumbing, not a unit operation", + } + #: Every subclass, in definition order; `profiles.registry()` reads it. + _PROFILES: list = [] + + @classmethod + def operations(cls) -> frozenset: + """Every public method of `QuadCortex` that is an operation on the unit.""" + return frozenset( + name for name, value in vars(QuadCortex).items() + if not name.startswith("_") + and (callable(value) or isinstance(value, property)) + and name not in QuadCortex.ALWAYS) + + def __init_subclass__(cls, **kwargs): + super().__init_subclass__(**kwargs) + QuadCortex._PROFILES.append(cls) + if cls.VERIFIED is EVERYTHING: + return + for name in QuadCortex.operations(): + if name in cls.__dict__: + if name not in cls.VERIFIED: + raise TypeError( + f"{cls.__name__} overrides {name} but does not list it in " + f"VERIFIED; an override is the profile's own measured " + f"behaviour, so say so in the one place that lists them") + continue + if name in cls.VERIFIED: + continue + setattr(cls, name, _guarded(name, getattr(QuadCortex, name))) +``` + +Constructor (replace the signature at line 260 and add two lines to the body): + +```python + def __init__(self, transport, _owned_resources=None, + support: Support = Support.VERIFIED): + self._t = transport + # Set by pyquadcortex.protocol.connect() so close() can tear down the transport + # and HID device it opened on the caller's behalf. When a caller wires + # their own transport, they own its lifecycle and this stays empty. + self._owned = _owned_resources or [] + # Populated on first use of .catalog (a ~47 KB fetch from the device). + self._catalog = None + # How this connection treats an operation its profile has not verified + # (ADR-0020). Read by the guard `__init_subclass__` installs. + self._support = support + self._warned: set = set() + + @property + def support(self) -> Support: + """How this connection treats operations its profile has not verified.""" + return self._support + + @property + def unverified_operations(self) -> frozenset: + """Operation names this profile has not verified - empty on `QuadCortex`.""" + return frozenset( + name for name in QuadCortex.operations() + if getattr(getattr(type(self), name), "_unverified", False)) +``` + +`catalog` is a property and `operations()` must treat it as public; the `isinstance(value, property)` clause does that, and `ALWAYS` excludes it. The two new properties `support` and `unverified_operations` are public and NOT in `ALWAYS`; they must not be guarded either, since they carry no bytes. Add them to `ALWAYS` with reasons ("reports the connection's own setting; no bytes", "reports the guard's own state; no bytes") and extend the `test_always_holds_only_the_lifecycle...` set accordingly. `set_param`'s `@overload` stubs are not in `vars()` (only the final `def` is), so they need no handling. + +- [ ] **Step 4: Run the tests, the full suite, and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_profiles.py -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: all pass; mypy clean. If mypy objects to `guard._unverified`, the `# type: ignore[attr-defined]` shown above is the accepted form (it is the only such ignore this plan adds; say so in the commit message). If mypy objects to `_PROFILES: list = []`, annotate it `list[type]`. + +- [ ] **Step 5: Commit** + +```bash +git add pyquadcortex/protocol/client.py tests/test_profiles.py +git commit -m "feat: QuadCortex is the 4.0.1 profile, and a subclass refuses what it has not verified" +``` + +--- + +### Task 4: `profiles.py` - the two stubs, the registry, `resolve()` + +**Files:** +- Create: `pyquadcortex/protocol/profiles.py` +- Test: `tests/test_profiles.py` + +**Interfaces:** +- Consumes: Task 3's class attributes and `_PROFILES`; Task 1's `NoSnapshot`, `Evidence`, `Hardware`, `unverified_text`. +- Produces: `QuadCortex41`, `QuadCortexMini`, `UnsupportedDevice(device_type, coros_version, message)` with attributes `device_type`, `coros_version`; `registry() -> dict[tuple[int, str], type]`; `stubs() -> list[type]`; `resolve(version_message) -> type`. + +- [ ] **Step 1: Write the failing tests (append to `tests/test_profiles.py`)** + +```python +from pyquadcortex.protocol import profiles + + +def test_the_4_1_stub_connects_but_verifies_nothing_and_has_no_snapshot(): + cls = profiles.QuadCortex41 + assert issubclass(cls, client.QuadCortex) + assert cls.MEASURED_ON == ("4.1.0",) + assert cls.EVIDENCE is support.Evidence.CONTRIBUTED + assert cls.VERIFIED == frozenset() + assert cls.CC_VERSION == "4.0.1", "inherited: the contributor's runs announced 4.0.1" + assert isinstance(cls.models, support.NoSnapshot) + with pytest.raises(AttributeError, match="coros_4_1_0"): + cls.models.Delay + assert len(cls(FakeTransport()).unverified_operations) == len(client.QuadCortex.operations()) + + +def test_the_mini_stub_is_recognised_but_cannot_connect(): + cls = profiles.QuadCortexMini + assert cls.DEVICE_TYPE == pa.VersionMessage.ATMA + assert cls.MEASURED_ON == () + assert cls.EVIDENCE is support.Evidence.STUB + assert cls.HARDWARE == support.Hardware(footswitches=4, expression_ports=2) + assert cls in profiles.stubs() + assert cls not in profiles.registry().values() + + +def test_the_registry_has_one_entry_per_measured_version(): + reg = profiles.registry() + assert reg[(pa.VersionMessage.QC, "4.0.1")] is client.QuadCortex + assert reg[(pa.VersionMessage.QC, "4.1.0")] is profiles.QuadCortex41 + assert all(len(k) == 2 for k in reg) + + +def _reply(device_type, coros): + return pa.VersionMessage(action=pa.MessageAction.UPDATE, device_type=device_type, + zenos_git_hash=coros, device_serial_number="QA00EE910") + + +def test_resolve_maps_known_pairs_to_their_class(): + assert profiles.resolve(_reply(pa.VersionMessage.QC, "4.0.1")) is client.QuadCortex + assert profiles.resolve(_reply(pa.VersionMessage.QC, "4.1.0")) is profiles.QuadCortex41 + + +def test_resolve_refuses_an_unknown_firmware_naming_what_exists_without_taking_it(): + with pytest.raises(profiles.UnsupportedDevice) as caught: + profiles.resolve(_reply(pa.VersionMessage.QC, "4.2.0")) + err = caught.value + assert (err.device_type, err.coros_version) == (pa.VersionMessage.QC, "4.2.0") + text = str(err) + assert "QC, CorOS 4.2.0" in text + assert "4.0.1" in text and "4.1.0" in text + assert "profile=QuadCortex41" in text and "Support.EXPERIMENTAL" in text + + +def test_resolve_refuses_a_mini_naming_the_stub_and_how_to_start(): + with pytest.raises(profiles.UnsupportedDevice) as caught: + profiles.resolve(_reply(pa.VersionMessage.ATMA, "1.0.0")) + text = str(caught.value) + assert "Quad Cortex Mini" in text and "QuadCortexMini" in text + assert "not yet supported" in text + assert "profile=QuadCortexMini" in text and "pytest tests/hardware --hardware" in text + + +def test_resolve_refuses_a_reply_with_no_identity(): + with pytest.raises(profiles.UnsupportedDevice, match="did not report"): + profiles.resolve(pa.VersionMessage(action=pa.MessageAction.UPDATE)) +``` + +- [ ] **Step 2: Run the tests to verify they fail** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_profiles.py -q -k "stub or registry or resolve"` +Expected: FAIL with `ModuleNotFoundError: No module named 'pyquadcortex.protocol.profiles'` + +- [ ] **Step 3: Write the module** + +```python +# pyquadcortex/protocol/profiles.py +"""The device profiles this library knows, and how a connection picks one. + +A profile is a client class (ADR-0020). ``QuadCortex`` in ``client.py`` is the +Quad Cortex on CorOS 4.0.1 and the base of every other profile. This module +holds the two profiles we know are coming and have not measured, and the +registry ``connect()`` resolves through. Adding a profile is: subclass +``QuadCortex``, declare the class attributes, and the registry sees it. +""" +from __future__ import annotations + +from pyquadcortex.protocol.client import QuadCortex +from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa +from pyquadcortex.protocol.support import Evidence, Hardware, NoSnapshot + +_DEVICE_NAMES = {pa.VersionMessage.QC: "Quad Cortex", + pa.VersionMessage.ATMA: "Quad Cortex Mini"} + + +class QuadCortex41(QuadCortex): + """Quad Cortex on CorOS 4.1 - connects, and verifies nothing yet. + + A contributor ran the whole hardware suite against a 4.1.0 unit with this + handshake and announce string, so the connection is known to work. Which + operations behave as on 4.0.1 is not known per name, so every inherited + operation refuses under ``Support.VERIFIED`` and runs with a warning under + ``Support.EXPERIMENTAL``. The snapshot is deliberately absent: binding the + 4.0.1 constants would hand a 4.1 user names their unit does not use. + + To finish this profile, on a 4.1 unit: + + 1. ``scripts/generate_models.py --snapshot coros_4_1_0`` and the params and + options generators; bind the three modules below. + 2. ``pytest tests/hardware --hardware``; the report at the end lists the + operations whose tests passed. Put those names in ``VERIFIED``. + 3. Record any operation that behaved differently in ``docs/protocol.md`` + beside the 4.0.1 record, dated and named, and override it here. + """ + + MEASURED_ON = ("4.1.0",) + EVIDENCE = Evidence.CONTRIBUTED + VERIFIED = frozenset() + models = NoSnapshot("coros_4_1_0") + params = NoSnapshot("coros_4_1_0") + options = NoSnapshot("coros_4_1_0") + + +class QuadCortexMini(QuadCortex): + """Quad Cortex Mini - recognised, not supported, and here to be finished. + + Nothing has been measured: no Mini has connected through this library. The + schema names it (``DeviceType.ATMA``, ``Mode.atma_page``, ``AtmaPowerOnMode``), + which is inference from field names, not a measurement. Four footswitches + is from the product page. Because ``MEASURED_ON`` is empty this class is + never resolved; a Mini refuses to connect with a message naming this class. + + To start, on a Mini: ``connect(profile=QuadCortexMini, + support=Support.EXPERIMENTAL)``. If the handshake works, run the hardware + suite and send the report. Expect the eight-footswitch assumptions in + ``QuadCortex`` to need overrides here, and expect this class to want a + different base than ``QuadCortex`` once its shape is known. + """ + + DEVICE_TYPE = pa.VersionMessage.ATMA + MEASURED_ON = () + EVIDENCE = Evidence.STUB + HARDWARE = Hardware(footswitches=4, expression_ports=2) + VERIFIED = frozenset() + models = NoSnapshot("coros_mini") + params = NoSnapshot("coros_mini") + options = NoSnapshot("coros_mini") + + +class UnsupportedDevice(Exception): + """The unit is not one this library has a measured profile for. + + Raised at connect, before the handshake. The message names what the unit + said and what is registered. It never picks a profile for the caller: the + ``profile=`` argument is how a person chooses to measure an unknown unit. + """ + + def __init__(self, device_type, coros_version, message): + super().__init__(message) + self.device_type = device_type + self.coros_version = coros_version + + +def _all_profiles() -> list[type[QuadCortex]]: + return [QuadCortex, *QuadCortex._PROFILES] + + +def registry() -> dict[tuple[int, str], type[QuadCortex]]: + """``(device_type, coros_version) -> class``, one entry per measured version.""" + reg: dict[tuple[int, str], type[QuadCortex]] = {} + for cls in _all_profiles(): + for coros in cls.MEASURED_ON: + reg[(cls.DEVICE_TYPE, coros)] = cls + return reg + + +def stubs() -> list[type[QuadCortex]]: + """Profiles that cannot be resolved because nothing was measured on them.""" + return [cls for cls in _all_profiles() if not cls.MEASURED_ON] + + +def _describe(cls: type[QuadCortex]) -> str: + level = {Evidence.MAINTAINER: "verified on the maintainer's unit", + Evidence.CONTRIBUTED: "contributed, not verified by the maintainer", + Evidence.STUB: "stub"}[cls.EVIDENCE] + return f"{_DEVICE_NAMES.get(cls.DEVICE_TYPE, cls.DEVICE_TYPE)} {', '.join(cls.MEASURED_ON)} ({level})" + + +def resolve(reply: pa.VersionMessage) -> type[QuadCortex]: + """The class for the unit that sent ``reply``, or ``UnsupportedDevice``.""" + if not (reply.HasField("device_type") and reply.HasField("zenos_git_hash")): + raise UnsupportedDevice(None, None, + "the unit did not report device_type and zenos_git_hash in " + "its Version reply, so no profile can be chosen") + key = (reply.device_type, reply.zenos_git_hash) + found = registry().get(key) + if found is not None: + return found + device = _DEVICE_NAMES.get(reply.device_type, pa.VersionMessage.DeviceType.Name(reply.device_type)) + known = "; ".join(_describe(c) for c in _all_profiles() if c.MEASURED_ON) + same_device = [c for c in _all_profiles() if c.DEVICE_TYPE == reply.device_type] + if same_device and all(c.EVIDENCE is Evidence.STUB for c in same_device): + stub = same_device[0] + hint = (f"The {device} is recognised and not yet supported; {stub.__name__} is the " + f"stub to finish. To start: connect(profile={stub.__name__}, " + f"support=Support.EXPERIMENTAL), then `pytest tests/hardware --hardware` " + f"and send the report. See its docstring.") + elif same_device: + nearest = max(same_device, key=lambda c: c.MEASURED_ON) + hint = (f"Pass profile={nearest.__name__} to treat it as " + f"{', '.join(nearest.MEASURED_ON)} while you measure it, with " + f"support=Support.EXPERIMENTAL; then add {reply.zenos_git_hash!r} to " + f"{nearest.__name__}.MEASURED_ON.") + else: + hint = "No profile exists for this device type." + raise UnsupportedDevice( + reply.device_type, reply.zenos_git_hash, + f"the unit reports {pa.VersionMessage.DeviceType.Name(reply.device_type)}, " + f"CorOS {reply.zenos_git_hash}; this library has profiles for: {known}. {hint}") +``` + +Note on the "nearest" wording: the message NAMES a class the caller may choose and never instantiates it. `max(..., key=MEASURED_ON)` is a string comparison of version tuples, good enough for a hint, and the test only asserts the name appears. + +- [ ] **Step 4: Run the tests, the suite, and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_profiles.py -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: all pass, mypy clean. `tests/test_import_cleanliness.py` walks every module; `profiles.py` imports no `hid`, so it passes. + +- [ ] **Step 5: Commit** + +```bash +git add pyquadcortex/protocol/profiles.py tests/test_profiles.py +git commit -m "feat: the profile registry, resolve(), and the two stubs that show how the next profiles arrive" +``` + +--- + +### Task 5: `connect()` resolves the profile before the handshake + +**Files:** +- Modify: `pyquadcortex/protocol/session.py:82-175`; `pyquadcortex/device/device.py:234-278`; `pyquadcortex/protocol/__init__.py:53-62` and its `__all__` +- Test: `tests/test_session.py`; `tests/test_device.py` (one test); `tests/typing/wrong_units.py` + `tests/test_typing.py` + +**Interfaces:** +- Consumes: Task 4's `resolve`, `UnsupportedDevice`, the stubs; Task 3's `support=` constructor argument. +- Produces: `protocol.connect(*, timeout, settle, handshake_patience, before_handshake, profile=None, support=Support.VERIFIED) -> QuadCortex`; `pyquadcortex.connect(*, timeout, settle, handshake_patience, profile=None, support=Support.VERIFIED) -> Device`; `pyquadcortex.protocol` exports `Support`, `Evidence`, `UnsupportedDevice`, `QuadCortex41`, `QuadCortexMini`, `Hardware`. + +- [ ] **Step 1: Read `tests/test_session.py:14-56`** to see the `FakeDevice` / `FakeTransport` / `fake_stack` doubles. `FakeTransport.request` returns the message it was sent; it has no `await_broadcast`. `version()` now uses `await_broadcast` (PR #51), so the double needs one that answers a `Version` READ with a canned reply. Add to `FakeTransport` in `tests/test_session.py`: + +```python + #: What the unit says it is. Tests set this before connect() runs. + version_reply = None + + def await_broadcast(self, expected_class, trigger, timeout=40.0, match=None): + self.happened.append(f"await {expected_class.__name__}") + trigger() + reply = type(self).version_reply + if reply is None: + reply = pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC, + zenos_git_hash="4.0.1", + device_serial_number="QCS0000001") + assert match is None or match(reply), "the canned reply must satisfy version()'s predicate" + return reply +``` + +and `from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa` at the top if absent. Reset `FakeTransport.version_reply = None` in the `fake_stack` fixture beside `FakeTransport.instances = []`. + +- [ ] **Step 2: Write the failing tests (append to `tests/test_session.py`)** + +```python +from pyquadcortex.protocol import profiles, support + + +def test_connect_resolves_the_profile_from_the_units_version_before_the_handshake(fake_stack): + qc = session.connect() + t = FakeTransport.instances[0] + assert type(qc) is client.QuadCortex + assert qc.support is support.Support.VERIFIED + order = [h for h in t.happened if h.startswith(("await Version", "request ResetComms", "send Version"))] + assert order[0] == "await VersionMessage", "identity is read before anything else is sent" + assert order.index("await VersionMessage") < order.index("request ResetCommsBuffersMessage") + + +def test_connect_hands_back_the_4_1_class_for_a_4_1_unit(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.1.0", device_serial_number="QCS0000001") + qc = session.connect() + assert type(qc) is profiles.QuadCortex41 + assert qc.unverified_operations == client.QuadCortex.operations() + with pytest.raises(errors.ControlNotDrivable): + qc.switch_scene(1) + + +def test_connect_refuses_an_unknown_unit_and_releases_the_device(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.2.0", device_serial_number="QCS0000001") + with pytest.raises(profiles.UnsupportedDevice, match="4.2.0"): + session.connect() + t = FakeTransport.instances[0] + assert t.stopped and t.device.closed + assert not any(h.startswith("request ResetComms") for h in t.happened), "no handshake ran" + + +def test_connect_with_profile_skips_the_registry_but_checks_the_device_type(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.2.0", device_serial_number="QCS0000001") + qc = session.connect(profile=profiles.QuadCortex41, support=support.Support.EXPERIMENTAL) + assert type(qc) is profiles.QuadCortex41 + assert qc.support is support.Support.EXPERIMENTAL + with pytest.raises(profiles.UnsupportedDevice, match="asked for QuadCortexMini"): + session.connect(profile=profiles.QuadCortexMini) + + +def test_the_announce_string_is_the_resolved_profiles(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.1.0", device_serial_number="QCS0000001") + session.connect() + t = FakeTransport.instances[0] + assert "send VersionMessage" in t.happened, "the announce went out on the resolved class" +``` + +The last test can only check that an announce was sent, because `FakeTransport.send` records the type name only; `QuadCortex41.CC_VERSION` is inherited and equals `"4.0.1"`, which `tests/test_profiles.py` already pins. + +Also add, in `tests/test_device.py` beside `test_from_client_exposes_the_client_it_was_given`: + +```python +def test_connect_passes_profile_and_support_through(monkeypatch): + seen = {} + + def fake_connect(**kw): + seen.update(kw) + return FakeClient() + + monkeypatch.setattr(device_module.protocol, "connect", fake_connect) + device_module.connect(profile=profiles.QuadCortex41, support=support.Support.EXPERIMENTAL) + assert seen["profile"] is profiles.QuadCortex41 + assert seen["support"] is support.Support.EXPERIMENTAL + assert "before_handshake" in seen +``` + +with `from pyquadcortex import device as device_module` and `from pyquadcortex.protocol import profiles, support` at the top (check how `tests/test_device.py` imports `device.py` already and follow it). + +- [ ] **Step 3: Run the tests to verify they fail** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_session.py tests/test_device.py -q` +Expected: the new tests FAIL (`TypeError: connect() got an unexpected keyword argument 'profile'`, and the resolution assertions). + +- [ ] **Step 4: Change `session.connect`** + +Signature and docstring additions: + +```python +def connect(*, timeout: float = 5.0, settle: float = 2.0, + handshake_patience: float = 30.0, + before_handshake=None, + profile=None, + support: Support = Support.VERIFIED) -> QuadCortex: +``` + +Add to the docstring's `Args:`: + +``` + profile: a profile class to use instead of the one the unit's identity + resolves to (ADR-0020). For measuring a unit this library has no + profile for: the class's ``DEVICE_TYPE`` must still match what the + unit reports, and ``MEASURED_ON`` is not checked. Combine with + ``support=Support.EXPERIMENTAL`` to run operations the profile has + not verified. + support: how the connection treats an operation its profile has not + verified. ``Support.VERIFIED`` (default) refuses it; + ``Support.EXPERIMENTAL`` runs it with a warning. On ``QuadCortex`` + every operation is verified, so this changes nothing there. +``` + +and to `Raises:`: + +``` + UnsupportedDevice: if the unit reports a device type and CorOS version + no profile has measured, or ``profile`` names a class for a + different device type. Raised before the handshake; the device is + released. +``` + +Body: replace the line `qc = QuadCortex(transport, _owned_resources=owned)` with + +```python + # Who are we talking to? Read before the handshake, through the base + # class, whose version() is in ALWAYS and works on any unit (ADR-0020). + identity = QuadCortex(transport).version(timeout=timeout) + if profile is None: + cls = profiles.resolve(identity) + else: + cls = profile + if identity.HasField("device_type") and identity.device_type != cls.DEVICE_TYPE: + raise profiles.UnsupportedDevice( + identity.device_type, identity.zenos_git_hash, + f"you asked for {cls.__name__}, which serves " + f"{pa.VersionMessage.DeviceType.Name(cls.DEVICE_TYPE)}, and the unit " + f"says {pa.VersionMessage.DeviceType.Name(identity.device_type)}") + qc = cls(transport, _owned_resources=owned, support=support) +``` + +Imports in `session.py`: `from pyquadcortex.protocol import profiles`, `from pyquadcortex.protocol.support import Support`, and `pa` if not already imported. `profiles` imports `client`, and `session` already imports `client`, so no cycle. The `try/except BaseException` that follows already releases everything opened, so an `UnsupportedDevice` from inside it closes the device: the test asserts that. + +- [ ] **Step 5: Change `device.connect` and the exports** + +`pyquadcortex/device/device.py:234`: + +```python +def connect(*, timeout: float = 5.0, settle: float = 2.0, + handshake_patience: float = 30.0, + profile=None, support=protocol.Support.VERIFIED) -> Device: +``` + +pass both through in the `protocol.connect(...)` call, and add the two `Args:` paragraphs (copy from `session.connect`, shortened to one sentence each pointing at `pyquadcortex.protocol.connect`). + +`pyquadcortex/protocol/__init__.py`: after the `session` import line add + +```python +from pyquadcortex.protocol.support import Support, Evidence, Hardware # noqa: F401 +from pyquadcortex.protocol.profiles import (UnsupportedDevice, QuadCortex41, # noqa: F401 + QuadCortexMini) +``` + +and add `"Support", "Evidence", "Hardware", "UnsupportedDevice", "QuadCortex41", "QuadCortexMini"` to `__all__`. `tests/test_namespace.py` pins the export list against a fixture; read its failure message if it fails and add the six names where it says, with the reason "ADR-0020 public surface". + +- [ ] **Step 6: Typing test** + +`tests/typing/wrong_units.py` is one file of accepted and rejected calls; `tests/test_typing.py` runs mypy over it and holds the reported line numbers against every line carrying the marker `# want: error`. Accepted lines carry no marker and must NOT be reported. Append, under a new comment header in the file's style: + +```python +# -- ADR-0020: the support mode is an enum, and connect() returns the base type +from pyquadcortex import protocol + +verified: protocol.QuadCortex = protocol.connect(support=protocol.Support.EXPERIMENTAL) +protocol.connect(support="experimental") # want: error +protocol.connect(profile=protocol.QuadCortex41) +``` + +The `from pyquadcortex import protocol` line goes with the file's other imports at the top rather than mid-file if the file's existing tests object to import placement (run `tests/test_typing.py` and read its message). + +- [ ] **Step 7: Run the suite and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: all pass, mypy clean. + +- [ ] **Step 8: Commit** + +```bash +git add -A +git commit -m "feat: connect() resolves the device profile before the handshake and refuses the unknown" +``` + +--- + +### Task 6: `set_block` checks the live catalog before sending + +**Files:** +- Modify: `pyquadcortex/protocol/client.py` (`set_block`, the block starting `if cell.model_id in units_module.UNPLACEABLE_MODELS:` around line 1144) +- Test: `tests/test_client.py` + +**Interfaces:** +- Consumes: `self.catalog` (a `ModelCatalog` with `get(model_id)` and `__len__`). +- Produces: `set_block` raises `ControlNotDrivable` for a model id the connected unit's catalog lacks, before sending. + +- [ ] **Step 1: How `tests/test_client.py` fakes the catalog.** Eight tests do `qc._catalog = catalog.parse_model_repo(_sample_repo_payload())` (for example at line 617); `_sample_repo_payload()` is a helper in that file and `catalog` is already imported there. Use exactly that. Note which model ids the sample payload contains: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -c "import sys; sys.path.insert(0,'tests'); import test_client as t; from pyquadcortex.protocol import catalog; c=catalog.parse_model_repo(t._sample_repo_payload()); print(sorted(m.id for m in c.factory_models())[:40], len(c))"`. + +- [ ] **Step 2: Write the failing test (append to `tests/test_client.py`)** + +```python +def test_set_block_refuses_a_model_the_unit_does_not_have_before_sending(): + """A 4.1 constant on a 4.0.1 unit (ADR-0020): the unit would accept the + hash silently and the block would simply not be there, reported as a DSP + or port problem. Checking the live catalog first names the real cause.""" + fake = FakeTransport() + qc = client.QuadCortex(fake) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) + missing = 6026 # Crystal Delay, CorOS 4.1.0 only; not in the sample payload either + assert qc.catalog.get(missing) is None + with pytest.raises(errors.ControlNotDrivable) as caught: + qc.set_block(Block(0, 3, missing), verify=False) + assert caught.value.control == "model 6026" + assert "not in this unit's catalog" in caught.value.evidence + assert fake.sent == [] +``` + +`Block`, `catalog`, `client` and `FakeTransport` are already imported in that file; add `from pyquadcortex.protocol import errors` if it is not. + +- [ ] **Step 3: Run to verify it fails** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_client.py -q -k refuses_a_model_the_unit_does_not_have` +Expected: FAIL (no exception raised; `fake.sent` has one message). + +- [ ] **Step 4: Add the check**, directly after the `UNPLACEABLE_MODELS` block and before `row, column, model = ...`: + +```python + model_id = int(getattr(cell.model_id, "id", cell.model_id)) + if self.catalog.get(model_id) is None: + raise errors.ControlNotDrivable( + f"model {model_id}", + f"not in this unit's catalog (CorOS {', '.join(type(self).MEASURED_ON)}); " + f"the catalog is read from the unit, so this id does not exist on it", + "use a constant from this connection's own snapshot (qc.models), or " + "look the model up in qc.catalog by name") +``` + +and remove the later duplicate `model_id = int(getattr(model, "id", model))` line, keeping one. Add to the docstring: "Refused, before sending, for a model id the unit's own catalog does not list - a constant from another firmware's snapshot, for instance (ADR-0020)." + +- [ ] **Step 5: Run the suite and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: the existing `set_block` tests that build a `QuadCortex(FakeTransport())` with NO catalog now fail, because the check fetches one and `FakeTransport.await_broadcast` returns `None`. That is expected and the fix is per test: give each one `qc._catalog = catalog.parse_model_repo(_sample_repo_payload())` and, where the id it places (5005 in `test_set_block_sends_row_column_keyed_grid_update`) is not in the sample payload, place an id that is (from Step 1's list) and update the assertions on `hash` to match. Never weaken the check to make a test pass. + +- [ ] **Step 6: Commit** + +```bash +git add pyquadcortex/protocol/client.py tests/test_client.py +git commit -m "feat: set_block refuses a model id the unit's own catalog does not list" +``` + +--- + +### Task 7: Generators take `--snapshot` and render the docstring example from the catalog + +**Files:** +- Modify: `scripts/generate_models.py:56-70,124-135`; `scripts/generate_options.py:210-220,276-284`; `scripts/generate_params.py:163-200,290-298` +- Modify: `pyquadcortex/protocol/catalogs/coros_4_0_1/{models,params,options}.py` (header line; params docstring example) +- Test: `tests/test_generators.py` + +**Interfaces:** +- Produces: each generator's `main()` accepts `--snapshot NAME` (required) and writes `pyquadcortex/protocol/catalogs/NAME/.py`; `render(cat, snapshot)`; `generate_params.example_cab(cat) -> str`. + +- [ ] **Step 1: Write the failing tests** + +```python +# tests/test_generators.py +"""The catalog generators write per-firmware snapshots (ADR-0020, spec section 2).""" +import importlib.util +import pathlib +import sys + +import pytest + +from pyquadcortex.protocol import catalog + +ROOT = pathlib.Path(__file__).parent.parent + + +def _load(name): + spec = importlib.util.spec_from_file_location(name, ROOT / "scripts" / f"{name}.py") + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +XML = b""" + + + + + + + + +""" + + +@pytest.fixture +def cat(): + return catalog.parse_model_repo(XML) + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_the_header_names_the_snapshot_it_was_written_for(name, cat): + mod = _load(name) + text = mod.render(cat, snapshot="coros_9_9_9") + assert "--snapshot coros_9_9_9" in text.splitlines()[2], text.splitlines()[:4] + + +def test_the_params_docstring_example_uses_the_lowest_id_cab_in_the_catalog(cat): + mod = _load("generate_params") + assert mod.example_cab(cat) == "models.CabsimBassM.N210C_DARKGLASS_M" + assert "Block(0, 5, models.CabsimBassM.N210C_DARKGLASS_M)" in mod.render(cat, snapshot="coros_9_9_9") + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_snapshot_is_required_and_decides_the_output_path(name, tmp_path, monkeypatch, cat): + mod = _load(name) + monkeypatch.setattr(mod, "load_payload", lambda path: XML) + monkeypatch.chdir(tmp_path) + monkeypatch.setattr(sys, "argv", [name, "--payload", "x"]) + with pytest.raises(SystemExit): # argparse: --snapshot is required + mod.main() + monkeypatch.setattr(sys, "argv", [name, "--payload", "x", "--snapshot", "coros_9_9_9"]) + mod.main() + written = tmp_path / "pyquadcortex" / "protocol" / "catalogs" / "coros_9_9_9" + assert (written / f"{name.split('_')[1]}.py").exists() +``` + +Adjust the XML if `catalog.parse_model_repo` requires attributes these elements lack: read `pyquadcortex/protocol/catalog.py:637-670` (`_parameter`, `factory_models`, the `hidden`/`factory` attributes) and add the minimum. The models must count as FACTORY for `generate_models.render` to emit them; check what `factory_models()` filters on and set it in the XML. + +- [ ] **Step 2: Run to verify they fail** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_generators.py -q` +Expected: FAIL (`render() got an unexpected keyword argument 'snapshot'`, `no attribute 'example_cab'`). + +- [ ] **Step 3: Change the three generators** + +In each `render`, take `snapshot: str` and make the header's second line `f"GENERATED by scripts/.py --snapshot {snapshot} - do not edit by hand."` (keep each file's existing header wording otherwise; `generate_options.py` uses double backticks around the script name - keep them). In each `main`, replace the `--out` argument with: + +```python + parser.add_argument("--snapshot", required=True, + help="snapshot package to write, named by CorOS version, e.g. coros_4_1_0") +``` + +and write to `pathlib.Path("pyquadcortex/protocol/catalogs") / args.snapshot / ".py"`, creating the directory and an `__init__.py` (the `coros_4_0_1/__init__.py` text from Task 2 with the version substituted) if absent. Keep `encoding="utf-8"` on the write if present; add it if not. + +In `generate_params.py`, add: + +```python +def example_cab(cat: catalog.ModelCatalog) -> str: + """The cab the module docstring's example places: the lowest-id factory + model whose category name starts with "Cabsim", so the example names a + constant that exists in the snapshot being written, by construction.""" + cabs = [m for m in cat.factory_models() if m.category.startswith("Cabsim")] + if not cabs: + raise SystemExit("no Cabsim category in this catalog; the docstring example needs one") + cab = min(cabs, key=lambda m: m.id) + return f"models.{class_name(cab.category)}.{constant_name(cab)}" +``` + +using whatever `generate_models.py` calls its class-name and constant-name functions (`class_name` exists at line 37; find the constant-name one and import both, or duplicate the two small functions if the scripts do not import each other today). Replace the hard-coded `" cab = Block(0, 5, models.CabsimBassM.N212_DARKGLASS_NEO_M)",` at line 187 with `f" cab = Block(0, 5, {example_cab(cat)})",`. + +- [ ] **Step 4: Bring the committed 4.0.1 snapshot in line by hand** + +The hardware comparison test compares the committed file byte-for-byte with a fresh render, so the committed files must equal what the changed generators would write. Without a saved 4.0.1 payload the change is two edits: in each of the three moved files, change the header's `GENERATED by ...` line to include ` --snapshot coros_4_0_1`; in `coros_4_0_1/params.py` line 23 change the example to `models.CabsimBassM.N210C_DARKGLASS_M` (id 21001, the lowest-id cab in the 4.0.1 catalog: `CabsimBassM` lists it first). `tests/test_docs.py` scans docstrings; it does not resolve `models.*` names, but check the example still passes its keyword and bare-number checks (it does: no keywords, `Real(3.0)` is typed). + +- [ ] **Step 5: Run the suite and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: all pass. + +- [ ] **Step 6: Commit** + +```bash +git add -A +git commit -m "feat: generators write a named snapshot and render the docstring example from the catalog" +``` + +--- + +### Task 8: The hardware suite measures per profile + +**Files:** +- Modify: `tests/conftest.py`; `tests/hardware/conftest.py`; `tests/hardware/test_generated_constants.py:42-47`; every `tests/hardware/test_*.py` +- Test: `tests/test_hardware_markers.py`; `tests/test_hardware_gate.py` (one assertion) + +**Interfaces:** +- Consumes: Task 3's `operations()`; Task 5's `connect(support=)`. +- Produces: marker `verifies(*names)`; option `--verifies NAME`; fixtures `profile`, `scratch_preset`; a session report; `UNMARKED_OPERATIONS` (dict name -> reason) in `tests/test_hardware_markers.py`. + +- [ ] **Step 1: Write the failing offline test** + +```python +# tests/test_hardware_markers.py +"""Every operation is named by a hardware test, or says why not (spec section 4). + +Source-reading, like tests/test_translation.py: the hardware modules are never +imported here, so this runs with no unit attached. +""" +import ast +import pathlib + +from pyquadcortex.protocol import client + +HARDWARE = pathlib.Path(__file__).parent / "hardware" + +#: Operations no hardware test names, each with the reason. A new operation +#: has to come through this dict or through a marker; there is no third way. +UNMARKED_OPERATIONS = { + # filled in Step 4 from the first run's failure message, with a reason per name +} + + +def marked_operations(): + names = set() + for path in sorted(HARDWARE.rglob("test_*.py")): + tree = ast.parse(path.read_text(encoding="utf-8")) + for node in ast.walk(tree): + if not isinstance(node, ast.FunctionDef): + continue + for deco in node.decorator_list: + if (isinstance(deco, ast.Call) and isinstance(deco.func, ast.Attribute) + and deco.func.attr == "verifies"): + for arg in deco.args: + assert isinstance(arg, ast.Constant) and isinstance(arg.value, str), ( + f"{path.name}:{node.lineno} verifies() takes string literals") + names.add(arg.value) + return names + + +def test_every_marker_names_a_real_operation(): + unknown = marked_operations() - client.QuadCortex.operations() + assert not unknown, f"markers name operations QuadCortex does not have: {sorted(unknown)}" + + +def test_every_operation_is_marked_or_excused_with_a_reason(): + missing = client.QuadCortex.operations() - marked_operations() - set(UNMARKED_OPERATIONS) + assert not missing, ( + f"operations no hardware test verifies and no reason excuses: {sorted(missing)}. " + f"Mark the test that drives each one with @pytest.mark.verifies(...), or add it " + f"to UNMARKED_OPERATIONS with the reason.") + stale = set(UNMARKED_OPERATIONS) & marked_operations() + assert not stale, f"excused AND marked; drop the excuse: {sorted(stale)}" + for name, reason in UNMARKED_OPERATIONS.items(): + assert len(reason) > 20, name +``` + +- [ ] **Step 2: Run to verify it fails** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_hardware_markers.py -q` +Expected: `test_every_operation_is_marked_or_excused_with_a_reason` FAILS listing every operation (none is marked yet). + +- [ ] **Step 3: Register the marker and the option in `tests/conftest.py`** + +```python +def pytest_addoption(parser): + parser.addoption("--hardware", ...) # existing + parser.addoption( + "--verifies", action="store", default=None, metavar="OPERATION", + help="with --hardware: run only the tests marked verifies(OPERATION) " + "(ADR-0020). pytest's -m cannot match a marker's arguments.") + + +def pytest_configure(config): + config.addinivalue_line( + "markers", + "verifies(*operations): the QuadCortex operations a hardware test exercises " + "(ADR-0020). Names are checked against QuadCortex.operations() at collection.") +``` + +- [ ] **Step 4: Change `tests/hardware/conftest.py`** + +Session fixture: `protocol.connect(before_handshake=subscribe, support=protocol.Support.EXPERIMENTAL)`, with a comment: "EXPERIMENTAL always: on a new profile this suite IS the verification, and a VERIFIED client would refuse everything before a test could look. On QuadCortex it changes nothing." + +Add fixtures: + +```python +@pytest.fixture(scope="session") +def profile(qc): + """The connected profile class (ADR-0020).""" + return type(qc) + + +@pytest.fixture +def scratch_preset(qc): + """A disposable copy of the loaded preset in a free User slot. + + Yields ``(folder_key, position, name)``. Teardown recalls the original slot + and deletes the copy, so a test that must edit, save or undo never touches + one of the owner's presets. Requires the loaded preset to be clean. + """ + from pyquadcortex.protocol import Setlist + before = qc.loaded_position() + assert qc.preset_dirty() is False, "the loaded preset has unsaved edits; save or reload it first" + listing = qc.list_presets(Setlist.USER, include_empty=True) + free = next(e.index for e in listing if not e.name) + name = "pyquadcortex scratch" + stored = qc.save_current_preset(Setlist.USER, free, name, confirm=True, confirm_timeout=30.0) + assert stored == name + qc.recall_preset(Setlist.USER, free) + time.sleep(3.0) + try: + yield Setlist.USER, free, name + finally: + qc.recall_preset(before.folder_key, before.position) + time.sleep(3.0) + qc.delete_preset(Setlist.USER, name) +``` + +`--verifies` selection and marker validation go at the TOP of `pytest_collection_modifyitems`, inside `if config.getoption("--hardware"):`, before the existing early `return` on that flag (the rest of the hook is the offline refusal and stays as it is): + +```python + wanted = config.getoption("--verifies") + if wanted: + keep, drop = [], [] + for item in items: + names = {n for m in item.iter_markers("verifies") for n in m.args} + (keep if wanted in names else drop).append(item) + items[:] = keep + config.hook.pytest_deselected(items=drop) +``` + +Marker validation at collection (same hook, always): for each item, `names = {n for m in item.iter_markers("verifies") for n in m.args}`; any name not in `QuadCortex.operations()` raises `pytest.UsageError(f"{item.nodeid}: verifies({name!r}) is not an operation")`. Import `QuadCortex` inside the hook (the module must stay import-safe offline; `client.py` imports no `hid`, so a top-level import is also fine). + +Report: collect outcomes with `pytest_runtest_logreport` into a dict `operation -> list[outcome]` using each item's markers (store the item's marker names on the report via a `pytest_runtest_makereport` hookwrapper, or look them up from `item` in `pytest_runtest_logreport` through `session.items`), then in `pytest_terminal_summary(terminalreporter, exitstatus, config)` when `--hardware` is set: + +```python + cls = getattr(config, "_profile", None) + if cls is None: # the session never connected, so there is nothing to report + return + passed = {op for op, outcomes in seen.items() if outcomes and all(o == "passed" for o in outcomes)} + failed = {op for op, outcomes in seen.items() if any(o != "passed" for o in outcomes)} + verified = set(cls.VERIFIED) if cls.VERIFIED is not EVERYTHING else cls.operations() + tr = terminalreporter + tr.section(f"operations on {cls.__name__} (CorOS {', '.join(cls.MEASURED_ON)}, {cls.EVIDENCE.name})") + tr.line(f"passed: {sorted(passed)}") + tr.line(f"failed or skipped: {sorted(failed)}") + tr.line(f"passed, not VERIFIED: {sorted(passed - verified)} <- candidates to add") + tr.line(f"VERIFIED, not passed: {sorted(verified - passed)} <- regressions by name") +``` + +The session fixture sets `request.config._profile = type(client)` after connecting (add `request` to its parameters). + +- [ ] **Step 5: Mark every hardware test** + +For each `def test_...` in `tests/hardware/test_*.py`, list the `qc.` methods it calls (this includes calls inside helpers it uses in the same file): + +```bash +for f in tests/hardware/test_*.py; do echo "== $f"; grep -oE 'qc\.[a-z_]+\(' "$f" | sort | uniq -c | sort -rn; done +``` + +Then decorate each test with `@pytest.mark.verifies("name", ...)` naming the operations it EXERCISES AND ASSERTS ON, not every method it touches for setup (a test that calls `qc.read_current_preset()` only to find a block is not verifying `read_current_preset`). Judgement call per test; when in doubt, mark fewer. Tests that only read state to assert on the cache (`test_model_state.py`) mark the reads they assert on. Run `tests/test_hardware_markers.py` after each file; its message lists what remains. + +- [ ] **Step 6: Fill `UNMARKED_OPERATIONS`** + +Run `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest tests/test_hardware_markers.py -q`. Its failure lists the operations no marker names. For each, add an entry with the reason: "no hardware test yet; ", "cannot run state-neutrally: ", or "cloud/account surface, parked per STEERING ยง2". Do not invent a marker to make the list shorter. + +- [ ] **Step 7: `test_generated_constants.py` compares against the profile's snapshot** + +Replace lines 42-47: + +```python +@pytest.mark.parametrize("name", ["models", "params", "options"]) +def test_the_committed_snapshot_matches_this_unit(live_catalog, profile, name): + """Read-only. Compares against the CONNECTED profile's snapshot (ADR-0020), + so a snapshot for another firmware never turns this unit's run red.""" + snapshot = getattr(profile, name) + if isinstance(snapshot, NoSnapshot): + pytest.fail(f"{profile.__name__} has no {name} snapshot yet; run " + f"scripts/generate_{name}.py --snapshot against this unit") + generated = _generator(name).render(live_catalog, snapshot=snapshot.__name__.rsplit(".", 2)[-2]) + committed = pathlib.Path(snapshot.__file__).read_text(encoding="utf-8") + if generated == committed: + return + ... # keep the existing diff-printing failure below +``` + +with `from pyquadcortex.protocol.support import NoSnapshot`. Keep whatever the existing test does after the equality check (it prints a diff and names the regenerate command) and update that command to `--snapshot`. + +- [ ] **Step 8: `tests/test_hardware_gate.py`**: it collects the hardware tree under `--hardware` with `hid` poisoned; the new marker validation runs at collection, so a wrong marker name would surface there too. In the test whose subprocess result is asserted `== pytest.ExitCode.OK` (line 98), add beside that assertion: + +```python + assert "UsageError" not in result.stderr, result.stderr # a verifies() name that is not an operation +``` + +- [ ] **Step 9: Run the offline suite and mypy** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m mypy pyquadcortex` +Expected: all pass, including `tests/test_hardware_gate.py` (which imports every hardware module offline) and `tests/test_hardware_markers.py`. + +- [ ] **Step 10: Commit** + +```bash +git add -A +git commit -m "test: the hardware suite names the operations it verifies and reports them per profile" +``` + +--- + +### Task 9: Documentation + +**Files:** +- Modify: `docs/STEERING.md` (ยง5 table, ยง7 change log), `CLAUDE.md` (the ADR-0020 bullet), `docs/protocol.md` (header lines 7-19), `docs/architecture.md` ("Adapting to a new CorOS version"), `contributing.md`, `changelog.md`, `docs/api.md` + +- [ ] **Step 1: STEERING ยง5**, add a row: + +``` +| Profile is the class | A connection resolves `(device_type, zenos_git_hash)` to a client class before the handshake; `QuadCortex` is 4.0.1 and the base, a subclass declares what differs and refuses what it has not verified | One `if firmware ==` in a method body is the smell polymorphism removes; the decision is made once, by which class is instantiated (see ADR-0020) | `QuadCortex41` in `pyquadcortex/protocol/profiles.py` | `ALWAYS`: the lifecycle methods every profile needs to connect and clean up | +``` + +**STEERING ยง7 change log**, a new entry above the 2026-09-03 ADR-0020 entry: + +``` +### 2026-09-04 - The profile seam is built (ADR-0020) + +**What changed:** `connect()` reads the unit's `Version` before the handshake, +resolves `(device_type, zenos_git_hash)` in a registry of profile classes, and +refuses an unknown pair with `UnsupportedDevice`. `QuadCortex` declares itself +as the 4.0.1 profile; `QuadCortex41` connects and verifies nothing until a 4.1 +unit's suite run fills its `VERIFIED` set; `QuadCortexMini` is recognised and +refused. An operation a profile has not verified refuses under the default +`Support.VERIFIED` and runs with one warning under `Support.EXPERIMENTAL`. +Generated constants live in `pyquadcortex/protocol/catalogs/coros_4_0_1/`; +`protocol.models` and friends are shims over it. `set_block` checks the live +catalog before sending. The hardware suite marks the operations each test +verifies and prints, per profile, which passed. + +**Why:** the ADR-0020 entry below records the decision; this is the code. + +**What did NOT change, on purpose:** `protocol.models` still means 4.0.1; +`CC_VERSION` still announces 4.0.1 on every profile; no 4.1 snapshot ships. +``` + +- [ ] **Step 2: CLAUDE.md**: in the ADR-0020 bullet, replace "(ADR-0020; the rule is decided, the seam is not built yet)" with "(ADR-0020)", and replace "Until the seam is built, `protocol.models`/`params`/`options` mean the QC 4.0.1 snapshot" with "`protocol.models`/`params`/`options` are shims over the QC 4.0.1 snapshot in `protocol/catalogs/coros_4_0_1/`; a connection's own snapshot is `qc.models`". Append two sentences: "A subclass of `QuadCortex` lists what it has verified in `VERIFIED`; everything else it inherits is guarded and refuses under `Support.VERIFIED`. Never put a version check in a method body - override on the profile class, and list the override in `VERIFIED`." + +- [ ] **Step 3: protocol.md header**: after "A profile is what the unit reports in its `Version` reply", add "and is a client class: `QuadCortex` (4.0.1), `QuadCortex41`, `QuadCortexMini` in `pyquadcortex/protocol/profiles.py`." + +- [ ] **Step 4: architecture.md**: retitle the section "Adding a device profile (a new CorOS version or a new model)" and replace the preamble paragraph added in PR #51 with the four steps from `QuadCortex41`'s docstring (generate the snapshot, run the suite, fill `VERIFIED`, record differences beside the 4.0.1 record). Keep the numbered re-verification checklist below it. + +- [ ] **Step 5: contributing.md**: add a section "Adding a device profile" with the same four steps, plus: profiles are named by CorOS version; `MEASURED_ON` lists exact strings; a patch release is added after a suite run, not assumed. + +- [ ] **Step 6: changelog.md** under `## Unreleased`, above the ADR-0020 entry from PR #51: + +``` +### BREAKING: the generators take `--snapshot`, and constants moved + +`scripts/generate_models.py`, `generate_params.py` and `generate_options.py` +require `--snapshot coros_x_y_z` and write `pyquadcortex/protocol/catalogs//`; +`--out` is gone. The generated modules moved there; `pyquadcortex.protocol.models`, +`params` and `options` still import and still mean CorOS 4.0.1, as shims. + +### The connection knows which unit it is talking to (ADR-0020) + +`connect()` reads the unit's `Version` first and picks the profile class for +`(device_type, zenos_git_hash)`: `QuadCortex` for a Quad Cortex on 4.0.1, +`QuadCortex41` for 4.1.0, and `UnsupportedDevice` for anything else, before +the handshake. `connect(profile=...)` names a class deliberately for a unit +nobody has measured. `connect(support=Support.EXPERIMENTAL)` runs operations +a profile has not verified, with one warning each; the default +`Support.VERIFIED` refuses them. `qc.models`, `qc.params`, `qc.options` are the +connection's own constants; `qc.unverified_operations` says what its profile +has not verified. `set_block` refuses a model id the unit's catalog lacks. +The Quad Cortex Mini is recognised and refused with instructions. +``` + +- [ ] **Step 7: api.md**: add `connect(profile=, support=)`, `Support`, `UnsupportedDevice`, `qc.models` to the table; the `test_api_method_table_entries_exist_where_the_table_says` test in `tests/test_docs.py` checks the names resolve. + +- [ ] **Step 8: Run the docs tests and the suite** + +Run: `PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q tests/test_docs.py tests/test_coverage_table.py && PYTHONPATH=$PWD /Users/jonathanstokes/dev/work/personal/pyquadcortex/.venv/bin/python -m pytest -q` +Expected: all pass. `git diff --check` clean. + +- [ ] **Step 9: Commit** + +```bash +git add -A +git commit -m "docs: the profile seam in STEERING, CLAUDE, protocol, architecture, contributing, changelog, api" +``` + +--- + +## After the last task + +Run the whole offline suite and mypy one more time from a clean tree, then the pre-PR self-review per the maintainer's `open-pr` skill. The PR body's test plan must say the hardware suite was NOT run in this work (nothing here needed the unit) and that the first thing to do on the maintainer's 4.0.1 unit after merge is `pytest tests/hardware --hardware`, which must print a report whose "VERIFIED, not passed" list is empty. From 04b17a3349838f9d51dc4ef5ae3026ef398b19ed Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 22:04:39 -0500 Subject: [PATCH 04/33] feat: the vocabulary a device profile is described in (ADR-0020) --- pyquadcortex/protocol/support.py | 112 +++++++++++++++++++++++++++++++ tests/test_support.py | 50 ++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 pyquadcortex/protocol/support.py create mode 100644 tests/test_support.py diff --git a/pyquadcortex/protocol/support.py b/pyquadcortex/protocol/support.py new file mode 100644 index 0000000..f3bca8e --- /dev/null +++ b/pyquadcortex/protocol/support.py @@ -0,0 +1,112 @@ +"""The words a device profile is described in (ADR-0020). + +A PROFILE is a client class: ``QuadCortex`` for a Quad Cortex on CorOS 4.0.1, +a subclass for each other unit somebody has measured. This module holds the +vocabulary those classes declare themselves with and the one function that +words a refusal, so the text cannot drift between the places that use it. + +It imports nothing from the package on purpose: ``client.py`` needs these +names to guard its methods, and the profile classes need ``client.py``, so +this is the module both can import without a cycle. +""" +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Protocol + + +class Support(Enum): + """How a connection treats an operation its profile has not verified. + + ``VERIFIED`` (the default) refuses it with ``ControlNotDrivable``. + ``EXPERIMENTAL`` runs the inherited behaviour and logs one warning per + operation. The hardware suite always connects ``EXPERIMENTAL``: on a new + profile it is the thing doing the verifying. + """ + + VERIFIED = "verified" + EXPERIMENTAL = "experimental" + + +class Evidence(Enum): + """How well a profile is known. + + ``MAINTAINER``: measured on the maintainer's own unit. ``CONTRIBUTED``: + measured by a contributor and not reproduced by the maintainer. ``STUB``: + nothing measured; the class exists to show where the measurements go. + """ + + MAINTAINER = "maintainer" + CONTRIBUTED = "contributed" + STUB = "stub" + + +class _Everything: + """The ``VERIFIED`` value meaning "every operation" - ``QuadCortex`` uses it.""" + + def __contains__(self, name: object) -> bool: + return True + + def __repr__(self) -> str: + return "EVERYTHING" + + +EVERYTHING = _Everything() + + +@dataclass(frozen=True) +class Hardware: + """Facts about the unit's hardware that the model layer needs. + + Extended only when a measurement needs a new field; a fact nobody reads + is a guess with a name. + """ + + footswitches: int + expression_ports: int + + +class NoSnapshot: + """What a profile binds instead of a constants snapshot it does not have yet. + + Binding a stub to the 4.0.1 snapshot would hand a 4.1 user names their + unit does not use, so the stub binds this and the first attribute access + says how to generate the real thing. + """ + + def __init__(self, name: str): + self._name = name + + def __getattr__(self, attr: str) -> object: + raise AttributeError( + f"no catalog snapshot {self._name!r} yet; run " + f"`scripts/generate_models.py --snapshot {self._name}` (and the " + f"params and options generators) against a unit on that firmware " + f"and bind the result on the profile class") + + def __repr__(self) -> str: + return f"NoSnapshot({self._name!r})" + + +class _ProfileClass(Protocol): + """The interface expected of a profile class by unverified_text.""" + + __name__: str + MEASURED_ON: tuple[str, ...] + + +def unverified_text(cls: type[_ProfileClass], name: str) -> tuple[str, str]: + """The evidence and the workaround for an operation ``cls`` has not verified. + + One function, used by the refusal, the experimental-mode warning and the + connect-time hint, so they cannot say three different things. + """ + firmware = ", ".join(cls.MEASURED_ON) or "no firmware measured" + class_name = cls.__dict__.get('__name__', cls.__name__) + evidence = f"not yet verified on {class_name} (CorOS {firmware})" + workaround = ( + f"connect(support=Support.EXPERIMENTAL) to try it, or run " + f"`pytest tests/hardware --hardware --verifies {name}` on your unit " + f"and add the result to {class_name}.VERIFIED") + return evidence, workaround diff --git a/tests/test_support.py b/tests/test_support.py new file mode 100644 index 0000000..43c9549 --- /dev/null +++ b/tests/test_support.py @@ -0,0 +1,50 @@ +"""The vocabulary every profile speaks (spec section 1, "Modules").""" +import dataclasses + +import pytest + +from pyquadcortex.protocol import support + + +def test_support_has_exactly_the_two_modes_the_spec_names(): + assert {m.name for m in support.Support} == {"VERIFIED", "EXPERIMENTAL"} + + +def test_evidence_has_exactly_the_three_levels_the_spec_names(): + assert {e.name for e in support.Evidence} == {"MAINTAINER", "CONTRIBUTED", "STUB"} + + +def test_everything_contains_any_name_and_says_what_it_is(): + assert "set_scene_label" in support.EVERYTHING + assert "anything_at_all" in support.EVERYTHING + assert repr(support.EVERYTHING) == "EVERYTHING" + + +def test_hardware_is_frozen_and_takes_the_two_facts(): + hw = support.Hardware(footswitches=8, expression_ports=2) + assert (hw.footswitches, hw.expression_ports) == (8, 2) + with pytest.raises(dataclasses.FrozenInstanceError): + hw.footswitches = 4 # type: ignore[misc] + + +def test_no_snapshot_refuses_every_attribute_and_names_the_generator(): + missing = support.NoSnapshot("coros_4_1_0") + with pytest.raises(AttributeError) as caught: + missing.Delay + text = str(caught.value) + assert "coros_4_1_0" in text + assert "--snapshot coros_4_1_0" in text + assert repr(missing) == "NoSnapshot('coros_4_1_0')" + + +class _Fake: + __name__ = "QuadCortex41" + MEASURED_ON = ("4.1.0",) + + +def test_unverified_text_names_the_profile_the_firmware_and_both_ways_out(): + evidence, workaround = support.unverified_text(_Fake, "set_scene_label") + assert evidence == "not yet verified on QuadCortex41 (CorOS 4.1.0)" + assert "connect(support=Support.EXPERIMENTAL)" in workaround + assert "pytest tests/hardware --hardware --verifies set_scene_label" in workaround + assert "QuadCortex41.VERIFIED" in workaround From 3720e9e485294d86354e2323777efef6b5008ceb Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 22:13:01 -0500 Subject: [PATCH 05/33] feat: generated constants live in a per-firmware snapshot package; the old paths are shims --- pyquadcortex/protocol/catalogs/__init__.py | 8 + .../protocol/catalogs/coros_4_0_1/__init__.py | 4 + .../protocol/catalogs/coros_4_0_1/models.py | 956 ++++ .../protocol/catalogs/coros_4_0_1/options.py | 1715 +++++++ .../protocol/catalogs/coros_4_0_1/params.py | 4213 ++++++++++++++++ pyquadcortex/protocol/models.py | 961 +--- pyquadcortex/protocol/options.py | 1720 +------ pyquadcortex/protocol/params.py | 4218 +---------------- scripts/check_artifacts.py | 7 + tests/test_profiles.py | 21 + tests/test_values.py | 3 +- 11 files changed, 6941 insertions(+), 6885 deletions(-) create mode 100644 pyquadcortex/protocol/catalogs/__init__.py create mode 100644 pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py create mode 100644 pyquadcortex/protocol/catalogs/coros_4_0_1/models.py create mode 100644 pyquadcortex/protocol/catalogs/coros_4_0_1/options.py create mode 100644 pyquadcortex/protocol/catalogs/coros_4_0_1/params.py create mode 100644 tests/test_profiles.py diff --git a/pyquadcortex/protocol/catalogs/__init__.py b/pyquadcortex/protocol/catalogs/__init__.py new file mode 100644 index 0000000..c431d7a --- /dev/null +++ b/pyquadcortex/protocol/catalogs/__init__.py @@ -0,0 +1,8 @@ +"""Generated constants, one package per firmware the catalog was read from. + +A snapshot is named by the CorOS version it came from (``coros_4_0_1``) and +belongs to the profile class that binds it (ADR-0020). The unversioned +``pyquadcortex.protocol.models`` / ``params`` / ``options`` are shims over the +maintainer's baseline, ``coros_4_0_1``, and stay that way until a decision +record moves them. +""" diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py new file mode 100644 index 0000000..432d29a --- /dev/null +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py @@ -0,0 +1,4 @@ +"""The Quad Cortex catalog on CorOS 4.0.1, read from the maintainer's unit.""" +from pyquadcortex.protocol.catalogs.coros_4_0_1 import models, options, params # noqa: F401 + +__all__ = ["models", "params", "options"] diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py new file mode 100644 index 0000000..44f0bc0 --- /dev/null +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py @@ -0,0 +1,956 @@ +"""Constants for the factory blocks every Quad Cortex has. + +GENERATED by scripts/generate_models.py - do not edit by hand. + +Each class is a model category and each constant a block's wire id, so a +constant can be passed straight to :meth:`pyquadcortex.protocol.QuadCortex.set_block`:: + + qc.set_block(Block(0, 2, models.GuitarOverdrive.CHIEF_DS1)) + +Only FACTORY content is here. Purchased plugin models and Neural Captures +are omitted on purpose: a unit may not have them, and capture ids are user +slots that differ per device. Resolve those at runtime instead:: + + qc.catalog.find('My Capture').id + +Names that begin with a digit are prefixed with N (810 -> N810). +""" + + +class BassAmplifier: + """Bass Amplifier.""" + + BRIT_BASS_50_BRIGHT = 2010 + BRIT_BASS_50_PATCH = 2011 + BRIT_BASS_50_NORMAL = 2012 + G800K = 2013 + CA_400_CH1 = 2014 + CA_400_CH2 = 2015 + AMPED_SUPER_VALVE = 2016 + AMPED_FLIP_TOP_6464 = 2017 + AMPED_FLIP_TOP_6466 = 2018 + AMPED_FLIP_TOP_6664 = 2019 + AMPED_FLIP_TOP_6666 = 2020 + WATT_BASS_MOD_NORMAL = 2021 + WATT_BASS_MOD_BRIGHT = 2022 + + +class BassOverdrive: + """Bass Overdrive.""" + + MICROTUBES_B3K = 3000 + BDDI = 3001 + SOVIET_FUZZ = 3004 + MICROTUBES_VMT = 3006 + EXOTIC_BASS_Z_BOOST = 3007 + + +class CabsimBassM: + """Cabsim Bass (M).""" + + N210C_DARKGLASS_M = 21001 + N410_US_BASSLAD_P10Q_16_M = 21002 + N810_AMPED_VT_ALN_70S_M = 21003 + N115_AMPED_MODERN_M = 21004 + N212_DARKGLASS_NEO_M = 21005 + N412_BRIT_35A_GB55HZ_75_M = 21006 + N410_AMPED_B410_90S_M = 21008 + N810_AMPED_VT_90S_M = 21009 + + +class CabsimBassST: + """Cabsim Bass (ST).""" + + N210C_DARKGLASS_ST = 33001 + N410_US_BASSLAD_P10Q_16_ST = 33002 + N810_AMPED_VT_ALN_70S_ST = 33003 + N115_AMPED_MODERN_ST = 33004 + N212_DARKGLASS_NEO_ST = 33005 + N412_BRIT_35A_GB55HZ_75_ST = 33006 + N410_AMPED_B410_90S_ST = 33008 + N810_AMPED_VT_90S_ST = 33009 + + +class CabsimGuitarM: + """Cabsim Guitar (M).""" + + N412_CA_STAND_OS_S_V30_90S_M = 12001 + N412_D_CELL_FRONT_V30_04_M = 12002 + N412_EV_STRAIGHT_G12_00S_M = 12003 + N212_US_A_TYPE_00S_M = 12004 + N412_BRIT_60B_GB_90S_M = 12005 + N412_BRIT_60B_GB_71_M = 12006 + N412_CA_TRAD_S_UKV30_90S_M = 12007 + N212_ZILA_CB_16_M = 12008 + N412_BRIT_SILVER_B_70W_87_M = 12009 + N412_RANGE_PPC_V30_03_M = 12010 + N412_BOGNA_UBER_T75_00S_M = 12011 + N212_SUR_V_TYPE_10_M = 12012 + N212_UK_C30_GB_69_M = 12013 + N412_ZILA_CUST_V30_12_V2_M = 12015 + N412_ENG_PRO_V30_18_M = 12016 + N112_US_DLX_BLACK_C12K_00S_M = 12017 + N112_US_DLX_TWEED_WGS_Q_10S_M = 12018 + N112_ZILA_MINIMOD_RB_17_M = 12019 + N210_US_TRMLX_OXF_63_M = 12020 + N212_CA_RECTO_V30_98_M = 12021 + N212_US_TWN_C12Q_00S_M = 12022 + N212_ROLS_JAZZ_87_M = 12023 + N212_UK_C30_65_M = 12024 + N212_ZILA_OPEN_GOLD_19_M = 12025 + N110_US_PRN_BROWN_FATJ_10S_M = 12026 + N412_BRIT_60A_GB75HZ_89_M = 12028 + N412_BRIT_60B_V30_95_M = 12029 + N412_BRIT_TV_GB75HZ_69_M = 12030 + N412_CA_STAND_OS_A_V30_01_M = 12031 + N412_CA_TRAD_A_V30_92_M = 12032 + N412_CA_TRAD_S_H30_15_M = 12033 + N412_RANGE_PPC_V30_02_M = 12034 + N412_BOGNA_UBER_V30_00S_M = 12035 + N412_CA_STAND_OS_A_V30_03_M = 12036 + N112_US_DLX_SC64_M = 12037 + N412_BRIT_35B_ALNICO_CREAM_M = 12038 + N212_CA_RECTO_LEGEND_V12_M = 12039 + N212_ZILA_FATBOY_V30_02_M = 12040 + N212_US_TWN_CK2_M = 12041 + N412_WATT_S4123_M = 12042 + N112_UK_C15_BLUE_M = 12043 + N410_US_BASSLAD_PR10_M = 12044 + N110_US_PRN_C10R_M = 12045 + N212_MATCH_JEFE_SIG_02_M = 12046 + N212_MATCH_JEFE_V30_02_M = 12047 + N212_MATCH_D30_SIG_A_M = 12048 + N212_MATCH_D30_SIG_B_M = 12049 + N412_CORNFIELD_V30_M = 12063 + N110_US_PRN_GOLD_G10_M = 12064 + N412_BRIT_60A_G75_80S_M = 12065 + N412_BRIT_60A_LB50_12_M = 12066 + N412_VH_FAT_P50_M = 12067 + N212_ZILA_OPEN_CL80_19_M = 12068 + N212_ZILA_OPEN_G65_82_M = 12069 + N412_CA_DAGGER_A_V30_01_M = 12070 + N212_US_BLEACHED_BASSLAD_V30_01_M = 12071 + N212_US_TWN_WEB_CLASSIC_08_M = 12072 + N412_CA_CUSTOM_A_SHADOW_87_M = 12073 + N212_TOO_ROCK_EV_VINTAGE_79_M = 12074 + N212_TOO_ROCK_G65_M = 12075 + N212_TOO_ROCK_KM65_M = 12076 + N112_BRIT_P_SERIES_TX_33_M = 12077 + + +class CabsimGuitarST: + """Cabsim Guitar (ST).""" + + N412_CA_STAND_OS_S_V30_90S_ST = 32001 + N412_D_CELL_FRONT_V30_04_ST = 32002 + N412_EV_STRAIGHT_G12_00S_ST = 32003 + N212_US_A_TYPE_00S_ST = 32004 + N412_BRIT_60B_GB_90S_ST = 32005 + N412_BRIT_60B_GB_71_ST = 32006 + N412_CA_TRAD_S_UKV30_90S_ST = 32007 + N212_ZILA_CB_16_ST = 32008 + N412_BRIT_SILVER_B_70W_87_ST = 32009 + N412_RANGE_PPC_V30_03_ST = 32010 + N412_BOGNA_UBER_T75_00S_ST = 32011 + N212_SUR_V_TYPE_10_ST = 32012 + N212_UK_C30_GB_69_ST = 32013 + N412_ZILA_CUST_V30_12_V2_ST = 32015 + N412_ENG_PRO_V30_18_ST = 32016 + N112_US_DLX_BLACK_C12K_00S_ST = 32017 + N112_US_DLX_TWEED_WGS_Q_10S_ST = 32018 + N112_ZILA_MINIMOD_RB_17_ST = 32019 + N210_US_TRMLX_OXF_63_ST = 32020 + N212_CA_RECTO_V30_98_ST = 32021 + N212_US_TWN_C12Q_00S_ST = 32022 + N212_ROLS_JAZZ_87_ST = 32023 + N212_UK_C30_65_ST = 32024 + N212_ZILA_OPEN_GOLD_19_ST = 32025 + N110_US_PRN_BROWN_FATJ_10S_ST = 32026 + N412_BRIT_60A_GB75HZ_89_ST = 32028 + N412_BRIT_60B_V30_95_ST = 32029 + N412_BRIT_TV_GB75HZ_69_ST = 32030 + N412_CA_STAND_OS_A_V30_01_ST = 32031 + N412_CA_TRAD_A_V30_92_ST = 32032 + N412_CA_TRAD_S_H30_15_ST = 32033 + N412_RANGE_PPC_V30_02_ST = 32034 + N412_BOGNA_UBER_V30_00S_ST = 32035 + N412_CA_STAND_OS_A_V30_03_ST = 32036 + N112_US_DLX_SC64_ST = 32037 + N412_BRIT_35B_ALNICO_CREAM_ST = 32038 + N212_CA_RECTO_LEGEND_V12_ST = 32039 + N212_ZILA_FATBOY_V30_02_ST = 32040 + N212_US_TWN_CK2_ST = 32041 + N412_WATT_S4123_ST = 32042 + N112_UK_C15_BLUE_ST = 32043 + N410_US_BASSLAD_PR10_ST = 32044 + N110_US_PRN_C10R_ST = 32045 + N212_MATCH_JEFE_SIG_02_ST = 32046 + N212_MATCH_JEFE_V30_02_ST = 32047 + N212_MATCH_D30_SIG_A_ST = 32048 + N212_MATCH_D30_SIG_B_ST = 32049 + N412_CORNFIELD_V30_ST = 32063 + N110_US_PRN_GOLD_G10_ST = 32064 + N412_BRIT_60A_G75_80S_ST = 32065 + N412_BRIT_60A_LB50_12_ST = 32066 + N412_VH_FAT_P50_ST = 32067 + N212_ZILA_OPEN_CL80_19_ST = 32068 + N212_ZILA_OPEN_G65_82_ST = 32069 + N412_CA_DAGGER_A_V30_01_ST = 32070 + N212_US_BLEACHED_BASSLAD_V30_01_ST = 32071 + N212_US_TWN_WEB_CLASSIC_08_ST = 32072 + N412_CA_CUSTOM_A_SHADOW_87_ST = 32073 + N212_TOO_ROCK_EV_VINTAGE_79_ST = 32074 + N212_TOO_ROCK_G65_ST = 32075 + N212_TOO_ROCK_KM65_ST = 32076 + N112_BRIT_P_SERIES_TX_33_ST = 32077 + + +class Compressor: + """Compressor.""" + + LEGENDARY_87_M = 5001 + SOLID_STATE_COMP_M = 5004 + VCA_COMP_M = 5005 + OPTO_COMP_M = 5007 + JEWEL = 5011 + LEGENDARY_87_ST = 5012 + SOLID_STATE_COMP_ST = 5013 + VCA_COMP_ST = 5014 + OPTO_COMP_ST = 5015 + CHIEF_CS3 = 5016 + SOLID_STATE_COMP_S_C = 5018 + LEGENDARY_87_S_C = 5019 + OPTO_COMP_S_C = 5020 + VCA_COMP_S_C = 5021 + + +class Delay: + """Delay.""" + + ANALOG_DELAY_M = 6001 + SIMPLE_PING_PONG_DELAY = 6002 + SIMPLE_DELAY_ST = 6003 + TAPE_DELAY_ST = 6004 + DIGITAL_DELAY_M = 6005 + SIMPLE_DELAY_M = 6006 + TAPE_DELAY_M = 6007 + SLAPBACK_DELAY_ST = 6008 + SLAPBACK_DELAY_M = 6009 + ANALOG_DELAY_ST = 6010 + DIGITAL_DELAY_ST = 6011 + DUAL_DELAY = 6012 + REVERSE_DELAY_M = 6013 + DUAL_REVERSE_DELAY = 6014 + CIRCULAR_DELAY = 6015 + + +class Equalizer: + """Equalizer.""" + + PARAMETRIC_8 = 4000 + PARAMETRIC_3 = 4001 + LOW_HIGH_CUT = 4003 + GRAPHIC_9 = 4005 + PLUGIN_GRAPHIC_9 = 4006 + GRAPHIC_9_LEGACY = 4002 + + +class FXLoop: + """FX Loop.""" + + SEND_1 = 13000 + SEND_2 = 13001 + RETURN_1 = 13002 + RETURN_2 = 13003 + FX_LOOP_1 = 13004 + FX_LOOP_2 = 13005 + SEND_1_2 = 13006 + RETURN_1_2 = 13007 + FX_LOOP_1_2 = 13008 + + +class Filter: + """Filter.""" + + LOVE_MEAT = 24001 + FOOG = 24002 + ENVELOPE_FILTER = 24006 + ENVELOPE_FILTER_S_C = 24007 + ENVELOPE_FILTER_LEGACY = 24003 + ENVELOPE_FILTER_S_C_LEGACY = 24004 + + +class GuitarAmplifier: + """Guitar Amplifier.""" + + BRIT_2203 = 1001 + PV_505_LEAD = 1002 + ROLS_JAZZ_CH120 = 1008 + UK_C30_NORMAL = 1009 + UK_C30_TOPBOOST = 1011 + CA_DUO_CH3_MODERN = 1018 + CA_DUO_CH3_RAW = 1019 + CA_DUO_CH3_VINTAGE = 1020 + FREEMAN_100_CLEAN = 1027 + FREEMAN_100_RHYTHM = 1028 + BRIT_TM45_NORMAL = 1038 + BRIT_TM45_BRIGHT = 1039 + BRIT_TM45_PATCH = 1040 + BRIT_900_CLEAN = 1041 + BRIT_900_LEAD = 1042 + WATT_D103_NORMAL = 1063 + WATT_D103_BRIGHT = 1064 + BRIT_PLEXI_50_BRIGHT = 1079 + BRIT_PLEXI_50_PATCH = 1080 + BRIT_PLEXI_50_NORMAL = 1081 + FREEMAN_100_LEAD = 1082 + US_TWN_NORMAL = 1083 + US_TWN_VIBRATO = 1084 + CA_TREMO_ORANGE = 1089 + CA_TREMO_RED = 1090 + BRIT_PLEXI_100_BRIGHT = 1091 + BRIT_PLEXI_100_PATCH = 1092 + BRIT_PLEXI_100_NORMAL = 1093 + US_SPR_NORMAL = 1096 + US_SPR_VIBRATO = 1097 + CA_1STAR_CLEAN_50W_NORMAL = 1101 + CA_1STAR_CLEAN_50W_TWEED = 1102 + CA_1STAR_CLEAN_100W_NORMAL = 1103 + CA_1STAR_CLEAN_100W_TWEED = 1104 + CA_1STAR_DRIVE_50W_NORMAL = 1105 + CA_1STAR_DRIVE_50W_TWEED = 1106 + CA_1STAR_DRIVE_100W_NORMAL = 1107 + CA_1STAR_DRIVE_100W_TWEED = 1108 + PV_505_RHYTHM = 1115 + CAPTAIN_50 = 1116 + BOGNA_VISHNU_20TH_CLEAN = 1117 + EV101IIIS_BLUE_6L6_100W = 1118 + EV101IIIS_RED_6L6_100W = 1119 + US_PRINCE = 1120 + BRIT_UBL_LEAD = 1121 + BRIT_UBL_LEAD_CLIP = 1122 + US_TWEED_BASSLAD_BRIGHT_PATCH = 1123 + US_TWEED_BASSLAD_BRIGHT = 1124 + US_TWEED_BASSLAD_NORMAL_PATCH = 1125 + US_TWEED_BASSLAD_NORMAL = 1126 + UK_C15_NORMAL = 1127 + UK_C15_TOPBOOST = 1128 + US_HP_TWEED_TWN_NORMAL = 1132 + US_HP_TWEED_TWN_NORMAL_PATCH = 1133 + US_HP_TWEED_TWN_BRIGHT = 1134 + US_HP_TWEED_TWN_BRIGHT_PATCH = 1135 + D_CELL_HISBERT_CH1 = 1136 + D_CELL_HISBERT_CH2 = 1137 + D_CELL_HISBERT_CH3 = 1138 + CA_JOHN_S_2C_CH1 = 1139 + CA_JOHN_S_2C_CH2 = 1140 + CA_JOHN_S_2C_CH3 = 1141 + D_CELL_H4_CH1_BRIGHT = 1142 + D_CELL_H4_CH1_NORMAL = 1143 + D_CELL_H4_CH2_BRIGHT = 1144 + D_CELL_H4_CH2_NORMAL = 1145 + D_CELL_H4_CH3 = 1146 + D_CELL_H4_CH4 = 1147 + EV101IIIS_RED_EL34_100W = 1148 + EV101IIIS_BLUE_EL34_100W = 1149 + SOLO_100_LEAD = 1150 + SOLO_100_CRUNCH_BRIGHT = 1151 + SOLO_100_CRUNCH_NORMAL = 1152 + MATCHMORE_JEFE = 1154 + MATCHMORE_D30_CH1 = 1155 + MATCHMORE_D30_CH2 = 1156 + VICTOR_SQUID_CH1 = 1157 + VICTOR_SQUID_CH2 = 1158 + US_DLX_64_VINTAGE = 1166 + US_DLX_65_REISSUE = 1167 + DUMBBELL_ODS = 1176 + EV101IIIS_RED_EL34_100W_LEGACY = 1017 + SOLO_100_LEAD_LEGACY = 1045 + US_DLX_NORMAL_LEGACY = 1094 + US_DLX_VIBRATO_LEGACY = 1095 + EV101IIIS_BLUE_EL34_100W_LEGACY = 1098 + SOLO_100_CRUNCH_BRIGHT_LEGACY = 1099 + SOLO_100_CRUNCH_NORMAL_LEGACY = 1100 + D_CELL_H4_CH1_BRIGHT_LEGACY = 1109 + D_CELL_H4_CH1_NORMAL_LEGACY = 1110 + D_CELL_H4_CH2_BRIGHT_LEGACY = 1111 + D_CELL_H4_CH2_NORMAL_LEGACY = 1112 + D_CELL_H4_CH3_LEGACY = 1113 + D_CELL_H4_CH4_LEGACY = 1114 + + +class GuitarOverdrive: + """Guitar Overdrive.""" + + MYTH_DRIVE = 1 + OBSESSIVE_DRIVE = 2 + OD250 = 3 + RODENT_DRIVE = 4 + EXOTIC = 6 + FREEMAN_BOD = 8 + BRIT_BLUES = 9 + CHIEF_DS1 = 10 + BRIT_GOVERNOR = 11 + CHIEF_MT = 12 + CHIEF_OD1 = 13 + CHIEF_SD1 = 14 + FUZZ_PI = 15 + CHIEF_BD2 = 18 + RAGE_BOOSTER = 21 + FACIAL_FUZZ = 22 + EXOTIC_Z_BOOST = 23 + RED_DRIVE = 24 + VEMURAL_RAY = 25 + NO_BELL_OD1 = 26 + GREEN_808 = 27 + THUNDERPAW = 28 + MK3_SILICON_FUZZ = 29 + N81_CREATIONS_DRIVE = 42 + GREEN_808_LEGACY = 5 + + +class IRLoaders: + """IRLoaders.""" + + SINGLE_M = 29001 + SINGLE_ST = 29002 + DUAL_M = 29003 + DUAL_ST = 29004 + SINGLE_M_LITE = 29005 + SINGLE_ST_LITE = 29006 + DUAL_M_LITE = 29007 + DUAL_ST_LITE = 29008 + + +class Loopers: + """Loopers.""" + + LOOPER_X = 27000 + + +class Modulation: + """Modulation.""" + + VINTAGE_CHORUS = 7000 + DUAL_CHORUS = 7001 + VIBRATO = 7002 + FLANGERISH = 7003 + TREMOLO = 7004 + ROTARY = 7008 + DIGITAL_FLANGER = 7009 + FLANGER_ENGINE = 7014 + CHORUS_ENGINE = 7015 + MX_FLANGER = 7021 + DREAM_CHORUS_ST = 7022 + CHORUS_229T = 7023 + CHIEF_CE2W_ST = 7024 + CHIEF_CE2W_M = 7025 + DREAM_CHORUS_M = 7026 + CHIEF_DC2W_ST = 7027 + MX_PHASE_95 = 7028 + MX_VIBE = 7029 + CHIEF_DC2W_M = 7030 + PHASER = 7031 + HARMONIC_TREMOLO = 7036 + MICRO_PROCESSOR_ST = 7039 + PATTERN_TREMOLO = 7040 + PHASER_LEGACY = 7006 + NUVIBES_LEGACY = 7007 + + +class Morph: + """Morph.""" + + FREEZE = 26001 + PHASE_LOCKED_LOOP = 26002 + BIT_CRUSHER_ST = 26003 + BIT_CRUSHER_ENGINE_M = 26004 + + +class Pitch: + """Pitch.""" + + PITCH_SHIFTER = 18001 + POLY_OCTAVER = 18004 + WHAM = 18006 + MINIVOICER = 18007 + TRANSPOSE = 18010 + PITCH_CORRECTION = 18013 + CHIEF_OC2 = 18014 + SUBHARMONIC_SYNTH = 18015 + AGGI_SUB_OCTAVER = 18016 + + +class Reverb: + """Reverb.""" + + ROOM = 8000 + SPRING_ST = 8001 + HALL = 8003 + SPRING_M = 8006 + MODULATED = 8007 + AMBIENCE = 8008 + CAVE = 8009 + SHIMMER = 8010 + MIND_HALL = 8011 + PLATE_LUSH = 8012 + PLATE = 8013 + PLATE_TIGHT = 8014 + SPRING_REVERB_ENGINE_M = 8026 + SPRING_REVERB_ENGINE_ST = 8027 + NORDIC_CONCERT_HALL_ST = 8028 + STUDIO_PLATE_70_ST = 8029 + BLOSSOM_ST = 8030 + + +class Synth: + """Synth.""" + + MONO_SYNTH = 30001 + + +class Utility: + """Utility.""" + + ADAPTIVE_GATE = 16001 + UTILITY_GATE = 16002 + SIMPLE_GATE = 16003 + GAIN = 16005 + VOLUME = 16006 + ADAPTIVE_GATE_S_C = 16007 + PLUGIN_BLEND = 16008 + PLUGIN_GATE = 16009 + DOUBLER = 16011 + PLUGIN_DOUBLER = 16012 + TRANSPARENT_BLEND = 16013 + PHASE_DOCTOR = 16016 + + +class Wah: + """Wah.""" + + BUBBA_WAH = 9010 + BASS_WAH = 9012 + CRYING_WAH = 9013 + CRYING_CLYDE_WAH = 9014 + BAD_HORSE = 9018 + CRYING_WAH_FROM_HELL = 9019 + AUTO_WAH = 9021 + BAD_HORSE_LEGACY = 9017 + + +#: Every generated constant, as 'Category.NAME' -> wire id. +ALL = { + "BassAmplifier.BRIT_BASS_50_BRIGHT": 2010, + "BassAmplifier.BRIT_BASS_50_PATCH": 2011, + "BassAmplifier.BRIT_BASS_50_NORMAL": 2012, + "BassAmplifier.G800K": 2013, + "BassAmplifier.CA_400_CH1": 2014, + "BassAmplifier.CA_400_CH2": 2015, + "BassAmplifier.AMPED_SUPER_VALVE": 2016, + "BassAmplifier.AMPED_FLIP_TOP_6464": 2017, + "BassAmplifier.AMPED_FLIP_TOP_6466": 2018, + "BassAmplifier.AMPED_FLIP_TOP_6664": 2019, + "BassAmplifier.AMPED_FLIP_TOP_6666": 2020, + "BassAmplifier.WATT_BASS_MOD_NORMAL": 2021, + "BassAmplifier.WATT_BASS_MOD_BRIGHT": 2022, + "BassOverdrive.MICROTUBES_B3K": 3000, + "BassOverdrive.BDDI": 3001, + "BassOverdrive.SOVIET_FUZZ": 3004, + "BassOverdrive.MICROTUBES_VMT": 3006, + "BassOverdrive.EXOTIC_BASS_Z_BOOST": 3007, + "CabsimBassM.N210C_DARKGLASS_M": 21001, + "CabsimBassM.N410_US_BASSLAD_P10Q_16_M": 21002, + "CabsimBassM.N810_AMPED_VT_ALN_70S_M": 21003, + "CabsimBassM.N115_AMPED_MODERN_M": 21004, + "CabsimBassM.N212_DARKGLASS_NEO_M": 21005, + "CabsimBassM.N412_BRIT_35A_GB55HZ_75_M": 21006, + "CabsimBassM.N410_AMPED_B410_90S_M": 21008, + "CabsimBassM.N810_AMPED_VT_90S_M": 21009, + "CabsimBassST.N210C_DARKGLASS_ST": 33001, + "CabsimBassST.N410_US_BASSLAD_P10Q_16_ST": 33002, + "CabsimBassST.N810_AMPED_VT_ALN_70S_ST": 33003, + "CabsimBassST.N115_AMPED_MODERN_ST": 33004, + "CabsimBassST.N212_DARKGLASS_NEO_ST": 33005, + "CabsimBassST.N412_BRIT_35A_GB55HZ_75_ST": 33006, + "CabsimBassST.N410_AMPED_B410_90S_ST": 33008, + "CabsimBassST.N810_AMPED_VT_90S_ST": 33009, + "CabsimGuitarM.N412_CA_STAND_OS_S_V30_90S_M": 12001, + "CabsimGuitarM.N412_D_CELL_FRONT_V30_04_M": 12002, + "CabsimGuitarM.N412_EV_STRAIGHT_G12_00S_M": 12003, + "CabsimGuitarM.N212_US_A_TYPE_00S_M": 12004, + "CabsimGuitarM.N412_BRIT_60B_GB_90S_M": 12005, + "CabsimGuitarM.N412_BRIT_60B_GB_71_M": 12006, + "CabsimGuitarM.N412_CA_TRAD_S_UKV30_90S_M": 12007, + "CabsimGuitarM.N212_ZILA_CB_16_M": 12008, + "CabsimGuitarM.N412_BRIT_SILVER_B_70W_87_M": 12009, + "CabsimGuitarM.N412_RANGE_PPC_V30_03_M": 12010, + "CabsimGuitarM.N412_BOGNA_UBER_T75_00S_M": 12011, + "CabsimGuitarM.N212_SUR_V_TYPE_10_M": 12012, + "CabsimGuitarM.N212_UK_C30_GB_69_M": 12013, + "CabsimGuitarM.N412_ZILA_CUST_V30_12_V2_M": 12015, + "CabsimGuitarM.N412_ENG_PRO_V30_18_M": 12016, + "CabsimGuitarM.N112_US_DLX_BLACK_C12K_00S_M": 12017, + "CabsimGuitarM.N112_US_DLX_TWEED_WGS_Q_10S_M": 12018, + "CabsimGuitarM.N112_ZILA_MINIMOD_RB_17_M": 12019, + "CabsimGuitarM.N210_US_TRMLX_OXF_63_M": 12020, + "CabsimGuitarM.N212_CA_RECTO_V30_98_M": 12021, + "CabsimGuitarM.N212_US_TWN_C12Q_00S_M": 12022, + "CabsimGuitarM.N212_ROLS_JAZZ_87_M": 12023, + "CabsimGuitarM.N212_UK_C30_65_M": 12024, + "CabsimGuitarM.N212_ZILA_OPEN_GOLD_19_M": 12025, + "CabsimGuitarM.N110_US_PRN_BROWN_FATJ_10S_M": 12026, + "CabsimGuitarM.N412_BRIT_60A_GB75HZ_89_M": 12028, + "CabsimGuitarM.N412_BRIT_60B_V30_95_M": 12029, + "CabsimGuitarM.N412_BRIT_TV_GB75HZ_69_M": 12030, + "CabsimGuitarM.N412_CA_STAND_OS_A_V30_01_M": 12031, + "CabsimGuitarM.N412_CA_TRAD_A_V30_92_M": 12032, + "CabsimGuitarM.N412_CA_TRAD_S_H30_15_M": 12033, + "CabsimGuitarM.N412_RANGE_PPC_V30_02_M": 12034, + "CabsimGuitarM.N412_BOGNA_UBER_V30_00S_M": 12035, + "CabsimGuitarM.N412_CA_STAND_OS_A_V30_03_M": 12036, + "CabsimGuitarM.N112_US_DLX_SC64_M": 12037, + "CabsimGuitarM.N412_BRIT_35B_ALNICO_CREAM_M": 12038, + "CabsimGuitarM.N212_CA_RECTO_LEGEND_V12_M": 12039, + "CabsimGuitarM.N212_ZILA_FATBOY_V30_02_M": 12040, + "CabsimGuitarM.N212_US_TWN_CK2_M": 12041, + "CabsimGuitarM.N412_WATT_S4123_M": 12042, + "CabsimGuitarM.N112_UK_C15_BLUE_M": 12043, + "CabsimGuitarM.N410_US_BASSLAD_PR10_M": 12044, + "CabsimGuitarM.N110_US_PRN_C10R_M": 12045, + "CabsimGuitarM.N212_MATCH_JEFE_SIG_02_M": 12046, + "CabsimGuitarM.N212_MATCH_JEFE_V30_02_M": 12047, + "CabsimGuitarM.N212_MATCH_D30_SIG_A_M": 12048, + "CabsimGuitarM.N212_MATCH_D30_SIG_B_M": 12049, + "CabsimGuitarM.N412_CORNFIELD_V30_M": 12063, + "CabsimGuitarM.N110_US_PRN_GOLD_G10_M": 12064, + "CabsimGuitarM.N412_BRIT_60A_G75_80S_M": 12065, + "CabsimGuitarM.N412_BRIT_60A_LB50_12_M": 12066, + "CabsimGuitarM.N412_VH_FAT_P50_M": 12067, + "CabsimGuitarM.N212_ZILA_OPEN_CL80_19_M": 12068, + "CabsimGuitarM.N212_ZILA_OPEN_G65_82_M": 12069, + "CabsimGuitarM.N412_CA_DAGGER_A_V30_01_M": 12070, + "CabsimGuitarM.N212_US_BLEACHED_BASSLAD_V30_01_M": 12071, + "CabsimGuitarM.N212_US_TWN_WEB_CLASSIC_08_M": 12072, + "CabsimGuitarM.N412_CA_CUSTOM_A_SHADOW_87_M": 12073, + "CabsimGuitarM.N212_TOO_ROCK_EV_VINTAGE_79_M": 12074, + "CabsimGuitarM.N212_TOO_ROCK_G65_M": 12075, + "CabsimGuitarM.N212_TOO_ROCK_KM65_M": 12076, + "CabsimGuitarM.N112_BRIT_P_SERIES_TX_33_M": 12077, + "CabsimGuitarST.N412_CA_STAND_OS_S_V30_90S_ST": 32001, + "CabsimGuitarST.N412_D_CELL_FRONT_V30_04_ST": 32002, + "CabsimGuitarST.N412_EV_STRAIGHT_G12_00S_ST": 32003, + "CabsimGuitarST.N212_US_A_TYPE_00S_ST": 32004, + "CabsimGuitarST.N412_BRIT_60B_GB_90S_ST": 32005, + "CabsimGuitarST.N412_BRIT_60B_GB_71_ST": 32006, + "CabsimGuitarST.N412_CA_TRAD_S_UKV30_90S_ST": 32007, + "CabsimGuitarST.N212_ZILA_CB_16_ST": 32008, + "CabsimGuitarST.N412_BRIT_SILVER_B_70W_87_ST": 32009, + "CabsimGuitarST.N412_RANGE_PPC_V30_03_ST": 32010, + "CabsimGuitarST.N412_BOGNA_UBER_T75_00S_ST": 32011, + "CabsimGuitarST.N212_SUR_V_TYPE_10_ST": 32012, + "CabsimGuitarST.N212_UK_C30_GB_69_ST": 32013, + "CabsimGuitarST.N412_ZILA_CUST_V30_12_V2_ST": 32015, + "CabsimGuitarST.N412_ENG_PRO_V30_18_ST": 32016, + "CabsimGuitarST.N112_US_DLX_BLACK_C12K_00S_ST": 32017, + "CabsimGuitarST.N112_US_DLX_TWEED_WGS_Q_10S_ST": 32018, + "CabsimGuitarST.N112_ZILA_MINIMOD_RB_17_ST": 32019, + "CabsimGuitarST.N210_US_TRMLX_OXF_63_ST": 32020, + "CabsimGuitarST.N212_CA_RECTO_V30_98_ST": 32021, + "CabsimGuitarST.N212_US_TWN_C12Q_00S_ST": 32022, + "CabsimGuitarST.N212_ROLS_JAZZ_87_ST": 32023, + "CabsimGuitarST.N212_UK_C30_65_ST": 32024, + "CabsimGuitarST.N212_ZILA_OPEN_GOLD_19_ST": 32025, + "CabsimGuitarST.N110_US_PRN_BROWN_FATJ_10S_ST": 32026, + "CabsimGuitarST.N412_BRIT_60A_GB75HZ_89_ST": 32028, + "CabsimGuitarST.N412_BRIT_60B_V30_95_ST": 32029, + "CabsimGuitarST.N412_BRIT_TV_GB75HZ_69_ST": 32030, + "CabsimGuitarST.N412_CA_STAND_OS_A_V30_01_ST": 32031, + "CabsimGuitarST.N412_CA_TRAD_A_V30_92_ST": 32032, + "CabsimGuitarST.N412_CA_TRAD_S_H30_15_ST": 32033, + "CabsimGuitarST.N412_RANGE_PPC_V30_02_ST": 32034, + "CabsimGuitarST.N412_BOGNA_UBER_V30_00S_ST": 32035, + "CabsimGuitarST.N412_CA_STAND_OS_A_V30_03_ST": 32036, + "CabsimGuitarST.N112_US_DLX_SC64_ST": 32037, + "CabsimGuitarST.N412_BRIT_35B_ALNICO_CREAM_ST": 32038, + "CabsimGuitarST.N212_CA_RECTO_LEGEND_V12_ST": 32039, + "CabsimGuitarST.N212_ZILA_FATBOY_V30_02_ST": 32040, + "CabsimGuitarST.N212_US_TWN_CK2_ST": 32041, + "CabsimGuitarST.N412_WATT_S4123_ST": 32042, + "CabsimGuitarST.N112_UK_C15_BLUE_ST": 32043, + "CabsimGuitarST.N410_US_BASSLAD_PR10_ST": 32044, + "CabsimGuitarST.N110_US_PRN_C10R_ST": 32045, + "CabsimGuitarST.N212_MATCH_JEFE_SIG_02_ST": 32046, + "CabsimGuitarST.N212_MATCH_JEFE_V30_02_ST": 32047, + "CabsimGuitarST.N212_MATCH_D30_SIG_A_ST": 32048, + "CabsimGuitarST.N212_MATCH_D30_SIG_B_ST": 32049, + "CabsimGuitarST.N412_CORNFIELD_V30_ST": 32063, + "CabsimGuitarST.N110_US_PRN_GOLD_G10_ST": 32064, + "CabsimGuitarST.N412_BRIT_60A_G75_80S_ST": 32065, + "CabsimGuitarST.N412_BRIT_60A_LB50_12_ST": 32066, + "CabsimGuitarST.N412_VH_FAT_P50_ST": 32067, + "CabsimGuitarST.N212_ZILA_OPEN_CL80_19_ST": 32068, + "CabsimGuitarST.N212_ZILA_OPEN_G65_82_ST": 32069, + "CabsimGuitarST.N412_CA_DAGGER_A_V30_01_ST": 32070, + "CabsimGuitarST.N212_US_BLEACHED_BASSLAD_V30_01_ST": 32071, + "CabsimGuitarST.N212_US_TWN_WEB_CLASSIC_08_ST": 32072, + "CabsimGuitarST.N412_CA_CUSTOM_A_SHADOW_87_ST": 32073, + "CabsimGuitarST.N212_TOO_ROCK_EV_VINTAGE_79_ST": 32074, + "CabsimGuitarST.N212_TOO_ROCK_G65_ST": 32075, + "CabsimGuitarST.N212_TOO_ROCK_KM65_ST": 32076, + "CabsimGuitarST.N112_BRIT_P_SERIES_TX_33_ST": 32077, + "Compressor.LEGENDARY_87_M": 5001, + "Compressor.SOLID_STATE_COMP_M": 5004, + "Compressor.VCA_COMP_M": 5005, + "Compressor.OPTO_COMP_M": 5007, + "Compressor.JEWEL": 5011, + "Compressor.LEGENDARY_87_ST": 5012, + "Compressor.SOLID_STATE_COMP_ST": 5013, + "Compressor.VCA_COMP_ST": 5014, + "Compressor.OPTO_COMP_ST": 5015, + "Compressor.CHIEF_CS3": 5016, + "Compressor.SOLID_STATE_COMP_S_C": 5018, + "Compressor.LEGENDARY_87_S_C": 5019, + "Compressor.OPTO_COMP_S_C": 5020, + "Compressor.VCA_COMP_S_C": 5021, + "Delay.ANALOG_DELAY_M": 6001, + "Delay.SIMPLE_PING_PONG_DELAY": 6002, + "Delay.SIMPLE_DELAY_ST": 6003, + "Delay.TAPE_DELAY_ST": 6004, + "Delay.DIGITAL_DELAY_M": 6005, + "Delay.SIMPLE_DELAY_M": 6006, + "Delay.TAPE_DELAY_M": 6007, + "Delay.SLAPBACK_DELAY_ST": 6008, + "Delay.SLAPBACK_DELAY_M": 6009, + "Delay.ANALOG_DELAY_ST": 6010, + "Delay.DIGITAL_DELAY_ST": 6011, + "Delay.DUAL_DELAY": 6012, + "Delay.REVERSE_DELAY_M": 6013, + "Delay.DUAL_REVERSE_DELAY": 6014, + "Delay.CIRCULAR_DELAY": 6015, + "Equalizer.PARAMETRIC_8": 4000, + "Equalizer.PARAMETRIC_3": 4001, + "Equalizer.LOW_HIGH_CUT": 4003, + "Equalizer.GRAPHIC_9": 4005, + "Equalizer.PLUGIN_GRAPHIC_9": 4006, + "Equalizer.GRAPHIC_9_LEGACY": 4002, + "FXLoop.SEND_1": 13000, + "FXLoop.SEND_2": 13001, + "FXLoop.RETURN_1": 13002, + "FXLoop.RETURN_2": 13003, + "FXLoop.FX_LOOP_1": 13004, + "FXLoop.FX_LOOP_2": 13005, + "FXLoop.SEND_1_2": 13006, + "FXLoop.RETURN_1_2": 13007, + "FXLoop.FX_LOOP_1_2": 13008, + "Filter.LOVE_MEAT": 24001, + "Filter.FOOG": 24002, + "Filter.ENVELOPE_FILTER": 24006, + "Filter.ENVELOPE_FILTER_S_C": 24007, + "Filter.ENVELOPE_FILTER_LEGACY": 24003, + "Filter.ENVELOPE_FILTER_S_C_LEGACY": 24004, + "GuitarAmplifier.BRIT_2203": 1001, + "GuitarAmplifier.PV_505_LEAD": 1002, + "GuitarAmplifier.ROLS_JAZZ_CH120": 1008, + "GuitarAmplifier.UK_C30_NORMAL": 1009, + "GuitarAmplifier.UK_C30_TOPBOOST": 1011, + "GuitarAmplifier.CA_DUO_CH3_MODERN": 1018, + "GuitarAmplifier.CA_DUO_CH3_RAW": 1019, + "GuitarAmplifier.CA_DUO_CH3_VINTAGE": 1020, + "GuitarAmplifier.FREEMAN_100_CLEAN": 1027, + "GuitarAmplifier.FREEMAN_100_RHYTHM": 1028, + "GuitarAmplifier.BRIT_TM45_NORMAL": 1038, + "GuitarAmplifier.BRIT_TM45_BRIGHT": 1039, + "GuitarAmplifier.BRIT_TM45_PATCH": 1040, + "GuitarAmplifier.BRIT_900_CLEAN": 1041, + "GuitarAmplifier.BRIT_900_LEAD": 1042, + "GuitarAmplifier.WATT_D103_NORMAL": 1063, + "GuitarAmplifier.WATT_D103_BRIGHT": 1064, + "GuitarAmplifier.BRIT_PLEXI_50_BRIGHT": 1079, + "GuitarAmplifier.BRIT_PLEXI_50_PATCH": 1080, + "GuitarAmplifier.BRIT_PLEXI_50_NORMAL": 1081, + "GuitarAmplifier.FREEMAN_100_LEAD": 1082, + "GuitarAmplifier.US_TWN_NORMAL": 1083, + "GuitarAmplifier.US_TWN_VIBRATO": 1084, + "GuitarAmplifier.CA_TREMO_ORANGE": 1089, + "GuitarAmplifier.CA_TREMO_RED": 1090, + "GuitarAmplifier.BRIT_PLEXI_100_BRIGHT": 1091, + "GuitarAmplifier.BRIT_PLEXI_100_PATCH": 1092, + "GuitarAmplifier.BRIT_PLEXI_100_NORMAL": 1093, + "GuitarAmplifier.US_SPR_NORMAL": 1096, + "GuitarAmplifier.US_SPR_VIBRATO": 1097, + "GuitarAmplifier.CA_1STAR_CLEAN_50W_NORMAL": 1101, + "GuitarAmplifier.CA_1STAR_CLEAN_50W_TWEED": 1102, + "GuitarAmplifier.CA_1STAR_CLEAN_100W_NORMAL": 1103, + "GuitarAmplifier.CA_1STAR_CLEAN_100W_TWEED": 1104, + "GuitarAmplifier.CA_1STAR_DRIVE_50W_NORMAL": 1105, + "GuitarAmplifier.CA_1STAR_DRIVE_50W_TWEED": 1106, + "GuitarAmplifier.CA_1STAR_DRIVE_100W_NORMAL": 1107, + "GuitarAmplifier.CA_1STAR_DRIVE_100W_TWEED": 1108, + "GuitarAmplifier.PV_505_RHYTHM": 1115, + "GuitarAmplifier.CAPTAIN_50": 1116, + "GuitarAmplifier.BOGNA_VISHNU_20TH_CLEAN": 1117, + "GuitarAmplifier.EV101IIIS_BLUE_6L6_100W": 1118, + "GuitarAmplifier.EV101IIIS_RED_6L6_100W": 1119, + "GuitarAmplifier.US_PRINCE": 1120, + "GuitarAmplifier.BRIT_UBL_LEAD": 1121, + "GuitarAmplifier.BRIT_UBL_LEAD_CLIP": 1122, + "GuitarAmplifier.US_TWEED_BASSLAD_BRIGHT_PATCH": 1123, + "GuitarAmplifier.US_TWEED_BASSLAD_BRIGHT": 1124, + "GuitarAmplifier.US_TWEED_BASSLAD_NORMAL_PATCH": 1125, + "GuitarAmplifier.US_TWEED_BASSLAD_NORMAL": 1126, + "GuitarAmplifier.UK_C15_NORMAL": 1127, + "GuitarAmplifier.UK_C15_TOPBOOST": 1128, + "GuitarAmplifier.US_HP_TWEED_TWN_NORMAL": 1132, + "GuitarAmplifier.US_HP_TWEED_TWN_NORMAL_PATCH": 1133, + "GuitarAmplifier.US_HP_TWEED_TWN_BRIGHT": 1134, + "GuitarAmplifier.US_HP_TWEED_TWN_BRIGHT_PATCH": 1135, + "GuitarAmplifier.D_CELL_HISBERT_CH1": 1136, + "GuitarAmplifier.D_CELL_HISBERT_CH2": 1137, + "GuitarAmplifier.D_CELL_HISBERT_CH3": 1138, + "GuitarAmplifier.CA_JOHN_S_2C_CH1": 1139, + "GuitarAmplifier.CA_JOHN_S_2C_CH2": 1140, + "GuitarAmplifier.CA_JOHN_S_2C_CH3": 1141, + "GuitarAmplifier.D_CELL_H4_CH1_BRIGHT": 1142, + "GuitarAmplifier.D_CELL_H4_CH1_NORMAL": 1143, + "GuitarAmplifier.D_CELL_H4_CH2_BRIGHT": 1144, + "GuitarAmplifier.D_CELL_H4_CH2_NORMAL": 1145, + "GuitarAmplifier.D_CELL_H4_CH3": 1146, + "GuitarAmplifier.D_CELL_H4_CH4": 1147, + "GuitarAmplifier.EV101IIIS_RED_EL34_100W": 1148, + "GuitarAmplifier.EV101IIIS_BLUE_EL34_100W": 1149, + "GuitarAmplifier.SOLO_100_LEAD": 1150, + "GuitarAmplifier.SOLO_100_CRUNCH_BRIGHT": 1151, + "GuitarAmplifier.SOLO_100_CRUNCH_NORMAL": 1152, + "GuitarAmplifier.MATCHMORE_JEFE": 1154, + "GuitarAmplifier.MATCHMORE_D30_CH1": 1155, + "GuitarAmplifier.MATCHMORE_D30_CH2": 1156, + "GuitarAmplifier.VICTOR_SQUID_CH1": 1157, + "GuitarAmplifier.VICTOR_SQUID_CH2": 1158, + "GuitarAmplifier.US_DLX_64_VINTAGE": 1166, + "GuitarAmplifier.US_DLX_65_REISSUE": 1167, + "GuitarAmplifier.DUMBBELL_ODS": 1176, + "GuitarAmplifier.EV101IIIS_RED_EL34_100W_LEGACY": 1017, + "GuitarAmplifier.SOLO_100_LEAD_LEGACY": 1045, + "GuitarAmplifier.US_DLX_NORMAL_LEGACY": 1094, + "GuitarAmplifier.US_DLX_VIBRATO_LEGACY": 1095, + "GuitarAmplifier.EV101IIIS_BLUE_EL34_100W_LEGACY": 1098, + "GuitarAmplifier.SOLO_100_CRUNCH_BRIGHT_LEGACY": 1099, + "GuitarAmplifier.SOLO_100_CRUNCH_NORMAL_LEGACY": 1100, + "GuitarAmplifier.D_CELL_H4_CH1_BRIGHT_LEGACY": 1109, + "GuitarAmplifier.D_CELL_H4_CH1_NORMAL_LEGACY": 1110, + "GuitarAmplifier.D_CELL_H4_CH2_BRIGHT_LEGACY": 1111, + "GuitarAmplifier.D_CELL_H4_CH2_NORMAL_LEGACY": 1112, + "GuitarAmplifier.D_CELL_H4_CH3_LEGACY": 1113, + "GuitarAmplifier.D_CELL_H4_CH4_LEGACY": 1114, + "GuitarOverdrive.MYTH_DRIVE": 1, + "GuitarOverdrive.OBSESSIVE_DRIVE": 2, + "GuitarOverdrive.OD250": 3, + "GuitarOverdrive.RODENT_DRIVE": 4, + "GuitarOverdrive.EXOTIC": 6, + "GuitarOverdrive.FREEMAN_BOD": 8, + "GuitarOverdrive.BRIT_BLUES": 9, + "GuitarOverdrive.CHIEF_DS1": 10, + "GuitarOverdrive.BRIT_GOVERNOR": 11, + "GuitarOverdrive.CHIEF_MT": 12, + "GuitarOverdrive.CHIEF_OD1": 13, + "GuitarOverdrive.CHIEF_SD1": 14, + "GuitarOverdrive.FUZZ_PI": 15, + "GuitarOverdrive.CHIEF_BD2": 18, + "GuitarOverdrive.RAGE_BOOSTER": 21, + "GuitarOverdrive.FACIAL_FUZZ": 22, + "GuitarOverdrive.EXOTIC_Z_BOOST": 23, + "GuitarOverdrive.RED_DRIVE": 24, + "GuitarOverdrive.VEMURAL_RAY": 25, + "GuitarOverdrive.NO_BELL_OD1": 26, + "GuitarOverdrive.GREEN_808": 27, + "GuitarOverdrive.THUNDERPAW": 28, + "GuitarOverdrive.MK3_SILICON_FUZZ": 29, + "GuitarOverdrive.N81_CREATIONS_DRIVE": 42, + "GuitarOverdrive.GREEN_808_LEGACY": 5, + "IRLoaders.SINGLE_M": 29001, + "IRLoaders.SINGLE_ST": 29002, + "IRLoaders.DUAL_M": 29003, + "IRLoaders.DUAL_ST": 29004, + "IRLoaders.SINGLE_M_LITE": 29005, + "IRLoaders.SINGLE_ST_LITE": 29006, + "IRLoaders.DUAL_M_LITE": 29007, + "IRLoaders.DUAL_ST_LITE": 29008, + "Loopers.LOOPER_X": 27000, + "Modulation.VINTAGE_CHORUS": 7000, + "Modulation.DUAL_CHORUS": 7001, + "Modulation.VIBRATO": 7002, + "Modulation.FLANGERISH": 7003, + "Modulation.TREMOLO": 7004, + "Modulation.ROTARY": 7008, + "Modulation.DIGITAL_FLANGER": 7009, + "Modulation.FLANGER_ENGINE": 7014, + "Modulation.CHORUS_ENGINE": 7015, + "Modulation.MX_FLANGER": 7021, + "Modulation.DREAM_CHORUS_ST": 7022, + "Modulation.CHORUS_229T": 7023, + "Modulation.CHIEF_CE2W_ST": 7024, + "Modulation.CHIEF_CE2W_M": 7025, + "Modulation.DREAM_CHORUS_M": 7026, + "Modulation.CHIEF_DC2W_ST": 7027, + "Modulation.MX_PHASE_95": 7028, + "Modulation.MX_VIBE": 7029, + "Modulation.CHIEF_DC2W_M": 7030, + "Modulation.PHASER": 7031, + "Modulation.HARMONIC_TREMOLO": 7036, + "Modulation.MICRO_PROCESSOR_ST": 7039, + "Modulation.PATTERN_TREMOLO": 7040, + "Modulation.PHASER_LEGACY": 7006, + "Modulation.NUVIBES_LEGACY": 7007, + "Morph.FREEZE": 26001, + "Morph.PHASE_LOCKED_LOOP": 26002, + "Morph.BIT_CRUSHER_ST": 26003, + "Morph.BIT_CRUSHER_ENGINE_M": 26004, + "Pitch.PITCH_SHIFTER": 18001, + "Pitch.POLY_OCTAVER": 18004, + "Pitch.WHAM": 18006, + "Pitch.MINIVOICER": 18007, + "Pitch.TRANSPOSE": 18010, + "Pitch.PITCH_CORRECTION": 18013, + "Pitch.CHIEF_OC2": 18014, + "Pitch.SUBHARMONIC_SYNTH": 18015, + "Pitch.AGGI_SUB_OCTAVER": 18016, + "Reverb.ROOM": 8000, + "Reverb.SPRING_ST": 8001, + "Reverb.HALL": 8003, + "Reverb.SPRING_M": 8006, + "Reverb.MODULATED": 8007, + "Reverb.AMBIENCE": 8008, + "Reverb.CAVE": 8009, + "Reverb.SHIMMER": 8010, + "Reverb.MIND_HALL": 8011, + "Reverb.PLATE_LUSH": 8012, + "Reverb.PLATE": 8013, + "Reverb.PLATE_TIGHT": 8014, + "Reverb.SPRING_REVERB_ENGINE_M": 8026, + "Reverb.SPRING_REVERB_ENGINE_ST": 8027, + "Reverb.NORDIC_CONCERT_HALL_ST": 8028, + "Reverb.STUDIO_PLATE_70_ST": 8029, + "Reverb.BLOSSOM_ST": 8030, + "Synth.MONO_SYNTH": 30001, + "Utility.ADAPTIVE_GATE": 16001, + "Utility.UTILITY_GATE": 16002, + "Utility.SIMPLE_GATE": 16003, + "Utility.GAIN": 16005, + "Utility.VOLUME": 16006, + "Utility.ADAPTIVE_GATE_S_C": 16007, + "Utility.PLUGIN_BLEND": 16008, + "Utility.PLUGIN_GATE": 16009, + "Utility.DOUBLER": 16011, + "Utility.PLUGIN_DOUBLER": 16012, + "Utility.TRANSPARENT_BLEND": 16013, + "Utility.PHASE_DOCTOR": 16016, + "Wah.BUBBA_WAH": 9010, + "Wah.BASS_WAH": 9012, + "Wah.CRYING_WAH": 9013, + "Wah.CRYING_CLYDE_WAH": 9014, + "Wah.BAD_HORSE": 9018, + "Wah.CRYING_WAH_FROM_HELL": 9019, + "Wah.AUTO_WAH": 9021, + "Wah.BAD_HORSE_LEGACY": 9017, +} diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py new file mode 100644 index 0000000..18943ee --- /dev/null +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py @@ -0,0 +1,1715 @@ +"""The choices a list-valued parameter offers, as enums. + +GENERATED by ``scripts/generate_options.py``. Do not edit by hand. + +A list parameter stores ``index / (count - 1)`` on the wire, so picking +an option means knowing its position. These name the positions:: + + qc.set_param_option(block, 'DYN MODE', options.DynMode.GATE) + +110 enums cover 267 parameters, because the same list means +the same thing wherever it appears - the note-length list is shared by +``SYNC NOTE``, ``SYNC NOTE L``, ``SYNC NOTE R`` and two more. + +**A two-option Off/On parameter gets no enum.** 247 parameters offer +exactly those, and ``True`` says everything ``OffOn.ON`` would:: + + qc.set_param(block, 'SYNC', True) + +**A dynamic list gets no enum either.** Twelve parameters build their +list from the preset - it includes one entry per upstream block - so +read those with :func:`~pyquadcortex.protocol.client.param_options`. + +The member names are ours; the wire's strings are the device's, and +``OPTION_LABELS`` keeps them verbatim. Where the two differ the label is +in a comment beside the member. +""" +from enum import IntEnum + + +class Adjust(IntEnum): + """2 parameters use this list: ร˜ ADJUST, ร˜ ADJUST R + + On Phase Doctor. + """ + + BYPASS = 0 + N90 = 1 # '90ยฐ' + N180 = 2 # '180ยฐ' + + +class AnalogDelayMSyncNote(IntEnum): + """2 parameters use this list: SYNC NOTE + + On Analog Delay (M), Analog Delay (ST). + """ + + N1_16 = 0 # '1/16' + N1_8T = 1 # '1/8T' + N1_16D = 2 # '1/16D' + N1_8 = 3 # '1/8' + N1_4T = 4 # '1/4T' + N1_8D = 5 # '1/8D' + N1_4 = 6 # '1/4' + N1_2T = 7 # '1/2T' + N1_4D = 8 # '1/4D' + N1_2 = 9 # '1/2' + N1_1T = 10 # '1/1T' + N1_2D = 11 # '1/2D' + N1_1 = 12 # '1/1' + + +class ArpPattern(IntEnum): + """1 parameter use this list: ARP PATTERN + + On Mono Synth. + """ + + UP = 0 + DOWN = 1 + UP_AND_DOWN = 2 # 'Up & Down' + DOWN_AND_UP = 3 # 'Down & Up' + RANDOM = 4 + + +class BitDepth(IntEnum): + """2 parameters use this list: BIT DEPTH + + On Bit-Crusher (ST), Bit-Crusher Engine (M). + """ + + N1 = 0 # '1' + N2 = 1 # '2' + N3 = 2 # '3' + N4 = 3 # '4' + N5 = 4 # '5' + N6 = 5 # '6' + N7 = 6 # '7' + N8 = 7 # '8' + N9 = 8 # '9' + N10 = 9 # '10' + N11 = 10 # '11' + N12 = 11 # '12' + N13 = 12 # '13' + N14 = 13 # '14' + N15 = 14 # '15' + N16 = 15 # '16' + + +class Boost(IntEnum): + """2 parameters use this list: BOOST + + On UK C15 TopBoost, UK C30 TopBoost. + """ + + HOT = 0 + COOL = 1 + + +class Bright(IntEnum): + """1 parameter use this list: BRIGHT + + On Freeman 100 Clean. + """ + + NORMAL = 0 + BRIGHT_1 = 1 # 'Bright 1' + BRIGHT_2 = 2 # 'Bright 2' + + +class Center(IntEnum): + """2 parameters use this list: ร˜ CENTER, ร˜ CENTER R + + On Phase Doctor. + """ + + LO_FREQ = 0 # 'Lo Freq' + HI_FREQ = 1 # 'Hi Freq' + + +class ChannelNormal(IntEnum): + """1 parameter use this list: CHANNEL + + On Soldano SLO-100ยฎ. + """ + + NORMAL = 0 + OD = 1 + + +class ChiefCe2wMType(IntEnum): + """2 parameters use this list: TYPE + + On Chief CE2W (M), Chief CE2W (ST). + """ + + CE2_C = 0 # 'CE2-C' + CE1_C = 1 # 'CE1-C' + CE1_V = 2 # 'CE1-V' + + +class ChiefDc2wMMode(IntEnum): + """2 parameters use this list: MODE + + On Chief DC2W (M), Chief DC2W (ST). + """ + + N1 = 0 # '1' + N2 = 1 # '2' + N3 = 2 # '3' + N4 = 3 # '4' + N1_2 = 4 # '1+2' + N1_3 = 5 # '1+3' + N1_4 = 6 # '1+4' + N2_3 = 7 # '2+3' + N2_4 = 8 # '2+4' + N3_4 = 9 # '3+4' + + +class ChiefDc2wMType(IntEnum): + """2 parameters use this list: TYPE + + On Chief DC2W (M), Chief DC2W (ST). + """ + + S = 0 + SDD_320 = 1 # 'SDD-320' + + +class Color(IntEnum): + """1 parameter use this list: COLOR + + On Flanger Engine. + """ + + NATURAL = 0 + WARM = 1 + DARK = 2 + BRIGHT = 3 + SPARKLE = 4 + DUSTY = 5 + SPIKY = 6 + TWANGY = 7 + + +class CoryWongDIFunkConsoleAttack(IntEnum): + """1 parameter use this list: ATTACK + + On Cory Wong D.I. Funk Console. + """ + + FAST = 0 + SLOW = 1 + + +class CoryWongDelayYYMode(IntEnum): + """1 parameter use this list: MODE + + On Cory Wong Delay-y-y. + """ + + SINGLE = 0 + DUAL = 1 + + +class Crunch(IntEnum): + """1 parameter use this list: CRUNCH + + On Soldano SLO-100ยฎ. + """ + + CLEAN = 0 + CRUNCH = 1 + + +class Curve(IntEnum): + """1 parameter use this list: CURVE + + On Volume. + """ + + LINEAR = 0 + LOG = 1 + + +class DCellHisbertCh2Mode(IntEnum): + """1 parameter use this list: MODE + + On D-Cell Hisbert Ch2. + """ + + MINUS = 0 # '-' + PLUS = 1 # '+' + + +class Decay(IntEnum): + """1 parameter use this list: DECAY + + On Foog. + """ + + FAST = 0 + SMOOTH = 1 + + +class DigitalFlangerPolarity(IntEnum): + """1 parameter use this list: POLARITY + + On Digital Flanger. + """ + + NEG = 0 + POS = 1 + + +class DivSource(IntEnum): + """1 parameter use this list: DIV. SOURCE + + On Phase-Locked Loop. + """ + + UNISON = 0 + MULTIPLIER = 1 + + +class Divider(IntEnum): + """1 parameter use this list: DIVIDER + + On Phase-Locked Loop. + """ + + N2 = 0 # '2' + N3 = 1 # '3' + N4 = 2 # '4' + N5 = 3 # '5' + N6 = 4 # '6' + N7 = 5 # '7' + N8 = 6 # '8' + + +class DreamChorusMMode(IntEnum): + """2 parameters use this list: MODE + + On Dream Chorus (M), Dream Chorus (ST). + """ + + CHO1 = 0 + CHO2 = 1 + + +class DriveType(IntEnum): + """2 parameters use this list: DRIVE TYPE + + On Chorus Engine, Flanger Engine. + """ + + SOFT = 0 + EDGY = 1 + HARD = 2 + OFF = 3 + + +class DualChorusMode(IntEnum): + """1 parameter use this list: MODE + + On Dual Chorus. + """ + + CHORUS = 0 + VIBE = 1 + + +class DumbbellOdsChannel(IntEnum): + """1 parameter use this list: CHANNEL + + On Dumbbell ODS. + """ + + CLEAN = 0 + OD = 1 + + +class DumbbellOdsEq(IntEnum): + """1 parameter use this list: EQ + + On Dumbbell ODS. + """ + + JAZZ = 0 + ROCK = 1 + + +class DuplicateMode(IntEnum): + """1 parameter use this list: DUPLICATE MODE + + On Looper X. + """ + + FREE = 0 + SYNC = 1 + + +class DynMode2(IntEnum): + """9 parameters use this list: DYN MODE + + On 9 models, among them Gojira DLY, Nameless Delay, Nolly Delay-1 (M). + """ + + DUCK = 0 + GATE = 1 + + +class DynMode3(IntEnum): + """11 parameters use this list: DYN MODE + + On 11 models, among them Analog Delay (M), Analog Delay (ST), Digital Delay (M). + """ + + OFF = 0 + DUCK = 1 + GATE = 2 + + +class Eq3(IntEnum): + """8 parameters use this list: EQ + + On 8 models, among them CA 1Star Clean 100W Normal, CA 1Star Clean 100W Tweed, CA 1Star Clean 50W Normal. + """ + + NORMAL = 0 + THICK = 1 + THICKER = 2 + + +class FeedbackMode(IntEnum): + """2 parameters use this list: FEEDBACK MODE + + On Dual Reverse Delay, Reverse Delay (M). + """ + + REVERSE = 0 + FLIP = 1 + + +class Filter(IntEnum): + """1 parameter use this list: FILTER + + On Foog. + """ + + N4_POLE = 0 # '4-POLE' + N2_POLE = 1 # '2-POLE' + + +class FilterCutoff(IntEnum): + """1 parameter use this list: FILTER CUTOFF + + On Love Meat. + """ + + LOW = 0 + A = 1 + B = 2 + HIGH = 3 + + +class FilterType(IntEnum): + """1 parameter use this list: FILTER TYPE + + On Love Meat. + """ + + LOWPASS = 0 + BANDPASS = 1 + HIGHPASS = 2 + + +class FlangerEngineWaveform(IntEnum): + """1 parameter use this list: WAVEFORM + + On Flanger Engine. + """ + + SINE = 0 + TRIANGLE = 1 + SQUARE = 2 + SAW_UP = 3 # 'Saw Up' + SAW_DN = 4 # 'Saw Dn' + RNDSMOOTH = 5 + RNDSTEP = 6 + + +class Focus(IntEnum): + """2 parameters use this list: FOCUS + + On Victor Squid Ch1, Victor Squid Ch2. + """ + + ON = 0 + OFF = 1 + + +class Frequency(IntEnum): + """2 parameters use this list: FREQUENCY, UNI. AMOUNT + + On Amped Super Valve, Mono Synth. + """ + + N1 = 0 # '1' + N2 = 1 # '2' + N3 = 2 # '3' + N4 = 3 # '4' + N5 = 4 # '5' + + +class GainPolarity(IntEnum): + """3 parameters use this list: PHASE INVERT, ร˜ POLARITY, ร˜ POLARITY R + + On Gain, Phase Doctor. + """ + + NORMAL = 0 + INVERTED = 1 + + +class GojiraWowMode(IntEnum): + """1 parameter use this list: MODE + + On Gojira WOW. + """ + + BLADE_2 = 0 # 'Blade 2' + BLADE_1 = 1 # 'Blade 1' + FATSO = 2 + + +class HighsFreq(IntEnum): + """1 parameter use this list: HIGHS FREQ + + On Cory Wong D.I. Funk Console. + """ + + N4_KHZ = 0 # '4 kHz' + N2_5_KHZ = 1 # '2.5 kHz' + + +class HpfSlope(IntEnum): + """2 parameters use this list: HPF SLOPE, LPF SLOPE + + On Low-High Cut. + """ + + FLAT = 0 + MINUS_6 = 1 # '-6' + MINUS_12 = 2 # '-12' + MINUS_18 = 3 # '-18' + MINUS_24 = 4 # '-24' + MINUS_30 = 5 # '-30' + MINUS_36 = 6 # '-36' + MINUS_42 = 7 # '-42' + MINUS_48 = 8 # '-48' + + +class Input(IntEnum): + """2 parameters use this list: INPUT + + On US DLX 64 Vintage, US DLX 65 Reissue. + """ + + LOW = 0 + HIGH = 1 + + +class Instrument(IntEnum): + """1 parameter use this list: INSTRUMENT + + On Phase-Locked Loop. + """ + + GUITAR = 0 + BASS = 1 + + +class Invert(IntEnum): + """16 parameters use this list: INVERT + + On 8 models, among them Dual (M), Dual (M) Lite, Dual (ST). + """ + + NORMAL = 0 # 'Noral' + INVERTED = 1 + + +class Legendary87MRatio(IntEnum): + """3 parameters use this list: RATIO + + On Legendary 87 (M), Legendary 87 (S/C), Legendary 87 (ST). + """ + + N4 = 0 # '4' + N8 = 1 # '8' + N12 = 2 # '12' + N20 = 3 # '20' + ALL = 4 + + +class LowsFreq(IntEnum): + """1 parameter use this list: LOWS FREQ + + On Cory Wong D.I. Funk Console. + """ + + N225_HZ = 0 # '225 Hz' + N150_HZ = 1 # '150 Hz' + + +class Mid(IntEnum): + """3 parameters use this list: BRIGHT, MID, PREAMP + + On Dumbbell ODS. + """ + + OFF = 0 + BOOST = 1 + + +class MidsFreq(IntEnum): + """1 parameter use this list: MIDS FREQ + + On Cory Wong D.I. Funk Console. + """ + + N900_HZ = 0 # '900 Hz' + N600_HZ = 1 # '600 Hz' + + +class MinivoicerMidiCh(IntEnum): + """1 parameter use this list: MIDI CH + + On Minivoicer. + """ + + N1 = 0 # '1' + N2 = 1 # '2' + N3 = 2 # '3' + N4 = 3 # '4' + N5 = 4 # '5' + N6 = 5 # '6' + N7 = 6 # '7' + N8 = 7 # '8' + N9 = 8 # '9' + N10 = 9 # '10' + N11 = 10 # '11' + N12 = 11 # '12' + N13 = 12 # '13' + N14 = 13 # '14' + N15 = 14 # '15' + N16 = 15 # '16' + OMNI = 16 + + +class MinivoicerMode(IntEnum): + """2 parameters use this list: MODE + + On Minivoicer, Pitch Correction. + """ + + MAJOR = 0 + MINOR = 1 + CHROM = 2 + + +class MinivoicerRoot(IntEnum): + """2 parameters use this list: ROOT + + On Minivoicer, Pitch Correction. + """ + + A = 0 + A_1 = 1 # 'A#' + B = 2 + C = 3 + C_4 = 4 # 'C#' + D = 5 + D_6 = 6 # 'D#' + E = 7 + F = 8 + F_9 = 9 # 'F#' + G = 10 + G_11 = 11 # 'G#' + + +class MixLaw(IntEnum): + """6 parameters use this list: MIX LAW + + On 6 models, among them Cory Wong The Wash, Default Reverb, Gojira REV. + """ + + NOLLY = 0 + NOLLYSKEWED = 1 + NOLLYSKEWEDPLUG = 2 + + +class ModSource(IntEnum): + """1 parameter use this list: MOD SOURCE + + On Micro Processor (ST). + """ + + LFO = 0 + LFO_STEREO = 1 # 'LFO Stereo' + PLUS_ENVELOPE = 2 # '+Envelope' + MINUS_ENVELOPE = 3 # '-Envelope' + + +class MonoSynthMidiCh(IntEnum): + """1 parameter use this list: MIDI CH. + + On Mono Synth. + """ + + OFF = 0 + N1 = 1 # '1' + N2 = 2 # '2' + N3 = 3 # '3' + N4 = 4 # '4' + N5 = 5 # '5' + N6 = 6 # '6' + N7 = 7 # '7' + N8 = 8 # '8' + N9 = 9 # '9' + N10 = 10 # '10' + N11 = 11 # '11' + N12 = 12 # '12' + N13 = 13 # '13' + N14 = 14 # '14' + N15 = 15 # '15' + N16 = 16 # '16' + OMNI = 17 + + +class MonoSynthRoot(IntEnum): + """1 parameter use this list: ROOT + + On Mono Synth. + """ + + OFF = 0 + A = 1 + A_2 = 2 # 'A#' + B = 3 + C = 4 + C_5 = 5 # 'C#' + D = 6 + D_7 = 7 # 'D#' + E = 8 + F = 9 + F_10 = 10 # 'F#' + G = 11 + G_12 = 12 # 'G#' + + +class MulSource(IntEnum): + """1 parameter use this list: MUL. SOURCE + + On Phase-Locked Loop. + """ + + UNISON = 0 + MINUS_1_OCTAVE = 1 # '-1 Octave' + MINUS_2_OCTAVES = 2 # '-2 Octaves' + + +class Multiplier(IntEnum): + """1 parameter use this list: MULTIPLIER + + On Phase-Locked Loop. + """ + + X1 = 0 + X2 = 1 + X3 = 2 + X4 = 3 + X5 = 4 + X6 = 5 + X7 = 6 + X8 = 7 + + +class MxPhase95Mode(IntEnum): + """1 parameter use this list: MODE + + On MX Phase 95. + """ + + BLOCK = 0 + SCRIPT = 1 + + +class MxPhase95Type(IntEnum): + """1 parameter use this list: TYPE + + On MX Phase 95. + """ + + N90 = 0 # '90' + N45 = 1 # '45' + + +class NollyCompressorAttack(IntEnum): + """1 parameter use this list: ATTACK + + On Nolly Compressor. + """ + + SMOOTH = 0 + SNAPPY = 1 + + +class Notelength(IntEnum): + """1 parameter use this list: NOTELENGTH + + On TempoControl. + """ + + QUARTER = 0 + EIGHTH = 1 + TRIPLET = 2 + SIXTEENTH = 3 + + +class Octave(IntEnum): + """1 parameter use this list: OCTAVE + + On Mono Synth. + """ + + MINUS_2 = 0 # '-2' + MINUS_1 = 1 # '-1' + N0 = 2 # '0' + N1 = 3 # '1' + N2 = 4 # '2' + + +class OnOff(IntEnum): + """1 parameter use this list: ON / OFF + + On Freeze. + """ + + RELEASE = 0 + FREEZE = 1 + + +class Osc1Wave(IntEnum): + """2 parameters use this list: OSC1 WAVE, OSC2 WAVE + + On Mono Synth. + """ + + SINE = 0 + TRIANG = 1 + SAWTOOTH = 2 + SQUARE = 3 + PULSE = 4 + PINK_NS = 5 # 'Pink NS' + WHITE_NS = 6 # 'White NS' + + +class OutMode(IntEnum): + """1 parameter use this list: OUT MODE + + On Chief CE2W (M). + """ + + MONO = 0 + WET_DRY = 1 # 'Wet/Dry' + + +class Peak(IntEnum): + """1 parameter use this list: PEAK + + On Obsessive Drive. + """ + + LP = 0 + HP = 1 + + +class Pickup(IntEnum): + """1 parameter use this list: PICKUP + + On Facial Fuzz. + """ + + HB = 0 + SINGLE = 1 + + +class PliniChorusMode(IntEnum): + """1 parameter use this list: MODE + + On Plini Chorus. + """ + + SPATIAL = 0 + VINTAGE = 1 + + +class PliniDriveMode(IntEnum): + """1 parameter use this list: MODE + + On Plini Drive. + """ + + FZ = 0 + OD = 1 + + +class PreRoll(IntEnum): + """1 parameter use this list: PRE ROLL + + On Looper X. + """ + + OFF = 0 + N1_BAR = 1 # '1 BAR' + N2_BARS = 2 # '2 BARS' + N4_BARS = 3 # '4 BARS' + + +class PunchMode(IntEnum): + """3 parameters use this list: OVERDUB MODE, PUNCH MODE, RECORD MODE + + On Looper X. + """ + + MOMENTARY = 0 + TOGGLE = 1 + + +class Quality(IntEnum): + """4 parameters use this list: QUALITY + + On 4 models, among them Analog Delay (M), Analog Delay (ST), Slapback Delay (M). + """ + + N0 = 0 # '0' + N1 = 1 # '1' + N2 = 2 # '2' + N3 = 3 # '3' + + +class Quantize(IntEnum): + """1 parameter use this list: QUANTIZE + + On Looper X. + """ + + OFF = 0 + N1_BEAT = 1 # '1 Beat' + N2_BEATS = 2 # '2 Beats' + N3_BEATS = 3 # '3 Beats' + N4_BEATS = 4 # '4 Beats' + N5_BEATS = 5 # '5 Beats' + N6_BEATS = 6 # '6 Beats' + N7_BEATS = 7 # '7 Beats' + N8_BEATS = 8 # '8 Beats' + N16_BEATS = 9 # '16 Beats' + + +class Ratio3(IntEnum): + """6 parameters use this list: RATIO + + On 6 models, among them Nolly Compressor, Plini Comp, SLO-100ยฎ Compressor. + """ + + N2 = 0 # '2' + N4 = 1 # '4' + N10 = 2 # '10' + + +class RecLength(IntEnum): + """1 parameter use this list: REC. LENGTH + + On Looper X. + """ + + OFF = 0 + N1_BAR = 1 # '1 BAR' + N2_BARS = 2 # '2 BARS' + N3_BARS = 3 # '3 BARS' + N4_BARS = 4 # '4 BARS' + N5_BARS = 5 # '5 BARS' + N6_BARS = 6 # '6 BARS' + N7_BARS = 7 # '7 BARS' + N8_BARS = 8 # '8 BARS' + N9_BARS = 9 # '9 BARS' + N10_BARS = 10 # '10 BARS' + N11_BARS = 11 # '11 BARS' + N12_BARS = 12 # '12 BARS' + N13_BARS = 13 # '13 BARS' + N14_BARS = 14 # '14 BARS' + N15_BARS = 15 # '15 BARS' + N16_BARS = 16 # '16 BARS' + N17_BARS = 17 # '17 BARS' + N18_BARS = 18 # '18 BARS' + N19_BARS = 19 # '19 BARS' + N20_BARS = 20 # '20 BARS' + N21_BARS = 21 # '21 BARS' + N22_BARS = 22 # '22 BARS' + N23_BARS = 23 # '23 BARS' + N24_BARS = 24 # '24 BARS' + N25_BARS = 25 # '25 BARS' + N26_BARS = 26 # '26 BARS' + N27_BARS = 27 # '27 BARS' + N28_BARS = 28 # '28 BARS' + N29_BARS = 29 # '29 BARS' + N30_BARS = 30 # '30 BARS' + N31_BARS = 31 # '31 BARS' + N32_BARS = 32 # '32 BARS' + + +class RedDriveMode(IntEnum): + """2 parameters use this list: INPUT, MODE + + On Fortinยฎ Nameless, Red Drive. + """ + + LOW = 0 + HIGH = 1 + + +class Resonance(IntEnum): + """1 parameter use this list: RESONANCE + + On Flanger Engine. + """ + + FULL = 0 + HOLLOW = 1 + RICH = 2 + INTENSE = 3 + + +class Routing(IntEnum): + """1 parameter use this list: ROUTING + + On TempoControl. + """ + + MULTI = 0 + HP = 1 + OUT_1_2 = 2 # 'OUT 1/2' + OUT_3_4 = 3 # 'OUT 3/4' + SEND_1_2 = 4 # 'SEND 1/2' + + +class RoutingMode(IntEnum): + """1 parameter use this list: ROUTING MODE + + On Looper X. + """ + + GRID = 0 + IN_1 = 1 # 'In 1' + IN_2 = 2 # 'In 2' + RET_1 = 3 # 'Ret 1' + RET_2 = 4 # 'Ret 2' + IN_1_2 = 5 # 'In 1/2' + RET_1_2 = 6 # 'Ret 1/2' + OUT1 = 7 + OUT2 = 8 + OUT3 = 9 + OUT4 = 10 + OUT1_2 = 11 # 'Out1/2' + OUT3_4 = 12 # 'Out3/4' + MULTI = 13 + + +class Scale(IntEnum): + """1 parameter use this list: SCALE + + On Mono Synth. + """ + + MAJOR = 0 + MINOR = 1 + + +class Size(IntEnum): + """12 parameters use this list: SIZE + + On 12 models, among them Ambience, Dual (M), Dual (M) Lite. + """ + + SMALL = 0 + MED = 1 + LARGE = 2 + + +class SlapbackDelayMSyncNote(IntEnum): + """2 parameters use this list: SYNC NOTE + + On Slapback Delay (M), Slapback Delay (ST). + """ + + N1_64T = 0 # '1/64T' + N1_64 = 1 # '1/64' + N1_32T = 2 # '1/32T' + N1_64D = 3 # '1/64D' + N1_32 = 4 # '1/32' + N1_16T = 5 # '1/16T' + N1_32D = 6 # '1/32D' + N1_16 = 7 # '1/16' + N1_8T = 8 # '1/8T' + N1_16D = 9 # '1/16D' + N1_8 = 10 # '1/8' + + +class Slope(IntEnum): + """1 parameter use this list: SLOPE + + On Mono Synth. + """ + + N6DB_OCT = 0 # '6dB/Oct' + N12DB_OCT = 1 # '12dB/Oct' + N18DB_OCT = 2 # '18dB/Oct' + N24DB_OCT = 3 # '24dB/Oct' + + +class SoldanoSlo100Channel(IntEnum): + """1 parameter use this list: CHANNEL + + On Soldano SLO-100ยฎ. + """ + + CLEAN = 0 + CRUNCH = 1 + LEAD = 2 + + +class Sound(IntEnum): + """1 parameter use this list: SOUND + + On TempoControl. + """ + + BLIP = 0 + BLOCK = 1 + COWBELL = 2 + DIGITAL = 3 + DRUM_KIT = 4 # 'DRUM KIT' + SOFT_KIT = 5 # 'SOFT KIT' + + +class Speed(IntEnum): + """2 parameters use this list: ATTACK, SPEED + + On Rotary, SLO-100ยฎ Compressor. + """ + + SLOW = 0 + FAST = 1 + + +class SplitterMode(IntEnum): + """2 parameters use this list: MODE + + On Splitter, Splitter Crossover. + """ + + REGULAR = 0 + INVERT = 1 + + +class SplitterType(IntEnum): + """1 parameter use this list: TYPE + + On Splitter. + """ + + BALANCE = 0 + A_B = 1 # 'A/B' + CROSSOVER = 2 + + +class Start(IntEnum): + """2 parameters use this list: METRONOME MUTE, START + + On Looper X, TempoControl. + """ + + MUTE = 0 + UNMUTE = 1 + + +class Stereo(IntEnum): + """4 parameters use this list: STEREO + + On 4 models, among them Splitter, Splitter AB, Splitter Balance. + """ + + NORMAL = 0 + SPLIT = 1 + + +class StereoLink(IntEnum): + """1 parameter use this list: STEREO LINK + + On Phase Doctor. + """ + + UNLINKED = 0 + LINKED = 1 + + +class SyncNote11(IntEnum): + """5 parameters use this list: CHR NOTE, SYNC NOTE + + On 5 models, among them Chief DC2W PCOM, Chorus 229T, Cory Wong The 80s. + """ + + N1_8 = 0 # '1/8' + N1_4T = 1 # '1/4T' + N1_8D = 2 # '1/8D' + N1_4 = 3 # '1/4' + N1_2T = 4 # '1/2T' + N1_4D = 5 # '1/4D' + N1_2 = 6 # '1/2' + N1_1T = 7 # '1/1T' + N1_2D = 8 # '1/2D' + N1_1 = 9 # '1/1' + N1_1D = 10 # '1/1D' + + +class SyncNote14(IntEnum): + """9 parameters use this list: SYNC NOTE + + On 9 models, among them Chief CE2W (M), Chief CE2W (ST), Dream Chorus (M). + """ + + N1_16 = 0 # '1/16' + N1_8T = 1 # '1/8T' + N1_16D = 2 # '1/16D' + N1_8 = 3 # '1/8' + N1_4T = 4 # '1/4T' + N1_8D = 5 # '1/8D' + N1_4 = 6 # '1/4' + N1_2T = 7 # '1/2T' + N1_4D = 8 # '1/4D' + N1_2 = 9 # '1/2' + N1_1T = 10 # '1/1T' + N1_2D = 11 # '1/2D' + N1_1 = 12 # '1/1' + N1_1D = 13 # '1/1D' + + +class SyncNote17(IntEnum): + """14 parameters use this list: FAST NOTE, SLOW NOTE, SYNC NOTE + + On 12 models, among them Chorus Engine, Digital Flanger, Flanger Engine. + """ + + N1_32 = 0 # '1/32' + N1_16T = 1 # '1/16T' + N1_32D = 2 # '1/32D' + N1_16 = 3 # '1/16' + N1_8T = 4 # '1/8T' + N1_16D = 5 # '1/16D' + N1_8 = 6 # '1/8' + N1_4T = 7 # '1/4T' + N1_8D = 8 # '1/8D' + N1_4 = 9 # '1/4' + N1_2T = 10 # '1/2T' + N1_4D = 11 # '1/4D' + N1_2 = 12 # '1/2' + N1_1T = 13 # '1/1T' + N1_2D = 14 # '1/2D' + N1_1 = 15 # '1/1' + N1_1D = 16 # '1/1D' + + +class SyncNote21(IntEnum): + """28 parameters use this list: SYNC NOTE, SYNC NOTE A, SYNC NOTE B, SYNC NOTE L, SYNC NOTE R + + On 24 models, among them Circular Delay, Cory Wong Delay-y-y, Digital Delay (M). + """ + + N1_64T = 0 # '1/64T' + N1_64 = 1 # '1/64' + N1_32T = 2 # '1/32T' + N1_64D = 3 # '1/64D' + N1_32 = 4 # '1/32' + N1_16T = 5 # '1/16T' + N1_32D = 6 # '1/32D' + N1_16 = 7 # '1/16' + N1_8T = 8 # '1/8T' + N1_16D = 9 # '1/16D' + N1_8 = 10 # '1/8' + N1_4T = 11 # '1/4T' + N1_8D = 12 # '1/8D' + N1_4 = 13 # '1/4' + N1_2T = 14 # '1/2T' + N1_4D = 15 # '1/4D' + N1_2 = 16 # '1/2' + N1_1T = 17 # '1/1T' + N1_2D = 18 # '1/2D' + N1_1 = 19 # '1/1' + N1_1D = 20 # '1/1D' + + +class SyncOn(IntEnum): + """1 parameter use this list: SYNC ON + + On Harmonic Tremolo. + """ + + LOWS = 0 + HIGHS = 1 + + +class TankType(IntEnum): + """2 parameters use this list: TANK TYPE + + On Spring Reverb Engine (M), Spring Reverb Engine (ST). + """ + + VINTAGE = 0 + SHORT = 1 + MID = 2 + LONG = 3 + + +class TapPreset(IntEnum): + """1 parameter use this list: TAP PRESET + + On Circular Delay. + """ + + N1 = 0 # '1' + N2 = 1 # '2' + N3 = 2 # '3' + N4 = 3 # '4' + N4_ALT = 4 # '4 Alt' + N5 = 5 # '5' + N5_ALT = 6 # '5 Alt' + N6 = 7 # '6' + N6_ALT = 8 # '6 Alt' + + +class TempocontrolType(IntEnum): + """1 parameter use this list: TYPE + + On TempoControl. + """ + + PRESET = 0 + GLOBAL_ = 1 # 'Global' + + +class TimeSignature(IntEnum): + """1 parameter use this list: TIME SIGNATURE + + On TempoControl. + """ + + N2_4 = 0 # '2/4' + N3_4 = 1 # '3/4' + N4_4 = 2 # '4/4' + N5_4 = 3 # '5/4' + N6_4 = 4 # '6/4' + N7_4 = 5 # '7/4' + N8_4 = 6 # '8/4' + N9_4 = 7 # '9/4' + N10_4 = 8 # '10/4' + N11_4 = 9 # '11/4' + N12_4 = 10 # '12/4' + N13_4 = 11 # '13/4' + N3_8 = 12 # '3/8' + N6_8 = 13 # '6/8' + N9_8 = 14 # '9/8' + N12_8 = 15 # '12/8' + N5_8_3_2 = 16 # '5/8 (3+2)' + N5_8_2_3 = 17 # '5/8 (2+3)' + N7_8_3_2_2 = 18 # '7/8 (3+2+2)' + N7_8_2_3_2 = 19 # '7/8 (2+3+2)' + N7_8_2_2_3 = 20 # '7/8 (2+2+3)' + + +class TremoloWaveform(IntEnum): + """2 parameters use this list: WAVEFORM + + On Harmonic Tremolo, Tremolo. + """ + + SINE = 0 + TRIANGLE = 1 + SQUARE = 2 + SAW_UP = 3 # 'Saw Up' + SAW_DN = 4 # 'Saw Dn' + + +class TrigDirection(IntEnum): + """1 parameter use this list: TRIG DIRECTION + + On Love Meat. + """ + + DOWN = 0 + UP = 1 + + +class TriggerMode(IntEnum): + """1 parameter use this list: TRIGGER MODE + + On Love Meat. + """ + + OFF = 0 + FULL = 1 + N1_2 = 2 # '1/2' + + +class Tube(IntEnum): + """2 parameters use this list: TUBE + + On Victor Squid Ch1, Victor Squid Ch2. + """ + + N6L6 = 0 # '6L6' + EL34 = 1 + + +class UnisonSource(IntEnum): + """1 parameter use this list: UNISON SOURCE + + On Mono Synth. + """ + + OFF = 0 + OSC_1 = 1 # 'OSC 1' + OSC_2 = 2 # 'OSC 2' + OSC_1_2 = 3 # 'OSC 1 + 2' + + +class UsDlx64VintageMode(IntEnum): + """2 parameters use this list: MODE + + On US DLX 64 Vintage, US DLX 65 Reissue. + """ + + NORMAL = 0 + VIBRATO = 1 + VIBRATO_BRIGHT_OFF = 2 # 'Vibrato Bright Off' + + +class V1Inter(IntEnum): + """2 parameters use this list: V1 INTER, V2 INTER + + On Minivoicer. + """ + + MINUS_15TH = 0 # '-15th' + MINUS_14TH = 1 # '-14th' + MINUS_13TH = 2 # '-13th' + MINUS_12TH = 3 # '-12th' + MINUS_11TH = 4 # '-11th' + MINUS_10TH = 5 # '-10th' + MINUS_9TH = 6 # '-9th' + MINUS_8TH = 7 # '-8th' + MINUS_7TH = 8 # '-7th' + MINUS_6TH = 9 # '-6th' + MINUS_5TH = 10 # '-5th' + MINUS_4TH = 11 # '-4th' + MINUS_3RD = 12 # '-3rd' + MINUS_2ND = 13 # '-2nd' + ROOT = 14 + N2ND = 15 # '2nd' + N3RD = 16 # '3rd' + N4TH = 17 # '4th' + N5TH = 18 # '5th' + N6TH = 19 # '6th' + N7TH = 20 # '7th' + N8TH = 21 # '8th' + N9TH = 22 # '9th' + N10TH = 23 # '10th' + N11TH = 24 # '11th' + N12TH = 25 # '12th' + N13TH = 26 # '13th' + N14TH = 27 # '14th' + N15TH = 28 # '15th' + + +class VibNote(IntEnum): + """2 parameters use this list: VIB NOTE + + On Cory Wong The 80s, Vintage Chorus. + """ + + N1_32 = 0 # '1/32' + N1_16T = 1 # '1/16T' + N1_32D = 2 # '1/32D' + N1_16 = 3 # '1/16' + N1_8T = 4 # '1/8T' + N1_16D = 5 # '1/16D' + N1_8 = 6 # '1/8' + N1_4T = 7 # '1/4T' + N1_8D = 8 # '1/8D' + + +class VintageChorusMode(IntEnum): + """2 parameters use this list: MODE + + On Cory Wong The 80s, Vintage Chorus. + """ + + CHORUS = 0 + VIBRATO = 1 + + +class VoiceMode(IntEnum): + """1 parameter use this list: VOICE MODE + + On Chorus Engine. + """ + + FULL = 0 + THICK = 1 + OPEN = 2 + BROAD = 3 + + +#: Each enum's options as the DEVICE spells them, in wire order. +#: +#: The member names above are ours - mangled to be valid Python, and +#: corrected where the device has a typo. These are the strings the +#: unit actually uses, which is what a dynamic list matches against. +OPTION_LABELS = { + Adjust: ('Bypass', '90ยฐ', '180ยฐ'), + AnalogDelayMSyncNote: ('1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1'), + ArpPattern: ('Up', 'Down', 'Up & Down', 'Down & Up', 'Random'), + BitDepth: ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16'), + Boost: ('HOT', 'COOL'), + Bright: ('Normal', 'Bright 1', 'Bright 2'), + Center: ('Lo Freq', 'Hi Freq'), + ChannelNormal: ('Normal', 'OD'), + ChiefCe2wMType: ('CE2-C', 'CE1-C', 'CE1-V'), + ChiefDc2wMMode: ('1', '2', '3', '4', '1+2', '1+3', '1+4', '2+3', '2+4', '3+4'), + ChiefDc2wMType: ('S', 'SDD-320'), + Color: ('Natural', 'Warm', 'Dark', 'Bright', 'Sparkle', 'Dusty', 'Spiky', 'Twangy'), + CoryWongDIFunkConsoleAttack: ('Fast', 'Slow'), + CoryWongDelayYYMode: ('Single', 'Dual'), + Crunch: ('Clean', 'Crunch'), + Curve: ('Linear', 'Log'), + DCellHisbertCh2Mode: ('-', '+'), + Decay: ('Fast', 'Smooth'), + DigitalFlangerPolarity: ('Neg', 'Pos'), + DivSource: ('Unison', 'Multiplier'), + Divider: ('2', '3', '4', '5', '6', '7', '8'), + DreamChorusMMode: ('CHO1', 'CHO2'), + DriveType: ('Soft', 'Edgy', 'Hard', 'Off'), + DualChorusMode: ('Chorus', 'Vibe'), + DumbbellOdsChannel: ('Clean', 'OD'), + DumbbellOdsEq: ('Jazz', 'Rock'), + DuplicateMode: ('Free', 'Sync'), + DynMode2: ('Duck', 'Gate'), + DynMode3: ('Off', 'Duck', 'Gate'), + Eq3: ('Normal', 'Thick', 'Thicker'), + FeedbackMode: ('Reverse', 'Flip'), + Filter: ('4-POLE', '2-POLE'), + FilterCutoff: ('Low', 'A', 'B', 'High'), + FilterType: ('Lowpass', 'Bandpass', 'Highpass'), + FlangerEngineWaveform: ('Sine', 'Triangle', 'Square', 'Saw Up', 'Saw Dn', 'rndSmooth', 'rndStep'), + Focus: ('ON', 'OFF'), + Frequency: ('1', '2', '3', '4', '5'), + GainPolarity: ('Normal', 'Inverted'), + GojiraWowMode: ('Blade 2', 'Blade 1', 'FATSO'), + HighsFreq: ('4 kHz', '2.5 kHz'), + HpfSlope: ('Flat', '-6', '-12', '-18', '-24', '-30', '-36', '-42', '-48'), + Input: ('Low', 'High'), + Instrument: ('Guitar', 'Bass'), + Invert: ('Noral', 'Inverted'), + Legendary87MRatio: ('4', '8', '12', '20', 'All'), + LowsFreq: ('225 Hz', '150 Hz'), + Mid: ('Off', 'Boost'), + MidsFreq: ('900 Hz', '600 Hz'), + MinivoicerMidiCh: ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', 'Omni'), + MinivoicerMode: ('Major', 'Minor', 'Chrom'), + MinivoicerRoot: ('A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'), + MixLaw: ('nolly', 'nollySkewed', 'nollySkewedPlug'), + ModSource: ('LFO', 'LFO Stereo', '+Envelope', '-Envelope'), + MonoSynthMidiCh: ('Off', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', 'Omni'), + MonoSynthRoot: ('OFF', 'A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'), + MulSource: ('Unison', '-1 Octave', '-2 Octaves'), + Multiplier: ('x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8'), + MxPhase95Mode: ('Block', 'Script'), + MxPhase95Type: ('90', '45'), + NollyCompressorAttack: ('Smooth', 'Snappy'), + Notelength: ('QUARTER', 'EIGHTH', 'TRIPLET', 'SIXTEENTH'), + Octave: ('-2', '-1', '0', '1', '2'), + OnOff: ('RELEASE', 'FREEZE'), + Osc1Wave: ('Sine', 'Triang', 'Sawtooth', 'Square', 'Pulse', 'Pink NS', 'White NS'), + OutMode: ('Mono', 'Wet/Dry'), + Peak: ('LP', 'HP'), + Pickup: ('HB', 'SINGLE'), + PliniChorusMode: ('Spatial', 'Vintage'), + PliniDriveMode: ('FZ', 'OD'), + PreRoll: ('OFF', '1 BAR', '2 BARS', '4 BARS'), + PunchMode: ('Momentary', 'Toggle'), + Quality: ('0', '1', '2', '3'), + Quantize: ('OFF', '1 Beat', '2 Beats', '3 Beats', '4 Beats', '5 Beats', '6 Beats', '7 Beats', '8 Beats', '16 Beats'), + Ratio3: ('2', '4', '10'), + RecLength: ('OFF', '1 BAR', '2 BARS', '3 BARS', '4 BARS', '5 BARS', '6 BARS', '7 BARS', '8 BARS', '9 BARS', '10 BARS', '11 BARS', '12 BARS', '13 BARS', '14 BARS', '15 BARS', '16 BARS', '17 BARS', '18 BARS', '19 BARS', '20 BARS', '21 BARS', '22 BARS', '23 BARS', '24 BARS', '25 BARS', '26 BARS', '27 BARS', '28 BARS', '29 BARS', '30 BARS', '31 BARS', '32 BARS'), + RedDriveMode: ('LOW', 'HIGH'), + Resonance: ('Full', 'Hollow', 'Rich', 'Intense'), + Routing: ('MULTI', 'HP', 'OUT 1/2', 'OUT 3/4', 'SEND 1/2'), + RoutingMode: ('Grid', 'In 1', 'In 2', 'Ret 1', 'Ret 2', 'In 1/2', 'Ret 1/2', 'Out1', 'Out2', 'Out3', 'Out4', 'Out1/2', 'Out3/4', 'Multi'), + Scale: ('Major', 'Minor'), + Size: ('Small', 'Med', 'Large'), + SlapbackDelayMSyncNote: ('1/64T', '1/64', '1/32T', '1/64D', '1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8'), + Slope: ('6dB/Oct', '12dB/Oct', '18dB/Oct', '24dB/Oct'), + SoldanoSlo100Channel: ('Clean', 'Crunch', 'Lead'), + Sound: ('BLIP', 'BLOCK', 'COWBELL', 'DIGITAL', 'DRUM KIT', 'SOFT KIT'), + Speed: ('Slow', 'Fast'), + SplitterMode: ('Regular', 'Invert'), + SplitterType: ('Balance', 'A/B', 'Crossover'), + Start: ('MUTE', 'UNMUTE'), + Stereo: ('Normal', 'Split'), + StereoLink: ('Unlinked', 'Linked'), + SyncNote11: ('1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), + SyncNote14: ('1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), + SyncNote17: ('1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), + SyncNote21: ('1/64T', '1/64', '1/32T', '1/64D', '1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), + SyncOn: ('Lows', 'Highs'), + TankType: ('Vintage', 'Short', 'Mid', 'Long'), + TapPreset: ('1', '2', '3', '4', '4 Alt', '5', '5 Alt', '6', '6 Alt'), + TempocontrolType: ('Preset', 'Global'), + TimeSignature: ('2/4', '3/4', '4/4', '5/4', '6/4', '7/4', '8/4', '9/4', '10/4', '11/4', '12/4', '13/4', '3/8', '6/8', '9/8', '12/8', '5/8 (3+2)', '5/8 (2+3)', '7/8 (3+2+2)', '7/8 (2+3+2)', '7/8 (2+2+3)'), + TremoloWaveform: ('Sine', 'Triangle', 'Square', 'Saw Up', 'Saw Dn'), + TrigDirection: ('Down', 'Up'), + TriggerMode: ('Off', 'Full', '1/2'), + Tube: ('6L6', 'EL34'), + UnisonSource: ('OFF', 'OSC 1', 'OSC 2', 'OSC 1 + 2'), + UsDlx64VintageMode: ('Normal', 'Vibrato', 'Vibrato Bright Off'), + V1Inter: ('-15th', '-14th', '-13th', '-12th', '-11th', '-10th', '-9th', '-8th', '-7th', '-6th', '-5th', '-4th', '-3rd', '-2nd', 'Root', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th'), + VibNote: ('1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D'), + VintageChorusMode: ('Chorus', 'Vibrato'), + VoiceMode: ('Full', 'Thick', 'Open', 'Broad'), +} + + +__all__ = [ + "Adjust", + "AnalogDelayMSyncNote", + "ArpPattern", + "BitDepth", + "Boost", + "Bright", + "Center", + "ChannelNormal", + "ChiefCe2wMType", + "ChiefDc2wMMode", + "ChiefDc2wMType", + "Color", + "CoryWongDIFunkConsoleAttack", + "CoryWongDelayYYMode", + "Crunch", + "Curve", + "DCellHisbertCh2Mode", + "Decay", + "DigitalFlangerPolarity", + "DivSource", + "Divider", + "DreamChorusMMode", + "DriveType", + "DualChorusMode", + "DumbbellOdsChannel", + "DumbbellOdsEq", + "DuplicateMode", + "DynMode2", + "DynMode3", + "Eq3", + "FeedbackMode", + "Filter", + "FilterCutoff", + "FilterType", + "FlangerEngineWaveform", + "Focus", + "Frequency", + "GainPolarity", + "GojiraWowMode", + "HighsFreq", + "HpfSlope", + "Input", + "Instrument", + "Invert", + "Legendary87MRatio", + "LowsFreq", + "Mid", + "MidsFreq", + "MinivoicerMidiCh", + "MinivoicerMode", + "MinivoicerRoot", + "MixLaw", + "ModSource", + "MonoSynthMidiCh", + "MonoSynthRoot", + "MulSource", + "Multiplier", + "MxPhase95Mode", + "MxPhase95Type", + "NollyCompressorAttack", + "Notelength", + "Octave", + "OnOff", + "Osc1Wave", + "OutMode", + "Peak", + "Pickup", + "PliniChorusMode", + "PliniDriveMode", + "PreRoll", + "PunchMode", + "Quality", + "Quantize", + "Ratio3", + "RecLength", + "RedDriveMode", + "Resonance", + "Routing", + "RoutingMode", + "Scale", + "Size", + "SlapbackDelayMSyncNote", + "Slope", + "SoldanoSlo100Channel", + "Sound", + "Speed", + "SplitterMode", + "SplitterType", + "Start", + "Stereo", + "StereoLink", + "SyncNote11", + "SyncNote14", + "SyncNote17", + "SyncNote21", + "SyncOn", + "TankType", + "TapPreset", + "TempocontrolType", + "TimeSignature", + "TremoloWaveform", + "TrigDirection", + "TriggerMode", + "Tube", + "UnisonSource", + "UsDlx64VintageMode", + "V1Inter", + "VibNote", + "VintageChorusMode", + "VoiceMode", + "OPTION_LABELS", +] diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py new file mode 100644 index 0000000..0151b8a --- /dev/null +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py @@ -0,0 +1,4213 @@ +"""Parameter constants for the factory blocks every Quad Cortex has. + +GENERATED by scripts/generate_params.py - do not edit by hand. + +Each class is a model and each member a parameter's wire index, so a +member goes straight to :meth:`pyquadcortex.protocol.QuadCortex.set_param`:: + + qc.set_param(LaneOutput(0), params.LaneOutputParam.VOLUME, Db(-3.1)) + +A constant IS its wire index - `Param` subclasses `int` - so passing +one needs no catalog, which makes it the cheapest route as well as the +clearest, since a catalog is fetched from the device. + +It also carries the parameter's UNIT in its type, so a type checker +rejects `set_param(LaneOutputParam.VOLUME, Hertz(217))` before it runs +(ADR-0018). The runtime check is unchanged and still covers every other +caller - a string, a bare index, or anyone not running a checker. + +**Cabs share one layout.** The catalog lists two parameters for a cab - +its two mic selectors - while the wire carries 22. So a cab is CHOSEN by +its `models.*` id and DRIVEN through :class:`Cabsim`:: + + cab = Block(0, 5, models.CabsimBassM.N212_DARKGLASS_NEO_M) + qc.set_block(cab) + qc.set_param(cab, params.Cabsim.MIC_1_DISTANCE, Real(3.0)) + +A name the device publishes twice is numbered by occurrence, and BOTH +occurrences are numbered. For a cab that repetition is a MICROPHONE and +for an IR Loader it is an IR slot; both are measured, not assumed. + +Only FACTORY content is here, as in `models.py`. Resolve anything else +through ``qc.catalog``. +""" +from pyquadcortex.protocol.values import (BpmUnit, CentsUnit, DbUnit, + HertzUnit, MillisecondsUnit, + NoUnit, Param, PercentUnit, + SecondsUnit, SemitonesUnit) + + +class _ParamSetMeta(type): + """The `IntEnum` surface worth keeping, on a plain class. + + These were `IntEnum`s until ADR-0018. An enum member's type is the + enum class, so it cannot carry a PER-MEMBER unit, and a model's + parameters have mixed units - which is the whole reason the shape + changed. What callers actually used of `IntEnum` is iteration, + lookup by name and `__members__`, so those are here; the rest of + the enum machinery was never reached. + """ + + @property + def __members__(cls): + return {k: v for k, v in vars(cls).items() + if isinstance(v, Param)} + + def __iter__(cls): + return iter(cls.__members__.values()) + + def __getitem__(cls, name): + return cls.__members__[name] + + def __len__(cls): + return len(cls.__members__) + + def __contains__(cls, item): + return item in cls.__members__.values() + + +class ParamSet(metaclass=_ParamSetMeta): + """One model's parameters. A namespace, not a value.""" + + def __init__(self): + raise TypeError( + f"{type(self).__name__} is a namespace of parameter " + f"constants, not something to instantiate - use its " + f"members, such as {type(self).__name__}.") + + +# -- the containers a target addresses ---------------------------------------- + + +class LaneOutputParam(ParamSet): + """A row's Lane Output Control - `LaneOutput(row)`.""" + + VOLUME: Param[DbUnit] = Param(0, 'VOLUME') # float dB + PAN: Param[NoUnit] = Param(1, 'PAN') # float + MUTE: Param[NoUnit] = Param(2, 'MUTE') # switch + SOLO: Param[NoUnit] = Param(3, 'SOLO') # switch + + +class LaneInputParam(ParamSet): + """A row's Input Gate Control - `LaneInput(row)`.""" + + NOISE_REDUCTION: Param[PercentUnit] = Param(0, 'NOISE_REDUCTION') # float % + BYPASS: Param[NoUnit] = Param(1, 'BYPASS') # switch + GAIN_REDUCTION: Param[DbUnit] = Param(2, 'GAIN_REDUCTION') # grMeter dB + INPUT_GAIN: Param[DbUnit] = Param(3, 'INPUT_GAIN') # float dB + + +class MixerParam(ParamSet): + """A row's Mixer - `Mixer(row)`.""" + + LEVEL_A: Param[DbUnit] = Param(0, 'LEVEL_A') # float dB + PAN_A: Param[NoUnit] = Param(1, 'PAN_A') # float + LEVEL_B: Param[DbUnit] = Param(2, 'LEVEL_B') # float dB + PAN_B: Param[NoUnit] = Param(3, 'PAN_B') # float + PHASE: Param[NoUnit] = Param(4, 'PHASE') # switch + MIXER_LEVEL: Param[DbUnit] = Param(5, 'MIXER_LEVEL') # float dB + SPLIT_MODE: Param[NoUnit] = Param(6, 'SPLIT_MODE') # float + + +class SplitterParam(ParamSet): + """A row's splitter - `Splitter(row)`.""" + + TYPE: Param[NoUnit] = Param(0, 'TYPE') # switch + STEREO: Param[NoUnit] = Param(1, 'STEREO') # switch + BALANCE: Param[NoUnit] = Param(2, 'BALANCE') # float + LEVEL_TO_A: Param[DbUnit] = Param(3, 'LEVEL_TO_A') # float dB + LEVEL_TO_B: Param[DbUnit] = Param(4, 'LEVEL_TO_B') # float dB + FREQUENCY: Param[HertzUnit] = Param(5, 'FREQUENCY') # float Hz + MODE: Param[NoUnit] = Param(6, 'MODE') # switch + + +class SplitterABParam(ParamSet): + """The older two-parameter splitter view.""" + + LEVEL_TO_A: Param[DbUnit] = Param(0, 'LEVEL_TO_A') # float dB + LEVEL_TO_B: Param[DbUnit] = Param(1, 'LEVEL_TO_B') # float dB + STEREO: Param[NoUnit] = Param(2, 'STEREO') # switch + + +class TempoParam(ParamSet): + """The preset's TempoControl - `Tempo()`.""" + + TEMPO: Param[BpmUnit] = Param(0, 'TEMPO') # float BPM + TYPE: Param[NoUnit] = Param(1, 'TYPE') # switch + LED_LIGHT: Param[NoUnit] = Param(2, 'LED_LIGHT') # switch + VOLUME: Param[DbUnit] = Param(3, 'VOLUME') # float dB + START: Param[NoUnit] = Param(4, 'START') # toggleButton + PAN: Param[NoUnit] = Param(5, 'PAN') # float + TIME_SIGNATURE: Param[NoUnit] = Param(6, 'TIME_SIGNATURE') # comboBox + NOTELENGTH: Param[NoUnit] = Param(7, 'NOTELENGTH') # comboBox + SOUND: Param[NoUnit] = Param(8, 'SOUND') # comboBox + ROUTING: Param[NoUnit] = Param(9, 'ROUTING') # comboBox + STEPSTATE0: Param[NoUnit] = Param(10, 'STEPSTATE0') # empty + STEPSTATE1: Param[NoUnit] = Param(11, 'STEPSTATE1') # empty + STEPSTATE2: Param[NoUnit] = Param(12, 'STEPSTATE2') # empty + STEPSTATE3: Param[NoUnit] = Param(13, 'STEPSTATE3') # empty + STEPSTATE4: Param[NoUnit] = Param(14, 'STEPSTATE4') # empty + STEPSTATE5: Param[NoUnit] = Param(15, 'STEPSTATE5') # empty + STEPSTATE6: Param[NoUnit] = Param(16, 'STEPSTATE6') # empty + STEPSTATE7: Param[NoUnit] = Param(17, 'STEPSTATE7') # empty + STEPSTATE8: Param[NoUnit] = Param(18, 'STEPSTATE8') # empty + STEPSTATE9: Param[NoUnit] = Param(19, 'STEPSTATE9') # empty + STEPSTATE10: Param[NoUnit] = Param(20, 'STEPSTATE10') # empty + STEPSTATE11: Param[NoUnit] = Param(21, 'STEPSTATE11') # empty + STEPSTATE12: Param[NoUnit] = Param(22, 'STEPSTATE12') # empty + + +# -- cabs: one layout, shared by every cab model ------------------------------ + + +class Cabsim(ParamSet): + """Every cab model's parameters. The catalog under-describes these. + + Measured on four cabs across all four categories: the wire carries + 22 parameters in the `Default Cabsim` layout regardless of which cab + is loaded, or whether it is mono or stereo. `MIC_1_PAN` is labelled + BALANCE on a stereo cab and PAN on a mono one - one wire index, two + screen names. + + The mic-to-index mapping was confirmed against the unit's own + editor. Index 21 exists on the wire, is absent from the catalog and + reads 0.0 everywhere, so it is omitted rather than guessed at. + """ + + MIC_1_BYPASS: Param[NoUnit] = Param(0, 'MIC_1_BYPASS') # switch + MIC_1_IR_SELECTOR: Param[NoUnit] = Param(1, 'MIC_1_IR_SELECTOR') # string + MIC_1_LEVEL: Param[DbUnit] = Param(2, 'MIC_1_LEVEL') # float dB + MIC_1_PAN: Param[NoUnit] = Param(3, 'MIC_1_PAN') # float + MIC_1_DISTANCE: Param[NoUnit] = Param(4, 'MIC_1_DISTANCE') # float + MIC_1_POSITION: Param[NoUnit] = Param(5, 'MIC_1_POSITION') # float + MIC_1_PHI: Param[NoUnit] = Param(6, 'MIC_1_PHI') # switch + MIC_1_GRID_MODE: Param[NoUnit] = Param(7, 'MIC_1_GRID_MODE') # switch + MIC_2_BYPASS: Param[NoUnit] = Param(8, 'MIC_2_BYPASS') # switch + MIC_2_IR_SELECTOR: Param[NoUnit] = Param(9, 'MIC_2_IR_SELECTOR') # string + MIC_2_LEVEL: Param[DbUnit] = Param(10, 'MIC_2_LEVEL') # float dB + MIC_2_PAN: Param[NoUnit] = Param(11, 'MIC_2_PAN') # float + MIC_2_DISTANCE: Param[NoUnit] = Param(12, 'MIC_2_DISTANCE') # float + MIC_2_POSITION: Param[NoUnit] = Param(13, 'MIC_2_POSITION') # float + MIC_2_PHI: Param[NoUnit] = Param(14, 'MIC_2_PHI') # switch + MIC_2_GRID_MODE: Param[NoUnit] = Param(15, 'MIC_2_GRID_MODE') # switch + HPF: Param[HertzUnit] = Param(16, 'HPF') # float Hz + LPF: Param[HertzUnit] = Param(17, 'LPF') # float Hz + OUTPUT_VOLUME: Param[DbUnit] = Param(18, 'OUTPUT_VOLUME') # float dB + MIC_1_IR_NAME: Param[NoUnit] = Param(19, 'MIC_1_IR_NAME') # string + MIC_2_IR_NAME: Param[NoUnit] = Param(20, 'MIC_2_IR_NAME') # string + + +# -- every other factory model ----------------------------------------------- + + +class MythDrive(ParamSet): + """Myth Drive (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + + +class ObsessiveDrive(ParamSet): + """Obsessive Drive (Guitar Overdrive).""" + + DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float + PEAK: Param[NoUnit] = Param(1, 'PEAK') # switch + TONE: Param[NoUnit] = Param(2, 'TONE') # float + VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float + + +class Od250(ParamSet): + """OD250 (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + + +class RodentDrive(ParamSet): + """Rodent Drive (Guitar Overdrive).""" + + DISTORTION: Param[NoUnit] = Param(0, 'DISTORTION') # float + FILTER: Param[NoUnit] = Param(1, 'FILTER') # float + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + + +class Exotic(ParamSet): + """Exotic (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float + + +class FreemanBod(ParamSet): + """Freeman BOD (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(3, 'PRESENCE') # float + TIGHT: Param[NoUnit] = Param(4, 'TIGHT') # float + TRIM: Param[NoUnit] = Param(5, 'TRIM') # float + VOLUME: Param[NoUnit] = Param(6, 'VOLUME') # float + + +class BritBlues(ParamSet): + """Brit Blues (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + + +class ChiefDs1(ParamSet): + """Chief DS1 (Guitar Overdrive).""" + + DISTORTION: Param[NoUnit] = Param(0, 'DISTORTION') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + + +class BritGovernor(ParamSet): + """Brit Governor (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + LEVEL: Param[NoUnit] = Param(4, 'LEVEL') # float + + +class ChiefMt(ParamSet): + """Chief MT (Guitar Overdrive).""" + + DIST: Param[NoUnit] = Param(0, 'DIST') # float + LOW: Param[NoUnit] = Param(1, 'LOW') # float + MIDDLE: Param[NoUnit] = Param(2, 'MIDDLE') # float + MIDFREQ: Param[NoUnit] = Param(3, 'MIDFREQ') # float + HIGH: Param[NoUnit] = Param(4, 'HIGH') # float + LEVEL: Param[NoUnit] = Param(5, 'LEVEL') # float + + +class ChiefOd1(ParamSet): + """Chief OD1 (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + LEVEL: Param[NoUnit] = Param(1, 'LEVEL') # float + + +class ChiefSd1(ParamSet): + """Chief SD1 (Guitar Overdrive).""" + + OVERDRIVE: Param[NoUnit] = Param(0, 'OVERDRIVE') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + + +class FuzzPi(ParamSet): + """Fuzz Pi (Guitar Overdrive).""" + + SUSTAIN: Param[NoUnit] = Param(0, 'SUSTAIN') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + + +class ChiefBd2(ParamSet): + """Chief BD2 (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + + +class RageBooster(ParamSet): + """Rage Booster (Guitar Overdrive).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + + +class FacialFuzz(ParamSet): + """Facial Fuzz (Guitar Overdrive).""" + + FUZZ: Param[NoUnit] = Param(0, 'FUZZ') # float + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + PICKUP: Param[NoUnit] = Param(2, 'PICKUP') # switch + PICKUP_LEVEL: Param[NoUnit] = Param(3, 'PICKUP_LEVEL') # float + + +class ExoticZBoost(ParamSet): + """Exotic Z Boost (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float + + +class RedDrive(ParamSet): + """Red Drive (Guitar Overdrive).""" + + DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + MODE: Param[NoUnit] = Param(3, 'MODE') # switch + + +class VemuralRay(ParamSet): + """Vemural Ray (Guitar Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + LEVEL: Param[NoUnit] = Param(3, 'LEVEL') # float + + +class NoBellOd1(ParamSet): + """No-Bell OD1 (Guitar Overdrive).""" + + DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float + SPECTRUM: Param[NoUnit] = Param(1, 'SPECTRUM') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + BASS_CUT: Param[NoUnit] = Param(3, 'BASS_CUT') # switch + MUTE_TRIG: Param[NoUnit] = Param(4, 'MUTE_TRIG') # switch + + +class Green808(ParamSet): + """Green 808 (Guitar Overdrive).""" + + OVERDRIVE: Param[NoUnit] = Param(0, 'OVERDRIVE') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + + +class Thunderpaw(ParamSet): + """Thunderpaw (Guitar Overdrive).""" + + OUTPUT: Param[NoUnit] = Param(0, 'OUTPUT') # float + DISTORTION: Param[NoUnit] = Param(1, 'DISTORTION') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + USE_GATE: Param[NoUnit] = Param(4, 'USE_GATE') # switch + + +class Mk3SiliconFuzz(ParamSet): + """MK3 Silicon Fuzz (Guitar Overdrive).""" + + ATTACK: Param[NoUnit] = Param(0, 'ATTACK') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + + +class N81CreationsDrive(ParamSet): + """81 Creations Drive (Guitar Overdrive).""" + + DRV: Param[PercentUnit] = Param(0, 'DRV') # float % + CUT: Param[PercentUnit] = Param(1, 'CUT') # float % + OUTPUT: Param[DbUnit] = Param(2, 'OUTPUT') # float dB + LEVEL: Param[PercentUnit] = Param(3, 'LEVEL') # float % + + +class Brit2203(ParamSet): + """Brit 2203 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Pv505Lead(ParamSet): + """PV-505 Lead (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEPTH: Param[NoUnit] = Param(6, 'DEPTH') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class RolsJazzCh120(ParamSet): + """Rols Jazz CH120 (Guitar Amplifier).""" + + BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class UkC30Normal(ParamSet): + """UK C30 Normal (Guitar Amplifier).""" + + BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + TONE_CUT: Param[NoUnit] = Param(2, 'TONE_CUT') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class UkC30Topboost(ParamSet): + """UK C30 TopBoost (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BOOST: Param[NoUnit] = Param(1, 'BOOST') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + TONE_CUT: Param[NoUnit] = Param(4, 'TONE_CUT') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class CaDuoCh3Modern(ParamSet): + """CA Duo Ch3 Modern (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class CaDuoCh3Raw(ParamSet): + """CA Duo Ch3 Raw (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class CaDuoCh3Vintage(ParamSet): + """CA Duo Ch3 Vintage (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Freeman100Clean(ParamSet): + """Freeman 100 Clean (Guitar Amplifier).""" + + BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # rotarySwitch + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class Freeman100Rhythm(ParamSet): + """Freeman 100 Rhythm (Guitar Amplifier).""" + + FAT: Param[NoUnit] = Param(0, 'FAT') # switch + C45: Param[NoUnit] = Param(1, 'C45') # switch + GAIN: Param[NoUnit] = Param(2, 'GAIN') # float + VOICE: Param[NoUnit] = Param(3, 'VOICE') # switch + SAT: Param[NoUnit] = Param(4, 'SAT') # switch + BASS: Param[NoUnit] = Param(5, 'BASS') # float + MID: Param[NoUnit] = Param(6, 'MID') # float + TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(8, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(9, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB + + +class BritTm45Normal(ParamSet): + """Brit TM45 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class BritTm45Bright(ParamSet): + """Brit TM45 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class BritTm45Patch(ParamSet): + """Brit TM45 Patch (Guitar Amplifier).""" + + GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float + GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Brit900Clean(ParamSet): + """Brit 900 Clean (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Brit900Lead(ParamSet): + """Brit 900 Lead (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class WattD103Normal(ParamSet): + """Watt D103 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class WattD103Bright(ParamSet): + """Watt D103 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class BritPlexi50Bright(ParamSet): + """Brit Plexi 50 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class BritPlexi50Patch(ParamSet): + """Brit Plexi 50 Patch (Guitar Amplifier).""" + + GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float + GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class BritPlexi50Normal(ParamSet): + """Brit Plexi 50 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class Freeman100Lead(ParamSet): + """Freeman 100 Lead (Guitar Amplifier).""" + + FAT: Param[NoUnit] = Param(0, 'FAT') # switch + C45: Param[NoUnit] = Param(1, 'C45') # switch + GAIN: Param[NoUnit] = Param(2, 'GAIN') # float + VOICE: Param[NoUnit] = Param(3, 'VOICE') # switch + SAT: Param[NoUnit] = Param(4, 'SAT') # switch + BASS: Param[NoUnit] = Param(5, 'BASS') # float + MID: Param[NoUnit] = Param(6, 'MID') # float + TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(8, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(9, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB + + +class UsTwnNormal(ParamSet): + """US TWN Normal (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class UsTwnVibrato(ParamSet): + """US TWN Vibrato (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class CaTremoOrange(ParamSet): + """CA Tremo Orange (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class CaTremoRed(ParamSet): + """CA Tremo Red (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class BritPlexi100Bright(ParamSet): + """Brit Plexi 100 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class BritPlexi100Patch(ParamSet): + """Brit Plexi 100 Patch (Guitar Amplifier).""" + + GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float + GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class BritPlexi100Normal(ParamSet): + """Brit Plexi 100 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class UsSprNormal(ParamSet): + """US SPR Normal (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + + +class UsSprVibrato(ParamSet): + """US SPR Vibrato (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class Ca1starClean50wNormal(ParamSet): + """CA 1Star Clean 50W Normal (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(4, 'GAIN') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ca1starClean50wTweed(ParamSet): + """CA 1Star Clean 50W Tweed (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(4, 'GAIN') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ca1starClean100wNormal(ParamSet): + """CA 1Star Clean 100W Normal (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(4, 'GAIN') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ca1starClean100wTweed(ParamSet): + """CA 1Star Clean 100W Tweed (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(4, 'GAIN') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ca1starDrive50wNormal(ParamSet): + """CA 1Star Drive 50W Normal (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float + EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(5, 'GAIN') # float + MASTER: Param[NoUnit] = Param(6, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class Ca1starDrive50wTweed(ParamSet): + """CA 1Star Drive 50W Tweed (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float + EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(5, 'GAIN') # float + MASTER: Param[NoUnit] = Param(6, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class Ca1starDrive100wNormal(ParamSet): + """CA 1Star Drive 100W Normal (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float + EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(5, 'GAIN') # float + MASTER: Param[NoUnit] = Param(6, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class Ca1starDrive100wTweed(ParamSet): + """CA 1Star Drive 100W Tweed (Guitar Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + MID: Param[NoUnit] = Param(1, 'MID') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float + EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch + GAIN: Param[NoUnit] = Param(5, 'GAIN') # float + MASTER: Param[NoUnit] = Param(6, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class Pv505Rhythm(ParamSet): + """PV-505 Rhythm (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + DEPTH: Param[NoUnit] = Param(7, 'DEPTH') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class Captain50(ParamSet): + """Captain 50 (Guitar Amplifier).""" + + BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch + LOW_BOOST: Param[NoUnit] = Param(1, 'LOW_BOOST') # switch + GAIN: Param[NoUnit] = Param(2, 'GAIN') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(6, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class BognaVishnu20thClean(ParamSet): + """Bogna Vishnu 20th Clean (Guitar Amplifier).""" + + BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch + GAIN: Param[NoUnit] = Param(1, 'GAIN') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + DEPTH: Param[NoUnit] = Param(7, 'DEPTH') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class Ev101iiisBlue6l6100w(ParamSet): + """EV101IIIS Blue 6L6 100W (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ev101iiisRed6l6100w(ParamSet): + """EV101IIIS Red 6L6 100W (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class UsPrince(ParamSet): + """US Prince (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class BritUblLead(ParamSet): + """Brit UBL Lead (Guitar Amplifier).""" + + INPUT_GAIN: Param[NoUnit] = Param(0, 'INPUT_GAIN') # float + LEAD_MASTER: Param[NoUnit] = Param(1, 'LEAD_MASTER') # float + OUTPUT_MASTER: Param[NoUnit] = Param(2, 'OUTPUT_MASTER') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class BritUblLeadClip(ParamSet): + """Brit UBL Lead Clip (Guitar Amplifier).""" + + INPUT_GAIN: Param[NoUnit] = Param(0, 'INPUT_GAIN') # float + LEAD_MASTER: Param[NoUnit] = Param(1, 'LEAD_MASTER') # float + OUTPUT_MASTER: Param[NoUnit] = Param(2, 'OUTPUT_MASTER') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class UsTweedBassladBrightPatch(ParamSet): + """US Tweed Basslad Bright Patch (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsTweedBassladBright(ParamSet): + """US Tweed Basslad Bright (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsTweedBassladNormalPatch(ParamSet): + """US Tweed Basslad Normal Patch (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsTweedBassladNormal(ParamSet): + """US Tweed Basslad Normal (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UkC15Normal(ParamSet): + """UK C15 Normal (Guitar Amplifier).""" + + BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + TONE_CUT: Param[NoUnit] = Param(2, 'TONE_CUT') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class UkC15Topboost(ParamSet): + """UK C15 TopBoost (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BOOST: Param[NoUnit] = Param(1, 'BOOST') # switch + BASS: Param[NoUnit] = Param(2, 'BASS') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + TONE_CUT: Param[NoUnit] = Param(4, 'TONE_CUT') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class UsHpTweedTwnNormal(ParamSet): + """US HP Tweed TWN Normal (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsHpTweedTwnNormalPatch(ParamSet): + """US HP Tweed TWN Normal Patch (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsHpTweedTwnBright(ParamSet): + """US HP Tweed TWN Bright (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsHpTweedTwnBrightPatch(ParamSet): + """US HP Tweed TWN Bright Patch (Guitar Amplifier).""" + + VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float + VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class DCellHisbertCh1(ParamSet): + """D-Cell Hisbert Ch1 (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MIDCUT: Param[NoUnit] = Param(4, 'MIDCUT') # switch + LEVEL: Param[NoUnit] = Param(5, 'LEVEL') # float + INTENSITY: Param[NoUnit] = Param(6, 'INTENSITY') # float + MASTER: Param[NoUnit] = Param(7, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(9, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB + + +class DCellHisbertCh2(ParamSet): + """D-Cell Hisbert Ch2 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + MODE: Param[NoUnit] = Param(1, 'MODE') # switch + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MID: Param[NoUnit] = Param(4, 'MID') # float + TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float + MIDCUT: Param[NoUnit] = Param(6, 'MIDCUT') # switch + LEVEL: Param[NoUnit] = Param(7, 'LEVEL') # float + INTENSITY: Param[NoUnit] = Param(8, 'INTENSITY') # float + MASTER: Param[NoUnit] = Param(9, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(10, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(11, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(12, 'OUTPUT') # float dB + + +class DCellHisbertCh3(ParamSet): + """D-Cell Hisbert Ch3 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + MIDCUT: Param[NoUnit] = Param(5, 'MIDCUT') # switch + LEVEL: Param[NoUnit] = Param(6, 'LEVEL') # float + INTENSITY: Param[NoUnit] = Param(7, 'INTENSITY') # float + MASTER: Param[NoUnit] = Param(8, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(9, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(10, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(11, 'OUTPUT') # float dB + + +class CaJohnS2cCh1(ParamSet): + """CA John's 2C Ch1 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + MASTER: Param[NoUnit] = Param(1, 'MASTER') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + DUMMY1: Param[NoUnit] = Param(7, 'DUMMY1') # empty + DUMMY2: Param[NoUnit] = Param(8, 'DUMMY2') # empty + DUMMY3: Param[NoUnit] = Param(9, 'DUMMY3') # empty + N80_HZ: Param[NoUnit] = Param(10, 'N80_HZ') # fader + N240_HZ: Param[NoUnit] = Param(11, 'N240_HZ') # fader + N750_HZ: Param[NoUnit] = Param(12, 'N750_HZ') # fader + N2200_HZ: Param[NoUnit] = Param(13, 'N2200_HZ') # fader + N6600_HZ: Param[NoUnit] = Param(14, 'N6600_HZ') # fader + + +class CaJohnS2cCh2(ParamSet): + """CA John's 2C Ch2 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + GAIN_PULL: Param[NoUnit] = Param(1, 'GAIN_PULL') # switch + SHRED: Param[NoUnit] = Param(2, 'SHRED') # switch + MASTER: Param[NoUnit] = Param(3, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + BASS: Param[NoUnit] = Param(5, 'BASS') # float + MID: Param[NoUnit] = Param(6, 'MID') # float + TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float + PRES_PULL: Param[NoUnit] = Param(9, 'PRES_PULL') # switch + N80_HZ: Param[NoUnit] = Param(10, 'N80_HZ') # fader + N240_HZ: Param[NoUnit] = Param(11, 'N240_HZ') # fader + N750_HZ: Param[NoUnit] = Param(12, 'N750_HZ') # fader + N2200_HZ: Param[NoUnit] = Param(13, 'N2200_HZ') # fader + N6600_HZ: Param[NoUnit] = Param(14, 'N6600_HZ') # fader + MUTE_TRIG: Param[NoUnit] = Param(15, 'MUTE_TRIG') # switch + + +class CaJohnS2cCh3(ParamSet): + """CA John's 2C Ch3 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + GAIN_PULL: Param[NoUnit] = Param(1, 'GAIN_PULL') # switch + SHRED: Param[NoUnit] = Param(2, 'SHRED') # switch + MASTER: Param[NoUnit] = Param(3, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + BASS: Param[NoUnit] = Param(5, 'BASS') # float + MID: Param[NoUnit] = Param(6, 'MID') # float + TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float + PRES_PULL: Param[NoUnit] = Param(9, 'PRES_PULL') # switch + N80_HZ: Param[NoUnit] = Param(10, 'N80_HZ') # fader + N240_HZ: Param[NoUnit] = Param(11, 'N240_HZ') # fader + N750_HZ: Param[NoUnit] = Param(12, 'N750_HZ') # fader + N2200_HZ: Param[NoUnit] = Param(13, 'N2200_HZ') # fader + N6600_HZ: Param[NoUnit] = Param(14, 'N6600_HZ') # fader + MUTE_TRIG: Param[NoUnit] = Param(15, 'MUTE_TRIG') # switch + + +class DCellH4Ch1Bright(ParamSet): + """D-Cell H4 Ch1 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch1Normal(ParamSet): + """D-Cell H4 Ch1 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch2Bright(ParamSet): + """D-Cell H4 Ch2 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch2Normal(ParamSet): + """D-Cell H4 Ch2 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch3(ParamSet): + """D-Cell H4 Ch3 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch4(ParamSet): + """D-Cell H4 Ch4 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ev101iiisRedEl34100w(ParamSet): + """EV101IIIS Red EL34 100W (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Ev101iiisBlueEl34100w(ParamSet): + """EV101IIIS Blue EL34 100W (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Solo100Lead(ParamSet): + """Solo 100 Lead (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Solo100CrunchBright(ParamSet): + """Solo 100 Crunch Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Solo100CrunchNormal(ParamSet): + """Solo 100 Crunch Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class MatchmoreJefe(ParamSet): + """Matchmore Jefe (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + BRILLIANCE: Param[NoUnit] = Param(4, 'BRILLIANCE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class MatchmoreD30Ch1(ParamSet): + """Matchmore D30 Ch1 (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + CUT: Param[NoUnit] = Param(3, 'CUT') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class MatchmoreD30Ch2(ParamSet): + """Matchmore D30 Ch2 (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + CUT: Param[NoUnit] = Param(1, 'CUT') # float + MASTER: Param[NoUnit] = Param(2, 'MASTER') # float + TONE: Param[NoUnit] = Param(3, 'TONE') # float + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + + +class VictorSquidCh1(ParamSet): + """Victor Squid Ch1 (Guitar Amplifier).""" + + MOD: Param[NoUnit] = Param(0, 'MOD') # switch + GAIN: Param[NoUnit] = Param(1, 'GAIN') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + FOCUS: Param[NoUnit] = Param(6, 'FOCUS') # switch + H: Param[NoUnit] = Param(7, 'H') # switch + B: Param[NoUnit] = Param(8, 'B') # switch + TUBE: Param[NoUnit] = Param(9, 'TUBE') # switch + OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB + MUTE_TRIG: Param[NoUnit] = Param(11, 'MUTE_TRIG') # switch + + +class VictorSquidCh2(ParamSet): + """Victor Squid Ch2 (Guitar Amplifier).""" + + MOD: Param[NoUnit] = Param(0, 'MOD') # switch + GAIN: Param[NoUnit] = Param(1, 'GAIN') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(5, 'MASTER') # float + FOCUS: Param[NoUnit] = Param(6, 'FOCUS') # switch + TIGHT: Param[NoUnit] = Param(7, 'TIGHT') # float + PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float + TUBE: Param[NoUnit] = Param(9, 'TUBE') # switch + OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB + MUTE_TRIG: Param[NoUnit] = Param(11, 'MUTE_TRIG') # switch + + +class UsDlx64Vintage(ParamSet): + """US DLX 64 Vintage (Guitar Amplifier).""" + + INPUT: Param[NoUnit] = Param(0, 'INPUT') # switch + MODE: Param[NoUnit] = Param(1, 'MODE') # comboBox + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + BASS: Param[NoUnit] = Param(4, 'BASS') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + MUTE_TRIG: Param[NoUnit] = Param(6, 'MUTE_TRIG') # switch + DELAY: Param[NoUnit] = Param(7, 'DELAY') # int + + +class UsDlx65Reissue(ParamSet): + """US DLX 65 Reissue (Guitar Amplifier).""" + + INPUT: Param[NoUnit] = Param(0, 'INPUT') # switch + MODE: Param[NoUnit] = Param(1, 'MODE') # comboBox + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + BASS: Param[NoUnit] = Param(4, 'BASS') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + MUTE_TRIG: Param[NoUnit] = Param(6, 'MUTE_TRIG') # switch + DELAY: Param[NoUnit] = Param(7, 'DELAY') # int + + +class DumbbellOds(ParamSet): + """Dumbbell ODS (Guitar Amplifier).""" + + CHANNEL: Param[NoUnit] = Param(0, 'CHANNEL') # switch + VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + MIDDLE: Param[NoUnit] = Param(3, 'MIDDLE') # float + BASS: Param[NoUnit] = Param(4, 'BASS') # float + OD_CONTENT: Param[NoUnit] = Param(5, 'OD_CONTENT') # float + OD_VOLUME: Param[NoUnit] = Param(6, 'OD_VOLUME') # float + MASTER: Param[NoUnit] = Param(7, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float + PREAMP: Param[NoUnit] = Param(9, 'PREAMP') # switch + BRIGHT: Param[NoUnit] = Param(10, 'BRIGHT') # switch + MID: Param[NoUnit] = Param(11, 'MID') # switch + EQ: Param[NoUnit] = Param(12, 'EQ') # switch + OUTPUT: Param[DbUnit] = Param(13, 'OUTPUT') # float dB + + +class BritBass50Bright(ParamSet): + """Brit Bass 50 Bright (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class BritBass50Patch(ParamSet): + """Brit Bass 50 Patch (Bass Amplifier).""" + + GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float + GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float + BASS: Param[NoUnit] = Param(2, 'BASS') # float + MID: Param[NoUnit] = Param(3, 'MID') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class BritBass50Normal(ParamSet): + """Brit Bass 50 Normal (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + + +class G800k(ParamSet): + """G800K (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + N10_DB: Param[NoUnit] = Param(1, 'N10_DB') # switch + LO_CUT: Param[NoUnit] = Param(2, 'LO_CUT') # switch + HIGH_BOOST: Param[NoUnit] = Param(3, 'HIGH_BOOST') # switch + MID_CONTOUR: Param[NoUnit] = Param(4, 'MID_CONTOUR') # switch + BASS: Param[NoUnit] = Param(5, 'BASS') # float + LO_MID: Param[NoUnit] = Param(6, 'LO_MID') # float + HI_MID: Param[NoUnit] = Param(7, 'HI_MID') # float + TREBLE: Param[NoUnit] = Param(8, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(9, 'OUTPUT') # float dB + + +class Ca400Ch1(ParamSet): + """CA 400+ Ch1 (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + TREBLE_SHIFT: Param[NoUnit] = Param(2, 'TREBLE_SHIFT') # switch + BASS_SHIFT: Param[NoUnit] = Param(3, 'BASS_SHIFT') # switch + BASS: Param[NoUnit] = Param(4, 'BASS') # float + MID: Param[NoUnit] = Param(5, 'MID') # float + TREBLE: Param[NoUnit] = Param(6, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(7, 'MASTER') # float + EQ: Param[NoUnit] = Param(8, 'EQ') # switch + OUTPUT: Param[DbUnit] = Param(9, 'OUTPUT') # float dB + N40_HZ: Param[NoUnit] = Param(10, 'N40_HZ') # float + N100_HZ: Param[NoUnit] = Param(11, 'N100_HZ') # float + N250_HZ: Param[NoUnit] = Param(12, 'N250_HZ') # float + N625_HZ: Param[NoUnit] = Param(13, 'N625_HZ') # float + N1560_HZ: Param[NoUnit] = Param(14, 'N1560_HZ') # float + N3900_HZ: Param[NoUnit] = Param(15, 'N3900_HZ') # float + N6600_HZ: Param[NoUnit] = Param(16, 'N6600_HZ') # float + + +class Ca400Ch2(ParamSet): + """CA 400+ Ch2 (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch + TREBLE_SHIFT: Param[NoUnit] = Param(2, 'TREBLE_SHIFT') # switch + BASS_SHIFT: Param[NoUnit] = Param(3, 'BASS_SHIFT') # switch + BASS: Param[NoUnit] = Param(4, 'BASS') # float + MID: Param[NoUnit] = Param(5, 'MID') # float + TREBLE: Param[NoUnit] = Param(6, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(7, 'MASTER') # float + EQ: Param[NoUnit] = Param(8, 'EQ') # switch + OUTPUT: Param[DbUnit] = Param(9, 'OUTPUT') # float dB + N40_HZ: Param[NoUnit] = Param(10, 'N40_HZ') # float + N100_HZ: Param[NoUnit] = Param(11, 'N100_HZ') # float + N250_HZ: Param[NoUnit] = Param(12, 'N250_HZ') # float + N625_HZ: Param[NoUnit] = Param(13, 'N625_HZ') # float + N1560_HZ: Param[NoUnit] = Param(14, 'N1560_HZ') # float + N3900_HZ: Param[NoUnit] = Param(15, 'N3900_HZ') # float + N6600_HZ: Param[NoUnit] = Param(16, 'N6600_HZ') # float + + +class AmpedSuperValve(ParamSet): + """Amped Super Valve (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + ULTRA_LO: Param[NoUnit] = Param(1, 'ULTRA_LO') # switch + ULTRA_HI: Param[NoUnit] = Param(2, 'ULTRA_HI') # switch + BASS: Param[NoUnit] = Param(3, 'BASS') # float + MIDRANGE: Param[NoUnit] = Param(4, 'MIDRANGE') # float + FREQUENCY: Param[NoUnit] = Param(5, 'FREQUENCY') # rotarySwitch + TREBLE: Param[NoUnit] = Param(6, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(7, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + + +class AmpedFlipTop6464(ParamSet): + """Amped Flip-Top 6464 (Bass Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(2, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class AmpedFlipTop6466(ParamSet): + """Amped Flip-Top 6466 (Bass Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(2, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class AmpedFlipTop6664(ParamSet): + """Amped Flip-Top 6664 (Bass Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(2, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class AmpedFlipTop6666(ParamSet): + """Amped Flip-Top 6666 (Bass Amplifier).""" + + BASS: Param[NoUnit] = Param(0, 'BASS') # float + TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(2, 'MASTER') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class WattBassModNormal(ParamSet): + """Watt Bass Mod Normal (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class WattBassModBright(ParamSet): + """Watt Bass Mod Bright (Bass Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class MicrotubesB3k(ParamSet): + """Microtubesยฎ B3K (Bass Overdrive).""" + + DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float + GROWL: Param[NoUnit] = Param(1, 'GROWL') # switch + MIDBOOST: Param[NoUnit] = Param(2, 'MIDBOOST') # switch + TONE: Param[NoUnit] = Param(3, 'TONE') # float + LEVEL: Param[NoUnit] = Param(4, 'LEVEL') # float + BLEND: Param[NoUnit] = Param(5, 'BLEND') # float + + +class Bddi(ParamSet): + """BDDI (Bass Overdrive).""" + + BLEND: Param[NoUnit] = Param(0, 'BLEND') # float + PRESENCE: Param[NoUnit] = Param(1, 'PRESENCE') # float + DRIVE: Param[NoUnit] = Param(2, 'DRIVE') # float + LEVEL: Param[NoUnit] = Param(3, 'LEVEL') # float + TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float + BASS: Param[NoUnit] = Param(5, 'BASS') # float + + +class SovietFuzz(ParamSet): + """Soviet Fuzz (Bass Overdrive).""" + + SUSTAIN: Param[NoUnit] = Param(0, 'SUSTAIN') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + + +class MicrotubesVmt(ParamSet): + """Microtubesยฎ VMT (Bass Overdrive).""" + + DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float + ERA: Param[NoUnit] = Param(1, 'ERA') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + BLEND: Param[NoUnit] = Param(3, 'BLEND') # float + + +class ExoticBassZBoost(ParamSet): + """Exotic Bass Z Boost (Bass Overdrive).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float + + +class Parametric8(ParamSet): + """Parametric-8 (Equalizer).""" + + N1_GAIN: Param[DbUnit] = Param(0, 'N1_GAIN') # float dB + N1_FREQ: Param[HertzUnit] = Param(1, 'N1_FREQ') # float Hz + N1_Q: Param[NoUnit] = Param(2, 'N1_Q') # float + N1_TYPE: Param[NoUnit] = Param(3, 'N1_TYPE') # float + N1_BYPASS: Param[NoUnit] = Param(4, 'N1_BYPASS') # switch + N2_GAIN: Param[DbUnit] = Param(5, 'N2_GAIN') # float dB + N2_FREQ: Param[HertzUnit] = Param(6, 'N2_FREQ') # float Hz + N2_Q: Param[NoUnit] = Param(7, 'N2_Q') # float + N2_TYPE: Param[NoUnit] = Param(8, 'N2_TYPE') # float + N2_BYPASS: Param[NoUnit] = Param(9, 'N2_BYPASS') # switch + N3_GAIN: Param[DbUnit] = Param(10, 'N3_GAIN') # float dB + N3_FREQ: Param[HertzUnit] = Param(11, 'N3_FREQ') # float Hz + N3_Q: Param[NoUnit] = Param(12, 'N3_Q') # float + N3_TYPE: Param[NoUnit] = Param(13, 'N3_TYPE') # float + N3_BYPASS: Param[NoUnit] = Param(14, 'N3_BYPASS') # switch + N4_GAIN: Param[DbUnit] = Param(15, 'N4_GAIN') # float dB + N4_FREQ: Param[HertzUnit] = Param(16, 'N4_FREQ') # float Hz + N4_Q: Param[NoUnit] = Param(17, 'N4_Q') # float + N4_TYPE: Param[NoUnit] = Param(18, 'N4_TYPE') # float + N4_BYPASS: Param[NoUnit] = Param(19, 'N4_BYPASS') # switch + N5_GAIN: Param[DbUnit] = Param(20, 'N5_GAIN') # float dB + N5_FREQ: Param[HertzUnit] = Param(21, 'N5_FREQ') # float Hz + N5_Q: Param[NoUnit] = Param(22, 'N5_Q') # float + N5_TYPE: Param[NoUnit] = Param(23, 'N5_TYPE') # float + N5_BYPASS: Param[NoUnit] = Param(24, 'N5_BYPASS') # switch + N6_GAIN: Param[DbUnit] = Param(25, 'N6_GAIN') # float dB + N6_FREQ: Param[HertzUnit] = Param(26, 'N6_FREQ') # float Hz + N6_Q: Param[NoUnit] = Param(27, 'N6_Q') # float + N6_TYPE: Param[NoUnit] = Param(28, 'N6_TYPE') # float + N6_BYPASS: Param[NoUnit] = Param(29, 'N6_BYPASS') # switch + N7_GAIN: Param[DbUnit] = Param(30, 'N7_GAIN') # float dB + N7_FREQ: Param[HertzUnit] = Param(31, 'N7_FREQ') # float Hz + N7_Q: Param[NoUnit] = Param(32, 'N7_Q') # float + N7_TYPE: Param[NoUnit] = Param(33, 'N7_TYPE') # float + N7_BYPASS: Param[NoUnit] = Param(34, 'N7_BYPASS') # switch + N8_GAIN: Param[DbUnit] = Param(35, 'N8_GAIN') # float dB + N8_FREQ: Param[HertzUnit] = Param(36, 'N8_FREQ') # float Hz + N8_Q: Param[NoUnit] = Param(37, 'N8_Q') # float + N8_TYPE: Param[NoUnit] = Param(38, 'N8_TYPE') # float + N8_BYPASS: Param[NoUnit] = Param(39, 'N8_BYPASS') # switch + OUTPUT: Param[DbUnit] = Param(40, 'OUTPUT') # float dB + + +class Parametric3(ParamSet): + """Parametric-3 (Equalizer).""" + + N1_GAIN: Param[DbUnit] = Param(0, 'N1_GAIN') # float dB + N1_FREQ: Param[HertzUnit] = Param(1, 'N1_FREQ') # float Hz + N1_Q: Param[NoUnit] = Param(2, 'N1_Q') # float + N1_TYPE: Param[NoUnit] = Param(3, 'N1_TYPE') # float + N1_BYPASS: Param[NoUnit] = Param(4, 'N1_BYPASS') # switch + N2_GAIN: Param[DbUnit] = Param(5, 'N2_GAIN') # float dB + N2_FREQ: Param[HertzUnit] = Param(6, 'N2_FREQ') # float Hz + N2_Q: Param[NoUnit] = Param(7, 'N2_Q') # float + N2_TYPE: Param[NoUnit] = Param(8, 'N2_TYPE') # float + N2_BYPASS: Param[NoUnit] = Param(9, 'N2_BYPASS') # switch + N3_GAIN: Param[DbUnit] = Param(10, 'N3_GAIN') # float dB + N3_FREQ: Param[HertzUnit] = Param(11, 'N3_FREQ') # float Hz + N3_Q: Param[NoUnit] = Param(12, 'N3_Q') # float + N3_TYPE: Param[NoUnit] = Param(13, 'N3_TYPE') # float + N3_BYPASS: Param[NoUnit] = Param(14, 'N3_BYPASS') # switch + OUTPUT: Param[DbUnit] = Param(15, 'OUTPUT') # float dB + + +class LowHighCut(ParamSet): + """Low-High Cut (Equalizer).""" + + HPF_SLOPE: Param[NoUnit] = Param(0, 'HPF_SLOPE') # rotarySwitch dB/oct + HPF_FREQ: Param[HertzUnit] = Param(1, 'HPF_FREQ') # float Hz + LPF_SLOPE: Param[NoUnit] = Param(2, 'LPF_SLOPE') # rotarySwitch dB/oct + LPF_FREQ: Param[HertzUnit] = Param(3, 'LPF_FREQ') # float Hz + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + + +class Graphic9(ParamSet): + """Graphic-9 (Equalizer).""" + + HPF: Param[HertzUnit] = Param(0, 'HPF') # float Hz + N65HZ: Param[DbUnit] = Param(1, 'N65HZ') # fader dB + N125HZ: Param[DbUnit] = Param(2, 'N125HZ') # fader dB + N250HZ: Param[DbUnit] = Param(3, 'N250HZ') # fader dB + N500HZ: Param[DbUnit] = Param(4, 'N500HZ') # fader dB + N1KHZ: Param[DbUnit] = Param(5, 'N1KHZ') # fader dB + N2KHZ: Param[DbUnit] = Param(6, 'N2KHZ') # fader dB + N4KHZ: Param[DbUnit] = Param(7, 'N4KHZ') # fader dB + N8KHZ: Param[DbUnit] = Param(8, 'N8KHZ') # fader dB + N16KHZ: Param[DbUnit] = Param(9, 'N16KHZ') # fader dB + LPF: Param[HertzUnit] = Param(10, 'LPF') # float Hz + Q: Param[NoUnit] = Param(11, 'Q') # float + OUTPUT: Param[DbUnit] = Param(12, 'OUTPUT') # float dB + + +class PluginGraphic9(ParamSet): + """Plugin Graphic-9 (Equalizer).""" + + HPF: Param[HertzUnit] = Param(0, 'HPF') # float Hz + N65HZ: Param[DbUnit] = Param(1, 'N65HZ') # fader dB + N125HZ: Param[DbUnit] = Param(2, 'N125HZ') # fader dB + N250HZ: Param[DbUnit] = Param(3, 'N250HZ') # fader dB + N500HZ: Param[DbUnit] = Param(4, 'N500HZ') # fader dB + N1KHZ: Param[DbUnit] = Param(5, 'N1KHZ') # fader dB + N2KHZ: Param[DbUnit] = Param(6, 'N2KHZ') # fader dB + N4KHZ: Param[DbUnit] = Param(7, 'N4KHZ') # fader dB + N8KHZ: Param[DbUnit] = Param(8, 'N8KHZ') # fader dB + N16KHZ: Param[DbUnit] = Param(9, 'N16KHZ') # fader dB + LPF: Param[HertzUnit] = Param(10, 'LPF') # float Hz + Q: Param[NoUnit] = Param(11, 'Q') # float + OUTPUT: Param[DbUnit] = Param(12, 'OUTPUT') # float dB + + +class Legendary87M(ParamSet): + """Legendary 87 (M) (Compressor).""" + + INPUT: Param[DbUnit] = Param(0, 'INPUT') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class SolidStateCompM(ParamSet): + """Solid State Comp (M) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class VcaCompM(ParamSet): + """VCA Comp (M) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # float + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class OptoCompM(ParamSet): + """Opto Comp (M) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # float + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class Jewel(ParamSet): + """Jewel (Compressor).""" + + COMP: Param[NoUnit] = Param(0, 'COMP') # float + EQ: Param[NoUnit] = Param(1, 'EQ') # float + VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float + HIGH_CUT: Param[NoUnit] = Param(3, 'HIGH_CUT') # switch + MIX: Param[PercentUnit] = Param(4, 'MIX') # float % + + +class Legendary87St(ParamSet): + """Legendary 87 (ST) (Compressor).""" + + INPUT: Param[DbUnit] = Param(0, 'INPUT') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class SolidStateCompSt(ParamSet): + """Solid State Comp (ST) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class VcaCompSt(ParamSet): + """VCA Comp (ST) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # float + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class OptoCompSt(ParamSet): + """Opto Comp (ST) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # float + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB + + +class ChiefCs3(ParamSet): + """Chief CS3 (Compressor).""" + + SUSTAIN: Param[NoUnit] = Param(0, 'SUSTAIN') # float + ATTACK: Param[NoUnit] = Param(1, 'ATTACK') # float + TONE: Param[NoUnit] = Param(2, 'TONE') # float + LEVEL: Param[NoUnit] = Param(3, 'LEVEL') # float + + +class SolidStateCompSC(ParamSet): + """Solid State Comp (S/C) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox + GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB + + +class Legendary87SC(ParamSet): + """Legendary 87 (S/C) (Compressor).""" + + INPUT: Param[DbUnit] = Param(0, 'INPUT') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox + GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB + + +class OptoCompSC(ParamSet): + """Opto Comp (S/C) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # float + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox + GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB + + +class VcaCompSC(ParamSet): + """VCA Comp (S/C) (Compressor).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + RATIO: Param[NoUnit] = Param(1, 'RATIO') # float + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox + GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB + + +class AnalogDelayM(ParamSet): + """Analog Delay (M) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + QUALITY: Param[NoUnit] = Param(4, 'QUALITY') # rotarySwitch + SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms + MOD_RATE: Param[HertzUnit] = Param(8, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(9, 'MOD_DEPTH') # float % + DRIVE: Param[PercentUnit] = Param(10, 'DRIVE') # float % + TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB + + +class SimplePingPongDelay(ParamSet): + """Simple Ping Pong Delay (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + TONE: Param[NoUnit] = Param(2, 'TONE') # float + SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(5, 'DELAY_TIME') # float ms + TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch + STEREO_WIDTH: Param[PercentUnit] = Param(7, 'STEREO_WIDTH') # float % + + +class SimpleDelaySt(ParamSet): + """Simple Delay (ST) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + TONE: Param[NoUnit] = Param(2, 'TONE') # float + SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(5, 'DELAY_TIME') # float ms + TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch + + +class TapeDelaySt(ParamSet): + """Tape Delay (ST) (Delay).""" + + NOTIFICATION_START: Param[NoUnit] = Param(0, 'NOTIFICATION_START') # float + MIX: Param[PercentUnit] = Param(1, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(2, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + PING_PONG: Param[NoUnit] = Param(5, 'PING_PONG') # switch + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME') # float ms + WOW: Param[PercentUnit] = Param(9, 'WOW') # float % + FLUTTER: Param[PercentUnit] = Param(10, 'FLUTTER') # float % + DRIVE: Param[PercentUnit] = Param(11, 'DRIVE') # float % + TRAILS: Param[NoUnit] = Param(12, 'TRAILS') # switch + DUMMY: Param[PercentUnit] = Param(13, 'DUMMY') # float % + STEREO_WIDTH: Param[PercentUnit] = Param(14, 'STEREO_WIDTH') # float % + DYN_DEPTH: Param[DbUnit] = Param(15, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(16, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(17, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(18, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(19, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(20, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(21, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(22, 'GAIN_REDUCTION') # grMeter dB + NOTIFICATION_END: Param[NoUnit] = Param(23, 'NOTIFICATION_END') # float + + +class DigitalDelayM(ParamSet): + """Digital Delay (M) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + SYNC: Param[NoUnit] = Param(4, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(5, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(6, 'DELAY_TIME') # float ms + MOD_RATE: Param[HertzUnit] = Param(7, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(8, 'MOD_DEPTH') # float % + TRAILS: Param[NoUnit] = Param(9, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(10, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(11, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(12, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(13, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(14, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(15, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(16, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(17, 'GAIN_REDUCTION') # grMeter dB + + +class SimpleDelayM(ParamSet): + """Simple Delay (M) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + TONE: Param[NoUnit] = Param(2, 'TONE') # float + SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(5, 'DELAY_TIME') # float ms + TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch + + +class TapeDelayM(ParamSet): + """Tape Delay (M) (Delay).""" + + NOTIFICATION_START: Param[NoUnit] = Param(0, 'NOTIFICATION_START') # float + MIX: Param[PercentUnit] = Param(1, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(2, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms + WOW: Param[PercentUnit] = Param(8, 'WOW') # float % + FLUTTER: Param[PercentUnit] = Param(9, 'FLUTTER') # float % + DRIVE: Param[PercentUnit] = Param(10, 'DRIVE') # float % + TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch + DUMMY: Param[NoUnit] = Param(12, 'DUMMY') # float + DYN_DEPTH: Param[DbUnit] = Param(13, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(14, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(15, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(16, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(17, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(18, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(19, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(20, 'GAIN_REDUCTION') # grMeter dB + NOTIFICATION_END: Param[NoUnit] = Param(21, 'NOTIFICATION_END') # float + + +class SlapbackDelaySt(ParamSet): + """Slapback Delay (ST) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + PING_PONG: Param[NoUnit] = Param(4, 'PING_PONG') # switch + QUALITY: Param[NoUnit] = Param(5, 'QUALITY') # rotarySwitch + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME') # float ms + MOD_RATE: Param[HertzUnit] = Param(9, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(10, 'MOD_DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(11, 'WIDTH') # float % + DRIVE: Param[PercentUnit] = Param(12, 'DRIVE') # float % + TRAILS: Param[NoUnit] = Param(13, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(14, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(15, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(16, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(17, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(18, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(19, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(20, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(21, 'GAIN_REDUCTION') # grMeter dB + STEREO_WIDTH: Param[PercentUnit] = Param(22, 'STEREO_WIDTH') # float % + + +class SlapbackDelayM(ParamSet): + """Slapback Delay (M) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + QUALITY: Param[NoUnit] = Param(4, 'QUALITY') # rotarySwitch + SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms + MOD_RATE: Param[HertzUnit] = Param(8, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(9, 'MOD_DEPTH') # float % + DRIVE: Param[PercentUnit] = Param(10, 'DRIVE') # float % + TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB + + +class AnalogDelaySt(ParamSet): + """Analog Delay (ST) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + PING_PONG: Param[NoUnit] = Param(4, 'PING_PONG') # switch + QUALITY: Param[NoUnit] = Param(5, 'QUALITY') # rotarySwitch + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME') # float ms + MOD_RATE: Param[HertzUnit] = Param(9, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(10, 'MOD_DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(11, 'WIDTH') # float % + DRIVE: Param[PercentUnit] = Param(12, 'DRIVE') # float % + TRAILS: Param[NoUnit] = Param(13, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(14, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(15, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(16, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(17, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(18, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(19, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(20, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(21, 'GAIN_REDUCTION') # grMeter dB + STEREO_WIDTH: Param[PercentUnit] = Param(22, 'STEREO_WIDTH') # float % + + +class DigitalDelaySt(ParamSet): + """Digital Delay (ST) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + PING_PONG: Param[NoUnit] = Param(4, 'PING_PONG') # switch + SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms + MOD_RATE: Param[HertzUnit] = Param(8, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(9, 'MOD_DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(10, 'WIDTH') # float % + TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB + STEREO_WIDTH: Param[PercentUnit] = Param(20, 'STEREO_WIDTH') # float % + + +class DualDelay(ParamSet): + """Dual Delay (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SYNC_L: Param[NoUnit] = Param(1, 'SYNC_L') # switch + SYNC_NOTE_L: Param[NoUnit] = Param(2, 'SYNC_NOTE_L') # rotarySwitch + DELAY_TIME_L: Param[MillisecondsUnit] = Param(3, 'DELAY_TIME_L') # float ms + FEEDBACK_L: Param[PercentUnit] = Param(4, 'FEEDBACK_L') # float % + X_FEEDBACK: Param[PercentUnit] = Param(5, 'X_FEEDBACK') # float % + SYNC_R: Param[NoUnit] = Param(6, 'SYNC_R') # switch + SYNC_NOTE_R: Param[NoUnit] = Param(7, 'SYNC_NOTE_R') # rotarySwitch + DELAY_TIME_R: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME_R') # float ms + FEEDBACK_R: Param[PercentUnit] = Param(9, 'FEEDBACK_R') # float % + HIGH_PASS: Param[HertzUnit] = Param(10, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(11, 'LOW_PASS') # float Hz + MOD_RATE: Param[HertzUnit] = Param(12, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(13, 'MOD_DEPTH') # float % + LINK_FBACK: Param[NoUnit] = Param(14, 'LINK_FBACK') # switch + TRAILS: Param[NoUnit] = Param(15, 'TRAILS') # switch + DYN_DEPTH: Param[DbUnit] = Param(16, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(17, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(18, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(19, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(20, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(21, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(22, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(23, 'GAIN_REDUCTION') # grMeter dB + STEREO_WIDTH: Param[PercentUnit] = Param(24, 'STEREO_WIDTH') # float % + + +class ReverseDelayM(ParamSet): + """Reverse Delay (M) (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % + FEEDBACK_MODE: Param[NoUnit] = Param(2, 'FEEDBACK_MODE') # switch + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms + OVERLAP: Param[PercentUnit] = Param(8, 'OVERLAP') # float % + TRIG_THRESHOLD: Param[DbUnit] = Param(9, 'TRIG_THRESHOLD') # floatWithLed dB + DYN_DEPTH: Param[DbUnit] = Param(10, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(11, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(12, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(13, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(14, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(15, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(16, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(17, 'GAIN_REDUCTION') # grMeter dB + TRAILS: Param[NoUnit] = Param(18, 'TRAILS') # switch + + +class DualReverseDelay(ParamSet): + """Dual Reverse Delay (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SYNC: Param[NoUnit] = Param(1, 'SYNC') # switch + SYNC_NOTE_L: Param[NoUnit] = Param(2, 'SYNC_NOTE_L') # rotarySwitch + DELAY_TIME_L: Param[MillisecondsUnit] = Param(3, 'DELAY_TIME_L') # float ms + FEEDBACK_L: Param[PercentUnit] = Param(4, 'FEEDBACK_L') # float % + X_FEEDBACK: Param[PercentUnit] = Param(5, 'X_FEEDBACK') # float % + FEEDBACK_MODE: Param[NoUnit] = Param(6, 'FEEDBACK_MODE') # switch + SYNC_NOTE_R: Param[NoUnit] = Param(7, 'SYNC_NOTE_R') # rotarySwitch + DELAY_TIME_R: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME_R') # float ms + FEEDBACK_R: Param[PercentUnit] = Param(9, 'FEEDBACK_R') # float % + OVERLAP: Param[PercentUnit] = Param(10, 'OVERLAP') # float % + TRIG_THRESHOLD: Param[DbUnit] = Param(11, 'TRIG_THRESHOLD') # floatWithLed dB + DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB + DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch + THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms + KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB + FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB + HIGH_PASS: Param[HertzUnit] = Param(20, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(21, 'LOW_PASS') # float Hz + STEREO_WIDTH: Param[PercentUnit] = Param(22, 'STEREO_WIDTH') # float % + TRAILS: Param[NoUnit] = Param(23, 'TRAILS') # switch + LINK_FBACK: Param[NoUnit] = Param(24, 'LINK_FBACK') # switch + + +class CircularDelay(ParamSet): + """Circular Delay (Delay).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + TAP_PRESET: Param[NoUnit] = Param(1, 'TAP_PRESET') # rotarySwitch + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DELAY_TIME: Param[MillisecondsUnit] = Param(4, 'DELAY_TIME') # float ms + FEEDBACK: Param[PercentUnit] = Param(5, 'FEEDBACK') # float % + DIFFUSION: Param[PercentUnit] = Param(6, 'DIFFUSION') # float % + HIGH_PASS: Param[HertzUnit] = Param(7, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(8, 'LOW_PASS') # float Hz + MOD_RATE: Param[HertzUnit] = Param(9, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(10, 'MOD_DEPTH') # float % + VINTAGE_MODE: Param[NoUnit] = Param(11, 'VINTAGE_MODE') # switch + TRAILS: Param[NoUnit] = Param(12, 'TRAILS') # switch + + +class VintageChorus(ParamSet): + """Vintage Chorus (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + MODE: Param[NoUnit] = Param(1, 'MODE') # switch + CHR_RATE: Param[HertzUnit] = Param(2, 'CHR_RATE') # float Hz + VIB_RATE: Param[HertzUnit] = Param(3, 'VIB_RATE') # float Hz + VIB_DEPTH: Param[PercentUnit] = Param(4, 'VIB_DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(5, 'WIDTH') # float % + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + CHR_NOTE: Param[NoUnit] = Param(7, 'CHR_NOTE') # rotarySwitch + VIB_NOTE: Param[NoUnit] = Param(8, 'VIB_NOTE') # rotarySwitch + + +class DualChorus(ParamSet): + """Dual Chorus (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + MODE: Param[NoUnit] = Param(1, 'MODE') # switch + RATE: Param[HertzUnit] = Param(2, 'RATE') # float Hz + DEPTH: Param[PercentUnit] = Param(3, 'DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(4, 'WIDTH') # float % + TONE: Param[NoUnit] = Param(5, 'TONE') # float + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + + +class Vibrato(ParamSet): + """Vibrato (Modulation).""" + + RATE: Param[HertzUnit] = Param(0, 'RATE') # float Hz + DEPTH: Param[PercentUnit] = Param(1, 'DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % + LFO_ACTIVE: Param[NoUnit] = Param(3, 'LFO_ACTIVE') # switch + FADE_IN: Param[MillisecondsUnit] = Param(4, 'FADE_IN') # float ms + FADE_OUT: Param[MillisecondsUnit] = Param(5, 'FADE_OUT') # float ms + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + + +class Flangerish(ParamSet): + """Flangerish (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + DEPTH: Param[PercentUnit] = Param(2, 'DEPTH') # float % + FEEDBACK: Param[PercentUnit] = Param(3, 'FEEDBACK') # float % + WIDTH: Param[PercentUnit] = Param(4, 'WIDTH') # float % + DRIVE: Param[PercentUnit] = Param(5, 'DRIVE') # float % + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + + +class Tremolo(ParamSet): + """Tremolo (Modulation).""" + + RATE: Param[HertzUnit] = Param(0, 'RATE') # float Hz + DEPTH: Param[PercentUnit] = Param(1, 'DEPTH') # float % + WAVEFORM: Param[NoUnit] = Param(2, 'WAVEFORM') # comboBox + DUTY_CYCLE: Param[PercentUnit] = Param(3, 'DUTY_CYCLE') # float % + WIDTH: Param[PercentUnit] = Param(4, 'WIDTH') # float % + SMOOTHING: Param[PercentUnit] = Param(5, 'SMOOTHING') # float % + LFO_ACTIVE: Param[NoUnit] = Param(6, 'LFO_ACTIVE') # switch + FADE_IN: Param[MillisecondsUnit] = Param(7, 'FADE_IN') # float ms + FADE_OUT: Param[MillisecondsUnit] = Param(8, 'FADE_OUT') # float ms + BOOST: Param[PercentUnit] = Param(9, 'BOOST') # float % + SYNC: Param[NoUnit] = Param(10, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(11, 'SYNC_NOTE') # rotarySwitch + + +class Rotary(ParamSet): + """Rotary (Modulation).""" + + SPEED: Param[NoUnit] = Param(0, 'SPEED') # switch + SLOW_SPEED: Param[HertzUnit] = Param(1, 'SLOW_SPEED') # float Hz + FAST_SPEED: Param[HertzUnit] = Param(2, 'FAST_SPEED') # float Hz + ACCELERATION: Param[PercentUnit] = Param(3, 'ACCELERATION') # float % + SPEAKER_BALANCE: Param[PercentUnit] = Param(4, 'SPEAKER_BALANCE') # float % + DRIVE: Param[PercentUnit] = Param(5, 'DRIVE') # float % + BRIGHTNESS: Param[PercentUnit] = Param(6, 'BRIGHTNESS') # float % + HORN_MIC_WIDTH: Param[PercentUnit] = Param(7, 'HORN_MIC_WIDTH') # float % + SYNC: Param[NoUnit] = Param(8, 'SYNC') # switch + SLOW_NOTE: Param[NoUnit] = Param(9, 'SLOW_NOTE') # rotarySwitch + FAST_NOTE: Param[NoUnit] = Param(10, 'FAST_NOTE') # rotarySwitch + + +class DigitalFlanger(ParamSet): + """Digital Flanger (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + DEPTH: Param[PercentUnit] = Param(2, 'DEPTH') # float % + DELAY: Param[MillisecondsUnit] = Param(3, 'DELAY') # float ms + FEEDBACK: Param[PercentUnit] = Param(4, 'FEEDBACK') # float % + POLARITY: Param[NoUnit] = Param(5, 'POLARITY') # switch + WIDTH: Param[PercentUnit] = Param(6, 'WIDTH') # float % + DRIVE: Param[PercentUnit] = Param(7, 'DRIVE') # float % + VOLUME: Param[DbUnit] = Param(8, 'VOLUME') # float dB + SYNC: Param[NoUnit] = Param(9, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(10, 'SYNC_NOTE') # rotarySwitch + + +class FlangerEngine(ParamSet): + """Flanger Engine (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DELAY: Param[MillisecondsUnit] = Param(4, 'DELAY') # float ms + DEPTH: Param[PercentUnit] = Param(5, 'DEPTH') # float % + THR_ZERO: Param[NoUnit] = Param(6, 'THR_ZERO') # switch + FEEDBACK: Param[PercentUnit] = Param(7, 'FEEDBACK') # float % + WAVEFORM: Param[NoUnit] = Param(8, 'WAVEFORM') # rotarySwitch + DUTY_CYCLE: Param[NoUnit] = Param(9, 'DUTY_CYCLE') # float + SKEW: Param[NoUnit] = Param(10, 'SKEW') # float + SMOOTHING: Param[PercentUnit] = Param(11, 'SMOOTHING') # float % + LOW_PASS: Param[HertzUnit] = Param(12, 'LOW_PASS') # float Hz + HIGH_PASS: Param[HertzUnit] = Param(13, 'HIGH_PASS') # float Hz + WIDTH: Param[PercentUnit] = Param(14, 'WIDTH') # float % + RESONANCE: Param[NoUnit] = Param(15, 'RESONANCE') # rotarySwitch + COLOR: Param[NoUnit] = Param(16, 'COLOR') # rotarySwitch + INTENSITY: Param[PercentUnit] = Param(17, 'INTENSITY') # float % + DRIVE_TYPE: Param[NoUnit] = Param(18, 'DRIVE_TYPE') # rotarySwitch + DRIVE: Param[PercentUnit] = Param(19, 'DRIVE') # float % + OUTPUT: Param[DbUnit] = Param(20, 'OUTPUT') # float dB + + +class ChorusEngine(ParamSet): + """Chorus Engine (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DELAY: Param[MillisecondsUnit] = Param(4, 'DELAY') # float ms + DEPTH: Param[PercentUnit] = Param(5, 'DEPTH') # float % + MORPH: Param[PercentUnit] = Param(6, 'MORPH') # float % + RANDOM: Param[PercentUnit] = Param(7, 'RANDOM') # float % + VOICE_MODE: Param[NoUnit] = Param(8, 'VOICE_MODE') # rotarySwitch + TONE: Param[PercentUnit] = Param(9, 'TONE') # float % + TONE_FREQ: Param[HertzUnit] = Param(10, 'TONE_FREQ') # float Hz + LOW_PASS: Param[HertzUnit] = Param(11, 'LOW_PASS') # float Hz + HIGH_PASS: Param[HertzUnit] = Param(12, 'HIGH_PASS') # float Hz + WIDTH: Param[PercentUnit] = Param(13, 'WIDTH') # float % + DRIVE_TYPE: Param[NoUnit] = Param(14, 'DRIVE_TYPE') # rotarySwitch + DRIVE: Param[PercentUnit] = Param(15, 'DRIVE') # float % + OUTPUT: Param[DbUnit] = Param(16, 'OUTPUT') # float dB + + +class MxFlanger(ParamSet): + """MX Flanger (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + MANUAL: Param[PercentUnit] = Param(1, 'MANUAL') # float % + WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % + SPEED: Param[PercentUnit] = Param(3, 'SPEED') # float % + SYNC: Param[NoUnit] = Param(4, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(5, 'SYNC_NOTE') # rotarySwitch + REGEN: Param[PercentUnit] = Param(6, 'REGEN') # float % + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + RATE: Param[NoUnit] = Param(8, 'RATE') # float + DELAY: Param[NoUnit] = Param(9, 'DELAY') # float + DEPTH: Param[NoUnit] = Param(10, 'DEPTH') # float + + +class DreamChorusSt(ParamSet): + """Dream Chorus (ST) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SPEED: Param[PercentUnit] = Param(1, 'SPEED') # float % + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + MODE: Param[NoUnit] = Param(5, 'MODE') # switch + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Chorus229t(ParamSet): + """Chorus 229T (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + WIDTH: Param[PercentUnit] = Param(5, 'WIDTH') # float % + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class ChiefCe2wSt(ParamSet): + """Chief CE2W (ST) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[PercentUnit] = Param(1, 'RATE') # float % + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + TYPE: Param[NoUnit] = Param(5, 'TYPE') # switch + WIDTH: Param[PercentUnit] = Param(6, 'WIDTH') # float % + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class ChiefCe2wM(ParamSet): + """Chief CE2W (M) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[PercentUnit] = Param(1, 'RATE') # float % + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + TYPE: Param[NoUnit] = Param(5, 'TYPE') # switch + OUT_MODE: Param[NoUnit] = Param(6, 'OUT_MODE') # switch + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DreamChorusM(ParamSet): + """Dream Chorus (M) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SPEED: Param[PercentUnit] = Param(1, 'SPEED') # float % + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + MODE: Param[NoUnit] = Param(5, 'MODE') # switch + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class ChiefDc2wSt(ParamSet): + """Chief DC2W (ST) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + MODE: Param[NoUnit] = Param(1, 'MODE') # rotarySwitch + TYPE: Param[NoUnit] = Param(2, 'TYPE') # switch + DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + STEREO: Param[NoUnit] = Param(5, 'STEREO') # switch + + +class MxPhase95(ParamSet): + """MX Phase 95 (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SPEED: Param[PercentUnit] = Param(1, 'SPEED') # float % + SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch + TYPE: Param[NoUnit] = Param(4, 'TYPE') # switch + MODE: Param[NoUnit] = Param(5, 'MODE') # switch + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class MxVibe(ParamSet): + """MX Vibe (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + VIBE: Param[NoUnit] = Param(1, 'VIBE') # switch + SPEED: Param[PercentUnit] = Param(2, 'SPEED') # float % + SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch + LEVEL: Param[PercentUnit] = Param(5, 'LEVEL') # float % + DEPTH: Param[PercentUnit] = Param(6, 'DEPTH') # float % + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class ChiefDc2wM(ParamSet): + """Chief DC2W (M) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + MODE: Param[NoUnit] = Param(1, 'MODE') # rotarySwitch + TYPE: Param[NoUnit] = Param(2, 'TYPE') # switch + DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % + OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB + STEREO: Param[NoUnit] = Param(5, 'STEREO') # switch + + +class Phaser(ParamSet): + """Phaser (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SPEED: Param[NoUnit] = Param(1, 'SPEED') # float + WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % + DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + MANUAL: Param[PercentUnit] = Param(5, 'MANUAL') # float % + RESONANCE: Param[PercentUnit] = Param(6, 'RESONANCE') # float % + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + SYNC: Param[NoUnit] = Param(8, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(9, 'SYNC_NOTE') # rotarySwitch + + +class HarmonicTremolo(ParamSet): + """Harmonic Tremolo (Modulation).""" + + RATE: Param[HertzUnit] = Param(0, 'RATE') # float Hz + DEPTH: Param[PercentUnit] = Param(1, 'DEPTH') # float % + WAVEFORM: Param[NoUnit] = Param(2, 'WAVEFORM') # comboBox + DUTY_CYCLE: Param[PercentUnit] = Param(3, 'DUTY_CYCLE') # float % + SMOOTHING: Param[PercentUnit] = Param(4, 'SMOOTHING') # float % + LFO_ACTIVE: Param[NoUnit] = Param(5, 'LFO_ACTIVE') # switch + FADE_IN: Param[MillisecondsUnit] = Param(6, 'FADE_IN') # float ms + FADE_OUT: Param[MillisecondsUnit] = Param(7, 'FADE_OUT') # float ms + BOOST: Param[PercentUnit] = Param(8, 'BOOST') # float % + LP_XOVER: Param[HertzUnit] = Param(9, 'LP_XOVER') # float Hz + HP_XOVER: Param[HertzUnit] = Param(10, 'HP_XOVER') # float Hz + SYNC: Param[NoUnit] = Param(11, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(12, 'SYNC_NOTE') # rotarySwitch + SYNC_ON: Param[NoUnit] = Param(13, 'SYNC_ON') # switch + + +class MicroProcessorSt(ParamSet): + """Micro Processor (ST) (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SYNC: Param[NoUnit] = Param(1, 'SYNC') # switch + DELAY_TIME_A: Param[MillisecondsUnit] = Param(2, 'DELAY_TIME_A') # float ms + DELAY_TIME_B: Param[MillisecondsUnit] = Param(3, 'DELAY_TIME_B') # float ms + SYNC_NOTE_A: Param[NoUnit] = Param(4, 'SYNC_NOTE_A') # rotarySwitch + SYNC_NOTE_B: Param[NoUnit] = Param(5, 'SYNC_NOTE_B') # rotarySwitch + MOD_SOURCE: Param[NoUnit] = Param(6, 'MOD_SOURCE') # comboBox + LFO_RATE: Param[HertzUnit] = Param(7, 'LFO_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(8, 'MOD_DEPTH') # float % + ENV_GAIN: Param[DbUnit] = Param(9, 'ENV_GAIN') # float dB + FEEDBACK: Param[PercentUnit] = Param(10, 'FEEDBACK') # float % + X_FEEDBACK: Param[NoUnit] = Param(11, 'X_FEEDBACK') # switch + PITCH_A: Param[CentsUnit] = Param(12, 'PITCH_A') # float cents + PITCH_B: Param[CentsUnit] = Param(13, 'PITCH_B') # float cents + A_B_PITCH_MIX: Param[PercentUnit] = Param(14, 'A_B_PITCH_MIX') # float % + TONE: Param[PercentUnit] = Param(15, 'TONE') # float % + OUTPUT: Param[DbUnit] = Param(16, 'OUTPUT') # float dB + TRAILS: Param[NoUnit] = Param(17, 'TRAILS') # switch + + +class PatternTremolo(ParamSet): + """Pattern Tremolo (Modulation).""" + + SYNC: Param[NoUnit] = Param(0, 'SYNC') # switch + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + SYNC_NOTE: Param[NoUnit] = Param(2, 'SYNC_NOTE') # rotarySwitch + SWING: Param[PercentUnit] = Param(3, 'SWING') # float % + DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % + SMOOTH: Param[PercentUnit] = Param(5, 'SMOOTH') # float % + PING_PONG: Param[NoUnit] = Param(6, 'PING_PONG') # switch + RETRIGGER: Param[NoUnit] = Param(7, 'RETRIGGER') # switch + OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB + TRANSIENT_THRESHOLD: Param[DbUnit] = Param(9, 'TRANSIENT_THRESHOLD') # float dB + STEPS: Param[NoUnit] = Param(10, 'STEPS') # float + STEP_1: Param[NoUnit] = Param(11, 'STEP_1') # float + STEP_2: Param[NoUnit] = Param(12, 'STEP_2') # float + STEP_3: Param[NoUnit] = Param(13, 'STEP_3') # float + STEP_4: Param[NoUnit] = Param(14, 'STEP_4') # float + STEP_5: Param[NoUnit] = Param(15, 'STEP_5') # float + STEP_6: Param[NoUnit] = Param(16, 'STEP_6') # float + STEP_7: Param[NoUnit] = Param(17, 'STEP_7') # float + STEP_8: Param[NoUnit] = Param(18, 'STEP_8') # float + STEP_9: Param[NoUnit] = Param(19, 'STEP_9') # float + STEP_10: Param[NoUnit] = Param(20, 'STEP_10') # float + STEP_11: Param[NoUnit] = Param(21, 'STEP_11') # float + STEP_12: Param[NoUnit] = Param(22, 'STEP_12') # float + STEP_13: Param[NoUnit] = Param(23, 'STEP_13') # float + STEP_14: Param[NoUnit] = Param(24, 'STEP_14') # float + STEP_15: Param[NoUnit] = Param(25, 'STEP_15') # float + STEP_16: Param[NoUnit] = Param(26, 'STEP_16') # float + STEP_1_CONNECTED: Param[NoUnit] = Param(27, 'STEP_1_CONNECTED') # switch + STEP_2_CONNECTED: Param[NoUnit] = Param(28, 'STEP_2_CONNECTED') # switch + STEP_3_CONNECTED: Param[NoUnit] = Param(29, 'STEP_3_CONNECTED') # switch + STEP_4_CONNECTED: Param[NoUnit] = Param(30, 'STEP_4_CONNECTED') # switch + STEP_5_CONNECTED: Param[NoUnit] = Param(31, 'STEP_5_CONNECTED') # switch + STEP_6_CONNECTED: Param[NoUnit] = Param(32, 'STEP_6_CONNECTED') # switch + STEP_7_CONNECTED: Param[NoUnit] = Param(33, 'STEP_7_CONNECTED') # switch + STEP_8_CONNECTED: Param[NoUnit] = Param(34, 'STEP_8_CONNECTED') # switch + STEP_9_CONNECTED: Param[NoUnit] = Param(35, 'STEP_9_CONNECTED') # switch + STEP_10_CONNECTED: Param[NoUnit] = Param(36, 'STEP_10_CONNECTED') # switch + STEP_11_CONNECTED: Param[NoUnit] = Param(37, 'STEP_11_CONNECTED') # switch + STEP_12_CONNECTED: Param[NoUnit] = Param(38, 'STEP_12_CONNECTED') # switch + STEP_13_CONNECTED: Param[NoUnit] = Param(39, 'STEP_13_CONNECTED') # switch + STEP_14_CONNECTED: Param[NoUnit] = Param(40, 'STEP_14_CONNECTED') # switch + STEP_15_CONNECTED: Param[NoUnit] = Param(41, 'STEP_15_CONNECTED') # switch + + +class Room(ParamSet): + """Room (Reverb).""" + + DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + MIX: Param[PercentUnit] = Param(4, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch + + +class SpringSt(ParamSet): + """Spring (ST) (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DAMPING: Param[PercentUnit] = Param(1, 'DAMPING') # float % + TONE: Param[PercentUnit] = Param(2, 'TONE') # float % + BOING: Param[PercentUnit] = Param(3, 'BOING') # float % + TRAILS: Param[NoUnit] = Param(4, 'TRAILS') # switch + + +class Hall(ParamSet): + """Hall (Reverb).""" + + DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + MIX: Param[PercentUnit] = Param(4, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch + + +class SpringM(ParamSet): + """Spring (M) (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DAMPING: Param[PercentUnit] = Param(1, 'DAMPING') # float % + TONE: Param[PercentUnit] = Param(2, 'TONE') # float % + BOING: Param[PercentUnit] = Param(3, 'BOING') # float % + TRAILS: Param[NoUnit] = Param(4, 'TRAILS') # switch + + +class Modulated(ParamSet): + """Modulated (Reverb).""" + + DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms + MOD_SPEED: Param[HertzUnit] = Param(2, 'MOD_SPEED') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(3, 'MOD_DEPTH') # float % + HIGH_PASS: Param[HertzUnit] = Param(4, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(5, 'LOW_PASS') # float Hz + MIX: Param[PercentUnit] = Param(6, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(7, 'TRAILS') # switch + + +class Ambience(ParamSet): + """Ambience (Reverb).""" + + SIZE: Param[NoUnit] = Param(0, 'SIZE') # rotarySwitch + PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz + MIX: Param[PercentUnit] = Param(4, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch + + +class Cave(ParamSet): + """Cave (Reverb).""" + + DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms + DAMPING: Param[PercentUnit] = Param(2, 'DAMPING') # float % + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch + + +class Shimmer(ParamSet): + """Shimmer (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s + BRIGHTNESS: Param[PercentUnit] = Param(2, 'BRIGHTNESS') # float % + FEEDBACK: Param[PercentUnit] = Param(3, 'FEEDBACK') # float % + PITCH: Param[SemitonesUnit] = Param(4, 'PITCH') # float Semitones + TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch + PRE_DELAY: Param[MillisecondsUnit] = Param(6, 'PRE_DELAY') # float ms + DAMPING: Param[PercentUnit] = Param(7, 'DAMPING') # float % + HIGH_PASS: Param[HertzUnit] = Param(8, 'HIGH_PASS') # float Hz + RAND_PITCH: Param[CentsUnit] = Param(9, 'RAND_PITCH') # float Cents + MOD_SPEED: Param[HertzUnit] = Param(10, 'MOD_SPEED') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(11, 'MOD_DEPTH') # float % + WET_LEVEL: Param[DbUnit] = Param(12, 'WET_LEVEL') # float dB + + +class MindHall(ParamSet): + """Mind Hall (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + DAMPING: Param[PercentUnit] = Param(5, 'DAMPING') # float % + TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch + + +class PlateLush(ParamSet): + """Plate Lush (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + LF_DAMPING: Param[PercentUnit] = Param(5, 'LF_DAMPING') # float % + HF_DAMPING: Param[PercentUnit] = Param(6, 'HF_DAMPING') # float % + MOD_DEPTH: Param[PercentUnit] = Param(7, 'MOD_DEPTH') # float % + TRAILS: Param[NoUnit] = Param(8, 'TRAILS') # switch + + +class Plate(ParamSet): + """Plate (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + LF_DAMPING: Param[PercentUnit] = Param(5, 'LF_DAMPING') # float % + HF_DAMPING: Param[PercentUnit] = Param(6, 'HF_DAMPING') # float % + MOD_DEPTH: Param[PercentUnit] = Param(7, 'MOD_DEPTH') # float % + TRAILS: Param[NoUnit] = Param(8, 'TRAILS') # switch + + +class PlateTight(ParamSet): + """Plate Tight (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + LF_DAMPING: Param[PercentUnit] = Param(5, 'LF_DAMPING') # float % + HF_DAMPING: Param[PercentUnit] = Param(6, 'HF_DAMPING') # float % + MOD_DEPTH: Param[PercentUnit] = Param(7, 'MOD_DEPTH') # float % + TRAILS: Param[NoUnit] = Param(8, 'TRAILS') # switch + + +class SpringReverbEngineM(ParamSet): + """Spring Reverb Engine (M) (Reverb).""" + + INPUT_GAIN: Param[DbUnit] = Param(0, 'INPUT_GAIN') # float dB + HIGH_PASS: Param[HertzUnit] = Param(1, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(2, 'LOW_PASS') # float Hz + CHIRP_DECAY: Param[PercentUnit] = Param(3, 'CHIRP_DECAY') # float % + DIFF_DECAY: Param[PercentUnit] = Param(4, 'DIFF_DECAY') # float % + CHIRP_LEVEL: Param[PercentUnit] = Param(5, 'CHIRP_LEVEL') # float % + DIFF_LEVEL: Param[PercentUnit] = Param(6, 'DIFF_LEVEL') # float % + TANK_TYPE: Param[NoUnit] = Param(7, 'TANK_TYPE') # comboBox + MIX: Param[PercentUnit] = Param(8, 'MIX') # float % + OUTPUT_GAIN: Param[DbUnit] = Param(9, 'OUTPUT_GAIN') # float dB + TRAILS: Param[NoUnit] = Param(10, 'TRAILS') # switch + + +class SpringReverbEngineSt(ParamSet): + """Spring Reverb Engine (ST) (Reverb).""" + + INPUT_GAIN: Param[DbUnit] = Param(0, 'INPUT_GAIN') # float dB + HIGH_PASS: Param[HertzUnit] = Param(1, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(2, 'LOW_PASS') # float Hz + CHIRP_DECAY: Param[PercentUnit] = Param(3, 'CHIRP_DECAY') # float % + DIFF_DECAY: Param[PercentUnit] = Param(4, 'DIFF_DECAY') # float % + CHIRP_LEVEL: Param[PercentUnit] = Param(5, 'CHIRP_LEVEL') # float % + DIFF_LEVEL: Param[PercentUnit] = Param(6, 'DIFF_LEVEL') # float % + TANK_TYPE: Param[NoUnit] = Param(7, 'TANK_TYPE') # comboBox + MIX: Param[PercentUnit] = Param(8, 'MIX') # float % + OUTPUT_GAIN: Param[DbUnit] = Param(9, 'OUTPUT_GAIN') # float dB + TRAILS: Param[NoUnit] = Param(10, 'TRAILS') # switch + + +class NordicConcertHallSt(ParamSet): + """Nordic Concert Hall (ST) (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + SIZE: Param[PercentUnit] = Param(3, 'SIZE') # float % + H_SHELF_GAIN: Param[DbUnit] = Param(4, 'H_SHELF_GAIN') # float dB + HIGH_PASS: Param[HertzUnit] = Param(5, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(6, 'LOW_PASS') # float Hz + BASS_FREQ: Param[HertzUnit] = Param(7, 'BASS_FREQ') # float Hz + BASS_MULT: Param[NoUnit] = Param(8, 'BASS_MULT') # float x + H_SHELF_FREQ: Param[HertzUnit] = Param(9, 'H_SHELF_FREQ') # float Hz + REV_ATTACK: Param[PercentUnit] = Param(10, 'REV_ATTACK') # float % + EARLY_DIFF: Param[PercentUnit] = Param(11, 'EARLY_DIFF') # float % + LATE_DIFF: Param[PercentUnit] = Param(12, 'LATE_DIFF') # float % + MOD_RATE: Param[HertzUnit] = Param(13, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(14, 'MOD_DEPTH') # float % + TRAILS: Param[NoUnit] = Param(15, 'TRAILS') # switch + + +class StudioPlate70St(ParamSet): + """Studio Plate 70 (ST) (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + SIZE: Param[PercentUnit] = Param(3, 'SIZE') # float % + H_SHELF_GAIN: Param[DbUnit] = Param(4, 'H_SHELF_GAIN') # float dB + HIGH_PASS: Param[HertzUnit] = Param(5, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(6, 'LOW_PASS') # float Hz + BASS_FREQ: Param[HertzUnit] = Param(7, 'BASS_FREQ') # float Hz + BASS_MULT: Param[NoUnit] = Param(8, 'BASS_MULT') # float x + H_SHELF_FREQ: Param[HertzUnit] = Param(9, 'H_SHELF_FREQ') # float Hz + REV_ATTACK: Param[PercentUnit] = Param(10, 'REV_ATTACK') # float % + EARLY_DIFF: Param[PercentUnit] = Param(11, 'EARLY_DIFF') # float % + LATE_DIFF: Param[PercentUnit] = Param(12, 'LATE_DIFF') # float % + MOD_RATE: Param[HertzUnit] = Param(13, 'MOD_RATE') # float Hz + MOD_DEPTH: Param[PercentUnit] = Param(14, 'MOD_DEPTH') # float % + TRAILS: Param[NoUnit] = Param(15, 'TRAILS') # switch + + +class BlossomSt(ParamSet): + """Blossom (ST) (Reverb).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s + PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms + HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz + EXTRA_E_R: Param[NoUnit] = Param(5, 'EXTRA_E_R') # switch + E_R_LENGTH: Param[PercentUnit] = Param(6, 'E_R_LENGTH') # float % + DIFFUSION: Param[PercentUnit] = Param(7, 'DIFFUSION') # float % + BASS: Param[DbUnit] = Param(8, 'BASS') # float dB + TREBLE: Param[DbUnit] = Param(9, 'TREBLE') # float dB + DUCKING: Param[PercentUnit] = Param(10, 'DUCKING') # float % + GAIN_REDUCTION: Param[DbUnit] = Param(11, 'GAIN_REDUCTION') # grMeter dB + MODULATION: Param[PercentUnit] = Param(12, 'MODULATION') # float % + TRAILS: Param[NoUnit] = Param(13, 'TRAILS') # switch + + +class BubbaWah(ParamSet): + """Bubba Wah (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + + +class BassWah(ParamSet): + """Bass Wah (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + + +class CryingWah(ParamSet): + """Crying Wah (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + + +class CryingClydeWah(ParamSet): + """Crying Clyde Wah (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + + +class BadHorse(ParamSet): + """Bad Horse (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + + +class CryingWahFromHell(ParamSet): + """Crying Wah From Hell (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + RANGE: Param[NoUnit] = Param(1, 'RANGE') # float + Q: Param[NoUnit] = Param(2, 'Q') # float + FINE_TUNE: Param[NoUnit] = Param(3, 'FINE_TUNE') # float + BOOST: Param[NoUnit] = Param(4, 'BOOST') # switch + BOOST_LEVEL: Param[DbUnit] = Param(5, 'BOOST_LEVEL') # float dB + + +class AutoWah(ParamSet): + """Auto Wah (Wah).""" + + SENSITIVITY: Param[PercentUnit] = Param(0, 'SENSITIVITY') # float % + ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(2, 'RELEASE') # float ms + + +class Send1(ParamSet): + """Send 1 (FX Loop).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + THRU: Param[DbUnit] = Param(1, 'THRU') # float dB + + +class Send2(ParamSet): + """Send 2 (FX Loop).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + THRU: Param[DbUnit] = Param(1, 'THRU') # float dB + + +class Return1(ParamSet): + """Return 1 (FX Loop).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + MIX: Param[PercentUnit] = Param(1, 'MIX') # float % + + +class Return2(ParamSet): + """Return 2 (FX Loop).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + MIX: Param[PercentUnit] = Param(1, 'MIX') # float % + + +class FxLoop1(ParamSet): + """FX Loop 1 (FX Loop).""" + + SEND_LEV: Param[DbUnit] = Param(0, 'SEND_LEV') # float dB + RET_LEV: Param[DbUnit] = Param(1, 'RET_LEV') # float dB + MIX: Param[PercentUnit] = Param(2, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(3, 'TRAILS') # switch + + +class FxLoop2(ParamSet): + """FX Loop 2 (FX Loop).""" + + SEND_LEV: Param[DbUnit] = Param(0, 'SEND_LEV') # float dB + RET_LEV: Param[DbUnit] = Param(1, 'RET_LEV') # float dB + MIX: Param[PercentUnit] = Param(2, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(3, 'TRAILS') # switch + + +class Send12(ParamSet): + """Send 1/2 (FX Loop).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + THRU: Param[DbUnit] = Param(1, 'THRU') # float dB + + +class Return12(ParamSet): + """Return 1/2 (FX Loop).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + MIX: Param[PercentUnit] = Param(1, 'MIX') # float % + + +class FxLoop12(ParamSet): + """FX Loop 1/2 (FX Loop).""" + + SEND_LEV: Param[DbUnit] = Param(0, 'SEND_LEV') # float dB + RET_LEV: Param[DbUnit] = Param(1, 'RET_LEV') # float dB + MIX: Param[PercentUnit] = Param(2, 'MIX') # float % + TRAILS: Param[NoUnit] = Param(3, 'TRAILS') # switch + + +class AdaptiveGate(ParamSet): + """Adaptive Gate (Utility).""" + + NOISE_REDUCTION: Param[PercentUnit] = Param(0, 'NOISE_REDUCTION') # float % + + +class UtilityGate(ParamSet): + """Utility Gate (Utility).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms + HOLD: Param[MillisecondsUnit] = Param(2, 'HOLD') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + RANGE: Param[DbUnit] = Param(4, 'RANGE') # float dB + + +class SimpleGate(ParamSet): + """Simple Gate (Utility).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + + +class Gain(ParamSet): + """Gain (Utility).""" + + LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB + PAN: Param[NoUnit] = Param(1, 'PAN') # float + PHASE_INVERT: Param[NoUnit] = Param(2, 'PHASE_INVERT') # switch + + +class Volume(ParamSet): + """Volume (Utility).""" + + LEVEL: Param[PercentUnit] = Param(0, 'LEVEL') # float % + CURVE: Param[NoUnit] = Param(1, 'CURVE') # switch + + +class AdaptiveGateSC(ParamSet): + """Adaptive Gate (S/C) (Utility).""" + + NOISE_REDUCTION: Param[PercentUnit] = Param(0, 'NOISE_REDUCTION') # float % + SOURCE: Param[NoUnit] = Param(1, 'SOURCE') # comboBox + + +class PluginBlend(ParamSet): + """Plugin Blend (Utility).""" + + INPUTSOURCEID: Param[NoUnit] = Param(0, 'INPUTSOURCEID') # int + INPUTCHANNEL: Param[NoUnit] = Param(1, 'INPUTCHANNEL') # int + STEREOINPUT: Param[NoUnit] = Param(2, 'STEREOINPUT') # int + DELAY: Param[NoUnit] = Param(3, 'DELAY') # int + BLEND: Param[PercentUnit] = Param(4, 'BLEND') # float % + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox + + +class PluginGate(ParamSet): + """Plugin Gate (Utility).""" + + THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB + + +class Doubler(ParamSet): + """Doubler (Utility).""" + + ENABLED: Param[NoUnit] = Param(0, 'ENABLED') # switch + SPREAD: Param[MillisecondsUnit] = Param(1, 'SPREAD') # float ms + DRY_LEVEL: Param[DbUnit] = Param(2, 'DRY_LEVEL') # float dB + FX_LEVEL: Param[DbUnit] = Param(3, 'FX_LEVEL') # float dB + TRIGGER: Param[NoUnit] = Param(4, 'TRIGGER') # comboBox + + +class PluginDoubler(ParamSet): + """Plugin Doubler (Utility).""" + + ENABLED: Param[NoUnit] = Param(0, 'ENABLED') # switch + SPREAD: Param[MillisecondsUnit] = Param(1, 'SPREAD') # float ms + DRY_LEVEL: Param[DbUnit] = Param(2, 'DRY_LEVEL') # float dB + FX_LEVEL: Param[DbUnit] = Param(3, 'FX_LEVEL') # float dB + TRIGGER: Param[NoUnit] = Param(4, 'TRIGGER') # comboBox + + +class TransparentBlend(ParamSet): + """Transparent Blend (Utility).""" + + INPUTSOURCEID: Param[NoUnit] = Param(0, 'INPUTSOURCEID') # int + INPUTCHANNEL: Param[NoUnit] = Param(1, 'INPUTCHANNEL') # int + STEREOINPUT: Param[NoUnit] = Param(2, 'STEREOINPUT') # int + DELAY: Param[NoUnit] = Param(3, 'DELAY') # int + BLEND: Param[PercentUnit] = Param(4, 'BLEND') # float % + OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB + SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox + + +class PhaseDoctor(ParamSet): + """Phase Doctor (Utility).""" + + POLARITY: Param[NoUnit] = Param(0, 'POLARITY') # switch + ADJUST: Param[NoUnit] = Param(1, 'ADJUST') # rotarySwitch + CENTER: Param[NoUnit] = Param(2, 'CENTER') # switch + SHIFT: Param[PercentUnit] = Param(3, 'SHIFT') # float % + STEREO_LINK: Param[NoUnit] = Param(4, 'STEREO_LINK') # switch + POLARITY_R: Param[NoUnit] = Param(5, 'POLARITY_R') # switch + ADJUST_R: Param[NoUnit] = Param(6, 'ADJUST_R') # rotarySwitch + CENTER_R: Param[NoUnit] = Param(7, 'CENTER_R') # switch + SHIFT_R: Param[PercentUnit] = Param(8, 'SHIFT_R') # float % + + +class PitchShifter(ParamSet): + """Pitch Shifter (Pitch).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + PITCH_COARSE: Param[SemitonesUnit] = Param(1, 'PITCH_COARSE') # float Semitones + PITCH_FINE: Param[CentsUnit] = Param(2, 'PITCH_FINE') # float Cents + + +class PolyOctaver(ParamSet): + """Poly Octaver (Pitch).""" + + DRY: Param[PercentUnit] = Param(0, 'DRY') # float % + OCT: Param[PercentUnit] = Param(1, 'OCT') # float % + SUB: Param[PercentUnit] = Param(2, 'SUB') # float % + + +class Wham(ParamSet): + """Wham (Pitch).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + PEDAL: Param[PercentUnit] = Param(1, 'PEDAL') # float % + HEEL_PITCH_1: Param[SemitonesUnit] = Param(2, 'HEEL_PITCH_1') # float Semitones + TOE_PITCH_1: Param[SemitonesUnit] = Param(3, 'TOE_PITCH_1') # float Semitones + HEEL_PITCH_2: Param[SemitonesUnit] = Param(4, 'HEEL_PITCH_2') # float Semitones + TOE_PITCH_2: Param[SemitonesUnit] = Param(5, 'TOE_PITCH_2') # float Semitones + BLEND: Param[PercentUnit] = Param(6, 'BLEND') # float % + + +class Minivoicer(ParamSet): + """Minivoicer (Pitch).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + ROOT: Param[NoUnit] = Param(1, 'ROOT') # comboBox + MODE: Param[NoUnit] = Param(2, 'MODE') # comboBox + TUNING: Param[HertzUnit] = Param(3, 'TUNING') # float Hz + QUANTIZE: Param[NoUnit] = Param(4, 'QUANTIZE') # switch + V1_ACTIVE: Param[NoUnit] = Param(5, 'V1_ACTIVE') # switch + V1_LEVEL: Param[DbUnit] = Param(6, 'V1_LEVEL') # float dB + V1_INTER: Param[NoUnit] = Param(7, 'V1_INTER') # rotarySwitch + V1_PAN: Param[NoUnit] = Param(8, 'V1_PAN') # float + V2_ACTIVE: Param[NoUnit] = Param(9, 'V2_ACTIVE') # switch + V2_LEVEL: Param[DbUnit] = Param(10, 'V2_LEVEL') # float dB + V2_INTER: Param[NoUnit] = Param(11, 'V2_INTER') # rotarySwitch + V2_PAN: Param[NoUnit] = Param(12, 'V2_PAN') # float + HIGH_PASS: Param[HertzUnit] = Param(13, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(14, 'LOW_PASS') # float Hz + MIDI: Param[NoUnit] = Param(15, 'MIDI') # switch + GLISSANDO: Param[MillisecondsUnit] = Param(16, 'GLISSANDO') # float ms + OUTPUT: Param[DbUnit] = Param(17, 'OUTPUT') # float dB + V1_NOTE: Param[NoUnit] = Param(18, 'V1_NOTE') # float + V2_NOTE: Param[NoUnit] = Param(19, 'V2_NOTE') # float + V1_SEMIT: Param[NoUnit] = Param(20, 'V1_SEMIT') # float + V2_SEMIT: Param[NoUnit] = Param(21, 'V2_SEMIT') # float + MIDI_CH: Param[NoUnit] = Param(22, 'MIDI_CH') # comboBox + V1_NOTE_DISPLAY: Param[NoUnit] = Param(23, 'V1_NOTE_DISPLAY') # float + V2_NOTE_DISPLAY: Param[NoUnit] = Param(24, 'V2_NOTE_DISPLAY') # float + + +class Transpose(ParamSet): + """Transpose (Pitch).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + PITCH_COARSE: Param[SemitonesUnit] = Param(1, 'PITCH_COARSE') # float Semitones + PITCH_FINE: Param[CentsUnit] = Param(2, 'PITCH_FINE') # float Cents + SEMITONES: Param[SemitonesUnit] = Param(3, 'SEMITONES') # float Semitones + + +class PitchCorrection(ParamSet): + """Pitch Correction (Pitch).""" + + ROOT: Param[NoUnit] = Param(0, 'ROOT') # comboBox + MODE: Param[NoUnit] = Param(1, 'MODE') # comboBox + TUNING: Param[HertzUnit] = Param(2, 'TUNING') # float Hz + QUANTIZE: Param[PercentUnit] = Param(3, 'QUANTIZE') # float % + GLISSANDO: Param[MillisecondsUnit] = Param(4, 'GLISSANDO') # float ms + HIGH_PASS: Param[HertzUnit] = Param(5, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(6, 'LOW_PASS') # float Hz + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class ChiefOc2(ParamSet): + """Chief OC2 (Pitch).""" + + OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB + DRY: Param[PercentUnit] = Param(1, 'DRY') # float % + OCT_1: Param[PercentUnit] = Param(2, 'OCT_1') # float % + OCT_2: Param[PercentUnit] = Param(3, 'OCT_2') # float % + + +class SubharmonicSynth(ParamSet): + """Subharmonic Synth (Pitch).""" + + OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB + DRY: Param[PercentUnit] = Param(1, 'DRY') # float % + OCTAVE: Param[PercentUnit] = Param(2, 'OCTAVE') # float % + CHARACTER: Param[PercentUnit] = Param(3, 'CHARACTER') # float % + LOW: Param[PercentUnit] = Param(4, 'LOW') # float % + SUB: Param[PercentUnit] = Param(5, 'SUB') # float % + + +class AggiSubOctaver(ParamSet): + """Aggi Sub Octaver (Pitch).""" + + OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB + CLEAN_LEVEL: Param[PercentUnit] = Param(1, 'CLEAN_LEVEL') # float % + CLEAN_TONE: Param[PercentUnit] = Param(2, 'CLEAN_TONE') # float % + OCTAVE_LEVEL: Param[PercentUnit] = Param(3, 'OCTAVE_LEVEL') # float % + OCTAVE_FILTER: Param[PercentUnit] = Param(4, 'OCTAVE_FILTER') # float % + + +class LoveMeat(ParamSet): + """Love Meat (Filter).""" + + SENSITIVITY: Param[NoUnit] = Param(0, 'SENSITIVITY') # float + ATTACK: Param[NoUnit] = Param(1, 'ATTACK') # float + DECAY: Param[NoUnit] = Param(2, 'DECAY') # float + COLOR: Param[NoUnit] = Param(3, 'COLOR') # float + INTENSITY: Param[NoUnit] = Param(4, 'INTENSITY') # float + BLEND: Param[NoUnit] = Param(5, 'BLEND') # float + TRIG_DIRECTION: Param[NoUnit] = Param(6, 'TRIG_DIRECTION') # switch + TRIGGER_MODE: Param[NoUnit] = Param(7, 'TRIGGER_MODE') # rotarySwitch + FILTER_CUTOFF: Param[NoUnit] = Param(8, 'FILTER_CUTOFF') # rotarySwitch + FILTER_TYPE: Param[NoUnit] = Param(9, 'FILTER_TYPE') # rotarySwitch + LEVEL: Param[DbUnit] = Param(10, 'LEVEL') # float dB + + +class Foog(ParamSet): + """Foog (Filter).""" + + DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float + DECAY: Param[NoUnit] = Param(1, 'DECAY') # switch + ENV_AMOUNT: Param[NoUnit] = Param(2, 'ENV_AMOUNT') # float + CUTOFF: Param[NoUnit] = Param(3, 'CUTOFF') # float + RESONANCE: Param[NoUnit] = Param(4, 'RESONANCE') # float + MIX: Param[PercentUnit] = Param(5, 'MIX') # float % + FILTER: Param[NoUnit] = Param(6, 'FILTER') # switch + LEVEL: Param[DbUnit] = Param(7, 'LEVEL') # float dB + + +class EnvelopeFilter(ParamSet): + """Envelope Filter (Filter).""" + + SENS: Param[DbUnit] = Param(0, 'SENS') # float dB + ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms + DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms + LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float + LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB + FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz + FREQ_DEPTH: Param[HertzUnit] = Param(6, 'FREQ_DEPTH') # float Hz + RESO: Param[NoUnit] = Param(7, 'RESO') # float + RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float + MIX: Param[PercentUnit] = Param(9, 'MIX') # float % + + +class EnvelopeFilterSC(ParamSet): + """Envelope Filter (S/C) (Filter).""" + + SENS: Param[DbUnit] = Param(0, 'SENS') # float dB + ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms + DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms + LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float + LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB + FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz + FREQ_DEPTH: Param[HertzUnit] = Param(6, 'FREQ_DEPTH') # float Hz + RESO: Param[NoUnit] = Param(7, 'RESO') # float + RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float + MIX: Param[PercentUnit] = Param(9, 'MIX') # float % + SOURCE: Param[NoUnit] = Param(10, 'SOURCE') # comboBox + + +class Freeze(ParamSet): + """Freeze (Morph).""" + + ON_OFF: Param[NoUnit] = Param(0, 'ON_OFF') # toggleButton + MOMENTARY: Param[NoUnit] = Param(1, 'MOMENTARY') # switch + ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms + RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms + DRY_GAIN: Param[DbUnit] = Param(4, 'DRY_GAIN') # float dB + FREEZE_GAIN: Param[DbUnit] = Param(5, 'FREEZE_GAIN') # float dB + HIGH_PASS: Param[HertzUnit] = Param(6, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(7, 'LOW_PASS') # float Hz + + +class PhaseLockedLoop(ParamSet): + """Phase-Locked Loop (Morph).""" + + OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB + DRY_LEVEL: Param[PercentUnit] = Param(1, 'DRY_LEVEL') # float % + UNISON_LEVEL: Param[PercentUnit] = Param(2, 'UNISON_LEVEL') # float % + MUL_LEVEL: Param[PercentUnit] = Param(3, 'MUL_LEVEL') # float % + DIV_LEVEL: Param[PercentUnit] = Param(4, 'DIV_LEVEL') # float % + MUL_SOURCE: Param[NoUnit] = Param(5, 'MUL_SOURCE') # comboBox + DIV_SOURCE: Param[NoUnit] = Param(6, 'DIV_SOURCE') # comboBox + MULTIPLIER: Param[NoUnit] = Param(7, 'MULTIPLIER') # rotarySwitch + DIVIDER: Param[NoUnit] = Param(8, 'DIVIDER') # rotarySwitch + RESPONSE: Param[PercentUnit] = Param(9, 'RESPONSE') # float % + STABILITY: Param[PercentUnit] = Param(10, 'STABILITY') # float % + THRESHOLD: Param[DbUnit] = Param(11, 'THRESHOLD') # float dB + TRAILS_GATE: Param[NoUnit] = Param(12, 'TRAILS_GATE') # switch + INSTRUMENT: Param[NoUnit] = Param(13, 'INSTRUMENT') # switch + + +class BitCrusherSt(ParamSet): + """Bit-Crusher (ST) (Morph).""" + + OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB + DRY: Param[PercentUnit] = Param(1, 'DRY') # float % + WET: Param[PercentUnit] = Param(2, 'WET') # float % + RESAMPLER: Param[HertzUnit] = Param(3, 'RESAMPLER') # float Hz + BIT_DEPTH: Param[NoUnit] = Param(4, 'BIT_DEPTH') # rotarySwitch bits + SHAPE: Param[PercentUnit] = Param(5, 'SHAPE') # float % + TONE: Param[HertzUnit] = Param(6, 'TONE') # float Hz + + +class BitCrusherEngineM(ParamSet): + """Bit-Crusher Engine (M) (Morph).""" + + OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB + DRY: Param[PercentUnit] = Param(1, 'DRY') # float % + WET: Param[PercentUnit] = Param(2, 'WET') # float % + RESAMPLER: Param[HertzUnit] = Param(3, 'RESAMPLER') # float Hz + FREQ_MULTI: Param[NoUnit] = Param(4, 'FREQ_MULTI') # float + DISSONANCE: Param[PercentUnit] = Param(5, 'DISSONANCE') # float % + PITCH_TRACKING: Param[NoUnit] = Param(6, 'PITCH_TRACKING') # switch + BIT_DEPTH: Param[NoUnit] = Param(7, 'BIT_DEPTH') # rotarySwitch bits + SHAPE: Param[PercentUnit] = Param(8, 'SHAPE') # float % + TONE: Param[HertzUnit] = Param(9, 'TONE') # float Hz + + +class LooperX(ParamSet): + """Looper X (Loopers).""" + + RECORD_OVERDUB: Param[NoUnit] = Param(0, 'RECORD_OVERDUB') # switch + PLAY_STOP: Param[NoUnit] = Param(1, 'PLAY_STOP') # switch + UNDO: Param[NoUnit] = Param(2, 'UNDO') # switch + DUPLICATE: Param[NoUnit] = Param(3, 'DUPLICATE') # switch + ONE_SHOT: Param[NoUnit] = Param(4, 'ONE_SHOT') # switch + HALF_SPEED: Param[NoUnit] = Param(5, 'HALF_SPEED') # switch + PUNCH: Param[NoUnit] = Param(6, 'PUNCH') # switch + REVERSE: Param[NoUnit] = Param(7, 'REVERSE') # switch + PLAYBACK_LEVEL: Param[DbUnit] = Param(8, 'PLAYBACK_LEVEL') # float dB + OVERDUB_LEVEL: Param[DbUnit] = Param(9, 'OVERDUB_LEVEL') # float dB + HIGH_PASS: Param[HertzUnit] = Param(10, 'HIGH_PASS') # float Hz + LOW_PASS: Param[HertzUnit] = Param(11, 'LOW_PASS') # float Hz + THRESHOLD: Param[DbUnit] = Param(12, 'THRESHOLD') # float dB + RECORD_MODE: Param[NoUnit] = Param(13, 'RECORD_MODE') # switch + OVERDUB_MODE: Param[NoUnit] = Param(14, 'OVERDUB_MODE') # switch + DUPLICATE_MODE: Param[NoUnit] = Param(15, 'DUPLICATE_MODE') # switch + PUNCH_MODE: Param[NoUnit] = Param(16, 'PUNCH_MODE') # switch + ROUTING_MODE: Param[NoUnit] = Param(17, 'ROUTING_MODE') # rotarySwitch + QUANTIZE: Param[NoUnit] = Param(18, 'QUANTIZE') # rotarySwitch + MIDI_CLOCK_START: Param[NoUnit] = Param(19, 'MIDI_CLOCK_START') # switch + PRE_ROLL: Param[NoUnit] = Param(20, 'PRE_ROLL') # rotarySwitch + METRONOME_MUTE: Param[NoUnit] = Param(21, 'METRONOME_MUTE') # toggleButton + REC_LENGTH: Param[NoUnit] = Param(22, 'REC_LENGTH') # rotarySwitch + + +class SingleM(ParamSet): + """Single (M) (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class SingleSt(ParamSet): + """Single (ST) (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class DualM(ParamSet): + """Dual (M) (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class DualSt(ParamSet): + """Dual (ST) (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_BALANCE: Param[NoUnit] = Param(6, 'IR_1_BALANCE') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_BALANCE: Param[NoUnit] = Param(14, 'IR_2_BALANCE') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class SingleMLite(ParamSet): + """Single (M) Lite (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class SingleStLite(ParamSet): + """Single (ST) Lite (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class DualMLite(ParamSet): + """Dual (M) Lite (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class DualStLite(ParamSet): + """Dual (ST) Lite (IRLoaders).""" + + IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch + IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch + IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string + IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB + IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz + IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz + IR_1_BALANCE: Param[NoUnit] = Param(6, 'IR_1_BALANCE') # float + IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms + IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch + IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch + IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string + IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB + IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz + IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz + IR_2_BALANCE: Param[NoUnit] = Param(14, 'IR_2_BALANCE') # float + IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms + ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % + PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms + REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz + REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz + SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch + GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB + IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string + IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string + + +class MonoSynth(ParamSet): + """Mono Synth (Synth).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SENSITIVITY: Param[PercentUnit] = Param(1, 'SENSITIVITY') # float % + ENV_RETRIGGER: Param[NoUnit] = Param(2, 'ENV_RETRIGGER') # switch + TUNING: Param[HertzUnit] = Param(3, 'TUNING') # float Hz + QUANTIZE: Param[NoUnit] = Param(4, 'QUANTIZE') # switch + ROOT: Param[NoUnit] = Param(5, 'ROOT') # comboBox + SCALE: Param[NoUnit] = Param(6, 'SCALE') # switch + SYNTH_ACTIVE: Param[NoUnit] = Param(7, 'SYNTH_ACTIVE') # switch + SYNTH_LEVEL: Param[DbUnit] = Param(8, 'SYNTH_LEVEL') # float dB + OSC1_ACTIVE: Param[NoUnit] = Param(9, 'OSC1_ACTIVE') # switch + OSC1_WAVE: Param[NoUnit] = Param(10, 'OSC1_WAVE') # rotarySwitch + OSC_1_LEVEL: Param[DbUnit] = Param(11, 'OSC_1_LEVEL') # float dB + OSC_1_STEPS: Param[SemitonesUnit] = Param(12, 'OSC_1_STEPS') # float st + OSC_1_DETUNE: Param[PercentUnit] = Param(13, 'OSC_1_DETUNE') # float % + OSC2_ACTIVE: Param[NoUnit] = Param(14, 'OSC2_ACTIVE') # switch + OSC2_WAVE: Param[NoUnit] = Param(15, 'OSC2_WAVE') # rotarySwitch + OSC_2_LEVEL: Param[DbUnit] = Param(16, 'OSC_2_LEVEL') # float dB + OSC_2_STEPS: Param[SemitonesUnit] = Param(17, 'OSC_2_STEPS') # float st + OSC_2_DETUNE: Param[PercentUnit] = Param(18, 'OSC_2_DETUNE') # float % + UNISON_SOURCE: Param[NoUnit] = Param(19, 'UNISON_SOURCE') # comboBox + UNI_AMOUNT: Param[NoUnit] = Param(20, 'UNI_AMOUNT') # rotarySwitch + UNI_DETUNE: Param[PercentUnit] = Param(21, 'UNI_DETUNE') # float % + UNI_WIDTH: Param[PercentUnit] = Param(22, 'UNI_WIDTH') # float % + FILTER: Param[NoUnit] = Param(23, 'FILTER') # switch + SLOPE: Param[NoUnit] = Param(24, 'SLOPE') # rotarySwitch + CUTOFF: Param[HertzUnit] = Param(25, 'CUTOFF') # float Hz + FILT_MOD: Param[PercentUnit] = Param(26, 'FILT_MOD') # float % + RESONANCE: Param[PercentUnit] = Param(27, 'RESONANCE') # float % + DRIVE: Param[PercentUnit] = Param(28, 'DRIVE') # float % + F_E_AMOUNT: Param[PercentUnit] = Param(29, 'F_E_AMOUNT') # float % + F_E_DCY_ATCK: Param[MillisecondsUnit] = Param(30, 'F_E_DCY_ATCK') # float ms + F_E_SUSTAIN: Param[PercentUnit] = Param(31, 'F_E_SUSTAIN') # float % + ENV_DCY_ATCK: Param[MillisecondsUnit] = Param(32, 'ENV_DCY_ATCK') # float ms + ENV_SUSTAIN: Param[PercentUnit] = Param(33, 'ENV_SUSTAIN') # float % + GATE: Param[DbUnit] = Param(34, 'GATE') # float dB + OUTPUT: Param[DbUnit] = Param(35, 'OUTPUT') # float dB + GLIDE: Param[MillisecondsUnit] = Param(36, 'GLIDE') # float ms + S_C_SOURCE: Param[NoUnit] = Param(37, 'S_C_SOURCE') # comboBox + ARPEGGIATOR: Param[NoUnit] = Param(38, 'ARPEGGIATOR') # switch + ARP_PATTERN: Param[NoUnit] = Param(39, 'ARP_PATTERN') # rotarySwitch + OCTAVE: Param[NoUnit] = Param(40, 'OCTAVE') # rotarySwitch + ARP_NOTE_2: Param[NoUnit] = Param(41, 'ARP_NOTE_2') # switch + ARP_NOTE_3: Param[NoUnit] = Param(42, 'ARP_NOTE_3') # switch + ARP_NOTE_4: Param[NoUnit] = Param(43, 'ARP_NOTE_4') # switch + ARP_NOTE_5: Param[NoUnit] = Param(44, 'ARP_NOTE_5') # switch + ARP_NOTE_6: Param[NoUnit] = Param(45, 'ARP_NOTE_6') # switch + ARP_NOTE_7: Param[NoUnit] = Param(46, 'ARP_NOTE_7') # switch + ARP_NOTE_8: Param[NoUnit] = Param(47, 'ARP_NOTE_8') # switch + FREE_RATE: Param[HertzUnit] = Param(48, 'FREE_RATE') # float Hz + SYNC: Param[NoUnit] = Param(49, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(50, 'SYNC_NOTE') # comboBox + MIDI_CH: Param[NoUnit] = Param(51, 'MIDI_CH') # comboBox + MIDI_NOTE: Param[NoUnit] = Param(52, 'MIDI_NOTE') # float + MIDI_VELOCITY: Param[NoUnit] = Param(53, 'MIDI_VELOCITY') # float + MIDI_TRIGGER: Param[NoUnit] = Param(54, 'MIDI_TRIGGER') # switch + + +class Green808Legacy(ParamSet): + """Green 808 (Guitar Overdrive).""" + + OVERDRIVE: Param[NoUnit] = Param(0, 'OVERDRIVE') # float + TONE: Param[NoUnit] = Param(1, 'TONE') # float + LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float + + +class Ev101iiisRedEl34100wLegacy(ParamSet): + """EV101IIIS Red EL34 100W (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Solo100LeadLegacy(ParamSet): + """Solo 100 Lead (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class UsDlxNormalLegacy(ParamSet): + """US DLX Normal (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class UsDlxVibratoLegacy(ParamSet): + """US DLX Vibrato (Guitar Amplifier).""" + + VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float + OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB + + +class Ev101iiisBlueEl34100wLegacy(ParamSet): + """EV101IIIS Blue EL34 100W (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Solo100CrunchBrightLegacy(ParamSet): + """Solo 100 Crunch Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class Solo100CrunchNormalLegacy(ParamSet): + """Solo 100 Crunch Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB + + +class DCellH4Ch1BrightLegacy(ParamSet): + """D-Cell H4 Ch1 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch1NormalLegacy(ParamSet): + """D-Cell H4 Ch1 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch2BrightLegacy(ParamSet): + """D-Cell H4 Ch2 Bright (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch2NormalLegacy(ParamSet): + """D-Cell H4 Ch2 Normal (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch3Legacy(ParamSet): + """D-Cell H4 Ch3 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class DCellH4Ch4Legacy(ParamSet): + """D-Cell H4 Ch4 (Guitar Amplifier).""" + + GAIN: Param[NoUnit] = Param(0, 'GAIN') # float + BASS: Param[NoUnit] = Param(1, 'BASS') # float + MID: Param[NoUnit] = Param(2, 'MID') # float + TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float + MASTER: Param[NoUnit] = Param(4, 'MASTER') # float + PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float + DEEP: Param[NoUnit] = Param(6, 'DEEP') # float + OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB + + +class Graphic9Legacy(ParamSet): + """Graphic-9 (Equalizer).""" + + HPF: Param[HertzUnit] = Param(0, 'HPF') # float Hz + N65HZ: Param[DbUnit] = Param(1, 'N65HZ') # float dB + N125HZ: Param[DbUnit] = Param(2, 'N125HZ') # float dB + N250HZ: Param[DbUnit] = Param(3, 'N250HZ') # float dB + N500HZ: Param[DbUnit] = Param(4, 'N500HZ') # float dB + N1KHZ: Param[DbUnit] = Param(5, 'N1KHZ') # float dB + N2KHZ: Param[DbUnit] = Param(6, 'N2KHZ') # float dB + N4KHZ: Param[DbUnit] = Param(7, 'N4KHZ') # float dB + N8KHZ: Param[DbUnit] = Param(8, 'N8KHZ') # float dB + N16KHZ: Param[DbUnit] = Param(9, 'N16KHZ') # float dB + OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB + + +class PhaserLegacy(ParamSet): + """Phaser (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + SPEED: Param[NoUnit] = Param(1, 'SPEED') # float + WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % + DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % + SYNC: Param[NoUnit] = Param(4, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(5, 'SYNC_NOTE') # rotarySwitch + + +class NuvibesLegacy(ParamSet): + """NuVibes (Modulation).""" + + MIX: Param[PercentUnit] = Param(0, 'MIX') # float % + RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz + INTENSITY: Param[PercentUnit] = Param(2, 'INTENSITY') # float % + WIDTH: Param[PercentUnit] = Param(3, 'WIDTH') # float % + SHAPE: Param[PercentUnit] = Param(4, 'SHAPE') # float % + DRIVE: Param[PercentUnit] = Param(5, 'DRIVE') # float % + SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch + SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch + + +class BadHorseLegacy(ParamSet): + """Bad Horse (Wah).""" + + WAH: Param[NoUnit] = Param(0, 'WAH') # float + + +class EnvelopeFilterLegacy(ParamSet): + """Envelope Filter (Filter).""" + + SENS: Param[DbUnit] = Param(0, 'SENS') # float dB + ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms + DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms + LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float + LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB + FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz + FREQ_ENV_AMT: Param[NoUnit] = Param(6, 'FREQ_ENV_AMT') # float + RESO: Param[NoUnit] = Param(7, 'RESO') # float + RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float + MIX: Param[PercentUnit] = Param(9, 'MIX') # float % + + +class EnvelopeFilterSCLegacy(ParamSet): + """Envelope Filter (S/C) (Filter).""" + + SENS: Param[DbUnit] = Param(0, 'SENS') # float dB + ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms + DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms + LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float + LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB + FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz + FREQ_ENV_AMT: Param[NoUnit] = Param(6, 'FREQ_ENV_AMT') # float + RESO: Param[NoUnit] = Param(7, 'RESO') # float + RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float + MIX: Param[PercentUnit] = Param(9, 'MIX') # float % + SOURCE: Param[NoUnit] = Param(10, 'SOURCE') # comboBox + + +#: Every generated parameter set, keyed by its model id. +BY_MODEL = { + 1: MythDrive, + 2: ObsessiveDrive, + 3: Od250, + 4: RodentDrive, + 6: Exotic, + 8: FreemanBod, + 9: BritBlues, + 10: ChiefDs1, + 11: BritGovernor, + 12: ChiefMt, + 13: ChiefOd1, + 14: ChiefSd1, + 15: FuzzPi, + 18: ChiefBd2, + 21: RageBooster, + 22: FacialFuzz, + 23: ExoticZBoost, + 24: RedDrive, + 25: VemuralRay, + 26: NoBellOd1, + 27: Green808, + 28: Thunderpaw, + 29: Mk3SiliconFuzz, + 42: N81CreationsDrive, + 1001: Brit2203, + 1002: Pv505Lead, + 1008: RolsJazzCh120, + 1009: UkC30Normal, + 1011: UkC30Topboost, + 1018: CaDuoCh3Modern, + 1019: CaDuoCh3Raw, + 1020: CaDuoCh3Vintage, + 1027: Freeman100Clean, + 1028: Freeman100Rhythm, + 1038: BritTm45Normal, + 1039: BritTm45Bright, + 1040: BritTm45Patch, + 1041: Brit900Clean, + 1042: Brit900Lead, + 1063: WattD103Normal, + 1064: WattD103Bright, + 1079: BritPlexi50Bright, + 1080: BritPlexi50Patch, + 1081: BritPlexi50Normal, + 1082: Freeman100Lead, + 1083: UsTwnNormal, + 1084: UsTwnVibrato, + 1089: CaTremoOrange, + 1090: CaTremoRed, + 1091: BritPlexi100Bright, + 1092: BritPlexi100Patch, + 1093: BritPlexi100Normal, + 1096: UsSprNormal, + 1097: UsSprVibrato, + 1101: Ca1starClean50wNormal, + 1102: Ca1starClean50wTweed, + 1103: Ca1starClean100wNormal, + 1104: Ca1starClean100wTweed, + 1105: Ca1starDrive50wNormal, + 1106: Ca1starDrive50wTweed, + 1107: Ca1starDrive100wNormal, + 1108: Ca1starDrive100wTweed, + 1115: Pv505Rhythm, + 1116: Captain50, + 1117: BognaVishnu20thClean, + 1118: Ev101iiisBlue6l6100w, + 1119: Ev101iiisRed6l6100w, + 1120: UsPrince, + 1121: BritUblLead, + 1122: BritUblLeadClip, + 1123: UsTweedBassladBrightPatch, + 1124: UsTweedBassladBright, + 1125: UsTweedBassladNormalPatch, + 1126: UsTweedBassladNormal, + 1127: UkC15Normal, + 1128: UkC15Topboost, + 1132: UsHpTweedTwnNormal, + 1133: UsHpTweedTwnNormalPatch, + 1134: UsHpTweedTwnBright, + 1135: UsHpTweedTwnBrightPatch, + 1136: DCellHisbertCh1, + 1137: DCellHisbertCh2, + 1138: DCellHisbertCh3, + 1139: CaJohnS2cCh1, + 1140: CaJohnS2cCh2, + 1141: CaJohnS2cCh3, + 1142: DCellH4Ch1Bright, + 1143: DCellH4Ch1Normal, + 1144: DCellH4Ch2Bright, + 1145: DCellH4Ch2Normal, + 1146: DCellH4Ch3, + 1147: DCellH4Ch4, + 1148: Ev101iiisRedEl34100w, + 1149: Ev101iiisBlueEl34100w, + 1150: Solo100Lead, + 1151: Solo100CrunchBright, + 1152: Solo100CrunchNormal, + 1154: MatchmoreJefe, + 1155: MatchmoreD30Ch1, + 1156: MatchmoreD30Ch2, + 1157: VictorSquidCh1, + 1158: VictorSquidCh2, + 1166: UsDlx64Vintage, + 1167: UsDlx65Reissue, + 1176: DumbbellOds, + 2010: BritBass50Bright, + 2011: BritBass50Patch, + 2012: BritBass50Normal, + 2013: G800k, + 2014: Ca400Ch1, + 2015: Ca400Ch2, + 2016: AmpedSuperValve, + 2017: AmpedFlipTop6464, + 2018: AmpedFlipTop6466, + 2019: AmpedFlipTop6664, + 2020: AmpedFlipTop6666, + 2021: WattBassModNormal, + 2022: WattBassModBright, + 3000: MicrotubesB3k, + 3001: Bddi, + 3004: SovietFuzz, + 3006: MicrotubesVmt, + 3007: ExoticBassZBoost, + 4000: Parametric8, + 4001: Parametric3, + 4003: LowHighCut, + 4005: Graphic9, + 4006: PluginGraphic9, + 5001: Legendary87M, + 5004: SolidStateCompM, + 5005: VcaCompM, + 5007: OptoCompM, + 5011: Jewel, + 5012: Legendary87St, + 5013: SolidStateCompSt, + 5014: VcaCompSt, + 5015: OptoCompSt, + 5016: ChiefCs3, + 5018: SolidStateCompSC, + 5019: Legendary87SC, + 5020: OptoCompSC, + 5021: VcaCompSC, + 6001: AnalogDelayM, + 6002: SimplePingPongDelay, + 6003: SimpleDelaySt, + 6004: TapeDelaySt, + 6005: DigitalDelayM, + 6006: SimpleDelayM, + 6007: TapeDelayM, + 6008: SlapbackDelaySt, + 6009: SlapbackDelayM, + 6010: AnalogDelaySt, + 6011: DigitalDelaySt, + 6012: DualDelay, + 6013: ReverseDelayM, + 6014: DualReverseDelay, + 6015: CircularDelay, + 7000: VintageChorus, + 7001: DualChorus, + 7002: Vibrato, + 7003: Flangerish, + 7004: Tremolo, + 7008: Rotary, + 7009: DigitalFlanger, + 7014: FlangerEngine, + 7015: ChorusEngine, + 7021: MxFlanger, + 7022: DreamChorusSt, + 7023: Chorus229t, + 7024: ChiefCe2wSt, + 7025: ChiefCe2wM, + 7026: DreamChorusM, + 7027: ChiefDc2wSt, + 7028: MxPhase95, + 7029: MxVibe, + 7030: ChiefDc2wM, + 7031: Phaser, + 7036: HarmonicTremolo, + 7039: MicroProcessorSt, + 7040: PatternTremolo, + 8000: Room, + 8001: SpringSt, + 8003: Hall, + 8006: SpringM, + 8007: Modulated, + 8008: Ambience, + 8009: Cave, + 8010: Shimmer, + 8011: MindHall, + 8012: PlateLush, + 8013: Plate, + 8014: PlateTight, + 8026: SpringReverbEngineM, + 8027: SpringReverbEngineSt, + 8028: NordicConcertHallSt, + 8029: StudioPlate70St, + 8030: BlossomSt, + 9010: BubbaWah, + 9012: BassWah, + 9013: CryingWah, + 9014: CryingClydeWah, + 9018: BadHorse, + 9019: CryingWahFromHell, + 9021: AutoWah, + 13000: Send1, + 13001: Send2, + 13002: Return1, + 13003: Return2, + 13004: FxLoop1, + 13005: FxLoop2, + 13006: Send12, + 13007: Return12, + 13008: FxLoop12, + 16001: AdaptiveGate, + 16002: UtilityGate, + 16003: SimpleGate, + 16005: Gain, + 16006: Volume, + 16007: AdaptiveGateSC, + 16008: PluginBlend, + 16009: PluginGate, + 16011: Doubler, + 16012: PluginDoubler, + 16013: TransparentBlend, + 16016: PhaseDoctor, + 18001: PitchShifter, + 18004: PolyOctaver, + 18006: Wham, + 18007: Minivoicer, + 18010: Transpose, + 18013: PitchCorrection, + 18014: ChiefOc2, + 18015: SubharmonicSynth, + 18016: AggiSubOctaver, + 24001: LoveMeat, + 24002: Foog, + 24006: EnvelopeFilter, + 24007: EnvelopeFilterSC, + 26001: Freeze, + 26002: PhaseLockedLoop, + 26003: BitCrusherSt, + 26004: BitCrusherEngineM, + 27000: LooperX, + 29001: SingleM, + 29002: SingleSt, + 29003: DualM, + 29004: DualSt, + 29005: SingleMLite, + 29006: SingleStLite, + 29007: DualMLite, + 29008: DualStLite, + 30001: MonoSynth, + 5: Green808Legacy, + 1017: Ev101iiisRedEl34100wLegacy, + 1045: Solo100LeadLegacy, + 1094: UsDlxNormalLegacy, + 1095: UsDlxVibratoLegacy, + 1098: Ev101iiisBlueEl34100wLegacy, + 1099: Solo100CrunchBrightLegacy, + 1100: Solo100CrunchNormalLegacy, + 1109: DCellH4Ch1BrightLegacy, + 1110: DCellH4Ch1NormalLegacy, + 1111: DCellH4Ch2BrightLegacy, + 1112: DCellH4Ch2NormalLegacy, + 1113: DCellH4Ch3Legacy, + 1114: DCellH4Ch4Legacy, + 4002: Graphic9Legacy, + 7006: PhaserLegacy, + 7007: NuvibesLegacy, + 9017: BadHorseLegacy, + 24003: EnvelopeFilterLegacy, + 24004: EnvelopeFilterSCLegacy, +} diff --git a/pyquadcortex/protocol/models.py b/pyquadcortex/protocol/models.py index 44f0bc0..1672e0b 100644 --- a/pyquadcortex/protocol/models.py +++ b/pyquadcortex/protocol/models.py @@ -1,956 +1,5 @@ -"""Constants for the factory blocks every Quad Cortex has. - -GENERATED by scripts/generate_models.py - do not edit by hand. - -Each class is a model category and each constant a block's wire id, so a -constant can be passed straight to :meth:`pyquadcortex.protocol.QuadCortex.set_block`:: - - qc.set_block(Block(0, 2, models.GuitarOverdrive.CHIEF_DS1)) - -Only FACTORY content is here. Purchased plugin models and Neural Captures -are omitted on purpose: a unit may not have them, and capture ids are user -slots that differ per device. Resolve those at runtime instead:: - - qc.catalog.find('My Capture').id - -Names that begin with a digit are prefixed with N (810 -> N810). -""" - - -class BassAmplifier: - """Bass Amplifier.""" - - BRIT_BASS_50_BRIGHT = 2010 - BRIT_BASS_50_PATCH = 2011 - BRIT_BASS_50_NORMAL = 2012 - G800K = 2013 - CA_400_CH1 = 2014 - CA_400_CH2 = 2015 - AMPED_SUPER_VALVE = 2016 - AMPED_FLIP_TOP_6464 = 2017 - AMPED_FLIP_TOP_6466 = 2018 - AMPED_FLIP_TOP_6664 = 2019 - AMPED_FLIP_TOP_6666 = 2020 - WATT_BASS_MOD_NORMAL = 2021 - WATT_BASS_MOD_BRIGHT = 2022 - - -class BassOverdrive: - """Bass Overdrive.""" - - MICROTUBES_B3K = 3000 - BDDI = 3001 - SOVIET_FUZZ = 3004 - MICROTUBES_VMT = 3006 - EXOTIC_BASS_Z_BOOST = 3007 - - -class CabsimBassM: - """Cabsim Bass (M).""" - - N210C_DARKGLASS_M = 21001 - N410_US_BASSLAD_P10Q_16_M = 21002 - N810_AMPED_VT_ALN_70S_M = 21003 - N115_AMPED_MODERN_M = 21004 - N212_DARKGLASS_NEO_M = 21005 - N412_BRIT_35A_GB55HZ_75_M = 21006 - N410_AMPED_B410_90S_M = 21008 - N810_AMPED_VT_90S_M = 21009 - - -class CabsimBassST: - """Cabsim Bass (ST).""" - - N210C_DARKGLASS_ST = 33001 - N410_US_BASSLAD_P10Q_16_ST = 33002 - N810_AMPED_VT_ALN_70S_ST = 33003 - N115_AMPED_MODERN_ST = 33004 - N212_DARKGLASS_NEO_ST = 33005 - N412_BRIT_35A_GB55HZ_75_ST = 33006 - N410_AMPED_B410_90S_ST = 33008 - N810_AMPED_VT_90S_ST = 33009 - - -class CabsimGuitarM: - """Cabsim Guitar (M).""" - - N412_CA_STAND_OS_S_V30_90S_M = 12001 - N412_D_CELL_FRONT_V30_04_M = 12002 - N412_EV_STRAIGHT_G12_00S_M = 12003 - N212_US_A_TYPE_00S_M = 12004 - N412_BRIT_60B_GB_90S_M = 12005 - N412_BRIT_60B_GB_71_M = 12006 - N412_CA_TRAD_S_UKV30_90S_M = 12007 - N212_ZILA_CB_16_M = 12008 - N412_BRIT_SILVER_B_70W_87_M = 12009 - N412_RANGE_PPC_V30_03_M = 12010 - N412_BOGNA_UBER_T75_00S_M = 12011 - N212_SUR_V_TYPE_10_M = 12012 - N212_UK_C30_GB_69_M = 12013 - N412_ZILA_CUST_V30_12_V2_M = 12015 - N412_ENG_PRO_V30_18_M = 12016 - N112_US_DLX_BLACK_C12K_00S_M = 12017 - N112_US_DLX_TWEED_WGS_Q_10S_M = 12018 - N112_ZILA_MINIMOD_RB_17_M = 12019 - N210_US_TRMLX_OXF_63_M = 12020 - N212_CA_RECTO_V30_98_M = 12021 - N212_US_TWN_C12Q_00S_M = 12022 - N212_ROLS_JAZZ_87_M = 12023 - N212_UK_C30_65_M = 12024 - N212_ZILA_OPEN_GOLD_19_M = 12025 - N110_US_PRN_BROWN_FATJ_10S_M = 12026 - N412_BRIT_60A_GB75HZ_89_M = 12028 - N412_BRIT_60B_V30_95_M = 12029 - N412_BRIT_TV_GB75HZ_69_M = 12030 - N412_CA_STAND_OS_A_V30_01_M = 12031 - N412_CA_TRAD_A_V30_92_M = 12032 - N412_CA_TRAD_S_H30_15_M = 12033 - N412_RANGE_PPC_V30_02_M = 12034 - N412_BOGNA_UBER_V30_00S_M = 12035 - N412_CA_STAND_OS_A_V30_03_M = 12036 - N112_US_DLX_SC64_M = 12037 - N412_BRIT_35B_ALNICO_CREAM_M = 12038 - N212_CA_RECTO_LEGEND_V12_M = 12039 - N212_ZILA_FATBOY_V30_02_M = 12040 - N212_US_TWN_CK2_M = 12041 - N412_WATT_S4123_M = 12042 - N112_UK_C15_BLUE_M = 12043 - N410_US_BASSLAD_PR10_M = 12044 - N110_US_PRN_C10R_M = 12045 - N212_MATCH_JEFE_SIG_02_M = 12046 - N212_MATCH_JEFE_V30_02_M = 12047 - N212_MATCH_D30_SIG_A_M = 12048 - N212_MATCH_D30_SIG_B_M = 12049 - N412_CORNFIELD_V30_M = 12063 - N110_US_PRN_GOLD_G10_M = 12064 - N412_BRIT_60A_G75_80S_M = 12065 - N412_BRIT_60A_LB50_12_M = 12066 - N412_VH_FAT_P50_M = 12067 - N212_ZILA_OPEN_CL80_19_M = 12068 - N212_ZILA_OPEN_G65_82_M = 12069 - N412_CA_DAGGER_A_V30_01_M = 12070 - N212_US_BLEACHED_BASSLAD_V30_01_M = 12071 - N212_US_TWN_WEB_CLASSIC_08_M = 12072 - N412_CA_CUSTOM_A_SHADOW_87_M = 12073 - N212_TOO_ROCK_EV_VINTAGE_79_M = 12074 - N212_TOO_ROCK_G65_M = 12075 - N212_TOO_ROCK_KM65_M = 12076 - N112_BRIT_P_SERIES_TX_33_M = 12077 - - -class CabsimGuitarST: - """Cabsim Guitar (ST).""" - - N412_CA_STAND_OS_S_V30_90S_ST = 32001 - N412_D_CELL_FRONT_V30_04_ST = 32002 - N412_EV_STRAIGHT_G12_00S_ST = 32003 - N212_US_A_TYPE_00S_ST = 32004 - N412_BRIT_60B_GB_90S_ST = 32005 - N412_BRIT_60B_GB_71_ST = 32006 - N412_CA_TRAD_S_UKV30_90S_ST = 32007 - N212_ZILA_CB_16_ST = 32008 - N412_BRIT_SILVER_B_70W_87_ST = 32009 - N412_RANGE_PPC_V30_03_ST = 32010 - N412_BOGNA_UBER_T75_00S_ST = 32011 - N212_SUR_V_TYPE_10_ST = 32012 - N212_UK_C30_GB_69_ST = 32013 - N412_ZILA_CUST_V30_12_V2_ST = 32015 - N412_ENG_PRO_V30_18_ST = 32016 - N112_US_DLX_BLACK_C12K_00S_ST = 32017 - N112_US_DLX_TWEED_WGS_Q_10S_ST = 32018 - N112_ZILA_MINIMOD_RB_17_ST = 32019 - N210_US_TRMLX_OXF_63_ST = 32020 - N212_CA_RECTO_V30_98_ST = 32021 - N212_US_TWN_C12Q_00S_ST = 32022 - N212_ROLS_JAZZ_87_ST = 32023 - N212_UK_C30_65_ST = 32024 - N212_ZILA_OPEN_GOLD_19_ST = 32025 - N110_US_PRN_BROWN_FATJ_10S_ST = 32026 - N412_BRIT_60A_GB75HZ_89_ST = 32028 - N412_BRIT_60B_V30_95_ST = 32029 - N412_BRIT_TV_GB75HZ_69_ST = 32030 - N412_CA_STAND_OS_A_V30_01_ST = 32031 - N412_CA_TRAD_A_V30_92_ST = 32032 - N412_CA_TRAD_S_H30_15_ST = 32033 - N412_RANGE_PPC_V30_02_ST = 32034 - N412_BOGNA_UBER_V30_00S_ST = 32035 - N412_CA_STAND_OS_A_V30_03_ST = 32036 - N112_US_DLX_SC64_ST = 32037 - N412_BRIT_35B_ALNICO_CREAM_ST = 32038 - N212_CA_RECTO_LEGEND_V12_ST = 32039 - N212_ZILA_FATBOY_V30_02_ST = 32040 - N212_US_TWN_CK2_ST = 32041 - N412_WATT_S4123_ST = 32042 - N112_UK_C15_BLUE_ST = 32043 - N410_US_BASSLAD_PR10_ST = 32044 - N110_US_PRN_C10R_ST = 32045 - N212_MATCH_JEFE_SIG_02_ST = 32046 - N212_MATCH_JEFE_V30_02_ST = 32047 - N212_MATCH_D30_SIG_A_ST = 32048 - N212_MATCH_D30_SIG_B_ST = 32049 - N412_CORNFIELD_V30_ST = 32063 - N110_US_PRN_GOLD_G10_ST = 32064 - N412_BRIT_60A_G75_80S_ST = 32065 - N412_BRIT_60A_LB50_12_ST = 32066 - N412_VH_FAT_P50_ST = 32067 - N212_ZILA_OPEN_CL80_19_ST = 32068 - N212_ZILA_OPEN_G65_82_ST = 32069 - N412_CA_DAGGER_A_V30_01_ST = 32070 - N212_US_BLEACHED_BASSLAD_V30_01_ST = 32071 - N212_US_TWN_WEB_CLASSIC_08_ST = 32072 - N412_CA_CUSTOM_A_SHADOW_87_ST = 32073 - N212_TOO_ROCK_EV_VINTAGE_79_ST = 32074 - N212_TOO_ROCK_G65_ST = 32075 - N212_TOO_ROCK_KM65_ST = 32076 - N112_BRIT_P_SERIES_TX_33_ST = 32077 - - -class Compressor: - """Compressor.""" - - LEGENDARY_87_M = 5001 - SOLID_STATE_COMP_M = 5004 - VCA_COMP_M = 5005 - OPTO_COMP_M = 5007 - JEWEL = 5011 - LEGENDARY_87_ST = 5012 - SOLID_STATE_COMP_ST = 5013 - VCA_COMP_ST = 5014 - OPTO_COMP_ST = 5015 - CHIEF_CS3 = 5016 - SOLID_STATE_COMP_S_C = 5018 - LEGENDARY_87_S_C = 5019 - OPTO_COMP_S_C = 5020 - VCA_COMP_S_C = 5021 - - -class Delay: - """Delay.""" - - ANALOG_DELAY_M = 6001 - SIMPLE_PING_PONG_DELAY = 6002 - SIMPLE_DELAY_ST = 6003 - TAPE_DELAY_ST = 6004 - DIGITAL_DELAY_M = 6005 - SIMPLE_DELAY_M = 6006 - TAPE_DELAY_M = 6007 - SLAPBACK_DELAY_ST = 6008 - SLAPBACK_DELAY_M = 6009 - ANALOG_DELAY_ST = 6010 - DIGITAL_DELAY_ST = 6011 - DUAL_DELAY = 6012 - REVERSE_DELAY_M = 6013 - DUAL_REVERSE_DELAY = 6014 - CIRCULAR_DELAY = 6015 - - -class Equalizer: - """Equalizer.""" - - PARAMETRIC_8 = 4000 - PARAMETRIC_3 = 4001 - LOW_HIGH_CUT = 4003 - GRAPHIC_9 = 4005 - PLUGIN_GRAPHIC_9 = 4006 - GRAPHIC_9_LEGACY = 4002 - - -class FXLoop: - """FX Loop.""" - - SEND_1 = 13000 - SEND_2 = 13001 - RETURN_1 = 13002 - RETURN_2 = 13003 - FX_LOOP_1 = 13004 - FX_LOOP_2 = 13005 - SEND_1_2 = 13006 - RETURN_1_2 = 13007 - FX_LOOP_1_2 = 13008 - - -class Filter: - """Filter.""" - - LOVE_MEAT = 24001 - FOOG = 24002 - ENVELOPE_FILTER = 24006 - ENVELOPE_FILTER_S_C = 24007 - ENVELOPE_FILTER_LEGACY = 24003 - ENVELOPE_FILTER_S_C_LEGACY = 24004 - - -class GuitarAmplifier: - """Guitar Amplifier.""" - - BRIT_2203 = 1001 - PV_505_LEAD = 1002 - ROLS_JAZZ_CH120 = 1008 - UK_C30_NORMAL = 1009 - UK_C30_TOPBOOST = 1011 - CA_DUO_CH3_MODERN = 1018 - CA_DUO_CH3_RAW = 1019 - CA_DUO_CH3_VINTAGE = 1020 - FREEMAN_100_CLEAN = 1027 - FREEMAN_100_RHYTHM = 1028 - BRIT_TM45_NORMAL = 1038 - BRIT_TM45_BRIGHT = 1039 - BRIT_TM45_PATCH = 1040 - BRIT_900_CLEAN = 1041 - BRIT_900_LEAD = 1042 - WATT_D103_NORMAL = 1063 - WATT_D103_BRIGHT = 1064 - BRIT_PLEXI_50_BRIGHT = 1079 - BRIT_PLEXI_50_PATCH = 1080 - BRIT_PLEXI_50_NORMAL = 1081 - FREEMAN_100_LEAD = 1082 - US_TWN_NORMAL = 1083 - US_TWN_VIBRATO = 1084 - CA_TREMO_ORANGE = 1089 - CA_TREMO_RED = 1090 - BRIT_PLEXI_100_BRIGHT = 1091 - BRIT_PLEXI_100_PATCH = 1092 - BRIT_PLEXI_100_NORMAL = 1093 - US_SPR_NORMAL = 1096 - US_SPR_VIBRATO = 1097 - CA_1STAR_CLEAN_50W_NORMAL = 1101 - CA_1STAR_CLEAN_50W_TWEED = 1102 - CA_1STAR_CLEAN_100W_NORMAL = 1103 - CA_1STAR_CLEAN_100W_TWEED = 1104 - CA_1STAR_DRIVE_50W_NORMAL = 1105 - CA_1STAR_DRIVE_50W_TWEED = 1106 - CA_1STAR_DRIVE_100W_NORMAL = 1107 - CA_1STAR_DRIVE_100W_TWEED = 1108 - PV_505_RHYTHM = 1115 - CAPTAIN_50 = 1116 - BOGNA_VISHNU_20TH_CLEAN = 1117 - EV101IIIS_BLUE_6L6_100W = 1118 - EV101IIIS_RED_6L6_100W = 1119 - US_PRINCE = 1120 - BRIT_UBL_LEAD = 1121 - BRIT_UBL_LEAD_CLIP = 1122 - US_TWEED_BASSLAD_BRIGHT_PATCH = 1123 - US_TWEED_BASSLAD_BRIGHT = 1124 - US_TWEED_BASSLAD_NORMAL_PATCH = 1125 - US_TWEED_BASSLAD_NORMAL = 1126 - UK_C15_NORMAL = 1127 - UK_C15_TOPBOOST = 1128 - US_HP_TWEED_TWN_NORMAL = 1132 - US_HP_TWEED_TWN_NORMAL_PATCH = 1133 - US_HP_TWEED_TWN_BRIGHT = 1134 - US_HP_TWEED_TWN_BRIGHT_PATCH = 1135 - D_CELL_HISBERT_CH1 = 1136 - D_CELL_HISBERT_CH2 = 1137 - D_CELL_HISBERT_CH3 = 1138 - CA_JOHN_S_2C_CH1 = 1139 - CA_JOHN_S_2C_CH2 = 1140 - CA_JOHN_S_2C_CH3 = 1141 - D_CELL_H4_CH1_BRIGHT = 1142 - D_CELL_H4_CH1_NORMAL = 1143 - D_CELL_H4_CH2_BRIGHT = 1144 - D_CELL_H4_CH2_NORMAL = 1145 - D_CELL_H4_CH3 = 1146 - D_CELL_H4_CH4 = 1147 - EV101IIIS_RED_EL34_100W = 1148 - EV101IIIS_BLUE_EL34_100W = 1149 - SOLO_100_LEAD = 1150 - SOLO_100_CRUNCH_BRIGHT = 1151 - SOLO_100_CRUNCH_NORMAL = 1152 - MATCHMORE_JEFE = 1154 - MATCHMORE_D30_CH1 = 1155 - MATCHMORE_D30_CH2 = 1156 - VICTOR_SQUID_CH1 = 1157 - VICTOR_SQUID_CH2 = 1158 - US_DLX_64_VINTAGE = 1166 - US_DLX_65_REISSUE = 1167 - DUMBBELL_ODS = 1176 - EV101IIIS_RED_EL34_100W_LEGACY = 1017 - SOLO_100_LEAD_LEGACY = 1045 - US_DLX_NORMAL_LEGACY = 1094 - US_DLX_VIBRATO_LEGACY = 1095 - EV101IIIS_BLUE_EL34_100W_LEGACY = 1098 - SOLO_100_CRUNCH_BRIGHT_LEGACY = 1099 - SOLO_100_CRUNCH_NORMAL_LEGACY = 1100 - D_CELL_H4_CH1_BRIGHT_LEGACY = 1109 - D_CELL_H4_CH1_NORMAL_LEGACY = 1110 - D_CELL_H4_CH2_BRIGHT_LEGACY = 1111 - D_CELL_H4_CH2_NORMAL_LEGACY = 1112 - D_CELL_H4_CH3_LEGACY = 1113 - D_CELL_H4_CH4_LEGACY = 1114 - - -class GuitarOverdrive: - """Guitar Overdrive.""" - - MYTH_DRIVE = 1 - OBSESSIVE_DRIVE = 2 - OD250 = 3 - RODENT_DRIVE = 4 - EXOTIC = 6 - FREEMAN_BOD = 8 - BRIT_BLUES = 9 - CHIEF_DS1 = 10 - BRIT_GOVERNOR = 11 - CHIEF_MT = 12 - CHIEF_OD1 = 13 - CHIEF_SD1 = 14 - FUZZ_PI = 15 - CHIEF_BD2 = 18 - RAGE_BOOSTER = 21 - FACIAL_FUZZ = 22 - EXOTIC_Z_BOOST = 23 - RED_DRIVE = 24 - VEMURAL_RAY = 25 - NO_BELL_OD1 = 26 - GREEN_808 = 27 - THUNDERPAW = 28 - MK3_SILICON_FUZZ = 29 - N81_CREATIONS_DRIVE = 42 - GREEN_808_LEGACY = 5 - - -class IRLoaders: - """IRLoaders.""" - - SINGLE_M = 29001 - SINGLE_ST = 29002 - DUAL_M = 29003 - DUAL_ST = 29004 - SINGLE_M_LITE = 29005 - SINGLE_ST_LITE = 29006 - DUAL_M_LITE = 29007 - DUAL_ST_LITE = 29008 - - -class Loopers: - """Loopers.""" - - LOOPER_X = 27000 - - -class Modulation: - """Modulation.""" - - VINTAGE_CHORUS = 7000 - DUAL_CHORUS = 7001 - VIBRATO = 7002 - FLANGERISH = 7003 - TREMOLO = 7004 - ROTARY = 7008 - DIGITAL_FLANGER = 7009 - FLANGER_ENGINE = 7014 - CHORUS_ENGINE = 7015 - MX_FLANGER = 7021 - DREAM_CHORUS_ST = 7022 - CHORUS_229T = 7023 - CHIEF_CE2W_ST = 7024 - CHIEF_CE2W_M = 7025 - DREAM_CHORUS_M = 7026 - CHIEF_DC2W_ST = 7027 - MX_PHASE_95 = 7028 - MX_VIBE = 7029 - CHIEF_DC2W_M = 7030 - PHASER = 7031 - HARMONIC_TREMOLO = 7036 - MICRO_PROCESSOR_ST = 7039 - PATTERN_TREMOLO = 7040 - PHASER_LEGACY = 7006 - NUVIBES_LEGACY = 7007 - - -class Morph: - """Morph.""" - - FREEZE = 26001 - PHASE_LOCKED_LOOP = 26002 - BIT_CRUSHER_ST = 26003 - BIT_CRUSHER_ENGINE_M = 26004 - - -class Pitch: - """Pitch.""" - - PITCH_SHIFTER = 18001 - POLY_OCTAVER = 18004 - WHAM = 18006 - MINIVOICER = 18007 - TRANSPOSE = 18010 - PITCH_CORRECTION = 18013 - CHIEF_OC2 = 18014 - SUBHARMONIC_SYNTH = 18015 - AGGI_SUB_OCTAVER = 18016 - - -class Reverb: - """Reverb.""" - - ROOM = 8000 - SPRING_ST = 8001 - HALL = 8003 - SPRING_M = 8006 - MODULATED = 8007 - AMBIENCE = 8008 - CAVE = 8009 - SHIMMER = 8010 - MIND_HALL = 8011 - PLATE_LUSH = 8012 - PLATE = 8013 - PLATE_TIGHT = 8014 - SPRING_REVERB_ENGINE_M = 8026 - SPRING_REVERB_ENGINE_ST = 8027 - NORDIC_CONCERT_HALL_ST = 8028 - STUDIO_PLATE_70_ST = 8029 - BLOSSOM_ST = 8030 - - -class Synth: - """Synth.""" - - MONO_SYNTH = 30001 - - -class Utility: - """Utility.""" - - ADAPTIVE_GATE = 16001 - UTILITY_GATE = 16002 - SIMPLE_GATE = 16003 - GAIN = 16005 - VOLUME = 16006 - ADAPTIVE_GATE_S_C = 16007 - PLUGIN_BLEND = 16008 - PLUGIN_GATE = 16009 - DOUBLER = 16011 - PLUGIN_DOUBLER = 16012 - TRANSPARENT_BLEND = 16013 - PHASE_DOCTOR = 16016 - - -class Wah: - """Wah.""" - - BUBBA_WAH = 9010 - BASS_WAH = 9012 - CRYING_WAH = 9013 - CRYING_CLYDE_WAH = 9014 - BAD_HORSE = 9018 - CRYING_WAH_FROM_HELL = 9019 - AUTO_WAH = 9021 - BAD_HORSE_LEGACY = 9017 - - -#: Every generated constant, as 'Category.NAME' -> wire id. -ALL = { - "BassAmplifier.BRIT_BASS_50_BRIGHT": 2010, - "BassAmplifier.BRIT_BASS_50_PATCH": 2011, - "BassAmplifier.BRIT_BASS_50_NORMAL": 2012, - "BassAmplifier.G800K": 2013, - "BassAmplifier.CA_400_CH1": 2014, - "BassAmplifier.CA_400_CH2": 2015, - "BassAmplifier.AMPED_SUPER_VALVE": 2016, - "BassAmplifier.AMPED_FLIP_TOP_6464": 2017, - "BassAmplifier.AMPED_FLIP_TOP_6466": 2018, - "BassAmplifier.AMPED_FLIP_TOP_6664": 2019, - "BassAmplifier.AMPED_FLIP_TOP_6666": 2020, - "BassAmplifier.WATT_BASS_MOD_NORMAL": 2021, - "BassAmplifier.WATT_BASS_MOD_BRIGHT": 2022, - "BassOverdrive.MICROTUBES_B3K": 3000, - "BassOverdrive.BDDI": 3001, - "BassOverdrive.SOVIET_FUZZ": 3004, - "BassOverdrive.MICROTUBES_VMT": 3006, - "BassOverdrive.EXOTIC_BASS_Z_BOOST": 3007, - "CabsimBassM.N210C_DARKGLASS_M": 21001, - "CabsimBassM.N410_US_BASSLAD_P10Q_16_M": 21002, - "CabsimBassM.N810_AMPED_VT_ALN_70S_M": 21003, - "CabsimBassM.N115_AMPED_MODERN_M": 21004, - "CabsimBassM.N212_DARKGLASS_NEO_M": 21005, - "CabsimBassM.N412_BRIT_35A_GB55HZ_75_M": 21006, - "CabsimBassM.N410_AMPED_B410_90S_M": 21008, - "CabsimBassM.N810_AMPED_VT_90S_M": 21009, - "CabsimBassST.N210C_DARKGLASS_ST": 33001, - "CabsimBassST.N410_US_BASSLAD_P10Q_16_ST": 33002, - "CabsimBassST.N810_AMPED_VT_ALN_70S_ST": 33003, - "CabsimBassST.N115_AMPED_MODERN_ST": 33004, - "CabsimBassST.N212_DARKGLASS_NEO_ST": 33005, - "CabsimBassST.N412_BRIT_35A_GB55HZ_75_ST": 33006, - "CabsimBassST.N410_AMPED_B410_90S_ST": 33008, - "CabsimBassST.N810_AMPED_VT_90S_ST": 33009, - "CabsimGuitarM.N412_CA_STAND_OS_S_V30_90S_M": 12001, - "CabsimGuitarM.N412_D_CELL_FRONT_V30_04_M": 12002, - "CabsimGuitarM.N412_EV_STRAIGHT_G12_00S_M": 12003, - "CabsimGuitarM.N212_US_A_TYPE_00S_M": 12004, - "CabsimGuitarM.N412_BRIT_60B_GB_90S_M": 12005, - "CabsimGuitarM.N412_BRIT_60B_GB_71_M": 12006, - "CabsimGuitarM.N412_CA_TRAD_S_UKV30_90S_M": 12007, - "CabsimGuitarM.N212_ZILA_CB_16_M": 12008, - "CabsimGuitarM.N412_BRIT_SILVER_B_70W_87_M": 12009, - "CabsimGuitarM.N412_RANGE_PPC_V30_03_M": 12010, - "CabsimGuitarM.N412_BOGNA_UBER_T75_00S_M": 12011, - "CabsimGuitarM.N212_SUR_V_TYPE_10_M": 12012, - "CabsimGuitarM.N212_UK_C30_GB_69_M": 12013, - "CabsimGuitarM.N412_ZILA_CUST_V30_12_V2_M": 12015, - "CabsimGuitarM.N412_ENG_PRO_V30_18_M": 12016, - "CabsimGuitarM.N112_US_DLX_BLACK_C12K_00S_M": 12017, - "CabsimGuitarM.N112_US_DLX_TWEED_WGS_Q_10S_M": 12018, - "CabsimGuitarM.N112_ZILA_MINIMOD_RB_17_M": 12019, - "CabsimGuitarM.N210_US_TRMLX_OXF_63_M": 12020, - "CabsimGuitarM.N212_CA_RECTO_V30_98_M": 12021, - "CabsimGuitarM.N212_US_TWN_C12Q_00S_M": 12022, - "CabsimGuitarM.N212_ROLS_JAZZ_87_M": 12023, - "CabsimGuitarM.N212_UK_C30_65_M": 12024, - "CabsimGuitarM.N212_ZILA_OPEN_GOLD_19_M": 12025, - "CabsimGuitarM.N110_US_PRN_BROWN_FATJ_10S_M": 12026, - "CabsimGuitarM.N412_BRIT_60A_GB75HZ_89_M": 12028, - "CabsimGuitarM.N412_BRIT_60B_V30_95_M": 12029, - "CabsimGuitarM.N412_BRIT_TV_GB75HZ_69_M": 12030, - "CabsimGuitarM.N412_CA_STAND_OS_A_V30_01_M": 12031, - "CabsimGuitarM.N412_CA_TRAD_A_V30_92_M": 12032, - "CabsimGuitarM.N412_CA_TRAD_S_H30_15_M": 12033, - "CabsimGuitarM.N412_RANGE_PPC_V30_02_M": 12034, - "CabsimGuitarM.N412_BOGNA_UBER_V30_00S_M": 12035, - "CabsimGuitarM.N412_CA_STAND_OS_A_V30_03_M": 12036, - "CabsimGuitarM.N112_US_DLX_SC64_M": 12037, - "CabsimGuitarM.N412_BRIT_35B_ALNICO_CREAM_M": 12038, - "CabsimGuitarM.N212_CA_RECTO_LEGEND_V12_M": 12039, - "CabsimGuitarM.N212_ZILA_FATBOY_V30_02_M": 12040, - "CabsimGuitarM.N212_US_TWN_CK2_M": 12041, - "CabsimGuitarM.N412_WATT_S4123_M": 12042, - "CabsimGuitarM.N112_UK_C15_BLUE_M": 12043, - "CabsimGuitarM.N410_US_BASSLAD_PR10_M": 12044, - "CabsimGuitarM.N110_US_PRN_C10R_M": 12045, - "CabsimGuitarM.N212_MATCH_JEFE_SIG_02_M": 12046, - "CabsimGuitarM.N212_MATCH_JEFE_V30_02_M": 12047, - "CabsimGuitarM.N212_MATCH_D30_SIG_A_M": 12048, - "CabsimGuitarM.N212_MATCH_D30_SIG_B_M": 12049, - "CabsimGuitarM.N412_CORNFIELD_V30_M": 12063, - "CabsimGuitarM.N110_US_PRN_GOLD_G10_M": 12064, - "CabsimGuitarM.N412_BRIT_60A_G75_80S_M": 12065, - "CabsimGuitarM.N412_BRIT_60A_LB50_12_M": 12066, - "CabsimGuitarM.N412_VH_FAT_P50_M": 12067, - "CabsimGuitarM.N212_ZILA_OPEN_CL80_19_M": 12068, - "CabsimGuitarM.N212_ZILA_OPEN_G65_82_M": 12069, - "CabsimGuitarM.N412_CA_DAGGER_A_V30_01_M": 12070, - "CabsimGuitarM.N212_US_BLEACHED_BASSLAD_V30_01_M": 12071, - "CabsimGuitarM.N212_US_TWN_WEB_CLASSIC_08_M": 12072, - "CabsimGuitarM.N412_CA_CUSTOM_A_SHADOW_87_M": 12073, - "CabsimGuitarM.N212_TOO_ROCK_EV_VINTAGE_79_M": 12074, - "CabsimGuitarM.N212_TOO_ROCK_G65_M": 12075, - "CabsimGuitarM.N212_TOO_ROCK_KM65_M": 12076, - "CabsimGuitarM.N112_BRIT_P_SERIES_TX_33_M": 12077, - "CabsimGuitarST.N412_CA_STAND_OS_S_V30_90S_ST": 32001, - "CabsimGuitarST.N412_D_CELL_FRONT_V30_04_ST": 32002, - "CabsimGuitarST.N412_EV_STRAIGHT_G12_00S_ST": 32003, - "CabsimGuitarST.N212_US_A_TYPE_00S_ST": 32004, - "CabsimGuitarST.N412_BRIT_60B_GB_90S_ST": 32005, - "CabsimGuitarST.N412_BRIT_60B_GB_71_ST": 32006, - "CabsimGuitarST.N412_CA_TRAD_S_UKV30_90S_ST": 32007, - "CabsimGuitarST.N212_ZILA_CB_16_ST": 32008, - "CabsimGuitarST.N412_BRIT_SILVER_B_70W_87_ST": 32009, - "CabsimGuitarST.N412_RANGE_PPC_V30_03_ST": 32010, - "CabsimGuitarST.N412_BOGNA_UBER_T75_00S_ST": 32011, - "CabsimGuitarST.N212_SUR_V_TYPE_10_ST": 32012, - "CabsimGuitarST.N212_UK_C30_GB_69_ST": 32013, - "CabsimGuitarST.N412_ZILA_CUST_V30_12_V2_ST": 32015, - "CabsimGuitarST.N412_ENG_PRO_V30_18_ST": 32016, - "CabsimGuitarST.N112_US_DLX_BLACK_C12K_00S_ST": 32017, - "CabsimGuitarST.N112_US_DLX_TWEED_WGS_Q_10S_ST": 32018, - "CabsimGuitarST.N112_ZILA_MINIMOD_RB_17_ST": 32019, - "CabsimGuitarST.N210_US_TRMLX_OXF_63_ST": 32020, - "CabsimGuitarST.N212_CA_RECTO_V30_98_ST": 32021, - "CabsimGuitarST.N212_US_TWN_C12Q_00S_ST": 32022, - "CabsimGuitarST.N212_ROLS_JAZZ_87_ST": 32023, - "CabsimGuitarST.N212_UK_C30_65_ST": 32024, - "CabsimGuitarST.N212_ZILA_OPEN_GOLD_19_ST": 32025, - "CabsimGuitarST.N110_US_PRN_BROWN_FATJ_10S_ST": 32026, - "CabsimGuitarST.N412_BRIT_60A_GB75HZ_89_ST": 32028, - "CabsimGuitarST.N412_BRIT_60B_V30_95_ST": 32029, - "CabsimGuitarST.N412_BRIT_TV_GB75HZ_69_ST": 32030, - "CabsimGuitarST.N412_CA_STAND_OS_A_V30_01_ST": 32031, - "CabsimGuitarST.N412_CA_TRAD_A_V30_92_ST": 32032, - "CabsimGuitarST.N412_CA_TRAD_S_H30_15_ST": 32033, - "CabsimGuitarST.N412_RANGE_PPC_V30_02_ST": 32034, - "CabsimGuitarST.N412_BOGNA_UBER_V30_00S_ST": 32035, - "CabsimGuitarST.N412_CA_STAND_OS_A_V30_03_ST": 32036, - "CabsimGuitarST.N112_US_DLX_SC64_ST": 32037, - "CabsimGuitarST.N412_BRIT_35B_ALNICO_CREAM_ST": 32038, - "CabsimGuitarST.N212_CA_RECTO_LEGEND_V12_ST": 32039, - "CabsimGuitarST.N212_ZILA_FATBOY_V30_02_ST": 32040, - "CabsimGuitarST.N212_US_TWN_CK2_ST": 32041, - "CabsimGuitarST.N412_WATT_S4123_ST": 32042, - "CabsimGuitarST.N112_UK_C15_BLUE_ST": 32043, - "CabsimGuitarST.N410_US_BASSLAD_PR10_ST": 32044, - "CabsimGuitarST.N110_US_PRN_C10R_ST": 32045, - "CabsimGuitarST.N212_MATCH_JEFE_SIG_02_ST": 32046, - "CabsimGuitarST.N212_MATCH_JEFE_V30_02_ST": 32047, - "CabsimGuitarST.N212_MATCH_D30_SIG_A_ST": 32048, - "CabsimGuitarST.N212_MATCH_D30_SIG_B_ST": 32049, - "CabsimGuitarST.N412_CORNFIELD_V30_ST": 32063, - "CabsimGuitarST.N110_US_PRN_GOLD_G10_ST": 32064, - "CabsimGuitarST.N412_BRIT_60A_G75_80S_ST": 32065, - "CabsimGuitarST.N412_BRIT_60A_LB50_12_ST": 32066, - "CabsimGuitarST.N412_VH_FAT_P50_ST": 32067, - "CabsimGuitarST.N212_ZILA_OPEN_CL80_19_ST": 32068, - "CabsimGuitarST.N212_ZILA_OPEN_G65_82_ST": 32069, - "CabsimGuitarST.N412_CA_DAGGER_A_V30_01_ST": 32070, - "CabsimGuitarST.N212_US_BLEACHED_BASSLAD_V30_01_ST": 32071, - "CabsimGuitarST.N212_US_TWN_WEB_CLASSIC_08_ST": 32072, - "CabsimGuitarST.N412_CA_CUSTOM_A_SHADOW_87_ST": 32073, - "CabsimGuitarST.N212_TOO_ROCK_EV_VINTAGE_79_ST": 32074, - "CabsimGuitarST.N212_TOO_ROCK_G65_ST": 32075, - "CabsimGuitarST.N212_TOO_ROCK_KM65_ST": 32076, - "CabsimGuitarST.N112_BRIT_P_SERIES_TX_33_ST": 32077, - "Compressor.LEGENDARY_87_M": 5001, - "Compressor.SOLID_STATE_COMP_M": 5004, - "Compressor.VCA_COMP_M": 5005, - "Compressor.OPTO_COMP_M": 5007, - "Compressor.JEWEL": 5011, - "Compressor.LEGENDARY_87_ST": 5012, - "Compressor.SOLID_STATE_COMP_ST": 5013, - "Compressor.VCA_COMP_ST": 5014, - "Compressor.OPTO_COMP_ST": 5015, - "Compressor.CHIEF_CS3": 5016, - "Compressor.SOLID_STATE_COMP_S_C": 5018, - "Compressor.LEGENDARY_87_S_C": 5019, - "Compressor.OPTO_COMP_S_C": 5020, - "Compressor.VCA_COMP_S_C": 5021, - "Delay.ANALOG_DELAY_M": 6001, - "Delay.SIMPLE_PING_PONG_DELAY": 6002, - "Delay.SIMPLE_DELAY_ST": 6003, - "Delay.TAPE_DELAY_ST": 6004, - "Delay.DIGITAL_DELAY_M": 6005, - "Delay.SIMPLE_DELAY_M": 6006, - "Delay.TAPE_DELAY_M": 6007, - "Delay.SLAPBACK_DELAY_ST": 6008, - "Delay.SLAPBACK_DELAY_M": 6009, - "Delay.ANALOG_DELAY_ST": 6010, - "Delay.DIGITAL_DELAY_ST": 6011, - "Delay.DUAL_DELAY": 6012, - "Delay.REVERSE_DELAY_M": 6013, - "Delay.DUAL_REVERSE_DELAY": 6014, - "Delay.CIRCULAR_DELAY": 6015, - "Equalizer.PARAMETRIC_8": 4000, - "Equalizer.PARAMETRIC_3": 4001, - "Equalizer.LOW_HIGH_CUT": 4003, - "Equalizer.GRAPHIC_9": 4005, - "Equalizer.PLUGIN_GRAPHIC_9": 4006, - "Equalizer.GRAPHIC_9_LEGACY": 4002, - "FXLoop.SEND_1": 13000, - "FXLoop.SEND_2": 13001, - "FXLoop.RETURN_1": 13002, - "FXLoop.RETURN_2": 13003, - "FXLoop.FX_LOOP_1": 13004, - "FXLoop.FX_LOOP_2": 13005, - "FXLoop.SEND_1_2": 13006, - "FXLoop.RETURN_1_2": 13007, - "FXLoop.FX_LOOP_1_2": 13008, - "Filter.LOVE_MEAT": 24001, - "Filter.FOOG": 24002, - "Filter.ENVELOPE_FILTER": 24006, - "Filter.ENVELOPE_FILTER_S_C": 24007, - "Filter.ENVELOPE_FILTER_LEGACY": 24003, - "Filter.ENVELOPE_FILTER_S_C_LEGACY": 24004, - "GuitarAmplifier.BRIT_2203": 1001, - "GuitarAmplifier.PV_505_LEAD": 1002, - "GuitarAmplifier.ROLS_JAZZ_CH120": 1008, - "GuitarAmplifier.UK_C30_NORMAL": 1009, - "GuitarAmplifier.UK_C30_TOPBOOST": 1011, - "GuitarAmplifier.CA_DUO_CH3_MODERN": 1018, - "GuitarAmplifier.CA_DUO_CH3_RAW": 1019, - "GuitarAmplifier.CA_DUO_CH3_VINTAGE": 1020, - "GuitarAmplifier.FREEMAN_100_CLEAN": 1027, - "GuitarAmplifier.FREEMAN_100_RHYTHM": 1028, - "GuitarAmplifier.BRIT_TM45_NORMAL": 1038, - "GuitarAmplifier.BRIT_TM45_BRIGHT": 1039, - "GuitarAmplifier.BRIT_TM45_PATCH": 1040, - "GuitarAmplifier.BRIT_900_CLEAN": 1041, - "GuitarAmplifier.BRIT_900_LEAD": 1042, - "GuitarAmplifier.WATT_D103_NORMAL": 1063, - "GuitarAmplifier.WATT_D103_BRIGHT": 1064, - "GuitarAmplifier.BRIT_PLEXI_50_BRIGHT": 1079, - "GuitarAmplifier.BRIT_PLEXI_50_PATCH": 1080, - "GuitarAmplifier.BRIT_PLEXI_50_NORMAL": 1081, - "GuitarAmplifier.FREEMAN_100_LEAD": 1082, - "GuitarAmplifier.US_TWN_NORMAL": 1083, - "GuitarAmplifier.US_TWN_VIBRATO": 1084, - "GuitarAmplifier.CA_TREMO_ORANGE": 1089, - "GuitarAmplifier.CA_TREMO_RED": 1090, - "GuitarAmplifier.BRIT_PLEXI_100_BRIGHT": 1091, - "GuitarAmplifier.BRIT_PLEXI_100_PATCH": 1092, - "GuitarAmplifier.BRIT_PLEXI_100_NORMAL": 1093, - "GuitarAmplifier.US_SPR_NORMAL": 1096, - "GuitarAmplifier.US_SPR_VIBRATO": 1097, - "GuitarAmplifier.CA_1STAR_CLEAN_50W_NORMAL": 1101, - "GuitarAmplifier.CA_1STAR_CLEAN_50W_TWEED": 1102, - "GuitarAmplifier.CA_1STAR_CLEAN_100W_NORMAL": 1103, - "GuitarAmplifier.CA_1STAR_CLEAN_100W_TWEED": 1104, - "GuitarAmplifier.CA_1STAR_DRIVE_50W_NORMAL": 1105, - "GuitarAmplifier.CA_1STAR_DRIVE_50W_TWEED": 1106, - "GuitarAmplifier.CA_1STAR_DRIVE_100W_NORMAL": 1107, - "GuitarAmplifier.CA_1STAR_DRIVE_100W_TWEED": 1108, - "GuitarAmplifier.PV_505_RHYTHM": 1115, - "GuitarAmplifier.CAPTAIN_50": 1116, - "GuitarAmplifier.BOGNA_VISHNU_20TH_CLEAN": 1117, - "GuitarAmplifier.EV101IIIS_BLUE_6L6_100W": 1118, - "GuitarAmplifier.EV101IIIS_RED_6L6_100W": 1119, - "GuitarAmplifier.US_PRINCE": 1120, - "GuitarAmplifier.BRIT_UBL_LEAD": 1121, - "GuitarAmplifier.BRIT_UBL_LEAD_CLIP": 1122, - "GuitarAmplifier.US_TWEED_BASSLAD_BRIGHT_PATCH": 1123, - "GuitarAmplifier.US_TWEED_BASSLAD_BRIGHT": 1124, - "GuitarAmplifier.US_TWEED_BASSLAD_NORMAL_PATCH": 1125, - "GuitarAmplifier.US_TWEED_BASSLAD_NORMAL": 1126, - "GuitarAmplifier.UK_C15_NORMAL": 1127, - "GuitarAmplifier.UK_C15_TOPBOOST": 1128, - "GuitarAmplifier.US_HP_TWEED_TWN_NORMAL": 1132, - "GuitarAmplifier.US_HP_TWEED_TWN_NORMAL_PATCH": 1133, - "GuitarAmplifier.US_HP_TWEED_TWN_BRIGHT": 1134, - "GuitarAmplifier.US_HP_TWEED_TWN_BRIGHT_PATCH": 1135, - "GuitarAmplifier.D_CELL_HISBERT_CH1": 1136, - "GuitarAmplifier.D_CELL_HISBERT_CH2": 1137, - "GuitarAmplifier.D_CELL_HISBERT_CH3": 1138, - "GuitarAmplifier.CA_JOHN_S_2C_CH1": 1139, - "GuitarAmplifier.CA_JOHN_S_2C_CH2": 1140, - "GuitarAmplifier.CA_JOHN_S_2C_CH3": 1141, - "GuitarAmplifier.D_CELL_H4_CH1_BRIGHT": 1142, - "GuitarAmplifier.D_CELL_H4_CH1_NORMAL": 1143, - "GuitarAmplifier.D_CELL_H4_CH2_BRIGHT": 1144, - "GuitarAmplifier.D_CELL_H4_CH2_NORMAL": 1145, - "GuitarAmplifier.D_CELL_H4_CH3": 1146, - "GuitarAmplifier.D_CELL_H4_CH4": 1147, - "GuitarAmplifier.EV101IIIS_RED_EL34_100W": 1148, - "GuitarAmplifier.EV101IIIS_BLUE_EL34_100W": 1149, - "GuitarAmplifier.SOLO_100_LEAD": 1150, - "GuitarAmplifier.SOLO_100_CRUNCH_BRIGHT": 1151, - "GuitarAmplifier.SOLO_100_CRUNCH_NORMAL": 1152, - "GuitarAmplifier.MATCHMORE_JEFE": 1154, - "GuitarAmplifier.MATCHMORE_D30_CH1": 1155, - "GuitarAmplifier.MATCHMORE_D30_CH2": 1156, - "GuitarAmplifier.VICTOR_SQUID_CH1": 1157, - "GuitarAmplifier.VICTOR_SQUID_CH2": 1158, - "GuitarAmplifier.US_DLX_64_VINTAGE": 1166, - "GuitarAmplifier.US_DLX_65_REISSUE": 1167, - "GuitarAmplifier.DUMBBELL_ODS": 1176, - "GuitarAmplifier.EV101IIIS_RED_EL34_100W_LEGACY": 1017, - "GuitarAmplifier.SOLO_100_LEAD_LEGACY": 1045, - "GuitarAmplifier.US_DLX_NORMAL_LEGACY": 1094, - "GuitarAmplifier.US_DLX_VIBRATO_LEGACY": 1095, - "GuitarAmplifier.EV101IIIS_BLUE_EL34_100W_LEGACY": 1098, - "GuitarAmplifier.SOLO_100_CRUNCH_BRIGHT_LEGACY": 1099, - "GuitarAmplifier.SOLO_100_CRUNCH_NORMAL_LEGACY": 1100, - "GuitarAmplifier.D_CELL_H4_CH1_BRIGHT_LEGACY": 1109, - "GuitarAmplifier.D_CELL_H4_CH1_NORMAL_LEGACY": 1110, - "GuitarAmplifier.D_CELL_H4_CH2_BRIGHT_LEGACY": 1111, - "GuitarAmplifier.D_CELL_H4_CH2_NORMAL_LEGACY": 1112, - "GuitarAmplifier.D_CELL_H4_CH3_LEGACY": 1113, - "GuitarAmplifier.D_CELL_H4_CH4_LEGACY": 1114, - "GuitarOverdrive.MYTH_DRIVE": 1, - "GuitarOverdrive.OBSESSIVE_DRIVE": 2, - "GuitarOverdrive.OD250": 3, - "GuitarOverdrive.RODENT_DRIVE": 4, - "GuitarOverdrive.EXOTIC": 6, - "GuitarOverdrive.FREEMAN_BOD": 8, - "GuitarOverdrive.BRIT_BLUES": 9, - "GuitarOverdrive.CHIEF_DS1": 10, - "GuitarOverdrive.BRIT_GOVERNOR": 11, - "GuitarOverdrive.CHIEF_MT": 12, - "GuitarOverdrive.CHIEF_OD1": 13, - "GuitarOverdrive.CHIEF_SD1": 14, - "GuitarOverdrive.FUZZ_PI": 15, - "GuitarOverdrive.CHIEF_BD2": 18, - "GuitarOverdrive.RAGE_BOOSTER": 21, - "GuitarOverdrive.FACIAL_FUZZ": 22, - "GuitarOverdrive.EXOTIC_Z_BOOST": 23, - "GuitarOverdrive.RED_DRIVE": 24, - "GuitarOverdrive.VEMURAL_RAY": 25, - "GuitarOverdrive.NO_BELL_OD1": 26, - "GuitarOverdrive.GREEN_808": 27, - "GuitarOverdrive.THUNDERPAW": 28, - "GuitarOverdrive.MK3_SILICON_FUZZ": 29, - "GuitarOverdrive.N81_CREATIONS_DRIVE": 42, - "GuitarOverdrive.GREEN_808_LEGACY": 5, - "IRLoaders.SINGLE_M": 29001, - "IRLoaders.SINGLE_ST": 29002, - "IRLoaders.DUAL_M": 29003, - "IRLoaders.DUAL_ST": 29004, - "IRLoaders.SINGLE_M_LITE": 29005, - "IRLoaders.SINGLE_ST_LITE": 29006, - "IRLoaders.DUAL_M_LITE": 29007, - "IRLoaders.DUAL_ST_LITE": 29008, - "Loopers.LOOPER_X": 27000, - "Modulation.VINTAGE_CHORUS": 7000, - "Modulation.DUAL_CHORUS": 7001, - "Modulation.VIBRATO": 7002, - "Modulation.FLANGERISH": 7003, - "Modulation.TREMOLO": 7004, - "Modulation.ROTARY": 7008, - "Modulation.DIGITAL_FLANGER": 7009, - "Modulation.FLANGER_ENGINE": 7014, - "Modulation.CHORUS_ENGINE": 7015, - "Modulation.MX_FLANGER": 7021, - "Modulation.DREAM_CHORUS_ST": 7022, - "Modulation.CHORUS_229T": 7023, - "Modulation.CHIEF_CE2W_ST": 7024, - "Modulation.CHIEF_CE2W_M": 7025, - "Modulation.DREAM_CHORUS_M": 7026, - "Modulation.CHIEF_DC2W_ST": 7027, - "Modulation.MX_PHASE_95": 7028, - "Modulation.MX_VIBE": 7029, - "Modulation.CHIEF_DC2W_M": 7030, - "Modulation.PHASER": 7031, - "Modulation.HARMONIC_TREMOLO": 7036, - "Modulation.MICRO_PROCESSOR_ST": 7039, - "Modulation.PATTERN_TREMOLO": 7040, - "Modulation.PHASER_LEGACY": 7006, - "Modulation.NUVIBES_LEGACY": 7007, - "Morph.FREEZE": 26001, - "Morph.PHASE_LOCKED_LOOP": 26002, - "Morph.BIT_CRUSHER_ST": 26003, - "Morph.BIT_CRUSHER_ENGINE_M": 26004, - "Pitch.PITCH_SHIFTER": 18001, - "Pitch.POLY_OCTAVER": 18004, - "Pitch.WHAM": 18006, - "Pitch.MINIVOICER": 18007, - "Pitch.TRANSPOSE": 18010, - "Pitch.PITCH_CORRECTION": 18013, - "Pitch.CHIEF_OC2": 18014, - "Pitch.SUBHARMONIC_SYNTH": 18015, - "Pitch.AGGI_SUB_OCTAVER": 18016, - "Reverb.ROOM": 8000, - "Reverb.SPRING_ST": 8001, - "Reverb.HALL": 8003, - "Reverb.SPRING_M": 8006, - "Reverb.MODULATED": 8007, - "Reverb.AMBIENCE": 8008, - "Reverb.CAVE": 8009, - "Reverb.SHIMMER": 8010, - "Reverb.MIND_HALL": 8011, - "Reverb.PLATE_LUSH": 8012, - "Reverb.PLATE": 8013, - "Reverb.PLATE_TIGHT": 8014, - "Reverb.SPRING_REVERB_ENGINE_M": 8026, - "Reverb.SPRING_REVERB_ENGINE_ST": 8027, - "Reverb.NORDIC_CONCERT_HALL_ST": 8028, - "Reverb.STUDIO_PLATE_70_ST": 8029, - "Reverb.BLOSSOM_ST": 8030, - "Synth.MONO_SYNTH": 30001, - "Utility.ADAPTIVE_GATE": 16001, - "Utility.UTILITY_GATE": 16002, - "Utility.SIMPLE_GATE": 16003, - "Utility.GAIN": 16005, - "Utility.VOLUME": 16006, - "Utility.ADAPTIVE_GATE_S_C": 16007, - "Utility.PLUGIN_BLEND": 16008, - "Utility.PLUGIN_GATE": 16009, - "Utility.DOUBLER": 16011, - "Utility.PLUGIN_DOUBLER": 16012, - "Utility.TRANSPARENT_BLEND": 16013, - "Utility.PHASE_DOCTOR": 16016, - "Wah.BUBBA_WAH": 9010, - "Wah.BASS_WAH": 9012, - "Wah.CRYING_WAH": 9013, - "Wah.CRYING_CLYDE_WAH": 9014, - "Wah.BAD_HORSE": 9018, - "Wah.CRYING_WAH_FROM_HELL": 9019, - "Wah.AUTO_WAH": 9021, - "Wah.BAD_HORSE_LEGACY": 9017, -} +"""The maintainer's baseline: the CorOS 4.0.1 snapshot (ADR-0020). Import a +profile's own snapshot from ``pyquadcortex.protocol.catalogs`` when the +connection decides.""" +from pyquadcortex.protocol.catalogs.coros_4_0_1.models import * # noqa: F401,F403 +from pyquadcortex.protocol.catalogs.coros_4_0_1.models import ALL # noqa: F401 diff --git a/pyquadcortex/protocol/options.py b/pyquadcortex/protocol/options.py index 18943ee..6c0aab4 100644 --- a/pyquadcortex/protocol/options.py +++ b/pyquadcortex/protocol/options.py @@ -1,1715 +1,5 @@ -"""The choices a list-valued parameter offers, as enums. - -GENERATED by ``scripts/generate_options.py``. Do not edit by hand. - -A list parameter stores ``index / (count - 1)`` on the wire, so picking -an option means knowing its position. These name the positions:: - - qc.set_param_option(block, 'DYN MODE', options.DynMode.GATE) - -110 enums cover 267 parameters, because the same list means -the same thing wherever it appears - the note-length list is shared by -``SYNC NOTE``, ``SYNC NOTE L``, ``SYNC NOTE R`` and two more. - -**A two-option Off/On parameter gets no enum.** 247 parameters offer -exactly those, and ``True`` says everything ``OffOn.ON`` would:: - - qc.set_param(block, 'SYNC', True) - -**A dynamic list gets no enum either.** Twelve parameters build their -list from the preset - it includes one entry per upstream block - so -read those with :func:`~pyquadcortex.protocol.client.param_options`. - -The member names are ours; the wire's strings are the device's, and -``OPTION_LABELS`` keeps them verbatim. Where the two differ the label is -in a comment beside the member. -""" -from enum import IntEnum - - -class Adjust(IntEnum): - """2 parameters use this list: ร˜ ADJUST, ร˜ ADJUST R - - On Phase Doctor. - """ - - BYPASS = 0 - N90 = 1 # '90ยฐ' - N180 = 2 # '180ยฐ' - - -class AnalogDelayMSyncNote(IntEnum): - """2 parameters use this list: SYNC NOTE - - On Analog Delay (M), Analog Delay (ST). - """ - - N1_16 = 0 # '1/16' - N1_8T = 1 # '1/8T' - N1_16D = 2 # '1/16D' - N1_8 = 3 # '1/8' - N1_4T = 4 # '1/4T' - N1_8D = 5 # '1/8D' - N1_4 = 6 # '1/4' - N1_2T = 7 # '1/2T' - N1_4D = 8 # '1/4D' - N1_2 = 9 # '1/2' - N1_1T = 10 # '1/1T' - N1_2D = 11 # '1/2D' - N1_1 = 12 # '1/1' - - -class ArpPattern(IntEnum): - """1 parameter use this list: ARP PATTERN - - On Mono Synth. - """ - - UP = 0 - DOWN = 1 - UP_AND_DOWN = 2 # 'Up & Down' - DOWN_AND_UP = 3 # 'Down & Up' - RANDOM = 4 - - -class BitDepth(IntEnum): - """2 parameters use this list: BIT DEPTH - - On Bit-Crusher (ST), Bit-Crusher Engine (M). - """ - - N1 = 0 # '1' - N2 = 1 # '2' - N3 = 2 # '3' - N4 = 3 # '4' - N5 = 4 # '5' - N6 = 5 # '6' - N7 = 6 # '7' - N8 = 7 # '8' - N9 = 8 # '9' - N10 = 9 # '10' - N11 = 10 # '11' - N12 = 11 # '12' - N13 = 12 # '13' - N14 = 13 # '14' - N15 = 14 # '15' - N16 = 15 # '16' - - -class Boost(IntEnum): - """2 parameters use this list: BOOST - - On UK C15 TopBoost, UK C30 TopBoost. - """ - - HOT = 0 - COOL = 1 - - -class Bright(IntEnum): - """1 parameter use this list: BRIGHT - - On Freeman 100 Clean. - """ - - NORMAL = 0 - BRIGHT_1 = 1 # 'Bright 1' - BRIGHT_2 = 2 # 'Bright 2' - - -class Center(IntEnum): - """2 parameters use this list: ร˜ CENTER, ร˜ CENTER R - - On Phase Doctor. - """ - - LO_FREQ = 0 # 'Lo Freq' - HI_FREQ = 1 # 'Hi Freq' - - -class ChannelNormal(IntEnum): - """1 parameter use this list: CHANNEL - - On Soldano SLO-100ยฎ. - """ - - NORMAL = 0 - OD = 1 - - -class ChiefCe2wMType(IntEnum): - """2 parameters use this list: TYPE - - On Chief CE2W (M), Chief CE2W (ST). - """ - - CE2_C = 0 # 'CE2-C' - CE1_C = 1 # 'CE1-C' - CE1_V = 2 # 'CE1-V' - - -class ChiefDc2wMMode(IntEnum): - """2 parameters use this list: MODE - - On Chief DC2W (M), Chief DC2W (ST). - """ - - N1 = 0 # '1' - N2 = 1 # '2' - N3 = 2 # '3' - N4 = 3 # '4' - N1_2 = 4 # '1+2' - N1_3 = 5 # '1+3' - N1_4 = 6 # '1+4' - N2_3 = 7 # '2+3' - N2_4 = 8 # '2+4' - N3_4 = 9 # '3+4' - - -class ChiefDc2wMType(IntEnum): - """2 parameters use this list: TYPE - - On Chief DC2W (M), Chief DC2W (ST). - """ - - S = 0 - SDD_320 = 1 # 'SDD-320' - - -class Color(IntEnum): - """1 parameter use this list: COLOR - - On Flanger Engine. - """ - - NATURAL = 0 - WARM = 1 - DARK = 2 - BRIGHT = 3 - SPARKLE = 4 - DUSTY = 5 - SPIKY = 6 - TWANGY = 7 - - -class CoryWongDIFunkConsoleAttack(IntEnum): - """1 parameter use this list: ATTACK - - On Cory Wong D.I. Funk Console. - """ - - FAST = 0 - SLOW = 1 - - -class CoryWongDelayYYMode(IntEnum): - """1 parameter use this list: MODE - - On Cory Wong Delay-y-y. - """ - - SINGLE = 0 - DUAL = 1 - - -class Crunch(IntEnum): - """1 parameter use this list: CRUNCH - - On Soldano SLO-100ยฎ. - """ - - CLEAN = 0 - CRUNCH = 1 - - -class Curve(IntEnum): - """1 parameter use this list: CURVE - - On Volume. - """ - - LINEAR = 0 - LOG = 1 - - -class DCellHisbertCh2Mode(IntEnum): - """1 parameter use this list: MODE - - On D-Cell Hisbert Ch2. - """ - - MINUS = 0 # '-' - PLUS = 1 # '+' - - -class Decay(IntEnum): - """1 parameter use this list: DECAY - - On Foog. - """ - - FAST = 0 - SMOOTH = 1 - - -class DigitalFlangerPolarity(IntEnum): - """1 parameter use this list: POLARITY - - On Digital Flanger. - """ - - NEG = 0 - POS = 1 - - -class DivSource(IntEnum): - """1 parameter use this list: DIV. SOURCE - - On Phase-Locked Loop. - """ - - UNISON = 0 - MULTIPLIER = 1 - - -class Divider(IntEnum): - """1 parameter use this list: DIVIDER - - On Phase-Locked Loop. - """ - - N2 = 0 # '2' - N3 = 1 # '3' - N4 = 2 # '4' - N5 = 3 # '5' - N6 = 4 # '6' - N7 = 5 # '7' - N8 = 6 # '8' - - -class DreamChorusMMode(IntEnum): - """2 parameters use this list: MODE - - On Dream Chorus (M), Dream Chorus (ST). - """ - - CHO1 = 0 - CHO2 = 1 - - -class DriveType(IntEnum): - """2 parameters use this list: DRIVE TYPE - - On Chorus Engine, Flanger Engine. - """ - - SOFT = 0 - EDGY = 1 - HARD = 2 - OFF = 3 - - -class DualChorusMode(IntEnum): - """1 parameter use this list: MODE - - On Dual Chorus. - """ - - CHORUS = 0 - VIBE = 1 - - -class DumbbellOdsChannel(IntEnum): - """1 parameter use this list: CHANNEL - - On Dumbbell ODS. - """ - - CLEAN = 0 - OD = 1 - - -class DumbbellOdsEq(IntEnum): - """1 parameter use this list: EQ - - On Dumbbell ODS. - """ - - JAZZ = 0 - ROCK = 1 - - -class DuplicateMode(IntEnum): - """1 parameter use this list: DUPLICATE MODE - - On Looper X. - """ - - FREE = 0 - SYNC = 1 - - -class DynMode2(IntEnum): - """9 parameters use this list: DYN MODE - - On 9 models, among them Gojira DLY, Nameless Delay, Nolly Delay-1 (M). - """ - - DUCK = 0 - GATE = 1 - - -class DynMode3(IntEnum): - """11 parameters use this list: DYN MODE - - On 11 models, among them Analog Delay (M), Analog Delay (ST), Digital Delay (M). - """ - - OFF = 0 - DUCK = 1 - GATE = 2 - - -class Eq3(IntEnum): - """8 parameters use this list: EQ - - On 8 models, among them CA 1Star Clean 100W Normal, CA 1Star Clean 100W Tweed, CA 1Star Clean 50W Normal. - """ - - NORMAL = 0 - THICK = 1 - THICKER = 2 - - -class FeedbackMode(IntEnum): - """2 parameters use this list: FEEDBACK MODE - - On Dual Reverse Delay, Reverse Delay (M). - """ - - REVERSE = 0 - FLIP = 1 - - -class Filter(IntEnum): - """1 parameter use this list: FILTER - - On Foog. - """ - - N4_POLE = 0 # '4-POLE' - N2_POLE = 1 # '2-POLE' - - -class FilterCutoff(IntEnum): - """1 parameter use this list: FILTER CUTOFF - - On Love Meat. - """ - - LOW = 0 - A = 1 - B = 2 - HIGH = 3 - - -class FilterType(IntEnum): - """1 parameter use this list: FILTER TYPE - - On Love Meat. - """ - - LOWPASS = 0 - BANDPASS = 1 - HIGHPASS = 2 - - -class FlangerEngineWaveform(IntEnum): - """1 parameter use this list: WAVEFORM - - On Flanger Engine. - """ - - SINE = 0 - TRIANGLE = 1 - SQUARE = 2 - SAW_UP = 3 # 'Saw Up' - SAW_DN = 4 # 'Saw Dn' - RNDSMOOTH = 5 - RNDSTEP = 6 - - -class Focus(IntEnum): - """2 parameters use this list: FOCUS - - On Victor Squid Ch1, Victor Squid Ch2. - """ - - ON = 0 - OFF = 1 - - -class Frequency(IntEnum): - """2 parameters use this list: FREQUENCY, UNI. AMOUNT - - On Amped Super Valve, Mono Synth. - """ - - N1 = 0 # '1' - N2 = 1 # '2' - N3 = 2 # '3' - N4 = 3 # '4' - N5 = 4 # '5' - - -class GainPolarity(IntEnum): - """3 parameters use this list: PHASE INVERT, ร˜ POLARITY, ร˜ POLARITY R - - On Gain, Phase Doctor. - """ - - NORMAL = 0 - INVERTED = 1 - - -class GojiraWowMode(IntEnum): - """1 parameter use this list: MODE - - On Gojira WOW. - """ - - BLADE_2 = 0 # 'Blade 2' - BLADE_1 = 1 # 'Blade 1' - FATSO = 2 - - -class HighsFreq(IntEnum): - """1 parameter use this list: HIGHS FREQ - - On Cory Wong D.I. Funk Console. - """ - - N4_KHZ = 0 # '4 kHz' - N2_5_KHZ = 1 # '2.5 kHz' - - -class HpfSlope(IntEnum): - """2 parameters use this list: HPF SLOPE, LPF SLOPE - - On Low-High Cut. - """ - - FLAT = 0 - MINUS_6 = 1 # '-6' - MINUS_12 = 2 # '-12' - MINUS_18 = 3 # '-18' - MINUS_24 = 4 # '-24' - MINUS_30 = 5 # '-30' - MINUS_36 = 6 # '-36' - MINUS_42 = 7 # '-42' - MINUS_48 = 8 # '-48' - - -class Input(IntEnum): - """2 parameters use this list: INPUT - - On US DLX 64 Vintage, US DLX 65 Reissue. - """ - - LOW = 0 - HIGH = 1 - - -class Instrument(IntEnum): - """1 parameter use this list: INSTRUMENT - - On Phase-Locked Loop. - """ - - GUITAR = 0 - BASS = 1 - - -class Invert(IntEnum): - """16 parameters use this list: INVERT - - On 8 models, among them Dual (M), Dual (M) Lite, Dual (ST). - """ - - NORMAL = 0 # 'Noral' - INVERTED = 1 - - -class Legendary87MRatio(IntEnum): - """3 parameters use this list: RATIO - - On Legendary 87 (M), Legendary 87 (S/C), Legendary 87 (ST). - """ - - N4 = 0 # '4' - N8 = 1 # '8' - N12 = 2 # '12' - N20 = 3 # '20' - ALL = 4 - - -class LowsFreq(IntEnum): - """1 parameter use this list: LOWS FREQ - - On Cory Wong D.I. Funk Console. - """ - - N225_HZ = 0 # '225 Hz' - N150_HZ = 1 # '150 Hz' - - -class Mid(IntEnum): - """3 parameters use this list: BRIGHT, MID, PREAMP - - On Dumbbell ODS. - """ - - OFF = 0 - BOOST = 1 - - -class MidsFreq(IntEnum): - """1 parameter use this list: MIDS FREQ - - On Cory Wong D.I. Funk Console. - """ - - N900_HZ = 0 # '900 Hz' - N600_HZ = 1 # '600 Hz' - - -class MinivoicerMidiCh(IntEnum): - """1 parameter use this list: MIDI CH - - On Minivoicer. - """ - - N1 = 0 # '1' - N2 = 1 # '2' - N3 = 2 # '3' - N4 = 3 # '4' - N5 = 4 # '5' - N6 = 5 # '6' - N7 = 6 # '7' - N8 = 7 # '8' - N9 = 8 # '9' - N10 = 9 # '10' - N11 = 10 # '11' - N12 = 11 # '12' - N13 = 12 # '13' - N14 = 13 # '14' - N15 = 14 # '15' - N16 = 15 # '16' - OMNI = 16 - - -class MinivoicerMode(IntEnum): - """2 parameters use this list: MODE - - On Minivoicer, Pitch Correction. - """ - - MAJOR = 0 - MINOR = 1 - CHROM = 2 - - -class MinivoicerRoot(IntEnum): - """2 parameters use this list: ROOT - - On Minivoicer, Pitch Correction. - """ - - A = 0 - A_1 = 1 # 'A#' - B = 2 - C = 3 - C_4 = 4 # 'C#' - D = 5 - D_6 = 6 # 'D#' - E = 7 - F = 8 - F_9 = 9 # 'F#' - G = 10 - G_11 = 11 # 'G#' - - -class MixLaw(IntEnum): - """6 parameters use this list: MIX LAW - - On 6 models, among them Cory Wong The Wash, Default Reverb, Gojira REV. - """ - - NOLLY = 0 - NOLLYSKEWED = 1 - NOLLYSKEWEDPLUG = 2 - - -class ModSource(IntEnum): - """1 parameter use this list: MOD SOURCE - - On Micro Processor (ST). - """ - - LFO = 0 - LFO_STEREO = 1 # 'LFO Stereo' - PLUS_ENVELOPE = 2 # '+Envelope' - MINUS_ENVELOPE = 3 # '-Envelope' - - -class MonoSynthMidiCh(IntEnum): - """1 parameter use this list: MIDI CH. - - On Mono Synth. - """ - - OFF = 0 - N1 = 1 # '1' - N2 = 2 # '2' - N3 = 3 # '3' - N4 = 4 # '4' - N5 = 5 # '5' - N6 = 6 # '6' - N7 = 7 # '7' - N8 = 8 # '8' - N9 = 9 # '9' - N10 = 10 # '10' - N11 = 11 # '11' - N12 = 12 # '12' - N13 = 13 # '13' - N14 = 14 # '14' - N15 = 15 # '15' - N16 = 16 # '16' - OMNI = 17 - - -class MonoSynthRoot(IntEnum): - """1 parameter use this list: ROOT - - On Mono Synth. - """ - - OFF = 0 - A = 1 - A_2 = 2 # 'A#' - B = 3 - C = 4 - C_5 = 5 # 'C#' - D = 6 - D_7 = 7 # 'D#' - E = 8 - F = 9 - F_10 = 10 # 'F#' - G = 11 - G_12 = 12 # 'G#' - - -class MulSource(IntEnum): - """1 parameter use this list: MUL. SOURCE - - On Phase-Locked Loop. - """ - - UNISON = 0 - MINUS_1_OCTAVE = 1 # '-1 Octave' - MINUS_2_OCTAVES = 2 # '-2 Octaves' - - -class Multiplier(IntEnum): - """1 parameter use this list: MULTIPLIER - - On Phase-Locked Loop. - """ - - X1 = 0 - X2 = 1 - X3 = 2 - X4 = 3 - X5 = 4 - X6 = 5 - X7 = 6 - X8 = 7 - - -class MxPhase95Mode(IntEnum): - """1 parameter use this list: MODE - - On MX Phase 95. - """ - - BLOCK = 0 - SCRIPT = 1 - - -class MxPhase95Type(IntEnum): - """1 parameter use this list: TYPE - - On MX Phase 95. - """ - - N90 = 0 # '90' - N45 = 1 # '45' - - -class NollyCompressorAttack(IntEnum): - """1 parameter use this list: ATTACK - - On Nolly Compressor. - """ - - SMOOTH = 0 - SNAPPY = 1 - - -class Notelength(IntEnum): - """1 parameter use this list: NOTELENGTH - - On TempoControl. - """ - - QUARTER = 0 - EIGHTH = 1 - TRIPLET = 2 - SIXTEENTH = 3 - - -class Octave(IntEnum): - """1 parameter use this list: OCTAVE - - On Mono Synth. - """ - - MINUS_2 = 0 # '-2' - MINUS_1 = 1 # '-1' - N0 = 2 # '0' - N1 = 3 # '1' - N2 = 4 # '2' - - -class OnOff(IntEnum): - """1 parameter use this list: ON / OFF - - On Freeze. - """ - - RELEASE = 0 - FREEZE = 1 - - -class Osc1Wave(IntEnum): - """2 parameters use this list: OSC1 WAVE, OSC2 WAVE - - On Mono Synth. - """ - - SINE = 0 - TRIANG = 1 - SAWTOOTH = 2 - SQUARE = 3 - PULSE = 4 - PINK_NS = 5 # 'Pink NS' - WHITE_NS = 6 # 'White NS' - - -class OutMode(IntEnum): - """1 parameter use this list: OUT MODE - - On Chief CE2W (M). - """ - - MONO = 0 - WET_DRY = 1 # 'Wet/Dry' - - -class Peak(IntEnum): - """1 parameter use this list: PEAK - - On Obsessive Drive. - """ - - LP = 0 - HP = 1 - - -class Pickup(IntEnum): - """1 parameter use this list: PICKUP - - On Facial Fuzz. - """ - - HB = 0 - SINGLE = 1 - - -class PliniChorusMode(IntEnum): - """1 parameter use this list: MODE - - On Plini Chorus. - """ - - SPATIAL = 0 - VINTAGE = 1 - - -class PliniDriveMode(IntEnum): - """1 parameter use this list: MODE - - On Plini Drive. - """ - - FZ = 0 - OD = 1 - - -class PreRoll(IntEnum): - """1 parameter use this list: PRE ROLL - - On Looper X. - """ - - OFF = 0 - N1_BAR = 1 # '1 BAR' - N2_BARS = 2 # '2 BARS' - N4_BARS = 3 # '4 BARS' - - -class PunchMode(IntEnum): - """3 parameters use this list: OVERDUB MODE, PUNCH MODE, RECORD MODE - - On Looper X. - """ - - MOMENTARY = 0 - TOGGLE = 1 - - -class Quality(IntEnum): - """4 parameters use this list: QUALITY - - On 4 models, among them Analog Delay (M), Analog Delay (ST), Slapback Delay (M). - """ - - N0 = 0 # '0' - N1 = 1 # '1' - N2 = 2 # '2' - N3 = 3 # '3' - - -class Quantize(IntEnum): - """1 parameter use this list: QUANTIZE - - On Looper X. - """ - - OFF = 0 - N1_BEAT = 1 # '1 Beat' - N2_BEATS = 2 # '2 Beats' - N3_BEATS = 3 # '3 Beats' - N4_BEATS = 4 # '4 Beats' - N5_BEATS = 5 # '5 Beats' - N6_BEATS = 6 # '6 Beats' - N7_BEATS = 7 # '7 Beats' - N8_BEATS = 8 # '8 Beats' - N16_BEATS = 9 # '16 Beats' - - -class Ratio3(IntEnum): - """6 parameters use this list: RATIO - - On 6 models, among them Nolly Compressor, Plini Comp, SLO-100ยฎ Compressor. - """ - - N2 = 0 # '2' - N4 = 1 # '4' - N10 = 2 # '10' - - -class RecLength(IntEnum): - """1 parameter use this list: REC. LENGTH - - On Looper X. - """ - - OFF = 0 - N1_BAR = 1 # '1 BAR' - N2_BARS = 2 # '2 BARS' - N3_BARS = 3 # '3 BARS' - N4_BARS = 4 # '4 BARS' - N5_BARS = 5 # '5 BARS' - N6_BARS = 6 # '6 BARS' - N7_BARS = 7 # '7 BARS' - N8_BARS = 8 # '8 BARS' - N9_BARS = 9 # '9 BARS' - N10_BARS = 10 # '10 BARS' - N11_BARS = 11 # '11 BARS' - N12_BARS = 12 # '12 BARS' - N13_BARS = 13 # '13 BARS' - N14_BARS = 14 # '14 BARS' - N15_BARS = 15 # '15 BARS' - N16_BARS = 16 # '16 BARS' - N17_BARS = 17 # '17 BARS' - N18_BARS = 18 # '18 BARS' - N19_BARS = 19 # '19 BARS' - N20_BARS = 20 # '20 BARS' - N21_BARS = 21 # '21 BARS' - N22_BARS = 22 # '22 BARS' - N23_BARS = 23 # '23 BARS' - N24_BARS = 24 # '24 BARS' - N25_BARS = 25 # '25 BARS' - N26_BARS = 26 # '26 BARS' - N27_BARS = 27 # '27 BARS' - N28_BARS = 28 # '28 BARS' - N29_BARS = 29 # '29 BARS' - N30_BARS = 30 # '30 BARS' - N31_BARS = 31 # '31 BARS' - N32_BARS = 32 # '32 BARS' - - -class RedDriveMode(IntEnum): - """2 parameters use this list: INPUT, MODE - - On Fortinยฎ Nameless, Red Drive. - """ - - LOW = 0 - HIGH = 1 - - -class Resonance(IntEnum): - """1 parameter use this list: RESONANCE - - On Flanger Engine. - """ - - FULL = 0 - HOLLOW = 1 - RICH = 2 - INTENSE = 3 - - -class Routing(IntEnum): - """1 parameter use this list: ROUTING - - On TempoControl. - """ - - MULTI = 0 - HP = 1 - OUT_1_2 = 2 # 'OUT 1/2' - OUT_3_4 = 3 # 'OUT 3/4' - SEND_1_2 = 4 # 'SEND 1/2' - - -class RoutingMode(IntEnum): - """1 parameter use this list: ROUTING MODE - - On Looper X. - """ - - GRID = 0 - IN_1 = 1 # 'In 1' - IN_2 = 2 # 'In 2' - RET_1 = 3 # 'Ret 1' - RET_2 = 4 # 'Ret 2' - IN_1_2 = 5 # 'In 1/2' - RET_1_2 = 6 # 'Ret 1/2' - OUT1 = 7 - OUT2 = 8 - OUT3 = 9 - OUT4 = 10 - OUT1_2 = 11 # 'Out1/2' - OUT3_4 = 12 # 'Out3/4' - MULTI = 13 - - -class Scale(IntEnum): - """1 parameter use this list: SCALE - - On Mono Synth. - """ - - MAJOR = 0 - MINOR = 1 - - -class Size(IntEnum): - """12 parameters use this list: SIZE - - On 12 models, among them Ambience, Dual (M), Dual (M) Lite. - """ - - SMALL = 0 - MED = 1 - LARGE = 2 - - -class SlapbackDelayMSyncNote(IntEnum): - """2 parameters use this list: SYNC NOTE - - On Slapback Delay (M), Slapback Delay (ST). - """ - - N1_64T = 0 # '1/64T' - N1_64 = 1 # '1/64' - N1_32T = 2 # '1/32T' - N1_64D = 3 # '1/64D' - N1_32 = 4 # '1/32' - N1_16T = 5 # '1/16T' - N1_32D = 6 # '1/32D' - N1_16 = 7 # '1/16' - N1_8T = 8 # '1/8T' - N1_16D = 9 # '1/16D' - N1_8 = 10 # '1/8' - - -class Slope(IntEnum): - """1 parameter use this list: SLOPE - - On Mono Synth. - """ - - N6DB_OCT = 0 # '6dB/Oct' - N12DB_OCT = 1 # '12dB/Oct' - N18DB_OCT = 2 # '18dB/Oct' - N24DB_OCT = 3 # '24dB/Oct' - - -class SoldanoSlo100Channel(IntEnum): - """1 parameter use this list: CHANNEL - - On Soldano SLO-100ยฎ. - """ - - CLEAN = 0 - CRUNCH = 1 - LEAD = 2 - - -class Sound(IntEnum): - """1 parameter use this list: SOUND - - On TempoControl. - """ - - BLIP = 0 - BLOCK = 1 - COWBELL = 2 - DIGITAL = 3 - DRUM_KIT = 4 # 'DRUM KIT' - SOFT_KIT = 5 # 'SOFT KIT' - - -class Speed(IntEnum): - """2 parameters use this list: ATTACK, SPEED - - On Rotary, SLO-100ยฎ Compressor. - """ - - SLOW = 0 - FAST = 1 - - -class SplitterMode(IntEnum): - """2 parameters use this list: MODE - - On Splitter, Splitter Crossover. - """ - - REGULAR = 0 - INVERT = 1 - - -class SplitterType(IntEnum): - """1 parameter use this list: TYPE - - On Splitter. - """ - - BALANCE = 0 - A_B = 1 # 'A/B' - CROSSOVER = 2 - - -class Start(IntEnum): - """2 parameters use this list: METRONOME MUTE, START - - On Looper X, TempoControl. - """ - - MUTE = 0 - UNMUTE = 1 - - -class Stereo(IntEnum): - """4 parameters use this list: STEREO - - On 4 models, among them Splitter, Splitter AB, Splitter Balance. - """ - - NORMAL = 0 - SPLIT = 1 - - -class StereoLink(IntEnum): - """1 parameter use this list: STEREO LINK - - On Phase Doctor. - """ - - UNLINKED = 0 - LINKED = 1 - - -class SyncNote11(IntEnum): - """5 parameters use this list: CHR NOTE, SYNC NOTE - - On 5 models, among them Chief DC2W PCOM, Chorus 229T, Cory Wong The 80s. - """ - - N1_8 = 0 # '1/8' - N1_4T = 1 # '1/4T' - N1_8D = 2 # '1/8D' - N1_4 = 3 # '1/4' - N1_2T = 4 # '1/2T' - N1_4D = 5 # '1/4D' - N1_2 = 6 # '1/2' - N1_1T = 7 # '1/1T' - N1_2D = 8 # '1/2D' - N1_1 = 9 # '1/1' - N1_1D = 10 # '1/1D' - - -class SyncNote14(IntEnum): - """9 parameters use this list: SYNC NOTE - - On 9 models, among them Chief CE2W (M), Chief CE2W (ST), Dream Chorus (M). - """ - - N1_16 = 0 # '1/16' - N1_8T = 1 # '1/8T' - N1_16D = 2 # '1/16D' - N1_8 = 3 # '1/8' - N1_4T = 4 # '1/4T' - N1_8D = 5 # '1/8D' - N1_4 = 6 # '1/4' - N1_2T = 7 # '1/2T' - N1_4D = 8 # '1/4D' - N1_2 = 9 # '1/2' - N1_1T = 10 # '1/1T' - N1_2D = 11 # '1/2D' - N1_1 = 12 # '1/1' - N1_1D = 13 # '1/1D' - - -class SyncNote17(IntEnum): - """14 parameters use this list: FAST NOTE, SLOW NOTE, SYNC NOTE - - On 12 models, among them Chorus Engine, Digital Flanger, Flanger Engine. - """ - - N1_32 = 0 # '1/32' - N1_16T = 1 # '1/16T' - N1_32D = 2 # '1/32D' - N1_16 = 3 # '1/16' - N1_8T = 4 # '1/8T' - N1_16D = 5 # '1/16D' - N1_8 = 6 # '1/8' - N1_4T = 7 # '1/4T' - N1_8D = 8 # '1/8D' - N1_4 = 9 # '1/4' - N1_2T = 10 # '1/2T' - N1_4D = 11 # '1/4D' - N1_2 = 12 # '1/2' - N1_1T = 13 # '1/1T' - N1_2D = 14 # '1/2D' - N1_1 = 15 # '1/1' - N1_1D = 16 # '1/1D' - - -class SyncNote21(IntEnum): - """28 parameters use this list: SYNC NOTE, SYNC NOTE A, SYNC NOTE B, SYNC NOTE L, SYNC NOTE R - - On 24 models, among them Circular Delay, Cory Wong Delay-y-y, Digital Delay (M). - """ - - N1_64T = 0 # '1/64T' - N1_64 = 1 # '1/64' - N1_32T = 2 # '1/32T' - N1_64D = 3 # '1/64D' - N1_32 = 4 # '1/32' - N1_16T = 5 # '1/16T' - N1_32D = 6 # '1/32D' - N1_16 = 7 # '1/16' - N1_8T = 8 # '1/8T' - N1_16D = 9 # '1/16D' - N1_8 = 10 # '1/8' - N1_4T = 11 # '1/4T' - N1_8D = 12 # '1/8D' - N1_4 = 13 # '1/4' - N1_2T = 14 # '1/2T' - N1_4D = 15 # '1/4D' - N1_2 = 16 # '1/2' - N1_1T = 17 # '1/1T' - N1_2D = 18 # '1/2D' - N1_1 = 19 # '1/1' - N1_1D = 20 # '1/1D' - - -class SyncOn(IntEnum): - """1 parameter use this list: SYNC ON - - On Harmonic Tremolo. - """ - - LOWS = 0 - HIGHS = 1 - - -class TankType(IntEnum): - """2 parameters use this list: TANK TYPE - - On Spring Reverb Engine (M), Spring Reverb Engine (ST). - """ - - VINTAGE = 0 - SHORT = 1 - MID = 2 - LONG = 3 - - -class TapPreset(IntEnum): - """1 parameter use this list: TAP PRESET - - On Circular Delay. - """ - - N1 = 0 # '1' - N2 = 1 # '2' - N3 = 2 # '3' - N4 = 3 # '4' - N4_ALT = 4 # '4 Alt' - N5 = 5 # '5' - N5_ALT = 6 # '5 Alt' - N6 = 7 # '6' - N6_ALT = 8 # '6 Alt' - - -class TempocontrolType(IntEnum): - """1 parameter use this list: TYPE - - On TempoControl. - """ - - PRESET = 0 - GLOBAL_ = 1 # 'Global' - - -class TimeSignature(IntEnum): - """1 parameter use this list: TIME SIGNATURE - - On TempoControl. - """ - - N2_4 = 0 # '2/4' - N3_4 = 1 # '3/4' - N4_4 = 2 # '4/4' - N5_4 = 3 # '5/4' - N6_4 = 4 # '6/4' - N7_4 = 5 # '7/4' - N8_4 = 6 # '8/4' - N9_4 = 7 # '9/4' - N10_4 = 8 # '10/4' - N11_4 = 9 # '11/4' - N12_4 = 10 # '12/4' - N13_4 = 11 # '13/4' - N3_8 = 12 # '3/8' - N6_8 = 13 # '6/8' - N9_8 = 14 # '9/8' - N12_8 = 15 # '12/8' - N5_8_3_2 = 16 # '5/8 (3+2)' - N5_8_2_3 = 17 # '5/8 (2+3)' - N7_8_3_2_2 = 18 # '7/8 (3+2+2)' - N7_8_2_3_2 = 19 # '7/8 (2+3+2)' - N7_8_2_2_3 = 20 # '7/8 (2+2+3)' - - -class TremoloWaveform(IntEnum): - """2 parameters use this list: WAVEFORM - - On Harmonic Tremolo, Tremolo. - """ - - SINE = 0 - TRIANGLE = 1 - SQUARE = 2 - SAW_UP = 3 # 'Saw Up' - SAW_DN = 4 # 'Saw Dn' - - -class TrigDirection(IntEnum): - """1 parameter use this list: TRIG DIRECTION - - On Love Meat. - """ - - DOWN = 0 - UP = 1 - - -class TriggerMode(IntEnum): - """1 parameter use this list: TRIGGER MODE - - On Love Meat. - """ - - OFF = 0 - FULL = 1 - N1_2 = 2 # '1/2' - - -class Tube(IntEnum): - """2 parameters use this list: TUBE - - On Victor Squid Ch1, Victor Squid Ch2. - """ - - N6L6 = 0 # '6L6' - EL34 = 1 - - -class UnisonSource(IntEnum): - """1 parameter use this list: UNISON SOURCE - - On Mono Synth. - """ - - OFF = 0 - OSC_1 = 1 # 'OSC 1' - OSC_2 = 2 # 'OSC 2' - OSC_1_2 = 3 # 'OSC 1 + 2' - - -class UsDlx64VintageMode(IntEnum): - """2 parameters use this list: MODE - - On US DLX 64 Vintage, US DLX 65 Reissue. - """ - - NORMAL = 0 - VIBRATO = 1 - VIBRATO_BRIGHT_OFF = 2 # 'Vibrato Bright Off' - - -class V1Inter(IntEnum): - """2 parameters use this list: V1 INTER, V2 INTER - - On Minivoicer. - """ - - MINUS_15TH = 0 # '-15th' - MINUS_14TH = 1 # '-14th' - MINUS_13TH = 2 # '-13th' - MINUS_12TH = 3 # '-12th' - MINUS_11TH = 4 # '-11th' - MINUS_10TH = 5 # '-10th' - MINUS_9TH = 6 # '-9th' - MINUS_8TH = 7 # '-8th' - MINUS_7TH = 8 # '-7th' - MINUS_6TH = 9 # '-6th' - MINUS_5TH = 10 # '-5th' - MINUS_4TH = 11 # '-4th' - MINUS_3RD = 12 # '-3rd' - MINUS_2ND = 13 # '-2nd' - ROOT = 14 - N2ND = 15 # '2nd' - N3RD = 16 # '3rd' - N4TH = 17 # '4th' - N5TH = 18 # '5th' - N6TH = 19 # '6th' - N7TH = 20 # '7th' - N8TH = 21 # '8th' - N9TH = 22 # '9th' - N10TH = 23 # '10th' - N11TH = 24 # '11th' - N12TH = 25 # '12th' - N13TH = 26 # '13th' - N14TH = 27 # '14th' - N15TH = 28 # '15th' - - -class VibNote(IntEnum): - """2 parameters use this list: VIB NOTE - - On Cory Wong The 80s, Vintage Chorus. - """ - - N1_32 = 0 # '1/32' - N1_16T = 1 # '1/16T' - N1_32D = 2 # '1/32D' - N1_16 = 3 # '1/16' - N1_8T = 4 # '1/8T' - N1_16D = 5 # '1/16D' - N1_8 = 6 # '1/8' - N1_4T = 7 # '1/4T' - N1_8D = 8 # '1/8D' - - -class VintageChorusMode(IntEnum): - """2 parameters use this list: MODE - - On Cory Wong The 80s, Vintage Chorus. - """ - - CHORUS = 0 - VIBRATO = 1 - - -class VoiceMode(IntEnum): - """1 parameter use this list: VOICE MODE - - On Chorus Engine. - """ - - FULL = 0 - THICK = 1 - OPEN = 2 - BROAD = 3 - - -#: Each enum's options as the DEVICE spells them, in wire order. -#: -#: The member names above are ours - mangled to be valid Python, and -#: corrected where the device has a typo. These are the strings the -#: unit actually uses, which is what a dynamic list matches against. -OPTION_LABELS = { - Adjust: ('Bypass', '90ยฐ', '180ยฐ'), - AnalogDelayMSyncNote: ('1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1'), - ArpPattern: ('Up', 'Down', 'Up & Down', 'Down & Up', 'Random'), - BitDepth: ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16'), - Boost: ('HOT', 'COOL'), - Bright: ('Normal', 'Bright 1', 'Bright 2'), - Center: ('Lo Freq', 'Hi Freq'), - ChannelNormal: ('Normal', 'OD'), - ChiefCe2wMType: ('CE2-C', 'CE1-C', 'CE1-V'), - ChiefDc2wMMode: ('1', '2', '3', '4', '1+2', '1+3', '1+4', '2+3', '2+4', '3+4'), - ChiefDc2wMType: ('S', 'SDD-320'), - Color: ('Natural', 'Warm', 'Dark', 'Bright', 'Sparkle', 'Dusty', 'Spiky', 'Twangy'), - CoryWongDIFunkConsoleAttack: ('Fast', 'Slow'), - CoryWongDelayYYMode: ('Single', 'Dual'), - Crunch: ('Clean', 'Crunch'), - Curve: ('Linear', 'Log'), - DCellHisbertCh2Mode: ('-', '+'), - Decay: ('Fast', 'Smooth'), - DigitalFlangerPolarity: ('Neg', 'Pos'), - DivSource: ('Unison', 'Multiplier'), - Divider: ('2', '3', '4', '5', '6', '7', '8'), - DreamChorusMMode: ('CHO1', 'CHO2'), - DriveType: ('Soft', 'Edgy', 'Hard', 'Off'), - DualChorusMode: ('Chorus', 'Vibe'), - DumbbellOdsChannel: ('Clean', 'OD'), - DumbbellOdsEq: ('Jazz', 'Rock'), - DuplicateMode: ('Free', 'Sync'), - DynMode2: ('Duck', 'Gate'), - DynMode3: ('Off', 'Duck', 'Gate'), - Eq3: ('Normal', 'Thick', 'Thicker'), - FeedbackMode: ('Reverse', 'Flip'), - Filter: ('4-POLE', '2-POLE'), - FilterCutoff: ('Low', 'A', 'B', 'High'), - FilterType: ('Lowpass', 'Bandpass', 'Highpass'), - FlangerEngineWaveform: ('Sine', 'Triangle', 'Square', 'Saw Up', 'Saw Dn', 'rndSmooth', 'rndStep'), - Focus: ('ON', 'OFF'), - Frequency: ('1', '2', '3', '4', '5'), - GainPolarity: ('Normal', 'Inverted'), - GojiraWowMode: ('Blade 2', 'Blade 1', 'FATSO'), - HighsFreq: ('4 kHz', '2.5 kHz'), - HpfSlope: ('Flat', '-6', '-12', '-18', '-24', '-30', '-36', '-42', '-48'), - Input: ('Low', 'High'), - Instrument: ('Guitar', 'Bass'), - Invert: ('Noral', 'Inverted'), - Legendary87MRatio: ('4', '8', '12', '20', 'All'), - LowsFreq: ('225 Hz', '150 Hz'), - Mid: ('Off', 'Boost'), - MidsFreq: ('900 Hz', '600 Hz'), - MinivoicerMidiCh: ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', 'Omni'), - MinivoicerMode: ('Major', 'Minor', 'Chrom'), - MinivoicerRoot: ('A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'), - MixLaw: ('nolly', 'nollySkewed', 'nollySkewedPlug'), - ModSource: ('LFO', 'LFO Stereo', '+Envelope', '-Envelope'), - MonoSynthMidiCh: ('Off', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', 'Omni'), - MonoSynthRoot: ('OFF', 'A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'), - MulSource: ('Unison', '-1 Octave', '-2 Octaves'), - Multiplier: ('x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8'), - MxPhase95Mode: ('Block', 'Script'), - MxPhase95Type: ('90', '45'), - NollyCompressorAttack: ('Smooth', 'Snappy'), - Notelength: ('QUARTER', 'EIGHTH', 'TRIPLET', 'SIXTEENTH'), - Octave: ('-2', '-1', '0', '1', '2'), - OnOff: ('RELEASE', 'FREEZE'), - Osc1Wave: ('Sine', 'Triang', 'Sawtooth', 'Square', 'Pulse', 'Pink NS', 'White NS'), - OutMode: ('Mono', 'Wet/Dry'), - Peak: ('LP', 'HP'), - Pickup: ('HB', 'SINGLE'), - PliniChorusMode: ('Spatial', 'Vintage'), - PliniDriveMode: ('FZ', 'OD'), - PreRoll: ('OFF', '1 BAR', '2 BARS', '4 BARS'), - PunchMode: ('Momentary', 'Toggle'), - Quality: ('0', '1', '2', '3'), - Quantize: ('OFF', '1 Beat', '2 Beats', '3 Beats', '4 Beats', '5 Beats', '6 Beats', '7 Beats', '8 Beats', '16 Beats'), - Ratio3: ('2', '4', '10'), - RecLength: ('OFF', '1 BAR', '2 BARS', '3 BARS', '4 BARS', '5 BARS', '6 BARS', '7 BARS', '8 BARS', '9 BARS', '10 BARS', '11 BARS', '12 BARS', '13 BARS', '14 BARS', '15 BARS', '16 BARS', '17 BARS', '18 BARS', '19 BARS', '20 BARS', '21 BARS', '22 BARS', '23 BARS', '24 BARS', '25 BARS', '26 BARS', '27 BARS', '28 BARS', '29 BARS', '30 BARS', '31 BARS', '32 BARS'), - RedDriveMode: ('LOW', 'HIGH'), - Resonance: ('Full', 'Hollow', 'Rich', 'Intense'), - Routing: ('MULTI', 'HP', 'OUT 1/2', 'OUT 3/4', 'SEND 1/2'), - RoutingMode: ('Grid', 'In 1', 'In 2', 'Ret 1', 'Ret 2', 'In 1/2', 'Ret 1/2', 'Out1', 'Out2', 'Out3', 'Out4', 'Out1/2', 'Out3/4', 'Multi'), - Scale: ('Major', 'Minor'), - Size: ('Small', 'Med', 'Large'), - SlapbackDelayMSyncNote: ('1/64T', '1/64', '1/32T', '1/64D', '1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8'), - Slope: ('6dB/Oct', '12dB/Oct', '18dB/Oct', '24dB/Oct'), - SoldanoSlo100Channel: ('Clean', 'Crunch', 'Lead'), - Sound: ('BLIP', 'BLOCK', 'COWBELL', 'DIGITAL', 'DRUM KIT', 'SOFT KIT'), - Speed: ('Slow', 'Fast'), - SplitterMode: ('Regular', 'Invert'), - SplitterType: ('Balance', 'A/B', 'Crossover'), - Start: ('MUTE', 'UNMUTE'), - Stereo: ('Normal', 'Split'), - StereoLink: ('Unlinked', 'Linked'), - SyncNote11: ('1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), - SyncNote14: ('1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), - SyncNote17: ('1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), - SyncNote21: ('1/64T', '1/64', '1/32T', '1/64D', '1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D', '1/4', '1/2T', '1/4D', '1/2', '1/1T', '1/2D', '1/1', '1/1D'), - SyncOn: ('Lows', 'Highs'), - TankType: ('Vintage', 'Short', 'Mid', 'Long'), - TapPreset: ('1', '2', '3', '4', '4 Alt', '5', '5 Alt', '6', '6 Alt'), - TempocontrolType: ('Preset', 'Global'), - TimeSignature: ('2/4', '3/4', '4/4', '5/4', '6/4', '7/4', '8/4', '9/4', '10/4', '11/4', '12/4', '13/4', '3/8', '6/8', '9/8', '12/8', '5/8 (3+2)', '5/8 (2+3)', '7/8 (3+2+2)', '7/8 (2+3+2)', '7/8 (2+2+3)'), - TremoloWaveform: ('Sine', 'Triangle', 'Square', 'Saw Up', 'Saw Dn'), - TrigDirection: ('Down', 'Up'), - TriggerMode: ('Off', 'Full', '1/2'), - Tube: ('6L6', 'EL34'), - UnisonSource: ('OFF', 'OSC 1', 'OSC 2', 'OSC 1 + 2'), - UsDlx64VintageMode: ('Normal', 'Vibrato', 'Vibrato Bright Off'), - V1Inter: ('-15th', '-14th', '-13th', '-12th', '-11th', '-10th', '-9th', '-8th', '-7th', '-6th', '-5th', '-4th', '-3rd', '-2nd', 'Root', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th'), - VibNote: ('1/32', '1/16T', '1/32D', '1/16', '1/8T', '1/16D', '1/8', '1/4T', '1/8D'), - VintageChorusMode: ('Chorus', 'Vibrato'), - VoiceMode: ('Full', 'Thick', 'Open', 'Broad'), -} - - -__all__ = [ - "Adjust", - "AnalogDelayMSyncNote", - "ArpPattern", - "BitDepth", - "Boost", - "Bright", - "Center", - "ChannelNormal", - "ChiefCe2wMType", - "ChiefDc2wMMode", - "ChiefDc2wMType", - "Color", - "CoryWongDIFunkConsoleAttack", - "CoryWongDelayYYMode", - "Crunch", - "Curve", - "DCellHisbertCh2Mode", - "Decay", - "DigitalFlangerPolarity", - "DivSource", - "Divider", - "DreamChorusMMode", - "DriveType", - "DualChorusMode", - "DumbbellOdsChannel", - "DumbbellOdsEq", - "DuplicateMode", - "DynMode2", - "DynMode3", - "Eq3", - "FeedbackMode", - "Filter", - "FilterCutoff", - "FilterType", - "FlangerEngineWaveform", - "Focus", - "Frequency", - "GainPolarity", - "GojiraWowMode", - "HighsFreq", - "HpfSlope", - "Input", - "Instrument", - "Invert", - "Legendary87MRatio", - "LowsFreq", - "Mid", - "MidsFreq", - "MinivoicerMidiCh", - "MinivoicerMode", - "MinivoicerRoot", - "MixLaw", - "ModSource", - "MonoSynthMidiCh", - "MonoSynthRoot", - "MulSource", - "Multiplier", - "MxPhase95Mode", - "MxPhase95Type", - "NollyCompressorAttack", - "Notelength", - "Octave", - "OnOff", - "Osc1Wave", - "OutMode", - "Peak", - "Pickup", - "PliniChorusMode", - "PliniDriveMode", - "PreRoll", - "PunchMode", - "Quality", - "Quantize", - "Ratio3", - "RecLength", - "RedDriveMode", - "Resonance", - "Routing", - "RoutingMode", - "Scale", - "Size", - "SlapbackDelayMSyncNote", - "Slope", - "SoldanoSlo100Channel", - "Sound", - "Speed", - "SplitterMode", - "SplitterType", - "Start", - "Stereo", - "StereoLink", - "SyncNote11", - "SyncNote14", - "SyncNote17", - "SyncNote21", - "SyncOn", - "TankType", - "TapPreset", - "TempocontrolType", - "TimeSignature", - "TremoloWaveform", - "TrigDirection", - "TriggerMode", - "Tube", - "UnisonSource", - "UsDlx64VintageMode", - "V1Inter", - "VibNote", - "VintageChorusMode", - "VoiceMode", - "OPTION_LABELS", -] +"""The maintainer's baseline: the CorOS 4.0.1 snapshot (ADR-0020). Import a +profile's own snapshot from ``pyquadcortex.protocol.catalogs`` when the +connection decides.""" +from pyquadcortex.protocol.catalogs.coros_4_0_1.options import * # noqa: F401,F403 +from pyquadcortex.protocol.catalogs.coros_4_0_1.options import OPTION_LABELS, __all__ # noqa: F401 diff --git a/pyquadcortex/protocol/params.py b/pyquadcortex/protocol/params.py index 0151b8a..8f798a2 100644 --- a/pyquadcortex/protocol/params.py +++ b/pyquadcortex/protocol/params.py @@ -1,4213 +1,5 @@ -"""Parameter constants for the factory blocks every Quad Cortex has. - -GENERATED by scripts/generate_params.py - do not edit by hand. - -Each class is a model and each member a parameter's wire index, so a -member goes straight to :meth:`pyquadcortex.protocol.QuadCortex.set_param`:: - - qc.set_param(LaneOutput(0), params.LaneOutputParam.VOLUME, Db(-3.1)) - -A constant IS its wire index - `Param` subclasses `int` - so passing -one needs no catalog, which makes it the cheapest route as well as the -clearest, since a catalog is fetched from the device. - -It also carries the parameter's UNIT in its type, so a type checker -rejects `set_param(LaneOutputParam.VOLUME, Hertz(217))` before it runs -(ADR-0018). The runtime check is unchanged and still covers every other -caller - a string, a bare index, or anyone not running a checker. - -**Cabs share one layout.** The catalog lists two parameters for a cab - -its two mic selectors - while the wire carries 22. So a cab is CHOSEN by -its `models.*` id and DRIVEN through :class:`Cabsim`:: - - cab = Block(0, 5, models.CabsimBassM.N212_DARKGLASS_NEO_M) - qc.set_block(cab) - qc.set_param(cab, params.Cabsim.MIC_1_DISTANCE, Real(3.0)) - -A name the device publishes twice is numbered by occurrence, and BOTH -occurrences are numbered. For a cab that repetition is a MICROPHONE and -for an IR Loader it is an IR slot; both are measured, not assumed. - -Only FACTORY content is here, as in `models.py`. Resolve anything else -through ``qc.catalog``. -""" -from pyquadcortex.protocol.values import (BpmUnit, CentsUnit, DbUnit, - HertzUnit, MillisecondsUnit, - NoUnit, Param, PercentUnit, - SecondsUnit, SemitonesUnit) - - -class _ParamSetMeta(type): - """The `IntEnum` surface worth keeping, on a plain class. - - These were `IntEnum`s until ADR-0018. An enum member's type is the - enum class, so it cannot carry a PER-MEMBER unit, and a model's - parameters have mixed units - which is the whole reason the shape - changed. What callers actually used of `IntEnum` is iteration, - lookup by name and `__members__`, so those are here; the rest of - the enum machinery was never reached. - """ - - @property - def __members__(cls): - return {k: v for k, v in vars(cls).items() - if isinstance(v, Param)} - - def __iter__(cls): - return iter(cls.__members__.values()) - - def __getitem__(cls, name): - return cls.__members__[name] - - def __len__(cls): - return len(cls.__members__) - - def __contains__(cls, item): - return item in cls.__members__.values() - - -class ParamSet(metaclass=_ParamSetMeta): - """One model's parameters. A namespace, not a value.""" - - def __init__(self): - raise TypeError( - f"{type(self).__name__} is a namespace of parameter " - f"constants, not something to instantiate - use its " - f"members, such as {type(self).__name__}.") - - -# -- the containers a target addresses ---------------------------------------- - - -class LaneOutputParam(ParamSet): - """A row's Lane Output Control - `LaneOutput(row)`.""" - - VOLUME: Param[DbUnit] = Param(0, 'VOLUME') # float dB - PAN: Param[NoUnit] = Param(1, 'PAN') # float - MUTE: Param[NoUnit] = Param(2, 'MUTE') # switch - SOLO: Param[NoUnit] = Param(3, 'SOLO') # switch - - -class LaneInputParam(ParamSet): - """A row's Input Gate Control - `LaneInput(row)`.""" - - NOISE_REDUCTION: Param[PercentUnit] = Param(0, 'NOISE_REDUCTION') # float % - BYPASS: Param[NoUnit] = Param(1, 'BYPASS') # switch - GAIN_REDUCTION: Param[DbUnit] = Param(2, 'GAIN_REDUCTION') # grMeter dB - INPUT_GAIN: Param[DbUnit] = Param(3, 'INPUT_GAIN') # float dB - - -class MixerParam(ParamSet): - """A row's Mixer - `Mixer(row)`.""" - - LEVEL_A: Param[DbUnit] = Param(0, 'LEVEL_A') # float dB - PAN_A: Param[NoUnit] = Param(1, 'PAN_A') # float - LEVEL_B: Param[DbUnit] = Param(2, 'LEVEL_B') # float dB - PAN_B: Param[NoUnit] = Param(3, 'PAN_B') # float - PHASE: Param[NoUnit] = Param(4, 'PHASE') # switch - MIXER_LEVEL: Param[DbUnit] = Param(5, 'MIXER_LEVEL') # float dB - SPLIT_MODE: Param[NoUnit] = Param(6, 'SPLIT_MODE') # float - - -class SplitterParam(ParamSet): - """A row's splitter - `Splitter(row)`.""" - - TYPE: Param[NoUnit] = Param(0, 'TYPE') # switch - STEREO: Param[NoUnit] = Param(1, 'STEREO') # switch - BALANCE: Param[NoUnit] = Param(2, 'BALANCE') # float - LEVEL_TO_A: Param[DbUnit] = Param(3, 'LEVEL_TO_A') # float dB - LEVEL_TO_B: Param[DbUnit] = Param(4, 'LEVEL_TO_B') # float dB - FREQUENCY: Param[HertzUnit] = Param(5, 'FREQUENCY') # float Hz - MODE: Param[NoUnit] = Param(6, 'MODE') # switch - - -class SplitterABParam(ParamSet): - """The older two-parameter splitter view.""" - - LEVEL_TO_A: Param[DbUnit] = Param(0, 'LEVEL_TO_A') # float dB - LEVEL_TO_B: Param[DbUnit] = Param(1, 'LEVEL_TO_B') # float dB - STEREO: Param[NoUnit] = Param(2, 'STEREO') # switch - - -class TempoParam(ParamSet): - """The preset's TempoControl - `Tempo()`.""" - - TEMPO: Param[BpmUnit] = Param(0, 'TEMPO') # float BPM - TYPE: Param[NoUnit] = Param(1, 'TYPE') # switch - LED_LIGHT: Param[NoUnit] = Param(2, 'LED_LIGHT') # switch - VOLUME: Param[DbUnit] = Param(3, 'VOLUME') # float dB - START: Param[NoUnit] = Param(4, 'START') # toggleButton - PAN: Param[NoUnit] = Param(5, 'PAN') # float - TIME_SIGNATURE: Param[NoUnit] = Param(6, 'TIME_SIGNATURE') # comboBox - NOTELENGTH: Param[NoUnit] = Param(7, 'NOTELENGTH') # comboBox - SOUND: Param[NoUnit] = Param(8, 'SOUND') # comboBox - ROUTING: Param[NoUnit] = Param(9, 'ROUTING') # comboBox - STEPSTATE0: Param[NoUnit] = Param(10, 'STEPSTATE0') # empty - STEPSTATE1: Param[NoUnit] = Param(11, 'STEPSTATE1') # empty - STEPSTATE2: Param[NoUnit] = Param(12, 'STEPSTATE2') # empty - STEPSTATE3: Param[NoUnit] = Param(13, 'STEPSTATE3') # empty - STEPSTATE4: Param[NoUnit] = Param(14, 'STEPSTATE4') # empty - STEPSTATE5: Param[NoUnit] = Param(15, 'STEPSTATE5') # empty - STEPSTATE6: Param[NoUnit] = Param(16, 'STEPSTATE6') # empty - STEPSTATE7: Param[NoUnit] = Param(17, 'STEPSTATE7') # empty - STEPSTATE8: Param[NoUnit] = Param(18, 'STEPSTATE8') # empty - STEPSTATE9: Param[NoUnit] = Param(19, 'STEPSTATE9') # empty - STEPSTATE10: Param[NoUnit] = Param(20, 'STEPSTATE10') # empty - STEPSTATE11: Param[NoUnit] = Param(21, 'STEPSTATE11') # empty - STEPSTATE12: Param[NoUnit] = Param(22, 'STEPSTATE12') # empty - - -# -- cabs: one layout, shared by every cab model ------------------------------ - - -class Cabsim(ParamSet): - """Every cab model's parameters. The catalog under-describes these. - - Measured on four cabs across all four categories: the wire carries - 22 parameters in the `Default Cabsim` layout regardless of which cab - is loaded, or whether it is mono or stereo. `MIC_1_PAN` is labelled - BALANCE on a stereo cab and PAN on a mono one - one wire index, two - screen names. - - The mic-to-index mapping was confirmed against the unit's own - editor. Index 21 exists on the wire, is absent from the catalog and - reads 0.0 everywhere, so it is omitted rather than guessed at. - """ - - MIC_1_BYPASS: Param[NoUnit] = Param(0, 'MIC_1_BYPASS') # switch - MIC_1_IR_SELECTOR: Param[NoUnit] = Param(1, 'MIC_1_IR_SELECTOR') # string - MIC_1_LEVEL: Param[DbUnit] = Param(2, 'MIC_1_LEVEL') # float dB - MIC_1_PAN: Param[NoUnit] = Param(3, 'MIC_1_PAN') # float - MIC_1_DISTANCE: Param[NoUnit] = Param(4, 'MIC_1_DISTANCE') # float - MIC_1_POSITION: Param[NoUnit] = Param(5, 'MIC_1_POSITION') # float - MIC_1_PHI: Param[NoUnit] = Param(6, 'MIC_1_PHI') # switch - MIC_1_GRID_MODE: Param[NoUnit] = Param(7, 'MIC_1_GRID_MODE') # switch - MIC_2_BYPASS: Param[NoUnit] = Param(8, 'MIC_2_BYPASS') # switch - MIC_2_IR_SELECTOR: Param[NoUnit] = Param(9, 'MIC_2_IR_SELECTOR') # string - MIC_2_LEVEL: Param[DbUnit] = Param(10, 'MIC_2_LEVEL') # float dB - MIC_2_PAN: Param[NoUnit] = Param(11, 'MIC_2_PAN') # float - MIC_2_DISTANCE: Param[NoUnit] = Param(12, 'MIC_2_DISTANCE') # float - MIC_2_POSITION: Param[NoUnit] = Param(13, 'MIC_2_POSITION') # float - MIC_2_PHI: Param[NoUnit] = Param(14, 'MIC_2_PHI') # switch - MIC_2_GRID_MODE: Param[NoUnit] = Param(15, 'MIC_2_GRID_MODE') # switch - HPF: Param[HertzUnit] = Param(16, 'HPF') # float Hz - LPF: Param[HertzUnit] = Param(17, 'LPF') # float Hz - OUTPUT_VOLUME: Param[DbUnit] = Param(18, 'OUTPUT_VOLUME') # float dB - MIC_1_IR_NAME: Param[NoUnit] = Param(19, 'MIC_1_IR_NAME') # string - MIC_2_IR_NAME: Param[NoUnit] = Param(20, 'MIC_2_IR_NAME') # string - - -# -- every other factory model ----------------------------------------------- - - -class MythDrive(ParamSet): - """Myth Drive (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - - -class ObsessiveDrive(ParamSet): - """Obsessive Drive (Guitar Overdrive).""" - - DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float - PEAK: Param[NoUnit] = Param(1, 'PEAK') # switch - TONE: Param[NoUnit] = Param(2, 'TONE') # float - VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float - - -class Od250(ParamSet): - """OD250 (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - - -class RodentDrive(ParamSet): - """Rodent Drive (Guitar Overdrive).""" - - DISTORTION: Param[NoUnit] = Param(0, 'DISTORTION') # float - FILTER: Param[NoUnit] = Param(1, 'FILTER') # float - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - - -class Exotic(ParamSet): - """Exotic (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float - - -class FreemanBod(ParamSet): - """Freeman BOD (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(3, 'PRESENCE') # float - TIGHT: Param[NoUnit] = Param(4, 'TIGHT') # float - TRIM: Param[NoUnit] = Param(5, 'TRIM') # float - VOLUME: Param[NoUnit] = Param(6, 'VOLUME') # float - - -class BritBlues(ParamSet): - """Brit Blues (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - - -class ChiefDs1(ParamSet): - """Chief DS1 (Guitar Overdrive).""" - - DISTORTION: Param[NoUnit] = Param(0, 'DISTORTION') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - - -class BritGovernor(ParamSet): - """Brit Governor (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - LEVEL: Param[NoUnit] = Param(4, 'LEVEL') # float - - -class ChiefMt(ParamSet): - """Chief MT (Guitar Overdrive).""" - - DIST: Param[NoUnit] = Param(0, 'DIST') # float - LOW: Param[NoUnit] = Param(1, 'LOW') # float - MIDDLE: Param[NoUnit] = Param(2, 'MIDDLE') # float - MIDFREQ: Param[NoUnit] = Param(3, 'MIDFREQ') # float - HIGH: Param[NoUnit] = Param(4, 'HIGH') # float - LEVEL: Param[NoUnit] = Param(5, 'LEVEL') # float - - -class ChiefOd1(ParamSet): - """Chief OD1 (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - LEVEL: Param[NoUnit] = Param(1, 'LEVEL') # float - - -class ChiefSd1(ParamSet): - """Chief SD1 (Guitar Overdrive).""" - - OVERDRIVE: Param[NoUnit] = Param(0, 'OVERDRIVE') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - - -class FuzzPi(ParamSet): - """Fuzz Pi (Guitar Overdrive).""" - - SUSTAIN: Param[NoUnit] = Param(0, 'SUSTAIN') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - - -class ChiefBd2(ParamSet): - """Chief BD2 (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - - -class RageBooster(ParamSet): - """Rage Booster (Guitar Overdrive).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - - -class FacialFuzz(ParamSet): - """Facial Fuzz (Guitar Overdrive).""" - - FUZZ: Param[NoUnit] = Param(0, 'FUZZ') # float - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - PICKUP: Param[NoUnit] = Param(2, 'PICKUP') # switch - PICKUP_LEVEL: Param[NoUnit] = Param(3, 'PICKUP_LEVEL') # float - - -class ExoticZBoost(ParamSet): - """Exotic Z Boost (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float - - -class RedDrive(ParamSet): - """Red Drive (Guitar Overdrive).""" - - DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - MODE: Param[NoUnit] = Param(3, 'MODE') # switch - - -class VemuralRay(ParamSet): - """Vemural Ray (Guitar Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - LEVEL: Param[NoUnit] = Param(3, 'LEVEL') # float - - -class NoBellOd1(ParamSet): - """No-Bell OD1 (Guitar Overdrive).""" - - DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float - SPECTRUM: Param[NoUnit] = Param(1, 'SPECTRUM') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - BASS_CUT: Param[NoUnit] = Param(3, 'BASS_CUT') # switch - MUTE_TRIG: Param[NoUnit] = Param(4, 'MUTE_TRIG') # switch - - -class Green808(ParamSet): - """Green 808 (Guitar Overdrive).""" - - OVERDRIVE: Param[NoUnit] = Param(0, 'OVERDRIVE') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - - -class Thunderpaw(ParamSet): - """Thunderpaw (Guitar Overdrive).""" - - OUTPUT: Param[NoUnit] = Param(0, 'OUTPUT') # float - DISTORTION: Param[NoUnit] = Param(1, 'DISTORTION') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - USE_GATE: Param[NoUnit] = Param(4, 'USE_GATE') # switch - - -class Mk3SiliconFuzz(ParamSet): - """MK3 Silicon Fuzz (Guitar Overdrive).""" - - ATTACK: Param[NoUnit] = Param(0, 'ATTACK') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - - -class N81CreationsDrive(ParamSet): - """81 Creations Drive (Guitar Overdrive).""" - - DRV: Param[PercentUnit] = Param(0, 'DRV') # float % - CUT: Param[PercentUnit] = Param(1, 'CUT') # float % - OUTPUT: Param[DbUnit] = Param(2, 'OUTPUT') # float dB - LEVEL: Param[PercentUnit] = Param(3, 'LEVEL') # float % - - -class Brit2203(ParamSet): - """Brit 2203 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Pv505Lead(ParamSet): - """PV-505 Lead (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEPTH: Param[NoUnit] = Param(6, 'DEPTH') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class RolsJazzCh120(ParamSet): - """Rols Jazz CH120 (Guitar Amplifier).""" - - BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class UkC30Normal(ParamSet): - """UK C30 Normal (Guitar Amplifier).""" - - BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - TONE_CUT: Param[NoUnit] = Param(2, 'TONE_CUT') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class UkC30Topboost(ParamSet): - """UK C30 TopBoost (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BOOST: Param[NoUnit] = Param(1, 'BOOST') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - TONE_CUT: Param[NoUnit] = Param(4, 'TONE_CUT') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class CaDuoCh3Modern(ParamSet): - """CA Duo Ch3 Modern (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class CaDuoCh3Raw(ParamSet): - """CA Duo Ch3 Raw (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class CaDuoCh3Vintage(ParamSet): - """CA Duo Ch3 Vintage (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Freeman100Clean(ParamSet): - """Freeman 100 Clean (Guitar Amplifier).""" - - BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # rotarySwitch - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class Freeman100Rhythm(ParamSet): - """Freeman 100 Rhythm (Guitar Amplifier).""" - - FAT: Param[NoUnit] = Param(0, 'FAT') # switch - C45: Param[NoUnit] = Param(1, 'C45') # switch - GAIN: Param[NoUnit] = Param(2, 'GAIN') # float - VOICE: Param[NoUnit] = Param(3, 'VOICE') # switch - SAT: Param[NoUnit] = Param(4, 'SAT') # switch - BASS: Param[NoUnit] = Param(5, 'BASS') # float - MID: Param[NoUnit] = Param(6, 'MID') # float - TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(8, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(9, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB - - -class BritTm45Normal(ParamSet): - """Brit TM45 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class BritTm45Bright(ParamSet): - """Brit TM45 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class BritTm45Patch(ParamSet): - """Brit TM45 Patch (Guitar Amplifier).""" - - GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float - GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Brit900Clean(ParamSet): - """Brit 900 Clean (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Brit900Lead(ParamSet): - """Brit 900 Lead (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class WattD103Normal(ParamSet): - """Watt D103 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class WattD103Bright(ParamSet): - """Watt D103 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class BritPlexi50Bright(ParamSet): - """Brit Plexi 50 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class BritPlexi50Patch(ParamSet): - """Brit Plexi 50 Patch (Guitar Amplifier).""" - - GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float - GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class BritPlexi50Normal(ParamSet): - """Brit Plexi 50 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class Freeman100Lead(ParamSet): - """Freeman 100 Lead (Guitar Amplifier).""" - - FAT: Param[NoUnit] = Param(0, 'FAT') # switch - C45: Param[NoUnit] = Param(1, 'C45') # switch - GAIN: Param[NoUnit] = Param(2, 'GAIN') # float - VOICE: Param[NoUnit] = Param(3, 'VOICE') # switch - SAT: Param[NoUnit] = Param(4, 'SAT') # switch - BASS: Param[NoUnit] = Param(5, 'BASS') # float - MID: Param[NoUnit] = Param(6, 'MID') # float - TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(8, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(9, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB - - -class UsTwnNormal(ParamSet): - """US TWN Normal (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class UsTwnVibrato(ParamSet): - """US TWN Vibrato (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class CaTremoOrange(ParamSet): - """CA Tremo Orange (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class CaTremoRed(ParamSet): - """CA Tremo Red (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class BritPlexi100Bright(ParamSet): - """Brit Plexi 100 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class BritPlexi100Patch(ParamSet): - """Brit Plexi 100 Patch (Guitar Amplifier).""" - - GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float - GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class BritPlexi100Normal(ParamSet): - """Brit Plexi 100 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class UsSprNormal(ParamSet): - """US SPR Normal (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - - -class UsSprVibrato(ParamSet): - """US SPR Vibrato (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class Ca1starClean50wNormal(ParamSet): - """CA 1Star Clean 50W Normal (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(4, 'GAIN') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ca1starClean50wTweed(ParamSet): - """CA 1Star Clean 50W Tweed (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(4, 'GAIN') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ca1starClean100wNormal(ParamSet): - """CA 1Star Clean 100W Normal (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(4, 'GAIN') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ca1starClean100wTweed(ParamSet): - """CA 1Star Clean 100W Tweed (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - EQ: Param[NoUnit] = Param(3, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(4, 'GAIN') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ca1starDrive50wNormal(ParamSet): - """CA 1Star Drive 50W Normal (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float - EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(5, 'GAIN') # float - MASTER: Param[NoUnit] = Param(6, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class Ca1starDrive50wTweed(ParamSet): - """CA 1Star Drive 50W Tweed (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float - EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(5, 'GAIN') # float - MASTER: Param[NoUnit] = Param(6, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class Ca1starDrive100wNormal(ParamSet): - """CA 1Star Drive 100W Normal (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float - EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(5, 'GAIN') # float - MASTER: Param[NoUnit] = Param(6, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class Ca1starDrive100wTweed(ParamSet): - """CA 1Star Drive 100W Tweed (Guitar Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - MID: Param[NoUnit] = Param(1, 'MID') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - DRIVE: Param[NoUnit] = Param(3, 'DRIVE') # float - EQ: Param[NoUnit] = Param(4, 'EQ') # rotarySwitch - GAIN: Param[NoUnit] = Param(5, 'GAIN') # float - MASTER: Param[NoUnit] = Param(6, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(7, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class Pv505Rhythm(ParamSet): - """PV-505 Rhythm (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - DEPTH: Param[NoUnit] = Param(7, 'DEPTH') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class Captain50(ParamSet): - """Captain 50 (Guitar Amplifier).""" - - BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch - LOW_BOOST: Param[NoUnit] = Param(1, 'LOW_BOOST') # switch - GAIN: Param[NoUnit] = Param(2, 'GAIN') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(6, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class BognaVishnu20thClean(ParamSet): - """Bogna Vishnu 20th Clean (Guitar Amplifier).""" - - BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch - GAIN: Param[NoUnit] = Param(1, 'GAIN') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - DEPTH: Param[NoUnit] = Param(7, 'DEPTH') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class Ev101iiisBlue6l6100w(ParamSet): - """EV101IIIS Blue 6L6 100W (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ev101iiisRed6l6100w(ParamSet): - """EV101IIIS Red 6L6 100W (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class UsPrince(ParamSet): - """US Prince (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class BritUblLead(ParamSet): - """Brit UBL Lead (Guitar Amplifier).""" - - INPUT_GAIN: Param[NoUnit] = Param(0, 'INPUT_GAIN') # float - LEAD_MASTER: Param[NoUnit] = Param(1, 'LEAD_MASTER') # float - OUTPUT_MASTER: Param[NoUnit] = Param(2, 'OUTPUT_MASTER') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class BritUblLeadClip(ParamSet): - """Brit UBL Lead Clip (Guitar Amplifier).""" - - INPUT_GAIN: Param[NoUnit] = Param(0, 'INPUT_GAIN') # float - LEAD_MASTER: Param[NoUnit] = Param(1, 'LEAD_MASTER') # float - OUTPUT_MASTER: Param[NoUnit] = Param(2, 'OUTPUT_MASTER') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(6, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class UsTweedBassladBrightPatch(ParamSet): - """US Tweed Basslad Bright Patch (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsTweedBassladBright(ParamSet): - """US Tweed Basslad Bright (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsTweedBassladNormalPatch(ParamSet): - """US Tweed Basslad Normal Patch (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsTweedBassladNormal(ParamSet): - """US Tweed Basslad Normal (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UkC15Normal(ParamSet): - """UK C15 Normal (Guitar Amplifier).""" - - BRIGHT: Param[NoUnit] = Param(0, 'BRIGHT') # switch - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - TONE_CUT: Param[NoUnit] = Param(2, 'TONE_CUT') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class UkC15Topboost(ParamSet): - """UK C15 TopBoost (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BOOST: Param[NoUnit] = Param(1, 'BOOST') # switch - BASS: Param[NoUnit] = Param(2, 'BASS') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - TONE_CUT: Param[NoUnit] = Param(4, 'TONE_CUT') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class UsHpTweedTwnNormal(ParamSet): - """US HP Tweed TWN Normal (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsHpTweedTwnNormalPatch(ParamSet): - """US HP Tweed TWN Normal Patch (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsHpTweedTwnBright(ParamSet): - """US HP Tweed TWN Bright (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsHpTweedTwnBrightPatch(ParamSet): - """US HP Tweed TWN Bright Patch (Guitar Amplifier).""" - - VOLUME_NORMAL: Param[NoUnit] = Param(0, 'VOLUME_NORMAL') # float - VOLUME_BRIGHT: Param[NoUnit] = Param(1, 'VOLUME_BRIGHT') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class DCellHisbertCh1(ParamSet): - """D-Cell Hisbert Ch1 (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MIDCUT: Param[NoUnit] = Param(4, 'MIDCUT') # switch - LEVEL: Param[NoUnit] = Param(5, 'LEVEL') # float - INTENSITY: Param[NoUnit] = Param(6, 'INTENSITY') # float - MASTER: Param[NoUnit] = Param(7, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(9, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB - - -class DCellHisbertCh2(ParamSet): - """D-Cell Hisbert Ch2 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - MODE: Param[NoUnit] = Param(1, 'MODE') # switch - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MID: Param[NoUnit] = Param(4, 'MID') # float - TREBLE: Param[NoUnit] = Param(5, 'TREBLE') # float - MIDCUT: Param[NoUnit] = Param(6, 'MIDCUT') # switch - LEVEL: Param[NoUnit] = Param(7, 'LEVEL') # float - INTENSITY: Param[NoUnit] = Param(8, 'INTENSITY') # float - MASTER: Param[NoUnit] = Param(9, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(10, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(11, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(12, 'OUTPUT') # float dB - - -class DCellHisbertCh3(ParamSet): - """D-Cell Hisbert Ch3 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - MIDCUT: Param[NoUnit] = Param(5, 'MIDCUT') # switch - LEVEL: Param[NoUnit] = Param(6, 'LEVEL') # float - INTENSITY: Param[NoUnit] = Param(7, 'INTENSITY') # float - MASTER: Param[NoUnit] = Param(8, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(9, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(10, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(11, 'OUTPUT') # float dB - - -class CaJohnS2cCh1(ParamSet): - """CA John's 2C Ch1 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - MASTER: Param[NoUnit] = Param(1, 'MASTER') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - DUMMY1: Param[NoUnit] = Param(7, 'DUMMY1') # empty - DUMMY2: Param[NoUnit] = Param(8, 'DUMMY2') # empty - DUMMY3: Param[NoUnit] = Param(9, 'DUMMY3') # empty - N80_HZ: Param[NoUnit] = Param(10, 'N80_HZ') # fader - N240_HZ: Param[NoUnit] = Param(11, 'N240_HZ') # fader - N750_HZ: Param[NoUnit] = Param(12, 'N750_HZ') # fader - N2200_HZ: Param[NoUnit] = Param(13, 'N2200_HZ') # fader - N6600_HZ: Param[NoUnit] = Param(14, 'N6600_HZ') # fader - - -class CaJohnS2cCh2(ParamSet): - """CA John's 2C Ch2 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - GAIN_PULL: Param[NoUnit] = Param(1, 'GAIN_PULL') # switch - SHRED: Param[NoUnit] = Param(2, 'SHRED') # switch - MASTER: Param[NoUnit] = Param(3, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - BASS: Param[NoUnit] = Param(5, 'BASS') # float - MID: Param[NoUnit] = Param(6, 'MID') # float - TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float - PRES_PULL: Param[NoUnit] = Param(9, 'PRES_PULL') # switch - N80_HZ: Param[NoUnit] = Param(10, 'N80_HZ') # fader - N240_HZ: Param[NoUnit] = Param(11, 'N240_HZ') # fader - N750_HZ: Param[NoUnit] = Param(12, 'N750_HZ') # fader - N2200_HZ: Param[NoUnit] = Param(13, 'N2200_HZ') # fader - N6600_HZ: Param[NoUnit] = Param(14, 'N6600_HZ') # fader - MUTE_TRIG: Param[NoUnit] = Param(15, 'MUTE_TRIG') # switch - - -class CaJohnS2cCh3(ParamSet): - """CA John's 2C Ch3 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - GAIN_PULL: Param[NoUnit] = Param(1, 'GAIN_PULL') # switch - SHRED: Param[NoUnit] = Param(2, 'SHRED') # switch - MASTER: Param[NoUnit] = Param(3, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - BASS: Param[NoUnit] = Param(5, 'BASS') # float - MID: Param[NoUnit] = Param(6, 'MID') # float - TREBLE: Param[NoUnit] = Param(7, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float - PRES_PULL: Param[NoUnit] = Param(9, 'PRES_PULL') # switch - N80_HZ: Param[NoUnit] = Param(10, 'N80_HZ') # fader - N240_HZ: Param[NoUnit] = Param(11, 'N240_HZ') # fader - N750_HZ: Param[NoUnit] = Param(12, 'N750_HZ') # fader - N2200_HZ: Param[NoUnit] = Param(13, 'N2200_HZ') # fader - N6600_HZ: Param[NoUnit] = Param(14, 'N6600_HZ') # fader - MUTE_TRIG: Param[NoUnit] = Param(15, 'MUTE_TRIG') # switch - - -class DCellH4Ch1Bright(ParamSet): - """D-Cell H4 Ch1 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch1Normal(ParamSet): - """D-Cell H4 Ch1 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch2Bright(ParamSet): - """D-Cell H4 Ch2 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch2Normal(ParamSet): - """D-Cell H4 Ch2 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch3(ParamSet): - """D-Cell H4 Ch3 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch4(ParamSet): - """D-Cell H4 Ch4 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ev101iiisRedEl34100w(ParamSet): - """EV101IIIS Red EL34 100W (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Ev101iiisBlueEl34100w(ParamSet): - """EV101IIIS Blue EL34 100W (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Solo100Lead(ParamSet): - """Solo 100 Lead (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Solo100CrunchBright(ParamSet): - """Solo 100 Crunch Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Solo100CrunchNormal(ParamSet): - """Solo 100 Crunch Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class MatchmoreJefe(ParamSet): - """Matchmore Jefe (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - BRILLIANCE: Param[NoUnit] = Param(4, 'BRILLIANCE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class MatchmoreD30Ch1(ParamSet): - """Matchmore D30 Ch1 (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - CUT: Param[NoUnit] = Param(3, 'CUT') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class MatchmoreD30Ch2(ParamSet): - """Matchmore D30 Ch2 (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - CUT: Param[NoUnit] = Param(1, 'CUT') # float - MASTER: Param[NoUnit] = Param(2, 'MASTER') # float - TONE: Param[NoUnit] = Param(3, 'TONE') # float - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - - -class VictorSquidCh1(ParamSet): - """Victor Squid Ch1 (Guitar Amplifier).""" - - MOD: Param[NoUnit] = Param(0, 'MOD') # switch - GAIN: Param[NoUnit] = Param(1, 'GAIN') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - FOCUS: Param[NoUnit] = Param(6, 'FOCUS') # switch - H: Param[NoUnit] = Param(7, 'H') # switch - B: Param[NoUnit] = Param(8, 'B') # switch - TUBE: Param[NoUnit] = Param(9, 'TUBE') # switch - OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB - MUTE_TRIG: Param[NoUnit] = Param(11, 'MUTE_TRIG') # switch - - -class VictorSquidCh2(ParamSet): - """Victor Squid Ch2 (Guitar Amplifier).""" - - MOD: Param[NoUnit] = Param(0, 'MOD') # switch - GAIN: Param[NoUnit] = Param(1, 'GAIN') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(5, 'MASTER') # float - FOCUS: Param[NoUnit] = Param(6, 'FOCUS') # switch - TIGHT: Param[NoUnit] = Param(7, 'TIGHT') # float - PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float - TUBE: Param[NoUnit] = Param(9, 'TUBE') # switch - OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB - MUTE_TRIG: Param[NoUnit] = Param(11, 'MUTE_TRIG') # switch - - -class UsDlx64Vintage(ParamSet): - """US DLX 64 Vintage (Guitar Amplifier).""" - - INPUT: Param[NoUnit] = Param(0, 'INPUT') # switch - MODE: Param[NoUnit] = Param(1, 'MODE') # comboBox - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - BASS: Param[NoUnit] = Param(4, 'BASS') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - MUTE_TRIG: Param[NoUnit] = Param(6, 'MUTE_TRIG') # switch - DELAY: Param[NoUnit] = Param(7, 'DELAY') # int - - -class UsDlx65Reissue(ParamSet): - """US DLX 65 Reissue (Guitar Amplifier).""" - - INPUT: Param[NoUnit] = Param(0, 'INPUT') # switch - MODE: Param[NoUnit] = Param(1, 'MODE') # comboBox - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - BASS: Param[NoUnit] = Param(4, 'BASS') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - MUTE_TRIG: Param[NoUnit] = Param(6, 'MUTE_TRIG') # switch - DELAY: Param[NoUnit] = Param(7, 'DELAY') # int - - -class DumbbellOds(ParamSet): - """Dumbbell ODS (Guitar Amplifier).""" - - CHANNEL: Param[NoUnit] = Param(0, 'CHANNEL') # switch - VOLUME: Param[NoUnit] = Param(1, 'VOLUME') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - MIDDLE: Param[NoUnit] = Param(3, 'MIDDLE') # float - BASS: Param[NoUnit] = Param(4, 'BASS') # float - OD_CONTENT: Param[NoUnit] = Param(5, 'OD_CONTENT') # float - OD_VOLUME: Param[NoUnit] = Param(6, 'OD_VOLUME') # float - MASTER: Param[NoUnit] = Param(7, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(8, 'PRESENCE') # float - PREAMP: Param[NoUnit] = Param(9, 'PREAMP') # switch - BRIGHT: Param[NoUnit] = Param(10, 'BRIGHT') # switch - MID: Param[NoUnit] = Param(11, 'MID') # switch - EQ: Param[NoUnit] = Param(12, 'EQ') # switch - OUTPUT: Param[DbUnit] = Param(13, 'OUTPUT') # float dB - - -class BritBass50Bright(ParamSet): - """Brit Bass 50 Bright (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class BritBass50Patch(ParamSet): - """Brit Bass 50 Patch (Bass Amplifier).""" - - GAIN_1: Param[NoUnit] = Param(0, 'GAIN_1') # float - GAIN_2: Param[NoUnit] = Param(1, 'GAIN_2') # float - BASS: Param[NoUnit] = Param(2, 'BASS') # float - MID: Param[NoUnit] = Param(3, 'MID') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class BritBass50Normal(ParamSet): - """Brit Bass 50 Normal (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - PRESENCE: Param[NoUnit] = Param(4, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - - -class G800k(ParamSet): - """G800K (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - N10_DB: Param[NoUnit] = Param(1, 'N10_DB') # switch - LO_CUT: Param[NoUnit] = Param(2, 'LO_CUT') # switch - HIGH_BOOST: Param[NoUnit] = Param(3, 'HIGH_BOOST') # switch - MID_CONTOUR: Param[NoUnit] = Param(4, 'MID_CONTOUR') # switch - BASS: Param[NoUnit] = Param(5, 'BASS') # float - LO_MID: Param[NoUnit] = Param(6, 'LO_MID') # float - HI_MID: Param[NoUnit] = Param(7, 'HI_MID') # float - TREBLE: Param[NoUnit] = Param(8, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(9, 'OUTPUT') # float dB - - -class Ca400Ch1(ParamSet): - """CA 400+ Ch1 (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - TREBLE_SHIFT: Param[NoUnit] = Param(2, 'TREBLE_SHIFT') # switch - BASS_SHIFT: Param[NoUnit] = Param(3, 'BASS_SHIFT') # switch - BASS: Param[NoUnit] = Param(4, 'BASS') # float - MID: Param[NoUnit] = Param(5, 'MID') # float - TREBLE: Param[NoUnit] = Param(6, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(7, 'MASTER') # float - EQ: Param[NoUnit] = Param(8, 'EQ') # switch - OUTPUT: Param[DbUnit] = Param(9, 'OUTPUT') # float dB - N40_HZ: Param[NoUnit] = Param(10, 'N40_HZ') # float - N100_HZ: Param[NoUnit] = Param(11, 'N100_HZ') # float - N250_HZ: Param[NoUnit] = Param(12, 'N250_HZ') # float - N625_HZ: Param[NoUnit] = Param(13, 'N625_HZ') # float - N1560_HZ: Param[NoUnit] = Param(14, 'N1560_HZ') # float - N3900_HZ: Param[NoUnit] = Param(15, 'N3900_HZ') # float - N6600_HZ: Param[NoUnit] = Param(16, 'N6600_HZ') # float - - -class Ca400Ch2(ParamSet): - """CA 400+ Ch2 (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BRIGHT: Param[NoUnit] = Param(1, 'BRIGHT') # switch - TREBLE_SHIFT: Param[NoUnit] = Param(2, 'TREBLE_SHIFT') # switch - BASS_SHIFT: Param[NoUnit] = Param(3, 'BASS_SHIFT') # switch - BASS: Param[NoUnit] = Param(4, 'BASS') # float - MID: Param[NoUnit] = Param(5, 'MID') # float - TREBLE: Param[NoUnit] = Param(6, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(7, 'MASTER') # float - EQ: Param[NoUnit] = Param(8, 'EQ') # switch - OUTPUT: Param[DbUnit] = Param(9, 'OUTPUT') # float dB - N40_HZ: Param[NoUnit] = Param(10, 'N40_HZ') # float - N100_HZ: Param[NoUnit] = Param(11, 'N100_HZ') # float - N250_HZ: Param[NoUnit] = Param(12, 'N250_HZ') # float - N625_HZ: Param[NoUnit] = Param(13, 'N625_HZ') # float - N1560_HZ: Param[NoUnit] = Param(14, 'N1560_HZ') # float - N3900_HZ: Param[NoUnit] = Param(15, 'N3900_HZ') # float - N6600_HZ: Param[NoUnit] = Param(16, 'N6600_HZ') # float - - -class AmpedSuperValve(ParamSet): - """Amped Super Valve (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - ULTRA_LO: Param[NoUnit] = Param(1, 'ULTRA_LO') # switch - ULTRA_HI: Param[NoUnit] = Param(2, 'ULTRA_HI') # switch - BASS: Param[NoUnit] = Param(3, 'BASS') # float - MIDRANGE: Param[NoUnit] = Param(4, 'MIDRANGE') # float - FREQUENCY: Param[NoUnit] = Param(5, 'FREQUENCY') # rotarySwitch - TREBLE: Param[NoUnit] = Param(6, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(7, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - - -class AmpedFlipTop6464(ParamSet): - """Amped Flip-Top 6464 (Bass Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(2, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class AmpedFlipTop6466(ParamSet): - """Amped Flip-Top 6466 (Bass Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(2, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class AmpedFlipTop6664(ParamSet): - """Amped Flip-Top 6664 (Bass Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(2, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class AmpedFlipTop6666(ParamSet): - """Amped Flip-Top 6666 (Bass Amplifier).""" - - BASS: Param[NoUnit] = Param(0, 'BASS') # float - TREBLE: Param[NoUnit] = Param(1, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(2, 'MASTER') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class WattBassModNormal(ParamSet): - """Watt Bass Mod Normal (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class WattBassModBright(ParamSet): - """Watt Bass Mod Bright (Bass Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class MicrotubesB3k(ParamSet): - """Microtubesยฎ B3K (Bass Overdrive).""" - - DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float - GROWL: Param[NoUnit] = Param(1, 'GROWL') # switch - MIDBOOST: Param[NoUnit] = Param(2, 'MIDBOOST') # switch - TONE: Param[NoUnit] = Param(3, 'TONE') # float - LEVEL: Param[NoUnit] = Param(4, 'LEVEL') # float - BLEND: Param[NoUnit] = Param(5, 'BLEND') # float - - -class Bddi(ParamSet): - """BDDI (Bass Overdrive).""" - - BLEND: Param[NoUnit] = Param(0, 'BLEND') # float - PRESENCE: Param[NoUnit] = Param(1, 'PRESENCE') # float - DRIVE: Param[NoUnit] = Param(2, 'DRIVE') # float - LEVEL: Param[NoUnit] = Param(3, 'LEVEL') # float - TREBLE: Param[NoUnit] = Param(4, 'TREBLE') # float - BASS: Param[NoUnit] = Param(5, 'BASS') # float - - -class SovietFuzz(ParamSet): - """Soviet Fuzz (Bass Overdrive).""" - - SUSTAIN: Param[NoUnit] = Param(0, 'SUSTAIN') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - - -class MicrotubesVmt(ParamSet): - """Microtubesยฎ VMT (Bass Overdrive).""" - - DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float - ERA: Param[NoUnit] = Param(1, 'ERA') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - BLEND: Param[NoUnit] = Param(3, 'BLEND') # float - - -class ExoticBassZBoost(ParamSet): - """Exotic Bass Z Boost (Bass Overdrive).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - VOLUME: Param[NoUnit] = Param(3, 'VOLUME') # float - - -class Parametric8(ParamSet): - """Parametric-8 (Equalizer).""" - - N1_GAIN: Param[DbUnit] = Param(0, 'N1_GAIN') # float dB - N1_FREQ: Param[HertzUnit] = Param(1, 'N1_FREQ') # float Hz - N1_Q: Param[NoUnit] = Param(2, 'N1_Q') # float - N1_TYPE: Param[NoUnit] = Param(3, 'N1_TYPE') # float - N1_BYPASS: Param[NoUnit] = Param(4, 'N1_BYPASS') # switch - N2_GAIN: Param[DbUnit] = Param(5, 'N2_GAIN') # float dB - N2_FREQ: Param[HertzUnit] = Param(6, 'N2_FREQ') # float Hz - N2_Q: Param[NoUnit] = Param(7, 'N2_Q') # float - N2_TYPE: Param[NoUnit] = Param(8, 'N2_TYPE') # float - N2_BYPASS: Param[NoUnit] = Param(9, 'N2_BYPASS') # switch - N3_GAIN: Param[DbUnit] = Param(10, 'N3_GAIN') # float dB - N3_FREQ: Param[HertzUnit] = Param(11, 'N3_FREQ') # float Hz - N3_Q: Param[NoUnit] = Param(12, 'N3_Q') # float - N3_TYPE: Param[NoUnit] = Param(13, 'N3_TYPE') # float - N3_BYPASS: Param[NoUnit] = Param(14, 'N3_BYPASS') # switch - N4_GAIN: Param[DbUnit] = Param(15, 'N4_GAIN') # float dB - N4_FREQ: Param[HertzUnit] = Param(16, 'N4_FREQ') # float Hz - N4_Q: Param[NoUnit] = Param(17, 'N4_Q') # float - N4_TYPE: Param[NoUnit] = Param(18, 'N4_TYPE') # float - N4_BYPASS: Param[NoUnit] = Param(19, 'N4_BYPASS') # switch - N5_GAIN: Param[DbUnit] = Param(20, 'N5_GAIN') # float dB - N5_FREQ: Param[HertzUnit] = Param(21, 'N5_FREQ') # float Hz - N5_Q: Param[NoUnit] = Param(22, 'N5_Q') # float - N5_TYPE: Param[NoUnit] = Param(23, 'N5_TYPE') # float - N5_BYPASS: Param[NoUnit] = Param(24, 'N5_BYPASS') # switch - N6_GAIN: Param[DbUnit] = Param(25, 'N6_GAIN') # float dB - N6_FREQ: Param[HertzUnit] = Param(26, 'N6_FREQ') # float Hz - N6_Q: Param[NoUnit] = Param(27, 'N6_Q') # float - N6_TYPE: Param[NoUnit] = Param(28, 'N6_TYPE') # float - N6_BYPASS: Param[NoUnit] = Param(29, 'N6_BYPASS') # switch - N7_GAIN: Param[DbUnit] = Param(30, 'N7_GAIN') # float dB - N7_FREQ: Param[HertzUnit] = Param(31, 'N7_FREQ') # float Hz - N7_Q: Param[NoUnit] = Param(32, 'N7_Q') # float - N7_TYPE: Param[NoUnit] = Param(33, 'N7_TYPE') # float - N7_BYPASS: Param[NoUnit] = Param(34, 'N7_BYPASS') # switch - N8_GAIN: Param[DbUnit] = Param(35, 'N8_GAIN') # float dB - N8_FREQ: Param[HertzUnit] = Param(36, 'N8_FREQ') # float Hz - N8_Q: Param[NoUnit] = Param(37, 'N8_Q') # float - N8_TYPE: Param[NoUnit] = Param(38, 'N8_TYPE') # float - N8_BYPASS: Param[NoUnit] = Param(39, 'N8_BYPASS') # switch - OUTPUT: Param[DbUnit] = Param(40, 'OUTPUT') # float dB - - -class Parametric3(ParamSet): - """Parametric-3 (Equalizer).""" - - N1_GAIN: Param[DbUnit] = Param(0, 'N1_GAIN') # float dB - N1_FREQ: Param[HertzUnit] = Param(1, 'N1_FREQ') # float Hz - N1_Q: Param[NoUnit] = Param(2, 'N1_Q') # float - N1_TYPE: Param[NoUnit] = Param(3, 'N1_TYPE') # float - N1_BYPASS: Param[NoUnit] = Param(4, 'N1_BYPASS') # switch - N2_GAIN: Param[DbUnit] = Param(5, 'N2_GAIN') # float dB - N2_FREQ: Param[HertzUnit] = Param(6, 'N2_FREQ') # float Hz - N2_Q: Param[NoUnit] = Param(7, 'N2_Q') # float - N2_TYPE: Param[NoUnit] = Param(8, 'N2_TYPE') # float - N2_BYPASS: Param[NoUnit] = Param(9, 'N2_BYPASS') # switch - N3_GAIN: Param[DbUnit] = Param(10, 'N3_GAIN') # float dB - N3_FREQ: Param[HertzUnit] = Param(11, 'N3_FREQ') # float Hz - N3_Q: Param[NoUnit] = Param(12, 'N3_Q') # float - N3_TYPE: Param[NoUnit] = Param(13, 'N3_TYPE') # float - N3_BYPASS: Param[NoUnit] = Param(14, 'N3_BYPASS') # switch - OUTPUT: Param[DbUnit] = Param(15, 'OUTPUT') # float dB - - -class LowHighCut(ParamSet): - """Low-High Cut (Equalizer).""" - - HPF_SLOPE: Param[NoUnit] = Param(0, 'HPF_SLOPE') # rotarySwitch dB/oct - HPF_FREQ: Param[HertzUnit] = Param(1, 'HPF_FREQ') # float Hz - LPF_SLOPE: Param[NoUnit] = Param(2, 'LPF_SLOPE') # rotarySwitch dB/oct - LPF_FREQ: Param[HertzUnit] = Param(3, 'LPF_FREQ') # float Hz - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - - -class Graphic9(ParamSet): - """Graphic-9 (Equalizer).""" - - HPF: Param[HertzUnit] = Param(0, 'HPF') # float Hz - N65HZ: Param[DbUnit] = Param(1, 'N65HZ') # fader dB - N125HZ: Param[DbUnit] = Param(2, 'N125HZ') # fader dB - N250HZ: Param[DbUnit] = Param(3, 'N250HZ') # fader dB - N500HZ: Param[DbUnit] = Param(4, 'N500HZ') # fader dB - N1KHZ: Param[DbUnit] = Param(5, 'N1KHZ') # fader dB - N2KHZ: Param[DbUnit] = Param(6, 'N2KHZ') # fader dB - N4KHZ: Param[DbUnit] = Param(7, 'N4KHZ') # fader dB - N8KHZ: Param[DbUnit] = Param(8, 'N8KHZ') # fader dB - N16KHZ: Param[DbUnit] = Param(9, 'N16KHZ') # fader dB - LPF: Param[HertzUnit] = Param(10, 'LPF') # float Hz - Q: Param[NoUnit] = Param(11, 'Q') # float - OUTPUT: Param[DbUnit] = Param(12, 'OUTPUT') # float dB - - -class PluginGraphic9(ParamSet): - """Plugin Graphic-9 (Equalizer).""" - - HPF: Param[HertzUnit] = Param(0, 'HPF') # float Hz - N65HZ: Param[DbUnit] = Param(1, 'N65HZ') # fader dB - N125HZ: Param[DbUnit] = Param(2, 'N125HZ') # fader dB - N250HZ: Param[DbUnit] = Param(3, 'N250HZ') # fader dB - N500HZ: Param[DbUnit] = Param(4, 'N500HZ') # fader dB - N1KHZ: Param[DbUnit] = Param(5, 'N1KHZ') # fader dB - N2KHZ: Param[DbUnit] = Param(6, 'N2KHZ') # fader dB - N4KHZ: Param[DbUnit] = Param(7, 'N4KHZ') # fader dB - N8KHZ: Param[DbUnit] = Param(8, 'N8KHZ') # fader dB - N16KHZ: Param[DbUnit] = Param(9, 'N16KHZ') # fader dB - LPF: Param[HertzUnit] = Param(10, 'LPF') # float Hz - Q: Param[NoUnit] = Param(11, 'Q') # float - OUTPUT: Param[DbUnit] = Param(12, 'OUTPUT') # float dB - - -class Legendary87M(ParamSet): - """Legendary 87 (M) (Compressor).""" - - INPUT: Param[DbUnit] = Param(0, 'INPUT') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class SolidStateCompM(ParamSet): - """Solid State Comp (M) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class VcaCompM(ParamSet): - """VCA Comp (M) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # float - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class OptoCompM(ParamSet): - """Opto Comp (M) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # float - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class Jewel(ParamSet): - """Jewel (Compressor).""" - - COMP: Param[NoUnit] = Param(0, 'COMP') # float - EQ: Param[NoUnit] = Param(1, 'EQ') # float - VOLUME: Param[NoUnit] = Param(2, 'VOLUME') # float - HIGH_CUT: Param[NoUnit] = Param(3, 'HIGH_CUT') # switch - MIX: Param[PercentUnit] = Param(4, 'MIX') # float % - - -class Legendary87St(ParamSet): - """Legendary 87 (ST) (Compressor).""" - - INPUT: Param[DbUnit] = Param(0, 'INPUT') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class SolidStateCompSt(ParamSet): - """Solid State Comp (ST) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class VcaCompSt(ParamSet): - """VCA Comp (ST) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # float - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class OptoCompSt(ParamSet): - """Opto Comp (ST) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # float - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(6, 'GAIN_REDUCTION') # grMeter dB - - -class ChiefCs3(ParamSet): - """Chief CS3 (Compressor).""" - - SUSTAIN: Param[NoUnit] = Param(0, 'SUSTAIN') # float - ATTACK: Param[NoUnit] = Param(1, 'ATTACK') # float - TONE: Param[NoUnit] = Param(2, 'TONE') # float - LEVEL: Param[NoUnit] = Param(3, 'LEVEL') # float - - -class SolidStateCompSC(ParamSet): - """Solid State Comp (S/C) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox - GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB - - -class Legendary87SC(ParamSet): - """Legendary 87 (S/C) (Compressor).""" - - INPUT: Param[DbUnit] = Param(0, 'INPUT') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # rotarySwitch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[SecondsUnit] = Param(3, 'RELEASE') # float s - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox - GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB - - -class OptoCompSC(ParamSet): - """Opto Comp (S/C) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # float - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox - GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB - - -class VcaCompSC(ParamSet): - """VCA Comp (S/C) (Compressor).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - RATIO: Param[NoUnit] = Param(1, 'RATIO') # float - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - MAKEUP: Param[DbUnit] = Param(4, 'MAKEUP') # float dB - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox - GAIN_REDUCTION: Param[DbUnit] = Param(7, 'GAIN_REDUCTION') # grMeter dB - - -class AnalogDelayM(ParamSet): - """Analog Delay (M) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - QUALITY: Param[NoUnit] = Param(4, 'QUALITY') # rotarySwitch - SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms - MOD_RATE: Param[HertzUnit] = Param(8, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(9, 'MOD_DEPTH') # float % - DRIVE: Param[PercentUnit] = Param(10, 'DRIVE') # float % - TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB - - -class SimplePingPongDelay(ParamSet): - """Simple Ping Pong Delay (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - TONE: Param[NoUnit] = Param(2, 'TONE') # float - SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(5, 'DELAY_TIME') # float ms - TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch - STEREO_WIDTH: Param[PercentUnit] = Param(7, 'STEREO_WIDTH') # float % - - -class SimpleDelaySt(ParamSet): - """Simple Delay (ST) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - TONE: Param[NoUnit] = Param(2, 'TONE') # float - SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(5, 'DELAY_TIME') # float ms - TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch - - -class TapeDelaySt(ParamSet): - """Tape Delay (ST) (Delay).""" - - NOTIFICATION_START: Param[NoUnit] = Param(0, 'NOTIFICATION_START') # float - MIX: Param[PercentUnit] = Param(1, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(2, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - PING_PONG: Param[NoUnit] = Param(5, 'PING_PONG') # switch - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME') # float ms - WOW: Param[PercentUnit] = Param(9, 'WOW') # float % - FLUTTER: Param[PercentUnit] = Param(10, 'FLUTTER') # float % - DRIVE: Param[PercentUnit] = Param(11, 'DRIVE') # float % - TRAILS: Param[NoUnit] = Param(12, 'TRAILS') # switch - DUMMY: Param[PercentUnit] = Param(13, 'DUMMY') # float % - STEREO_WIDTH: Param[PercentUnit] = Param(14, 'STEREO_WIDTH') # float % - DYN_DEPTH: Param[DbUnit] = Param(15, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(16, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(17, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(18, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(19, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(20, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(21, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(22, 'GAIN_REDUCTION') # grMeter dB - NOTIFICATION_END: Param[NoUnit] = Param(23, 'NOTIFICATION_END') # float - - -class DigitalDelayM(ParamSet): - """Digital Delay (M) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - SYNC: Param[NoUnit] = Param(4, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(5, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(6, 'DELAY_TIME') # float ms - MOD_RATE: Param[HertzUnit] = Param(7, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(8, 'MOD_DEPTH') # float % - TRAILS: Param[NoUnit] = Param(9, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(10, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(11, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(12, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(13, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(14, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(15, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(16, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(17, 'GAIN_REDUCTION') # grMeter dB - - -class SimpleDelayM(ParamSet): - """Simple Delay (M) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - TONE: Param[NoUnit] = Param(2, 'TONE') # float - SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(5, 'DELAY_TIME') # float ms - TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch - - -class TapeDelayM(ParamSet): - """Tape Delay (M) (Delay).""" - - NOTIFICATION_START: Param[NoUnit] = Param(0, 'NOTIFICATION_START') # float - MIX: Param[PercentUnit] = Param(1, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(2, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms - WOW: Param[PercentUnit] = Param(8, 'WOW') # float % - FLUTTER: Param[PercentUnit] = Param(9, 'FLUTTER') # float % - DRIVE: Param[PercentUnit] = Param(10, 'DRIVE') # float % - TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch - DUMMY: Param[NoUnit] = Param(12, 'DUMMY') # float - DYN_DEPTH: Param[DbUnit] = Param(13, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(14, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(15, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(16, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(17, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(18, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(19, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(20, 'GAIN_REDUCTION') # grMeter dB - NOTIFICATION_END: Param[NoUnit] = Param(21, 'NOTIFICATION_END') # float - - -class SlapbackDelaySt(ParamSet): - """Slapback Delay (ST) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - PING_PONG: Param[NoUnit] = Param(4, 'PING_PONG') # switch - QUALITY: Param[NoUnit] = Param(5, 'QUALITY') # rotarySwitch - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME') # float ms - MOD_RATE: Param[HertzUnit] = Param(9, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(10, 'MOD_DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(11, 'WIDTH') # float % - DRIVE: Param[PercentUnit] = Param(12, 'DRIVE') # float % - TRAILS: Param[NoUnit] = Param(13, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(14, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(15, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(16, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(17, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(18, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(19, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(20, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(21, 'GAIN_REDUCTION') # grMeter dB - STEREO_WIDTH: Param[PercentUnit] = Param(22, 'STEREO_WIDTH') # float % - - -class SlapbackDelayM(ParamSet): - """Slapback Delay (M) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - QUALITY: Param[NoUnit] = Param(4, 'QUALITY') # rotarySwitch - SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms - MOD_RATE: Param[HertzUnit] = Param(8, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(9, 'MOD_DEPTH') # float % - DRIVE: Param[PercentUnit] = Param(10, 'DRIVE') # float % - TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB - - -class AnalogDelaySt(ParamSet): - """Analog Delay (ST) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - PING_PONG: Param[NoUnit] = Param(4, 'PING_PONG') # switch - QUALITY: Param[NoUnit] = Param(5, 'QUALITY') # rotarySwitch - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME') # float ms - MOD_RATE: Param[HertzUnit] = Param(9, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(10, 'MOD_DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(11, 'WIDTH') # float % - DRIVE: Param[PercentUnit] = Param(12, 'DRIVE') # float % - TRAILS: Param[NoUnit] = Param(13, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(14, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(15, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(16, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(17, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(18, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(19, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(20, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(21, 'GAIN_REDUCTION') # grMeter dB - STEREO_WIDTH: Param[PercentUnit] = Param(22, 'STEREO_WIDTH') # float % - - -class DigitalDelaySt(ParamSet): - """Digital Delay (ST) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - PING_PONG: Param[NoUnit] = Param(4, 'PING_PONG') # switch - SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms - MOD_RATE: Param[HertzUnit] = Param(8, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(9, 'MOD_DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(10, 'WIDTH') # float % - TRAILS: Param[NoUnit] = Param(11, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB - STEREO_WIDTH: Param[PercentUnit] = Param(20, 'STEREO_WIDTH') # float % - - -class DualDelay(ParamSet): - """Dual Delay (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SYNC_L: Param[NoUnit] = Param(1, 'SYNC_L') # switch - SYNC_NOTE_L: Param[NoUnit] = Param(2, 'SYNC_NOTE_L') # rotarySwitch - DELAY_TIME_L: Param[MillisecondsUnit] = Param(3, 'DELAY_TIME_L') # float ms - FEEDBACK_L: Param[PercentUnit] = Param(4, 'FEEDBACK_L') # float % - X_FEEDBACK: Param[PercentUnit] = Param(5, 'X_FEEDBACK') # float % - SYNC_R: Param[NoUnit] = Param(6, 'SYNC_R') # switch - SYNC_NOTE_R: Param[NoUnit] = Param(7, 'SYNC_NOTE_R') # rotarySwitch - DELAY_TIME_R: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME_R') # float ms - FEEDBACK_R: Param[PercentUnit] = Param(9, 'FEEDBACK_R') # float % - HIGH_PASS: Param[HertzUnit] = Param(10, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(11, 'LOW_PASS') # float Hz - MOD_RATE: Param[HertzUnit] = Param(12, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(13, 'MOD_DEPTH') # float % - LINK_FBACK: Param[NoUnit] = Param(14, 'LINK_FBACK') # switch - TRAILS: Param[NoUnit] = Param(15, 'TRAILS') # switch - DYN_DEPTH: Param[DbUnit] = Param(16, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(17, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(18, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(19, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(20, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(21, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(22, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(23, 'GAIN_REDUCTION') # grMeter dB - STEREO_WIDTH: Param[PercentUnit] = Param(24, 'STEREO_WIDTH') # float % - - -class ReverseDelayM(ParamSet): - """Reverse Delay (M) (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - FEEDBACK: Param[PercentUnit] = Param(1, 'FEEDBACK') # float % - FEEDBACK_MODE: Param[NoUnit] = Param(2, 'FEEDBACK_MODE') # switch - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - SYNC: Param[NoUnit] = Param(5, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(6, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(7, 'DELAY_TIME') # float ms - OVERLAP: Param[PercentUnit] = Param(8, 'OVERLAP') # float % - TRIG_THRESHOLD: Param[DbUnit] = Param(9, 'TRIG_THRESHOLD') # floatWithLed dB - DYN_DEPTH: Param[DbUnit] = Param(10, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(11, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(12, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(13, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(14, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(15, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(16, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(17, 'GAIN_REDUCTION') # grMeter dB - TRAILS: Param[NoUnit] = Param(18, 'TRAILS') # switch - - -class DualReverseDelay(ParamSet): - """Dual Reverse Delay (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SYNC: Param[NoUnit] = Param(1, 'SYNC') # switch - SYNC_NOTE_L: Param[NoUnit] = Param(2, 'SYNC_NOTE_L') # rotarySwitch - DELAY_TIME_L: Param[MillisecondsUnit] = Param(3, 'DELAY_TIME_L') # float ms - FEEDBACK_L: Param[PercentUnit] = Param(4, 'FEEDBACK_L') # float % - X_FEEDBACK: Param[PercentUnit] = Param(5, 'X_FEEDBACK') # float % - FEEDBACK_MODE: Param[NoUnit] = Param(6, 'FEEDBACK_MODE') # switch - SYNC_NOTE_R: Param[NoUnit] = Param(7, 'SYNC_NOTE_R') # rotarySwitch - DELAY_TIME_R: Param[MillisecondsUnit] = Param(8, 'DELAY_TIME_R') # float ms - FEEDBACK_R: Param[PercentUnit] = Param(9, 'FEEDBACK_R') # float % - OVERLAP: Param[PercentUnit] = Param(10, 'OVERLAP') # float % - TRIG_THRESHOLD: Param[DbUnit] = Param(11, 'TRIG_THRESHOLD') # floatWithLed dB - DYN_DEPTH: Param[DbUnit] = Param(12, 'DYN_DEPTH') # float dB - DYN_MODE: Param[NoUnit] = Param(13, 'DYN_MODE') # rotarySwitch - THRESHOLD: Param[DbUnit] = Param(14, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(15, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(16, 'RELEASE') # float ms - KNEE: Param[DbUnit] = Param(17, 'KNEE') # float dB - FEEDBACK_DEPTH: Param[PercentUnit] = Param(18, 'FEEDBACK_DEPTH') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(19, 'GAIN_REDUCTION') # grMeter dB - HIGH_PASS: Param[HertzUnit] = Param(20, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(21, 'LOW_PASS') # float Hz - STEREO_WIDTH: Param[PercentUnit] = Param(22, 'STEREO_WIDTH') # float % - TRAILS: Param[NoUnit] = Param(23, 'TRAILS') # switch - LINK_FBACK: Param[NoUnit] = Param(24, 'LINK_FBACK') # switch - - -class CircularDelay(ParamSet): - """Circular Delay (Delay).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - TAP_PRESET: Param[NoUnit] = Param(1, 'TAP_PRESET') # rotarySwitch - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DELAY_TIME: Param[MillisecondsUnit] = Param(4, 'DELAY_TIME') # float ms - FEEDBACK: Param[PercentUnit] = Param(5, 'FEEDBACK') # float % - DIFFUSION: Param[PercentUnit] = Param(6, 'DIFFUSION') # float % - HIGH_PASS: Param[HertzUnit] = Param(7, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(8, 'LOW_PASS') # float Hz - MOD_RATE: Param[HertzUnit] = Param(9, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(10, 'MOD_DEPTH') # float % - VINTAGE_MODE: Param[NoUnit] = Param(11, 'VINTAGE_MODE') # switch - TRAILS: Param[NoUnit] = Param(12, 'TRAILS') # switch - - -class VintageChorus(ParamSet): - """Vintage Chorus (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - MODE: Param[NoUnit] = Param(1, 'MODE') # switch - CHR_RATE: Param[HertzUnit] = Param(2, 'CHR_RATE') # float Hz - VIB_RATE: Param[HertzUnit] = Param(3, 'VIB_RATE') # float Hz - VIB_DEPTH: Param[PercentUnit] = Param(4, 'VIB_DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(5, 'WIDTH') # float % - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - CHR_NOTE: Param[NoUnit] = Param(7, 'CHR_NOTE') # rotarySwitch - VIB_NOTE: Param[NoUnit] = Param(8, 'VIB_NOTE') # rotarySwitch - - -class DualChorus(ParamSet): - """Dual Chorus (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - MODE: Param[NoUnit] = Param(1, 'MODE') # switch - RATE: Param[HertzUnit] = Param(2, 'RATE') # float Hz - DEPTH: Param[PercentUnit] = Param(3, 'DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(4, 'WIDTH') # float % - TONE: Param[NoUnit] = Param(5, 'TONE') # float - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - - -class Vibrato(ParamSet): - """Vibrato (Modulation).""" - - RATE: Param[HertzUnit] = Param(0, 'RATE') # float Hz - DEPTH: Param[PercentUnit] = Param(1, 'DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % - LFO_ACTIVE: Param[NoUnit] = Param(3, 'LFO_ACTIVE') # switch - FADE_IN: Param[MillisecondsUnit] = Param(4, 'FADE_IN') # float ms - FADE_OUT: Param[MillisecondsUnit] = Param(5, 'FADE_OUT') # float ms - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - - -class Flangerish(ParamSet): - """Flangerish (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - DEPTH: Param[PercentUnit] = Param(2, 'DEPTH') # float % - FEEDBACK: Param[PercentUnit] = Param(3, 'FEEDBACK') # float % - WIDTH: Param[PercentUnit] = Param(4, 'WIDTH') # float % - DRIVE: Param[PercentUnit] = Param(5, 'DRIVE') # float % - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - - -class Tremolo(ParamSet): - """Tremolo (Modulation).""" - - RATE: Param[HertzUnit] = Param(0, 'RATE') # float Hz - DEPTH: Param[PercentUnit] = Param(1, 'DEPTH') # float % - WAVEFORM: Param[NoUnit] = Param(2, 'WAVEFORM') # comboBox - DUTY_CYCLE: Param[PercentUnit] = Param(3, 'DUTY_CYCLE') # float % - WIDTH: Param[PercentUnit] = Param(4, 'WIDTH') # float % - SMOOTHING: Param[PercentUnit] = Param(5, 'SMOOTHING') # float % - LFO_ACTIVE: Param[NoUnit] = Param(6, 'LFO_ACTIVE') # switch - FADE_IN: Param[MillisecondsUnit] = Param(7, 'FADE_IN') # float ms - FADE_OUT: Param[MillisecondsUnit] = Param(8, 'FADE_OUT') # float ms - BOOST: Param[PercentUnit] = Param(9, 'BOOST') # float % - SYNC: Param[NoUnit] = Param(10, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(11, 'SYNC_NOTE') # rotarySwitch - - -class Rotary(ParamSet): - """Rotary (Modulation).""" - - SPEED: Param[NoUnit] = Param(0, 'SPEED') # switch - SLOW_SPEED: Param[HertzUnit] = Param(1, 'SLOW_SPEED') # float Hz - FAST_SPEED: Param[HertzUnit] = Param(2, 'FAST_SPEED') # float Hz - ACCELERATION: Param[PercentUnit] = Param(3, 'ACCELERATION') # float % - SPEAKER_BALANCE: Param[PercentUnit] = Param(4, 'SPEAKER_BALANCE') # float % - DRIVE: Param[PercentUnit] = Param(5, 'DRIVE') # float % - BRIGHTNESS: Param[PercentUnit] = Param(6, 'BRIGHTNESS') # float % - HORN_MIC_WIDTH: Param[PercentUnit] = Param(7, 'HORN_MIC_WIDTH') # float % - SYNC: Param[NoUnit] = Param(8, 'SYNC') # switch - SLOW_NOTE: Param[NoUnit] = Param(9, 'SLOW_NOTE') # rotarySwitch - FAST_NOTE: Param[NoUnit] = Param(10, 'FAST_NOTE') # rotarySwitch - - -class DigitalFlanger(ParamSet): - """Digital Flanger (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - DEPTH: Param[PercentUnit] = Param(2, 'DEPTH') # float % - DELAY: Param[MillisecondsUnit] = Param(3, 'DELAY') # float ms - FEEDBACK: Param[PercentUnit] = Param(4, 'FEEDBACK') # float % - POLARITY: Param[NoUnit] = Param(5, 'POLARITY') # switch - WIDTH: Param[PercentUnit] = Param(6, 'WIDTH') # float % - DRIVE: Param[PercentUnit] = Param(7, 'DRIVE') # float % - VOLUME: Param[DbUnit] = Param(8, 'VOLUME') # float dB - SYNC: Param[NoUnit] = Param(9, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(10, 'SYNC_NOTE') # rotarySwitch - - -class FlangerEngine(ParamSet): - """Flanger Engine (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DELAY: Param[MillisecondsUnit] = Param(4, 'DELAY') # float ms - DEPTH: Param[PercentUnit] = Param(5, 'DEPTH') # float % - THR_ZERO: Param[NoUnit] = Param(6, 'THR_ZERO') # switch - FEEDBACK: Param[PercentUnit] = Param(7, 'FEEDBACK') # float % - WAVEFORM: Param[NoUnit] = Param(8, 'WAVEFORM') # rotarySwitch - DUTY_CYCLE: Param[NoUnit] = Param(9, 'DUTY_CYCLE') # float - SKEW: Param[NoUnit] = Param(10, 'SKEW') # float - SMOOTHING: Param[PercentUnit] = Param(11, 'SMOOTHING') # float % - LOW_PASS: Param[HertzUnit] = Param(12, 'LOW_PASS') # float Hz - HIGH_PASS: Param[HertzUnit] = Param(13, 'HIGH_PASS') # float Hz - WIDTH: Param[PercentUnit] = Param(14, 'WIDTH') # float % - RESONANCE: Param[NoUnit] = Param(15, 'RESONANCE') # rotarySwitch - COLOR: Param[NoUnit] = Param(16, 'COLOR') # rotarySwitch - INTENSITY: Param[PercentUnit] = Param(17, 'INTENSITY') # float % - DRIVE_TYPE: Param[NoUnit] = Param(18, 'DRIVE_TYPE') # rotarySwitch - DRIVE: Param[PercentUnit] = Param(19, 'DRIVE') # float % - OUTPUT: Param[DbUnit] = Param(20, 'OUTPUT') # float dB - - -class ChorusEngine(ParamSet): - """Chorus Engine (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DELAY: Param[MillisecondsUnit] = Param(4, 'DELAY') # float ms - DEPTH: Param[PercentUnit] = Param(5, 'DEPTH') # float % - MORPH: Param[PercentUnit] = Param(6, 'MORPH') # float % - RANDOM: Param[PercentUnit] = Param(7, 'RANDOM') # float % - VOICE_MODE: Param[NoUnit] = Param(8, 'VOICE_MODE') # rotarySwitch - TONE: Param[PercentUnit] = Param(9, 'TONE') # float % - TONE_FREQ: Param[HertzUnit] = Param(10, 'TONE_FREQ') # float Hz - LOW_PASS: Param[HertzUnit] = Param(11, 'LOW_PASS') # float Hz - HIGH_PASS: Param[HertzUnit] = Param(12, 'HIGH_PASS') # float Hz - WIDTH: Param[PercentUnit] = Param(13, 'WIDTH') # float % - DRIVE_TYPE: Param[NoUnit] = Param(14, 'DRIVE_TYPE') # rotarySwitch - DRIVE: Param[PercentUnit] = Param(15, 'DRIVE') # float % - OUTPUT: Param[DbUnit] = Param(16, 'OUTPUT') # float dB - - -class MxFlanger(ParamSet): - """MX Flanger (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - MANUAL: Param[PercentUnit] = Param(1, 'MANUAL') # float % - WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % - SPEED: Param[PercentUnit] = Param(3, 'SPEED') # float % - SYNC: Param[NoUnit] = Param(4, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(5, 'SYNC_NOTE') # rotarySwitch - REGEN: Param[PercentUnit] = Param(6, 'REGEN') # float % - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - RATE: Param[NoUnit] = Param(8, 'RATE') # float - DELAY: Param[NoUnit] = Param(9, 'DELAY') # float - DEPTH: Param[NoUnit] = Param(10, 'DEPTH') # float - - -class DreamChorusSt(ParamSet): - """Dream Chorus (ST) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SPEED: Param[PercentUnit] = Param(1, 'SPEED') # float % - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - MODE: Param[NoUnit] = Param(5, 'MODE') # switch - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Chorus229t(ParamSet): - """Chorus 229T (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - WIDTH: Param[PercentUnit] = Param(5, 'WIDTH') # float % - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class ChiefCe2wSt(ParamSet): - """Chief CE2W (ST) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[PercentUnit] = Param(1, 'RATE') # float % - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - TYPE: Param[NoUnit] = Param(5, 'TYPE') # switch - WIDTH: Param[PercentUnit] = Param(6, 'WIDTH') # float % - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class ChiefCe2wM(ParamSet): - """Chief CE2W (M) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[PercentUnit] = Param(1, 'RATE') # float % - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - TYPE: Param[NoUnit] = Param(5, 'TYPE') # switch - OUT_MODE: Param[NoUnit] = Param(6, 'OUT_MODE') # switch - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DreamChorusM(ParamSet): - """Dream Chorus (M) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SPEED: Param[PercentUnit] = Param(1, 'SPEED') # float % - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - MODE: Param[NoUnit] = Param(5, 'MODE') # switch - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class ChiefDc2wSt(ParamSet): - """Chief DC2W (ST) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - MODE: Param[NoUnit] = Param(1, 'MODE') # rotarySwitch - TYPE: Param[NoUnit] = Param(2, 'TYPE') # switch - DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - STEREO: Param[NoUnit] = Param(5, 'STEREO') # switch - - -class MxPhase95(ParamSet): - """MX Phase 95 (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SPEED: Param[PercentUnit] = Param(1, 'SPEED') # float % - SYNC: Param[NoUnit] = Param(2, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(3, 'SYNC_NOTE') # rotarySwitch - TYPE: Param[NoUnit] = Param(4, 'TYPE') # switch - MODE: Param[NoUnit] = Param(5, 'MODE') # switch - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class MxVibe(ParamSet): - """MX Vibe (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - VIBE: Param[NoUnit] = Param(1, 'VIBE') # switch - SPEED: Param[PercentUnit] = Param(2, 'SPEED') # float % - SYNC: Param[NoUnit] = Param(3, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(4, 'SYNC_NOTE') # rotarySwitch - LEVEL: Param[PercentUnit] = Param(5, 'LEVEL') # float % - DEPTH: Param[PercentUnit] = Param(6, 'DEPTH') # float % - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class ChiefDc2wM(ParamSet): - """Chief DC2W (M) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - MODE: Param[NoUnit] = Param(1, 'MODE') # rotarySwitch - TYPE: Param[NoUnit] = Param(2, 'TYPE') # switch - DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % - OUTPUT: Param[DbUnit] = Param(4, 'OUTPUT') # float dB - STEREO: Param[NoUnit] = Param(5, 'STEREO') # switch - - -class Phaser(ParamSet): - """Phaser (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SPEED: Param[NoUnit] = Param(1, 'SPEED') # float - WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % - DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - MANUAL: Param[PercentUnit] = Param(5, 'MANUAL') # float % - RESONANCE: Param[PercentUnit] = Param(6, 'RESONANCE') # float % - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - SYNC: Param[NoUnit] = Param(8, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(9, 'SYNC_NOTE') # rotarySwitch - - -class HarmonicTremolo(ParamSet): - """Harmonic Tremolo (Modulation).""" - - RATE: Param[HertzUnit] = Param(0, 'RATE') # float Hz - DEPTH: Param[PercentUnit] = Param(1, 'DEPTH') # float % - WAVEFORM: Param[NoUnit] = Param(2, 'WAVEFORM') # comboBox - DUTY_CYCLE: Param[PercentUnit] = Param(3, 'DUTY_CYCLE') # float % - SMOOTHING: Param[PercentUnit] = Param(4, 'SMOOTHING') # float % - LFO_ACTIVE: Param[NoUnit] = Param(5, 'LFO_ACTIVE') # switch - FADE_IN: Param[MillisecondsUnit] = Param(6, 'FADE_IN') # float ms - FADE_OUT: Param[MillisecondsUnit] = Param(7, 'FADE_OUT') # float ms - BOOST: Param[PercentUnit] = Param(8, 'BOOST') # float % - LP_XOVER: Param[HertzUnit] = Param(9, 'LP_XOVER') # float Hz - HP_XOVER: Param[HertzUnit] = Param(10, 'HP_XOVER') # float Hz - SYNC: Param[NoUnit] = Param(11, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(12, 'SYNC_NOTE') # rotarySwitch - SYNC_ON: Param[NoUnit] = Param(13, 'SYNC_ON') # switch - - -class MicroProcessorSt(ParamSet): - """Micro Processor (ST) (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SYNC: Param[NoUnit] = Param(1, 'SYNC') # switch - DELAY_TIME_A: Param[MillisecondsUnit] = Param(2, 'DELAY_TIME_A') # float ms - DELAY_TIME_B: Param[MillisecondsUnit] = Param(3, 'DELAY_TIME_B') # float ms - SYNC_NOTE_A: Param[NoUnit] = Param(4, 'SYNC_NOTE_A') # rotarySwitch - SYNC_NOTE_B: Param[NoUnit] = Param(5, 'SYNC_NOTE_B') # rotarySwitch - MOD_SOURCE: Param[NoUnit] = Param(6, 'MOD_SOURCE') # comboBox - LFO_RATE: Param[HertzUnit] = Param(7, 'LFO_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(8, 'MOD_DEPTH') # float % - ENV_GAIN: Param[DbUnit] = Param(9, 'ENV_GAIN') # float dB - FEEDBACK: Param[PercentUnit] = Param(10, 'FEEDBACK') # float % - X_FEEDBACK: Param[NoUnit] = Param(11, 'X_FEEDBACK') # switch - PITCH_A: Param[CentsUnit] = Param(12, 'PITCH_A') # float cents - PITCH_B: Param[CentsUnit] = Param(13, 'PITCH_B') # float cents - A_B_PITCH_MIX: Param[PercentUnit] = Param(14, 'A_B_PITCH_MIX') # float % - TONE: Param[PercentUnit] = Param(15, 'TONE') # float % - OUTPUT: Param[DbUnit] = Param(16, 'OUTPUT') # float dB - TRAILS: Param[NoUnit] = Param(17, 'TRAILS') # switch - - -class PatternTremolo(ParamSet): - """Pattern Tremolo (Modulation).""" - - SYNC: Param[NoUnit] = Param(0, 'SYNC') # switch - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - SYNC_NOTE: Param[NoUnit] = Param(2, 'SYNC_NOTE') # rotarySwitch - SWING: Param[PercentUnit] = Param(3, 'SWING') # float % - DEPTH: Param[PercentUnit] = Param(4, 'DEPTH') # float % - SMOOTH: Param[PercentUnit] = Param(5, 'SMOOTH') # float % - PING_PONG: Param[NoUnit] = Param(6, 'PING_PONG') # switch - RETRIGGER: Param[NoUnit] = Param(7, 'RETRIGGER') # switch - OUTPUT: Param[DbUnit] = Param(8, 'OUTPUT') # float dB - TRANSIENT_THRESHOLD: Param[DbUnit] = Param(9, 'TRANSIENT_THRESHOLD') # float dB - STEPS: Param[NoUnit] = Param(10, 'STEPS') # float - STEP_1: Param[NoUnit] = Param(11, 'STEP_1') # float - STEP_2: Param[NoUnit] = Param(12, 'STEP_2') # float - STEP_3: Param[NoUnit] = Param(13, 'STEP_3') # float - STEP_4: Param[NoUnit] = Param(14, 'STEP_4') # float - STEP_5: Param[NoUnit] = Param(15, 'STEP_5') # float - STEP_6: Param[NoUnit] = Param(16, 'STEP_6') # float - STEP_7: Param[NoUnit] = Param(17, 'STEP_7') # float - STEP_8: Param[NoUnit] = Param(18, 'STEP_8') # float - STEP_9: Param[NoUnit] = Param(19, 'STEP_9') # float - STEP_10: Param[NoUnit] = Param(20, 'STEP_10') # float - STEP_11: Param[NoUnit] = Param(21, 'STEP_11') # float - STEP_12: Param[NoUnit] = Param(22, 'STEP_12') # float - STEP_13: Param[NoUnit] = Param(23, 'STEP_13') # float - STEP_14: Param[NoUnit] = Param(24, 'STEP_14') # float - STEP_15: Param[NoUnit] = Param(25, 'STEP_15') # float - STEP_16: Param[NoUnit] = Param(26, 'STEP_16') # float - STEP_1_CONNECTED: Param[NoUnit] = Param(27, 'STEP_1_CONNECTED') # switch - STEP_2_CONNECTED: Param[NoUnit] = Param(28, 'STEP_2_CONNECTED') # switch - STEP_3_CONNECTED: Param[NoUnit] = Param(29, 'STEP_3_CONNECTED') # switch - STEP_4_CONNECTED: Param[NoUnit] = Param(30, 'STEP_4_CONNECTED') # switch - STEP_5_CONNECTED: Param[NoUnit] = Param(31, 'STEP_5_CONNECTED') # switch - STEP_6_CONNECTED: Param[NoUnit] = Param(32, 'STEP_6_CONNECTED') # switch - STEP_7_CONNECTED: Param[NoUnit] = Param(33, 'STEP_7_CONNECTED') # switch - STEP_8_CONNECTED: Param[NoUnit] = Param(34, 'STEP_8_CONNECTED') # switch - STEP_9_CONNECTED: Param[NoUnit] = Param(35, 'STEP_9_CONNECTED') # switch - STEP_10_CONNECTED: Param[NoUnit] = Param(36, 'STEP_10_CONNECTED') # switch - STEP_11_CONNECTED: Param[NoUnit] = Param(37, 'STEP_11_CONNECTED') # switch - STEP_12_CONNECTED: Param[NoUnit] = Param(38, 'STEP_12_CONNECTED') # switch - STEP_13_CONNECTED: Param[NoUnit] = Param(39, 'STEP_13_CONNECTED') # switch - STEP_14_CONNECTED: Param[NoUnit] = Param(40, 'STEP_14_CONNECTED') # switch - STEP_15_CONNECTED: Param[NoUnit] = Param(41, 'STEP_15_CONNECTED') # switch - - -class Room(ParamSet): - """Room (Reverb).""" - - DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - MIX: Param[PercentUnit] = Param(4, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch - - -class SpringSt(ParamSet): - """Spring (ST) (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DAMPING: Param[PercentUnit] = Param(1, 'DAMPING') # float % - TONE: Param[PercentUnit] = Param(2, 'TONE') # float % - BOING: Param[PercentUnit] = Param(3, 'BOING') # float % - TRAILS: Param[NoUnit] = Param(4, 'TRAILS') # switch - - -class Hall(ParamSet): - """Hall (Reverb).""" - - DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - MIX: Param[PercentUnit] = Param(4, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch - - -class SpringM(ParamSet): - """Spring (M) (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DAMPING: Param[PercentUnit] = Param(1, 'DAMPING') # float % - TONE: Param[PercentUnit] = Param(2, 'TONE') # float % - BOING: Param[PercentUnit] = Param(3, 'BOING') # float % - TRAILS: Param[NoUnit] = Param(4, 'TRAILS') # switch - - -class Modulated(ParamSet): - """Modulated (Reverb).""" - - DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms - MOD_SPEED: Param[HertzUnit] = Param(2, 'MOD_SPEED') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(3, 'MOD_DEPTH') # float % - HIGH_PASS: Param[HertzUnit] = Param(4, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(5, 'LOW_PASS') # float Hz - MIX: Param[PercentUnit] = Param(6, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(7, 'TRAILS') # switch - - -class Ambience(ParamSet): - """Ambience (Reverb).""" - - SIZE: Param[NoUnit] = Param(0, 'SIZE') # rotarySwitch - PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(2, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(3, 'LOW_PASS') # float Hz - MIX: Param[PercentUnit] = Param(4, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch - - -class Cave(ParamSet): - """Cave (Reverb).""" - - DECAY: Param[SecondsUnit] = Param(0, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(1, 'PRE_DELAY') # float ms - DAMPING: Param[PercentUnit] = Param(2, 'DAMPING') # float % - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch - - -class Shimmer(ParamSet): - """Shimmer (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s - BRIGHTNESS: Param[PercentUnit] = Param(2, 'BRIGHTNESS') # float % - FEEDBACK: Param[PercentUnit] = Param(3, 'FEEDBACK') # float % - PITCH: Param[SemitonesUnit] = Param(4, 'PITCH') # float Semitones - TRAILS: Param[NoUnit] = Param(5, 'TRAILS') # switch - PRE_DELAY: Param[MillisecondsUnit] = Param(6, 'PRE_DELAY') # float ms - DAMPING: Param[PercentUnit] = Param(7, 'DAMPING') # float % - HIGH_PASS: Param[HertzUnit] = Param(8, 'HIGH_PASS') # float Hz - RAND_PITCH: Param[CentsUnit] = Param(9, 'RAND_PITCH') # float Cents - MOD_SPEED: Param[HertzUnit] = Param(10, 'MOD_SPEED') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(11, 'MOD_DEPTH') # float % - WET_LEVEL: Param[DbUnit] = Param(12, 'WET_LEVEL') # float dB - - -class MindHall(ParamSet): - """Mind Hall (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - DAMPING: Param[PercentUnit] = Param(5, 'DAMPING') # float % - TRAILS: Param[NoUnit] = Param(6, 'TRAILS') # switch - - -class PlateLush(ParamSet): - """Plate Lush (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - LF_DAMPING: Param[PercentUnit] = Param(5, 'LF_DAMPING') # float % - HF_DAMPING: Param[PercentUnit] = Param(6, 'HF_DAMPING') # float % - MOD_DEPTH: Param[PercentUnit] = Param(7, 'MOD_DEPTH') # float % - TRAILS: Param[NoUnit] = Param(8, 'TRAILS') # switch - - -class Plate(ParamSet): - """Plate (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - LF_DAMPING: Param[PercentUnit] = Param(5, 'LF_DAMPING') # float % - HF_DAMPING: Param[PercentUnit] = Param(6, 'HF_DAMPING') # float % - MOD_DEPTH: Param[PercentUnit] = Param(7, 'MOD_DEPTH') # float % - TRAILS: Param[NoUnit] = Param(8, 'TRAILS') # switch - - -class PlateTight(ParamSet): - """Plate Tight (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[PercentUnit] = Param(1, 'DECAY') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - LF_DAMPING: Param[PercentUnit] = Param(5, 'LF_DAMPING') # float % - HF_DAMPING: Param[PercentUnit] = Param(6, 'HF_DAMPING') # float % - MOD_DEPTH: Param[PercentUnit] = Param(7, 'MOD_DEPTH') # float % - TRAILS: Param[NoUnit] = Param(8, 'TRAILS') # switch - - -class SpringReverbEngineM(ParamSet): - """Spring Reverb Engine (M) (Reverb).""" - - INPUT_GAIN: Param[DbUnit] = Param(0, 'INPUT_GAIN') # float dB - HIGH_PASS: Param[HertzUnit] = Param(1, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(2, 'LOW_PASS') # float Hz - CHIRP_DECAY: Param[PercentUnit] = Param(3, 'CHIRP_DECAY') # float % - DIFF_DECAY: Param[PercentUnit] = Param(4, 'DIFF_DECAY') # float % - CHIRP_LEVEL: Param[PercentUnit] = Param(5, 'CHIRP_LEVEL') # float % - DIFF_LEVEL: Param[PercentUnit] = Param(6, 'DIFF_LEVEL') # float % - TANK_TYPE: Param[NoUnit] = Param(7, 'TANK_TYPE') # comboBox - MIX: Param[PercentUnit] = Param(8, 'MIX') # float % - OUTPUT_GAIN: Param[DbUnit] = Param(9, 'OUTPUT_GAIN') # float dB - TRAILS: Param[NoUnit] = Param(10, 'TRAILS') # switch - - -class SpringReverbEngineSt(ParamSet): - """Spring Reverb Engine (ST) (Reverb).""" - - INPUT_GAIN: Param[DbUnit] = Param(0, 'INPUT_GAIN') # float dB - HIGH_PASS: Param[HertzUnit] = Param(1, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(2, 'LOW_PASS') # float Hz - CHIRP_DECAY: Param[PercentUnit] = Param(3, 'CHIRP_DECAY') # float % - DIFF_DECAY: Param[PercentUnit] = Param(4, 'DIFF_DECAY') # float % - CHIRP_LEVEL: Param[PercentUnit] = Param(5, 'CHIRP_LEVEL') # float % - DIFF_LEVEL: Param[PercentUnit] = Param(6, 'DIFF_LEVEL') # float % - TANK_TYPE: Param[NoUnit] = Param(7, 'TANK_TYPE') # comboBox - MIX: Param[PercentUnit] = Param(8, 'MIX') # float % - OUTPUT_GAIN: Param[DbUnit] = Param(9, 'OUTPUT_GAIN') # float dB - TRAILS: Param[NoUnit] = Param(10, 'TRAILS') # switch - - -class NordicConcertHallSt(ParamSet): - """Nordic Concert Hall (ST) (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - SIZE: Param[PercentUnit] = Param(3, 'SIZE') # float % - H_SHELF_GAIN: Param[DbUnit] = Param(4, 'H_SHELF_GAIN') # float dB - HIGH_PASS: Param[HertzUnit] = Param(5, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(6, 'LOW_PASS') # float Hz - BASS_FREQ: Param[HertzUnit] = Param(7, 'BASS_FREQ') # float Hz - BASS_MULT: Param[NoUnit] = Param(8, 'BASS_MULT') # float x - H_SHELF_FREQ: Param[HertzUnit] = Param(9, 'H_SHELF_FREQ') # float Hz - REV_ATTACK: Param[PercentUnit] = Param(10, 'REV_ATTACK') # float % - EARLY_DIFF: Param[PercentUnit] = Param(11, 'EARLY_DIFF') # float % - LATE_DIFF: Param[PercentUnit] = Param(12, 'LATE_DIFF') # float % - MOD_RATE: Param[HertzUnit] = Param(13, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(14, 'MOD_DEPTH') # float % - TRAILS: Param[NoUnit] = Param(15, 'TRAILS') # switch - - -class StudioPlate70St(ParamSet): - """Studio Plate 70 (ST) (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - SIZE: Param[PercentUnit] = Param(3, 'SIZE') # float % - H_SHELF_GAIN: Param[DbUnit] = Param(4, 'H_SHELF_GAIN') # float dB - HIGH_PASS: Param[HertzUnit] = Param(5, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(6, 'LOW_PASS') # float Hz - BASS_FREQ: Param[HertzUnit] = Param(7, 'BASS_FREQ') # float Hz - BASS_MULT: Param[NoUnit] = Param(8, 'BASS_MULT') # float x - H_SHELF_FREQ: Param[HertzUnit] = Param(9, 'H_SHELF_FREQ') # float Hz - REV_ATTACK: Param[PercentUnit] = Param(10, 'REV_ATTACK') # float % - EARLY_DIFF: Param[PercentUnit] = Param(11, 'EARLY_DIFF') # float % - LATE_DIFF: Param[PercentUnit] = Param(12, 'LATE_DIFF') # float % - MOD_RATE: Param[HertzUnit] = Param(13, 'MOD_RATE') # float Hz - MOD_DEPTH: Param[PercentUnit] = Param(14, 'MOD_DEPTH') # float % - TRAILS: Param[NoUnit] = Param(15, 'TRAILS') # switch - - -class BlossomSt(ParamSet): - """Blossom (ST) (Reverb).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - DECAY: Param[SecondsUnit] = Param(1, 'DECAY') # float s - PRE_DELAY: Param[MillisecondsUnit] = Param(2, 'PRE_DELAY') # float ms - HIGH_PASS: Param[HertzUnit] = Param(3, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(4, 'LOW_PASS') # float Hz - EXTRA_E_R: Param[NoUnit] = Param(5, 'EXTRA_E_R') # switch - E_R_LENGTH: Param[PercentUnit] = Param(6, 'E_R_LENGTH') # float % - DIFFUSION: Param[PercentUnit] = Param(7, 'DIFFUSION') # float % - BASS: Param[DbUnit] = Param(8, 'BASS') # float dB - TREBLE: Param[DbUnit] = Param(9, 'TREBLE') # float dB - DUCKING: Param[PercentUnit] = Param(10, 'DUCKING') # float % - GAIN_REDUCTION: Param[DbUnit] = Param(11, 'GAIN_REDUCTION') # grMeter dB - MODULATION: Param[PercentUnit] = Param(12, 'MODULATION') # float % - TRAILS: Param[NoUnit] = Param(13, 'TRAILS') # switch - - -class BubbaWah(ParamSet): - """Bubba Wah (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - - -class BassWah(ParamSet): - """Bass Wah (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - - -class CryingWah(ParamSet): - """Crying Wah (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - - -class CryingClydeWah(ParamSet): - """Crying Clyde Wah (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - - -class BadHorse(ParamSet): - """Bad Horse (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - - -class CryingWahFromHell(ParamSet): - """Crying Wah From Hell (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - RANGE: Param[NoUnit] = Param(1, 'RANGE') # float - Q: Param[NoUnit] = Param(2, 'Q') # float - FINE_TUNE: Param[NoUnit] = Param(3, 'FINE_TUNE') # float - BOOST: Param[NoUnit] = Param(4, 'BOOST') # switch - BOOST_LEVEL: Param[DbUnit] = Param(5, 'BOOST_LEVEL') # float dB - - -class AutoWah(ParamSet): - """Auto Wah (Wah).""" - - SENSITIVITY: Param[PercentUnit] = Param(0, 'SENSITIVITY') # float % - ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(2, 'RELEASE') # float ms - - -class Send1(ParamSet): - """Send 1 (FX Loop).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - THRU: Param[DbUnit] = Param(1, 'THRU') # float dB - - -class Send2(ParamSet): - """Send 2 (FX Loop).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - THRU: Param[DbUnit] = Param(1, 'THRU') # float dB - - -class Return1(ParamSet): - """Return 1 (FX Loop).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - MIX: Param[PercentUnit] = Param(1, 'MIX') # float % - - -class Return2(ParamSet): - """Return 2 (FX Loop).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - MIX: Param[PercentUnit] = Param(1, 'MIX') # float % - - -class FxLoop1(ParamSet): - """FX Loop 1 (FX Loop).""" - - SEND_LEV: Param[DbUnit] = Param(0, 'SEND_LEV') # float dB - RET_LEV: Param[DbUnit] = Param(1, 'RET_LEV') # float dB - MIX: Param[PercentUnit] = Param(2, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(3, 'TRAILS') # switch - - -class FxLoop2(ParamSet): - """FX Loop 2 (FX Loop).""" - - SEND_LEV: Param[DbUnit] = Param(0, 'SEND_LEV') # float dB - RET_LEV: Param[DbUnit] = Param(1, 'RET_LEV') # float dB - MIX: Param[PercentUnit] = Param(2, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(3, 'TRAILS') # switch - - -class Send12(ParamSet): - """Send 1/2 (FX Loop).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - THRU: Param[DbUnit] = Param(1, 'THRU') # float dB - - -class Return12(ParamSet): - """Return 1/2 (FX Loop).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - MIX: Param[PercentUnit] = Param(1, 'MIX') # float % - - -class FxLoop12(ParamSet): - """FX Loop 1/2 (FX Loop).""" - - SEND_LEV: Param[DbUnit] = Param(0, 'SEND_LEV') # float dB - RET_LEV: Param[DbUnit] = Param(1, 'RET_LEV') # float dB - MIX: Param[PercentUnit] = Param(2, 'MIX') # float % - TRAILS: Param[NoUnit] = Param(3, 'TRAILS') # switch - - -class AdaptiveGate(ParamSet): - """Adaptive Gate (Utility).""" - - NOISE_REDUCTION: Param[PercentUnit] = Param(0, 'NOISE_REDUCTION') # float % - - -class UtilityGate(ParamSet): - """Utility Gate (Utility).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms - HOLD: Param[MillisecondsUnit] = Param(2, 'HOLD') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - RANGE: Param[DbUnit] = Param(4, 'RANGE') # float dB - - -class SimpleGate(ParamSet): - """Simple Gate (Utility).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - - -class Gain(ParamSet): - """Gain (Utility).""" - - LEVEL: Param[DbUnit] = Param(0, 'LEVEL') # float dB - PAN: Param[NoUnit] = Param(1, 'PAN') # float - PHASE_INVERT: Param[NoUnit] = Param(2, 'PHASE_INVERT') # switch - - -class Volume(ParamSet): - """Volume (Utility).""" - - LEVEL: Param[PercentUnit] = Param(0, 'LEVEL') # float % - CURVE: Param[NoUnit] = Param(1, 'CURVE') # switch - - -class AdaptiveGateSC(ParamSet): - """Adaptive Gate (S/C) (Utility).""" - - NOISE_REDUCTION: Param[PercentUnit] = Param(0, 'NOISE_REDUCTION') # float % - SOURCE: Param[NoUnit] = Param(1, 'SOURCE') # comboBox - - -class PluginBlend(ParamSet): - """Plugin Blend (Utility).""" - - INPUTSOURCEID: Param[NoUnit] = Param(0, 'INPUTSOURCEID') # int - INPUTCHANNEL: Param[NoUnit] = Param(1, 'INPUTCHANNEL') # int - STEREOINPUT: Param[NoUnit] = Param(2, 'STEREOINPUT') # int - DELAY: Param[NoUnit] = Param(3, 'DELAY') # int - BLEND: Param[PercentUnit] = Param(4, 'BLEND') # float % - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox - - -class PluginGate(ParamSet): - """Plugin Gate (Utility).""" - - THRESHOLD: Param[DbUnit] = Param(0, 'THRESHOLD') # float dB - - -class Doubler(ParamSet): - """Doubler (Utility).""" - - ENABLED: Param[NoUnit] = Param(0, 'ENABLED') # switch - SPREAD: Param[MillisecondsUnit] = Param(1, 'SPREAD') # float ms - DRY_LEVEL: Param[DbUnit] = Param(2, 'DRY_LEVEL') # float dB - FX_LEVEL: Param[DbUnit] = Param(3, 'FX_LEVEL') # float dB - TRIGGER: Param[NoUnit] = Param(4, 'TRIGGER') # comboBox - - -class PluginDoubler(ParamSet): - """Plugin Doubler (Utility).""" - - ENABLED: Param[NoUnit] = Param(0, 'ENABLED') # switch - SPREAD: Param[MillisecondsUnit] = Param(1, 'SPREAD') # float ms - DRY_LEVEL: Param[DbUnit] = Param(2, 'DRY_LEVEL') # float dB - FX_LEVEL: Param[DbUnit] = Param(3, 'FX_LEVEL') # float dB - TRIGGER: Param[NoUnit] = Param(4, 'TRIGGER') # comboBox - - -class TransparentBlend(ParamSet): - """Transparent Blend (Utility).""" - - INPUTSOURCEID: Param[NoUnit] = Param(0, 'INPUTSOURCEID') # int - INPUTCHANNEL: Param[NoUnit] = Param(1, 'INPUTCHANNEL') # int - STEREOINPUT: Param[NoUnit] = Param(2, 'STEREOINPUT') # int - DELAY: Param[NoUnit] = Param(3, 'DELAY') # int - BLEND: Param[PercentUnit] = Param(4, 'BLEND') # float % - OUTPUT: Param[DbUnit] = Param(5, 'OUTPUT') # float dB - SOURCE: Param[NoUnit] = Param(6, 'SOURCE') # comboBox - - -class PhaseDoctor(ParamSet): - """Phase Doctor (Utility).""" - - POLARITY: Param[NoUnit] = Param(0, 'POLARITY') # switch - ADJUST: Param[NoUnit] = Param(1, 'ADJUST') # rotarySwitch - CENTER: Param[NoUnit] = Param(2, 'CENTER') # switch - SHIFT: Param[PercentUnit] = Param(3, 'SHIFT') # float % - STEREO_LINK: Param[NoUnit] = Param(4, 'STEREO_LINK') # switch - POLARITY_R: Param[NoUnit] = Param(5, 'POLARITY_R') # switch - ADJUST_R: Param[NoUnit] = Param(6, 'ADJUST_R') # rotarySwitch - CENTER_R: Param[NoUnit] = Param(7, 'CENTER_R') # switch - SHIFT_R: Param[PercentUnit] = Param(8, 'SHIFT_R') # float % - - -class PitchShifter(ParamSet): - """Pitch Shifter (Pitch).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - PITCH_COARSE: Param[SemitonesUnit] = Param(1, 'PITCH_COARSE') # float Semitones - PITCH_FINE: Param[CentsUnit] = Param(2, 'PITCH_FINE') # float Cents - - -class PolyOctaver(ParamSet): - """Poly Octaver (Pitch).""" - - DRY: Param[PercentUnit] = Param(0, 'DRY') # float % - OCT: Param[PercentUnit] = Param(1, 'OCT') # float % - SUB: Param[PercentUnit] = Param(2, 'SUB') # float % - - -class Wham(ParamSet): - """Wham (Pitch).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - PEDAL: Param[PercentUnit] = Param(1, 'PEDAL') # float % - HEEL_PITCH_1: Param[SemitonesUnit] = Param(2, 'HEEL_PITCH_1') # float Semitones - TOE_PITCH_1: Param[SemitonesUnit] = Param(3, 'TOE_PITCH_1') # float Semitones - HEEL_PITCH_2: Param[SemitonesUnit] = Param(4, 'HEEL_PITCH_2') # float Semitones - TOE_PITCH_2: Param[SemitonesUnit] = Param(5, 'TOE_PITCH_2') # float Semitones - BLEND: Param[PercentUnit] = Param(6, 'BLEND') # float % - - -class Minivoicer(ParamSet): - """Minivoicer (Pitch).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - ROOT: Param[NoUnit] = Param(1, 'ROOT') # comboBox - MODE: Param[NoUnit] = Param(2, 'MODE') # comboBox - TUNING: Param[HertzUnit] = Param(3, 'TUNING') # float Hz - QUANTIZE: Param[NoUnit] = Param(4, 'QUANTIZE') # switch - V1_ACTIVE: Param[NoUnit] = Param(5, 'V1_ACTIVE') # switch - V1_LEVEL: Param[DbUnit] = Param(6, 'V1_LEVEL') # float dB - V1_INTER: Param[NoUnit] = Param(7, 'V1_INTER') # rotarySwitch - V1_PAN: Param[NoUnit] = Param(8, 'V1_PAN') # float - V2_ACTIVE: Param[NoUnit] = Param(9, 'V2_ACTIVE') # switch - V2_LEVEL: Param[DbUnit] = Param(10, 'V2_LEVEL') # float dB - V2_INTER: Param[NoUnit] = Param(11, 'V2_INTER') # rotarySwitch - V2_PAN: Param[NoUnit] = Param(12, 'V2_PAN') # float - HIGH_PASS: Param[HertzUnit] = Param(13, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(14, 'LOW_PASS') # float Hz - MIDI: Param[NoUnit] = Param(15, 'MIDI') # switch - GLISSANDO: Param[MillisecondsUnit] = Param(16, 'GLISSANDO') # float ms - OUTPUT: Param[DbUnit] = Param(17, 'OUTPUT') # float dB - V1_NOTE: Param[NoUnit] = Param(18, 'V1_NOTE') # float - V2_NOTE: Param[NoUnit] = Param(19, 'V2_NOTE') # float - V1_SEMIT: Param[NoUnit] = Param(20, 'V1_SEMIT') # float - V2_SEMIT: Param[NoUnit] = Param(21, 'V2_SEMIT') # float - MIDI_CH: Param[NoUnit] = Param(22, 'MIDI_CH') # comboBox - V1_NOTE_DISPLAY: Param[NoUnit] = Param(23, 'V1_NOTE_DISPLAY') # float - V2_NOTE_DISPLAY: Param[NoUnit] = Param(24, 'V2_NOTE_DISPLAY') # float - - -class Transpose(ParamSet): - """Transpose (Pitch).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - PITCH_COARSE: Param[SemitonesUnit] = Param(1, 'PITCH_COARSE') # float Semitones - PITCH_FINE: Param[CentsUnit] = Param(2, 'PITCH_FINE') # float Cents - SEMITONES: Param[SemitonesUnit] = Param(3, 'SEMITONES') # float Semitones - - -class PitchCorrection(ParamSet): - """Pitch Correction (Pitch).""" - - ROOT: Param[NoUnit] = Param(0, 'ROOT') # comboBox - MODE: Param[NoUnit] = Param(1, 'MODE') # comboBox - TUNING: Param[HertzUnit] = Param(2, 'TUNING') # float Hz - QUANTIZE: Param[PercentUnit] = Param(3, 'QUANTIZE') # float % - GLISSANDO: Param[MillisecondsUnit] = Param(4, 'GLISSANDO') # float ms - HIGH_PASS: Param[HertzUnit] = Param(5, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(6, 'LOW_PASS') # float Hz - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class ChiefOc2(ParamSet): - """Chief OC2 (Pitch).""" - - OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB - DRY: Param[PercentUnit] = Param(1, 'DRY') # float % - OCT_1: Param[PercentUnit] = Param(2, 'OCT_1') # float % - OCT_2: Param[PercentUnit] = Param(3, 'OCT_2') # float % - - -class SubharmonicSynth(ParamSet): - """Subharmonic Synth (Pitch).""" - - OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB - DRY: Param[PercentUnit] = Param(1, 'DRY') # float % - OCTAVE: Param[PercentUnit] = Param(2, 'OCTAVE') # float % - CHARACTER: Param[PercentUnit] = Param(3, 'CHARACTER') # float % - LOW: Param[PercentUnit] = Param(4, 'LOW') # float % - SUB: Param[PercentUnit] = Param(5, 'SUB') # float % - - -class AggiSubOctaver(ParamSet): - """Aggi Sub Octaver (Pitch).""" - - OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB - CLEAN_LEVEL: Param[PercentUnit] = Param(1, 'CLEAN_LEVEL') # float % - CLEAN_TONE: Param[PercentUnit] = Param(2, 'CLEAN_TONE') # float % - OCTAVE_LEVEL: Param[PercentUnit] = Param(3, 'OCTAVE_LEVEL') # float % - OCTAVE_FILTER: Param[PercentUnit] = Param(4, 'OCTAVE_FILTER') # float % - - -class LoveMeat(ParamSet): - """Love Meat (Filter).""" - - SENSITIVITY: Param[NoUnit] = Param(0, 'SENSITIVITY') # float - ATTACK: Param[NoUnit] = Param(1, 'ATTACK') # float - DECAY: Param[NoUnit] = Param(2, 'DECAY') # float - COLOR: Param[NoUnit] = Param(3, 'COLOR') # float - INTENSITY: Param[NoUnit] = Param(4, 'INTENSITY') # float - BLEND: Param[NoUnit] = Param(5, 'BLEND') # float - TRIG_DIRECTION: Param[NoUnit] = Param(6, 'TRIG_DIRECTION') # switch - TRIGGER_MODE: Param[NoUnit] = Param(7, 'TRIGGER_MODE') # rotarySwitch - FILTER_CUTOFF: Param[NoUnit] = Param(8, 'FILTER_CUTOFF') # rotarySwitch - FILTER_TYPE: Param[NoUnit] = Param(9, 'FILTER_TYPE') # rotarySwitch - LEVEL: Param[DbUnit] = Param(10, 'LEVEL') # float dB - - -class Foog(ParamSet): - """Foog (Filter).""" - - DRIVE: Param[NoUnit] = Param(0, 'DRIVE') # float - DECAY: Param[NoUnit] = Param(1, 'DECAY') # switch - ENV_AMOUNT: Param[NoUnit] = Param(2, 'ENV_AMOUNT') # float - CUTOFF: Param[NoUnit] = Param(3, 'CUTOFF') # float - RESONANCE: Param[NoUnit] = Param(4, 'RESONANCE') # float - MIX: Param[PercentUnit] = Param(5, 'MIX') # float % - FILTER: Param[NoUnit] = Param(6, 'FILTER') # switch - LEVEL: Param[DbUnit] = Param(7, 'LEVEL') # float dB - - -class EnvelopeFilter(ParamSet): - """Envelope Filter (Filter).""" - - SENS: Param[DbUnit] = Param(0, 'SENS') # float dB - ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms - DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms - LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float - LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB - FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz - FREQ_DEPTH: Param[HertzUnit] = Param(6, 'FREQ_DEPTH') # float Hz - RESO: Param[NoUnit] = Param(7, 'RESO') # float - RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float - MIX: Param[PercentUnit] = Param(9, 'MIX') # float % - - -class EnvelopeFilterSC(ParamSet): - """Envelope Filter (S/C) (Filter).""" - - SENS: Param[DbUnit] = Param(0, 'SENS') # float dB - ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms - DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms - LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float - LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB - FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz - FREQ_DEPTH: Param[HertzUnit] = Param(6, 'FREQ_DEPTH') # float Hz - RESO: Param[NoUnit] = Param(7, 'RESO') # float - RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float - MIX: Param[PercentUnit] = Param(9, 'MIX') # float % - SOURCE: Param[NoUnit] = Param(10, 'SOURCE') # comboBox - - -class Freeze(ParamSet): - """Freeze (Morph).""" - - ON_OFF: Param[NoUnit] = Param(0, 'ON_OFF') # toggleButton - MOMENTARY: Param[NoUnit] = Param(1, 'MOMENTARY') # switch - ATTACK: Param[MillisecondsUnit] = Param(2, 'ATTACK') # float ms - RELEASE: Param[MillisecondsUnit] = Param(3, 'RELEASE') # float ms - DRY_GAIN: Param[DbUnit] = Param(4, 'DRY_GAIN') # float dB - FREEZE_GAIN: Param[DbUnit] = Param(5, 'FREEZE_GAIN') # float dB - HIGH_PASS: Param[HertzUnit] = Param(6, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(7, 'LOW_PASS') # float Hz - - -class PhaseLockedLoop(ParamSet): - """Phase-Locked Loop (Morph).""" - - OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB - DRY_LEVEL: Param[PercentUnit] = Param(1, 'DRY_LEVEL') # float % - UNISON_LEVEL: Param[PercentUnit] = Param(2, 'UNISON_LEVEL') # float % - MUL_LEVEL: Param[PercentUnit] = Param(3, 'MUL_LEVEL') # float % - DIV_LEVEL: Param[PercentUnit] = Param(4, 'DIV_LEVEL') # float % - MUL_SOURCE: Param[NoUnit] = Param(5, 'MUL_SOURCE') # comboBox - DIV_SOURCE: Param[NoUnit] = Param(6, 'DIV_SOURCE') # comboBox - MULTIPLIER: Param[NoUnit] = Param(7, 'MULTIPLIER') # rotarySwitch - DIVIDER: Param[NoUnit] = Param(8, 'DIVIDER') # rotarySwitch - RESPONSE: Param[PercentUnit] = Param(9, 'RESPONSE') # float % - STABILITY: Param[PercentUnit] = Param(10, 'STABILITY') # float % - THRESHOLD: Param[DbUnit] = Param(11, 'THRESHOLD') # float dB - TRAILS_GATE: Param[NoUnit] = Param(12, 'TRAILS_GATE') # switch - INSTRUMENT: Param[NoUnit] = Param(13, 'INSTRUMENT') # switch - - -class BitCrusherSt(ParamSet): - """Bit-Crusher (ST) (Morph).""" - - OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB - DRY: Param[PercentUnit] = Param(1, 'DRY') # float % - WET: Param[PercentUnit] = Param(2, 'WET') # float % - RESAMPLER: Param[HertzUnit] = Param(3, 'RESAMPLER') # float Hz - BIT_DEPTH: Param[NoUnit] = Param(4, 'BIT_DEPTH') # rotarySwitch bits - SHAPE: Param[PercentUnit] = Param(5, 'SHAPE') # float % - TONE: Param[HertzUnit] = Param(6, 'TONE') # float Hz - - -class BitCrusherEngineM(ParamSet): - """Bit-Crusher Engine (M) (Morph).""" - - OUTPUT: Param[DbUnit] = Param(0, 'OUTPUT') # float dB - DRY: Param[PercentUnit] = Param(1, 'DRY') # float % - WET: Param[PercentUnit] = Param(2, 'WET') # float % - RESAMPLER: Param[HertzUnit] = Param(3, 'RESAMPLER') # float Hz - FREQ_MULTI: Param[NoUnit] = Param(4, 'FREQ_MULTI') # float - DISSONANCE: Param[PercentUnit] = Param(5, 'DISSONANCE') # float % - PITCH_TRACKING: Param[NoUnit] = Param(6, 'PITCH_TRACKING') # switch - BIT_DEPTH: Param[NoUnit] = Param(7, 'BIT_DEPTH') # rotarySwitch bits - SHAPE: Param[PercentUnit] = Param(8, 'SHAPE') # float % - TONE: Param[HertzUnit] = Param(9, 'TONE') # float Hz - - -class LooperX(ParamSet): - """Looper X (Loopers).""" - - RECORD_OVERDUB: Param[NoUnit] = Param(0, 'RECORD_OVERDUB') # switch - PLAY_STOP: Param[NoUnit] = Param(1, 'PLAY_STOP') # switch - UNDO: Param[NoUnit] = Param(2, 'UNDO') # switch - DUPLICATE: Param[NoUnit] = Param(3, 'DUPLICATE') # switch - ONE_SHOT: Param[NoUnit] = Param(4, 'ONE_SHOT') # switch - HALF_SPEED: Param[NoUnit] = Param(5, 'HALF_SPEED') # switch - PUNCH: Param[NoUnit] = Param(6, 'PUNCH') # switch - REVERSE: Param[NoUnit] = Param(7, 'REVERSE') # switch - PLAYBACK_LEVEL: Param[DbUnit] = Param(8, 'PLAYBACK_LEVEL') # float dB - OVERDUB_LEVEL: Param[DbUnit] = Param(9, 'OVERDUB_LEVEL') # float dB - HIGH_PASS: Param[HertzUnit] = Param(10, 'HIGH_PASS') # float Hz - LOW_PASS: Param[HertzUnit] = Param(11, 'LOW_PASS') # float Hz - THRESHOLD: Param[DbUnit] = Param(12, 'THRESHOLD') # float dB - RECORD_MODE: Param[NoUnit] = Param(13, 'RECORD_MODE') # switch - OVERDUB_MODE: Param[NoUnit] = Param(14, 'OVERDUB_MODE') # switch - DUPLICATE_MODE: Param[NoUnit] = Param(15, 'DUPLICATE_MODE') # switch - PUNCH_MODE: Param[NoUnit] = Param(16, 'PUNCH_MODE') # switch - ROUTING_MODE: Param[NoUnit] = Param(17, 'ROUTING_MODE') # rotarySwitch - QUANTIZE: Param[NoUnit] = Param(18, 'QUANTIZE') # rotarySwitch - MIDI_CLOCK_START: Param[NoUnit] = Param(19, 'MIDI_CLOCK_START') # switch - PRE_ROLL: Param[NoUnit] = Param(20, 'PRE_ROLL') # rotarySwitch - METRONOME_MUTE: Param[NoUnit] = Param(21, 'METRONOME_MUTE') # toggleButton - REC_LENGTH: Param[NoUnit] = Param(22, 'REC_LENGTH') # rotarySwitch - - -class SingleM(ParamSet): - """Single (M) (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class SingleSt(ParamSet): - """Single (ST) (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class DualM(ParamSet): - """Dual (M) (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class DualSt(ParamSet): - """Dual (ST) (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_BALANCE: Param[NoUnit] = Param(6, 'IR_1_BALANCE') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_BALANCE: Param[NoUnit] = Param(14, 'IR_2_BALANCE') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class SingleMLite(ParamSet): - """Single (M) Lite (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class SingleStLite(ParamSet): - """Single (ST) Lite (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class DualMLite(ParamSet): - """Dual (M) Lite (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_PAN: Param[NoUnit] = Param(6, 'IR_1_PAN') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_PAN: Param[NoUnit] = Param(14, 'IR_2_PAN') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class DualStLite(ParamSet): - """Dual (ST) Lite (IRLoaders).""" - - IR_1_MUTE: Param[NoUnit] = Param(0, 'IR_1_MUTE') # switch - IR_1_INVERT: Param[NoUnit] = Param(1, 'IR_1_INVERT') # switch - IR_1_PATH: Param[NoUnit] = Param(2, 'IR_1_PATH') # string - IR_1_LEVEL: Param[DbUnit] = Param(3, 'IR_1_LEVEL') # float dB - IR_1_HI_PASS: Param[HertzUnit] = Param(4, 'IR_1_HI_PASS') # float Hz - IR_1_LOW_PASS: Param[HertzUnit] = Param(5, 'IR_1_LOW_PASS') # float Hz - IR_1_BALANCE: Param[NoUnit] = Param(6, 'IR_1_BALANCE') # float - IR_1_DELAY: Param[MillisecondsUnit] = Param(7, 'IR_1_DELAY') # float ms - IR_2_MUTE: Param[NoUnit] = Param(8, 'IR_2_MUTE') # switch - IR_2_INVERT: Param[NoUnit] = Param(9, 'IR_2_INVERT') # switch - IR_2_PATH: Param[NoUnit] = Param(10, 'IR_2_PATH') # string - IR_2_LEVEL: Param[DbUnit] = Param(11, 'IR_2_LEVEL') # float dB - IR_2_HI_PASS: Param[HertzUnit] = Param(12, 'IR_2_HI_PASS') # float Hz - IR_2_LOW_PASS: Param[HertzUnit] = Param(13, 'IR_2_LOW_PASS') # float Hz - IR_2_BALANCE: Param[NoUnit] = Param(14, 'IR_2_BALANCE') # float - IR_2_DELAY: Param[MillisecondsUnit] = Param(15, 'IR_2_DELAY') # float ms - ROOM_MIX: Param[PercentUnit] = Param(16, 'ROOM_MIX') # float % - PRE_DELAY: Param[MillisecondsUnit] = Param(17, 'PRE_DELAY') # float ms - REV_HI_PASS: Param[HertzUnit] = Param(18, 'REV_HI_PASS') # float Hz - REV_LOW_PASS: Param[HertzUnit] = Param(19, 'REV_LOW_PASS') # float Hz - SIZE: Param[NoUnit] = Param(20, 'SIZE') # rotarySwitch - GLOBAL_OUTPUT: Param[DbUnit] = Param(21, 'GLOBAL_OUTPUT') # float dB - IR_1_NAME: Param[NoUnit] = Param(22, 'IR_1_NAME') # string - IR_2_NAME: Param[NoUnit] = Param(23, 'IR_2_NAME') # string - - -class MonoSynth(ParamSet): - """Mono Synth (Synth).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SENSITIVITY: Param[PercentUnit] = Param(1, 'SENSITIVITY') # float % - ENV_RETRIGGER: Param[NoUnit] = Param(2, 'ENV_RETRIGGER') # switch - TUNING: Param[HertzUnit] = Param(3, 'TUNING') # float Hz - QUANTIZE: Param[NoUnit] = Param(4, 'QUANTIZE') # switch - ROOT: Param[NoUnit] = Param(5, 'ROOT') # comboBox - SCALE: Param[NoUnit] = Param(6, 'SCALE') # switch - SYNTH_ACTIVE: Param[NoUnit] = Param(7, 'SYNTH_ACTIVE') # switch - SYNTH_LEVEL: Param[DbUnit] = Param(8, 'SYNTH_LEVEL') # float dB - OSC1_ACTIVE: Param[NoUnit] = Param(9, 'OSC1_ACTIVE') # switch - OSC1_WAVE: Param[NoUnit] = Param(10, 'OSC1_WAVE') # rotarySwitch - OSC_1_LEVEL: Param[DbUnit] = Param(11, 'OSC_1_LEVEL') # float dB - OSC_1_STEPS: Param[SemitonesUnit] = Param(12, 'OSC_1_STEPS') # float st - OSC_1_DETUNE: Param[PercentUnit] = Param(13, 'OSC_1_DETUNE') # float % - OSC2_ACTIVE: Param[NoUnit] = Param(14, 'OSC2_ACTIVE') # switch - OSC2_WAVE: Param[NoUnit] = Param(15, 'OSC2_WAVE') # rotarySwitch - OSC_2_LEVEL: Param[DbUnit] = Param(16, 'OSC_2_LEVEL') # float dB - OSC_2_STEPS: Param[SemitonesUnit] = Param(17, 'OSC_2_STEPS') # float st - OSC_2_DETUNE: Param[PercentUnit] = Param(18, 'OSC_2_DETUNE') # float % - UNISON_SOURCE: Param[NoUnit] = Param(19, 'UNISON_SOURCE') # comboBox - UNI_AMOUNT: Param[NoUnit] = Param(20, 'UNI_AMOUNT') # rotarySwitch - UNI_DETUNE: Param[PercentUnit] = Param(21, 'UNI_DETUNE') # float % - UNI_WIDTH: Param[PercentUnit] = Param(22, 'UNI_WIDTH') # float % - FILTER: Param[NoUnit] = Param(23, 'FILTER') # switch - SLOPE: Param[NoUnit] = Param(24, 'SLOPE') # rotarySwitch - CUTOFF: Param[HertzUnit] = Param(25, 'CUTOFF') # float Hz - FILT_MOD: Param[PercentUnit] = Param(26, 'FILT_MOD') # float % - RESONANCE: Param[PercentUnit] = Param(27, 'RESONANCE') # float % - DRIVE: Param[PercentUnit] = Param(28, 'DRIVE') # float % - F_E_AMOUNT: Param[PercentUnit] = Param(29, 'F_E_AMOUNT') # float % - F_E_DCY_ATCK: Param[MillisecondsUnit] = Param(30, 'F_E_DCY_ATCK') # float ms - F_E_SUSTAIN: Param[PercentUnit] = Param(31, 'F_E_SUSTAIN') # float % - ENV_DCY_ATCK: Param[MillisecondsUnit] = Param(32, 'ENV_DCY_ATCK') # float ms - ENV_SUSTAIN: Param[PercentUnit] = Param(33, 'ENV_SUSTAIN') # float % - GATE: Param[DbUnit] = Param(34, 'GATE') # float dB - OUTPUT: Param[DbUnit] = Param(35, 'OUTPUT') # float dB - GLIDE: Param[MillisecondsUnit] = Param(36, 'GLIDE') # float ms - S_C_SOURCE: Param[NoUnit] = Param(37, 'S_C_SOURCE') # comboBox - ARPEGGIATOR: Param[NoUnit] = Param(38, 'ARPEGGIATOR') # switch - ARP_PATTERN: Param[NoUnit] = Param(39, 'ARP_PATTERN') # rotarySwitch - OCTAVE: Param[NoUnit] = Param(40, 'OCTAVE') # rotarySwitch - ARP_NOTE_2: Param[NoUnit] = Param(41, 'ARP_NOTE_2') # switch - ARP_NOTE_3: Param[NoUnit] = Param(42, 'ARP_NOTE_3') # switch - ARP_NOTE_4: Param[NoUnit] = Param(43, 'ARP_NOTE_4') # switch - ARP_NOTE_5: Param[NoUnit] = Param(44, 'ARP_NOTE_5') # switch - ARP_NOTE_6: Param[NoUnit] = Param(45, 'ARP_NOTE_6') # switch - ARP_NOTE_7: Param[NoUnit] = Param(46, 'ARP_NOTE_7') # switch - ARP_NOTE_8: Param[NoUnit] = Param(47, 'ARP_NOTE_8') # switch - FREE_RATE: Param[HertzUnit] = Param(48, 'FREE_RATE') # float Hz - SYNC: Param[NoUnit] = Param(49, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(50, 'SYNC_NOTE') # comboBox - MIDI_CH: Param[NoUnit] = Param(51, 'MIDI_CH') # comboBox - MIDI_NOTE: Param[NoUnit] = Param(52, 'MIDI_NOTE') # float - MIDI_VELOCITY: Param[NoUnit] = Param(53, 'MIDI_VELOCITY') # float - MIDI_TRIGGER: Param[NoUnit] = Param(54, 'MIDI_TRIGGER') # switch - - -class Green808Legacy(ParamSet): - """Green 808 (Guitar Overdrive).""" - - OVERDRIVE: Param[NoUnit] = Param(0, 'OVERDRIVE') # float - TONE: Param[NoUnit] = Param(1, 'TONE') # float - LEVEL: Param[NoUnit] = Param(2, 'LEVEL') # float - - -class Ev101iiisRedEl34100wLegacy(ParamSet): - """EV101IIIS Red EL34 100W (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Solo100LeadLegacy(ParamSet): - """Solo 100 Lead (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class UsDlxNormalLegacy(ParamSet): - """US DLX Normal (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class UsDlxVibratoLegacy(ParamSet): - """US DLX Vibrato (Guitar Amplifier).""" - - VOLUME: Param[NoUnit] = Param(0, 'VOLUME') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - TREBLE: Param[NoUnit] = Param(2, 'TREBLE') # float - OUTPUT: Param[DbUnit] = Param(3, 'OUTPUT') # float dB - - -class Ev101iiisBlueEl34100wLegacy(ParamSet): - """EV101IIIS Blue EL34 100W (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - RESONANCE: Param[NoUnit] = Param(6, 'RESONANCE') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Solo100CrunchBrightLegacy(ParamSet): - """Solo 100 Crunch Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class Solo100CrunchNormalLegacy(ParamSet): - """Solo 100 Crunch Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - OUTPUT: Param[DbUnit] = Param(6, 'OUTPUT') # float dB - - -class DCellH4Ch1BrightLegacy(ParamSet): - """D-Cell H4 Ch1 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch1NormalLegacy(ParamSet): - """D-Cell H4 Ch1 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch2BrightLegacy(ParamSet): - """D-Cell H4 Ch2 Bright (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch2NormalLegacy(ParamSet): - """D-Cell H4 Ch2 Normal (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch3Legacy(ParamSet): - """D-Cell H4 Ch3 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class DCellH4Ch4Legacy(ParamSet): - """D-Cell H4 Ch4 (Guitar Amplifier).""" - - GAIN: Param[NoUnit] = Param(0, 'GAIN') # float - BASS: Param[NoUnit] = Param(1, 'BASS') # float - MID: Param[NoUnit] = Param(2, 'MID') # float - TREBLE: Param[NoUnit] = Param(3, 'TREBLE') # float - MASTER: Param[NoUnit] = Param(4, 'MASTER') # float - PRESENCE: Param[NoUnit] = Param(5, 'PRESENCE') # float - DEEP: Param[NoUnit] = Param(6, 'DEEP') # float - OUTPUT: Param[DbUnit] = Param(7, 'OUTPUT') # float dB - - -class Graphic9Legacy(ParamSet): - """Graphic-9 (Equalizer).""" - - HPF: Param[HertzUnit] = Param(0, 'HPF') # float Hz - N65HZ: Param[DbUnit] = Param(1, 'N65HZ') # float dB - N125HZ: Param[DbUnit] = Param(2, 'N125HZ') # float dB - N250HZ: Param[DbUnit] = Param(3, 'N250HZ') # float dB - N500HZ: Param[DbUnit] = Param(4, 'N500HZ') # float dB - N1KHZ: Param[DbUnit] = Param(5, 'N1KHZ') # float dB - N2KHZ: Param[DbUnit] = Param(6, 'N2KHZ') # float dB - N4KHZ: Param[DbUnit] = Param(7, 'N4KHZ') # float dB - N8KHZ: Param[DbUnit] = Param(8, 'N8KHZ') # float dB - N16KHZ: Param[DbUnit] = Param(9, 'N16KHZ') # float dB - OUTPUT: Param[DbUnit] = Param(10, 'OUTPUT') # float dB - - -class PhaserLegacy(ParamSet): - """Phaser (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - SPEED: Param[NoUnit] = Param(1, 'SPEED') # float - WIDTH: Param[PercentUnit] = Param(2, 'WIDTH') # float % - DRIVE: Param[PercentUnit] = Param(3, 'DRIVE') # float % - SYNC: Param[NoUnit] = Param(4, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(5, 'SYNC_NOTE') # rotarySwitch - - -class NuvibesLegacy(ParamSet): - """NuVibes (Modulation).""" - - MIX: Param[PercentUnit] = Param(0, 'MIX') # float % - RATE: Param[HertzUnit] = Param(1, 'RATE') # float Hz - INTENSITY: Param[PercentUnit] = Param(2, 'INTENSITY') # float % - WIDTH: Param[PercentUnit] = Param(3, 'WIDTH') # float % - SHAPE: Param[PercentUnit] = Param(4, 'SHAPE') # float % - DRIVE: Param[PercentUnit] = Param(5, 'DRIVE') # float % - SYNC: Param[NoUnit] = Param(6, 'SYNC') # switch - SYNC_NOTE: Param[NoUnit] = Param(7, 'SYNC_NOTE') # rotarySwitch - - -class BadHorseLegacy(ParamSet): - """Bad Horse (Wah).""" - - WAH: Param[NoUnit] = Param(0, 'WAH') # float - - -class EnvelopeFilterLegacy(ParamSet): - """Envelope Filter (Filter).""" - - SENS: Param[DbUnit] = Param(0, 'SENS') # float dB - ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms - DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms - LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float - LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB - FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz - FREQ_ENV_AMT: Param[NoUnit] = Param(6, 'FREQ_ENV_AMT') # float - RESO: Param[NoUnit] = Param(7, 'RESO') # float - RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float - MIX: Param[PercentUnit] = Param(9, 'MIX') # float % - - -class EnvelopeFilterSCLegacy(ParamSet): - """Envelope Filter (S/C) (Filter).""" - - SENS: Param[DbUnit] = Param(0, 'SENS') # float dB - ATTACK: Param[MillisecondsUnit] = Param(1, 'ATTACK') # float ms - DECAY: Param[MillisecondsUnit] = Param(2, 'DECAY') # float ms - LP_BP_HP: Param[NoUnit] = Param(3, 'LP_BP_HP') # float - LEVEL: Param[DbUnit] = Param(4, 'LEVEL') # float dB - FREQ: Param[HertzUnit] = Param(5, 'FREQ') # float Hz - FREQ_ENV_AMT: Param[NoUnit] = Param(6, 'FREQ_ENV_AMT') # float - RESO: Param[NoUnit] = Param(7, 'RESO') # float - RESO_ENV_AMT: Param[NoUnit] = Param(8, 'RESO_ENV_AMT') # float - MIX: Param[PercentUnit] = Param(9, 'MIX') # float % - SOURCE: Param[NoUnit] = Param(10, 'SOURCE') # comboBox - - -#: Every generated parameter set, keyed by its model id. -BY_MODEL = { - 1: MythDrive, - 2: ObsessiveDrive, - 3: Od250, - 4: RodentDrive, - 6: Exotic, - 8: FreemanBod, - 9: BritBlues, - 10: ChiefDs1, - 11: BritGovernor, - 12: ChiefMt, - 13: ChiefOd1, - 14: ChiefSd1, - 15: FuzzPi, - 18: ChiefBd2, - 21: RageBooster, - 22: FacialFuzz, - 23: ExoticZBoost, - 24: RedDrive, - 25: VemuralRay, - 26: NoBellOd1, - 27: Green808, - 28: Thunderpaw, - 29: Mk3SiliconFuzz, - 42: N81CreationsDrive, - 1001: Brit2203, - 1002: Pv505Lead, - 1008: RolsJazzCh120, - 1009: UkC30Normal, - 1011: UkC30Topboost, - 1018: CaDuoCh3Modern, - 1019: CaDuoCh3Raw, - 1020: CaDuoCh3Vintage, - 1027: Freeman100Clean, - 1028: Freeman100Rhythm, - 1038: BritTm45Normal, - 1039: BritTm45Bright, - 1040: BritTm45Patch, - 1041: Brit900Clean, - 1042: Brit900Lead, - 1063: WattD103Normal, - 1064: WattD103Bright, - 1079: BritPlexi50Bright, - 1080: BritPlexi50Patch, - 1081: BritPlexi50Normal, - 1082: Freeman100Lead, - 1083: UsTwnNormal, - 1084: UsTwnVibrato, - 1089: CaTremoOrange, - 1090: CaTremoRed, - 1091: BritPlexi100Bright, - 1092: BritPlexi100Patch, - 1093: BritPlexi100Normal, - 1096: UsSprNormal, - 1097: UsSprVibrato, - 1101: Ca1starClean50wNormal, - 1102: Ca1starClean50wTweed, - 1103: Ca1starClean100wNormal, - 1104: Ca1starClean100wTweed, - 1105: Ca1starDrive50wNormal, - 1106: Ca1starDrive50wTweed, - 1107: Ca1starDrive100wNormal, - 1108: Ca1starDrive100wTweed, - 1115: Pv505Rhythm, - 1116: Captain50, - 1117: BognaVishnu20thClean, - 1118: Ev101iiisBlue6l6100w, - 1119: Ev101iiisRed6l6100w, - 1120: UsPrince, - 1121: BritUblLead, - 1122: BritUblLeadClip, - 1123: UsTweedBassladBrightPatch, - 1124: UsTweedBassladBright, - 1125: UsTweedBassladNormalPatch, - 1126: UsTweedBassladNormal, - 1127: UkC15Normal, - 1128: UkC15Topboost, - 1132: UsHpTweedTwnNormal, - 1133: UsHpTweedTwnNormalPatch, - 1134: UsHpTweedTwnBright, - 1135: UsHpTweedTwnBrightPatch, - 1136: DCellHisbertCh1, - 1137: DCellHisbertCh2, - 1138: DCellHisbertCh3, - 1139: CaJohnS2cCh1, - 1140: CaJohnS2cCh2, - 1141: CaJohnS2cCh3, - 1142: DCellH4Ch1Bright, - 1143: DCellH4Ch1Normal, - 1144: DCellH4Ch2Bright, - 1145: DCellH4Ch2Normal, - 1146: DCellH4Ch3, - 1147: DCellH4Ch4, - 1148: Ev101iiisRedEl34100w, - 1149: Ev101iiisBlueEl34100w, - 1150: Solo100Lead, - 1151: Solo100CrunchBright, - 1152: Solo100CrunchNormal, - 1154: MatchmoreJefe, - 1155: MatchmoreD30Ch1, - 1156: MatchmoreD30Ch2, - 1157: VictorSquidCh1, - 1158: VictorSquidCh2, - 1166: UsDlx64Vintage, - 1167: UsDlx65Reissue, - 1176: DumbbellOds, - 2010: BritBass50Bright, - 2011: BritBass50Patch, - 2012: BritBass50Normal, - 2013: G800k, - 2014: Ca400Ch1, - 2015: Ca400Ch2, - 2016: AmpedSuperValve, - 2017: AmpedFlipTop6464, - 2018: AmpedFlipTop6466, - 2019: AmpedFlipTop6664, - 2020: AmpedFlipTop6666, - 2021: WattBassModNormal, - 2022: WattBassModBright, - 3000: MicrotubesB3k, - 3001: Bddi, - 3004: SovietFuzz, - 3006: MicrotubesVmt, - 3007: ExoticBassZBoost, - 4000: Parametric8, - 4001: Parametric3, - 4003: LowHighCut, - 4005: Graphic9, - 4006: PluginGraphic9, - 5001: Legendary87M, - 5004: SolidStateCompM, - 5005: VcaCompM, - 5007: OptoCompM, - 5011: Jewel, - 5012: Legendary87St, - 5013: SolidStateCompSt, - 5014: VcaCompSt, - 5015: OptoCompSt, - 5016: ChiefCs3, - 5018: SolidStateCompSC, - 5019: Legendary87SC, - 5020: OptoCompSC, - 5021: VcaCompSC, - 6001: AnalogDelayM, - 6002: SimplePingPongDelay, - 6003: SimpleDelaySt, - 6004: TapeDelaySt, - 6005: DigitalDelayM, - 6006: SimpleDelayM, - 6007: TapeDelayM, - 6008: SlapbackDelaySt, - 6009: SlapbackDelayM, - 6010: AnalogDelaySt, - 6011: DigitalDelaySt, - 6012: DualDelay, - 6013: ReverseDelayM, - 6014: DualReverseDelay, - 6015: CircularDelay, - 7000: VintageChorus, - 7001: DualChorus, - 7002: Vibrato, - 7003: Flangerish, - 7004: Tremolo, - 7008: Rotary, - 7009: DigitalFlanger, - 7014: FlangerEngine, - 7015: ChorusEngine, - 7021: MxFlanger, - 7022: DreamChorusSt, - 7023: Chorus229t, - 7024: ChiefCe2wSt, - 7025: ChiefCe2wM, - 7026: DreamChorusM, - 7027: ChiefDc2wSt, - 7028: MxPhase95, - 7029: MxVibe, - 7030: ChiefDc2wM, - 7031: Phaser, - 7036: HarmonicTremolo, - 7039: MicroProcessorSt, - 7040: PatternTremolo, - 8000: Room, - 8001: SpringSt, - 8003: Hall, - 8006: SpringM, - 8007: Modulated, - 8008: Ambience, - 8009: Cave, - 8010: Shimmer, - 8011: MindHall, - 8012: PlateLush, - 8013: Plate, - 8014: PlateTight, - 8026: SpringReverbEngineM, - 8027: SpringReverbEngineSt, - 8028: NordicConcertHallSt, - 8029: StudioPlate70St, - 8030: BlossomSt, - 9010: BubbaWah, - 9012: BassWah, - 9013: CryingWah, - 9014: CryingClydeWah, - 9018: BadHorse, - 9019: CryingWahFromHell, - 9021: AutoWah, - 13000: Send1, - 13001: Send2, - 13002: Return1, - 13003: Return2, - 13004: FxLoop1, - 13005: FxLoop2, - 13006: Send12, - 13007: Return12, - 13008: FxLoop12, - 16001: AdaptiveGate, - 16002: UtilityGate, - 16003: SimpleGate, - 16005: Gain, - 16006: Volume, - 16007: AdaptiveGateSC, - 16008: PluginBlend, - 16009: PluginGate, - 16011: Doubler, - 16012: PluginDoubler, - 16013: TransparentBlend, - 16016: PhaseDoctor, - 18001: PitchShifter, - 18004: PolyOctaver, - 18006: Wham, - 18007: Minivoicer, - 18010: Transpose, - 18013: PitchCorrection, - 18014: ChiefOc2, - 18015: SubharmonicSynth, - 18016: AggiSubOctaver, - 24001: LoveMeat, - 24002: Foog, - 24006: EnvelopeFilter, - 24007: EnvelopeFilterSC, - 26001: Freeze, - 26002: PhaseLockedLoop, - 26003: BitCrusherSt, - 26004: BitCrusherEngineM, - 27000: LooperX, - 29001: SingleM, - 29002: SingleSt, - 29003: DualM, - 29004: DualSt, - 29005: SingleMLite, - 29006: SingleStLite, - 29007: DualMLite, - 29008: DualStLite, - 30001: MonoSynth, - 5: Green808Legacy, - 1017: Ev101iiisRedEl34100wLegacy, - 1045: Solo100LeadLegacy, - 1094: UsDlxNormalLegacy, - 1095: UsDlxVibratoLegacy, - 1098: Ev101iiisBlueEl34100wLegacy, - 1099: Solo100CrunchBrightLegacy, - 1100: Solo100CrunchNormalLegacy, - 1109: DCellH4Ch1BrightLegacy, - 1110: DCellH4Ch1NormalLegacy, - 1111: DCellH4Ch2BrightLegacy, - 1112: DCellH4Ch2NormalLegacy, - 1113: DCellH4Ch3Legacy, - 1114: DCellH4Ch4Legacy, - 4002: Graphic9Legacy, - 7006: PhaserLegacy, - 7007: NuvibesLegacy, - 9017: BadHorseLegacy, - 24003: EnvelopeFilterLegacy, - 24004: EnvelopeFilterSCLegacy, -} +"""The maintainer's baseline: the CorOS 4.0.1 snapshot (ADR-0020). Import a +profile's own snapshot from ``pyquadcortex.protocol.catalogs`` when the +connection decides.""" +from pyquadcortex.protocol.catalogs.coros_4_0_1.params import * # noqa: F401,F403 +from pyquadcortex.protocol.catalogs.coros_4_0_1.params import BY_MODEL # noqa: F401 diff --git a/scripts/check_artifacts.py b/scripts/check_artifacts.py index 91b73e2..55bd9d5 100755 --- a/scripts/check_artifacts.py +++ b/scripts/check_artifacts.py @@ -31,6 +31,13 @@ "pyquadcortex/py.typed", "pyquadcortex/protocol/proto/Preset_pb2.pyi", "pyquadcortex/protocol/proto/ProductionAutomation_pb2.pyi", + # The constants snapshots are packages the profile classes bind (ADR-0020). + # A wheel that dropped one would import and then fail on first attribute. + "pyquadcortex/protocol/catalogs/__init__.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/models.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/params.py", + "pyquadcortex/protocol/catalogs/coros_4_0_1/options.py", "pyquadcortex/protocol/cli.py", "pyquadcortex/protocol/client.py", "pyquadcortex/device/device.py", diff --git a/tests/test_profiles.py b/tests/test_profiles.py new file mode 100644 index 0000000..5896296 --- /dev/null +++ b/tests/test_profiles.py @@ -0,0 +1,21 @@ +"""The device profile seam (ADR-0020, spec 2026-09-03).""" +import importlib + +from pyquadcortex.protocol import models, options, params +from pyquadcortex.protocol.catalogs import coros_4_0_1 + + +def test_the_baseline_shims_re_export_the_4_0_1_snapshot(): + """`protocol.models` keeps meaning CorOS 4.0.1 until an ADR moves it.""" + assert models.ALL is coros_4_0_1.models.ALL + assert params.BY_MODEL is coros_4_0_1.params.BY_MODEL + assert options.OPTION_LABELS is coros_4_0_1.options.OPTION_LABELS + # Only `options.py` defines `__all__` (`models.py` and `params.py` do not); + # this checks re-export fidelity on the module that actually has one. + assert set(options.__all__) == set(coros_4_0_1.options.__all__) + + +def test_the_old_import_paths_still_resolve_as_modules(): + for name in ("models", "params", "options"): + importlib.import_module(f"pyquadcortex.protocol.{name}") + importlib.import_module(f"pyquadcortex.protocol.catalogs.coros_4_0_1.{name}") diff --git a/tests/test_values.py b/tests/test_values.py index 3e4825c..8524699 100644 --- a/tests/test_values.py +++ b/tests/test_values.py @@ -194,7 +194,8 @@ def test_a_floor_is_typed_whether_it_was_measured_or_derived(): # `params.py` is generated FROM the device's catalog and committed, so it is # real spellings available offline. Its trailing comments carry them. -PARAMS_PY = pathlib.Path(__file__).parent.parent / "pyquadcortex" / "protocol" / "params.py" +PARAMS_PY = (pathlib.Path(__file__).parent.parent / "pyquadcortex" / "protocol" + / "catalogs" / "coros_4_0_1" / "params.py") #: Spellings the catalog uses that no type claims, with the reason. Two #: parameters each does not earn a public name, and `Real` is not a worse From 779da56e82c1c1e909987fb2dbdcf0c14947e81b Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 22:22:20 -0500 Subject: [PATCH 06/33] feat: QuadCortex is the 4.0.1 profile, and a subclass refuses what it has not verified mypy did not need the `# type: ignore[attr-defined]` the plan anticipated for `guard._unverified = True`; omitted as an unused-ignore. Used `ControlNotDrivable` directly in the guard (already imported by name in client.py) rather than `errors.ControlNotDrivable`, since `errors` itself is not imported as a module here. --- pyquadcortex/protocol/client.py | 112 +++++++++++++++++++++++++++- tests/test_profiles.py | 127 +++++++++++++++++++++++++++++++- 2 files changed, 237 insertions(+), 2 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index fc2dad3..a412abc 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -28,6 +28,8 @@ ``docs/protocol.md`` for the per-operation coverage table. """ +import functools +import logging import time import typing import uuid @@ -38,6 +40,7 @@ from pyquadcortex.protocol import options as options_module from pyquadcortex.protocol import values as values_module from pyquadcortex.protocol import units as units_module +from pyquadcortex.protocol.catalogs import coros_4_0_1 from pyquadcortex.protocol.enums import (Footswitch, Input, Instrument, Scene, # noqa: F401 MetronomeBeat, MetronomeRouting, MetronomeSound, MidiOutType, @@ -48,6 +51,8 @@ from pyquadcortex.protocol.errors import (BlockRefused, # noqa: F401 ControlNotDrivable) +from pyquadcortex.protocol.support import (EVERYTHING, Evidence, Hardware, + Support, unverified_text) from pyquadcortex.protocol.targets import ( # noqa: F401 LANE_OUTPUT_UNASSIGNABLE, Block, LaneInput, LaneOutput, Mixer, ParamTarget, Splitter, Tempo, _require_even_row) @@ -55,6 +60,8 @@ db_to_input_level, db_to_lane_level, input_level_db, lane_level_db, tempo_bpm) +log = logging.getLogger(__name__) + @@ -254,10 +261,97 @@ def _sweep_wire(value, target, index, spec, get_catalog, what): raise _bare_number(value, what, unit_example=f"Real({value!r})") +def _guarded(name, inherited): + """Wrap an inherited operation a profile has not verified (ADR-0020). + + Under ``Support.VERIFIED`` it refuses before any bytes are sent; under + ``Support.EXPERIMENTAL`` it warns once per operation per connection and + runs the inherited behaviour. The decision is the caller's, made at + connect, and the wording comes from one place. + """ + @functools.wraps(inherited) + def guard(self, *args, **kwargs): + evidence, workaround = unverified_text(type(self), name) + if self._support is Support.VERIFIED: + raise ControlNotDrivable(name, evidence, workaround) + if name not in self._warned: + self._warned.add(name) + log.warning("%s is %s; running it anyway", name, evidence) + return inherited(self, *args, **kwargs) + guard._unverified = True + return guard + + class QuadCortex: """Ergonomic control surface over a request/response transport.""" - def __init__(self, transport, _owned_resources=None): + # -- the profile this class IS (ADR-0020) ----------------------------------- + #: The `Version.device_type` this class serves. + DEVICE_TYPE = pa.VersionMessage.QC + #: Exact `zenos_git_hash` strings a hardware-suite run has been done against. + #: A patch release not listed here refuses to connect until someone adds it + #: after a run - "probably only bug fixes" is the guess the rule stops. + MEASURED_ON = ("4.0.1",) + #: How well this profile is known. This one is the maintainer's own unit. + EVIDENCE = Evidence.MAINTAINER + #: Facts the model layer needs. Eight footswitches, two expression ports. + HARDWARE = Hardware(footswitches=8, expression_ports=2) + #: Operation names verified on this profile. Every method this class has + #: carries 4.0.1 evidence, so the base verifies everything; a subclass + #: starts from an empty set and grows it from the hardware suite's report. + VERIFIED = EVERYTHING + #: The constants snapshot read from this firmware. A subclass rebinds these. + #: Dynamic on purpose: `qc.models` follows the connection, at the price of + #: mypy seeing `Any` through it - import a snapshot module directly for + #: static unit checking (ADR-0018). + models = coros_4_0_1.models + params = coros_4_0_1.params + options = coros_4_0_1.options + #: Public methods that must work on ANY profile, because connecting and + #: cleaning up depend on them. Everything public and not here is an + #: OPERATION and is guarded on a subclass that has not verified it. Each + #: entry says why, because this list is the one place a guess could hide. + ALWAYS = { + "version": "resolving the profile reads it before any class is chosen", + "catalog": "the live catalog is how set_block checks an id on any firmware", + "close": "releasing the device must never depend on what was measured", + "disconnect": "saying goodbye must never depend on what was measured", + "add_listener": "subscribing to pushes is transport plumbing, not a unit operation", + "remove_listener": "unsubscribing is transport plumbing, not a unit operation", + "support": "reports the connection's own setting; no bytes", + "unverified_operations": "reports the guard's own state; no bytes", + } + #: Every subclass, in definition order; `profiles.registry()` reads it. + _PROFILES: list = [] + + @classmethod + def operations(cls) -> frozenset: + """Every public method of `QuadCortex` that is an operation on the unit.""" + return frozenset( + name for name, value in vars(QuadCortex).items() + if not name.startswith("_") + and (callable(value) or isinstance(value, property)) + and name not in QuadCortex.ALWAYS) + + def __init_subclass__(cls, **kwargs): + super().__init_subclass__(**kwargs) + QuadCortex._PROFILES.append(cls) + if cls.VERIFIED is EVERYTHING: + return + for name in QuadCortex.operations(): + if name in cls.__dict__: + if name not in cls.VERIFIED: + raise TypeError( + f"{cls.__name__} overrides {name} but does not list it in " + f"VERIFIED; an override is the profile's own measured " + f"behaviour, so say so in the one place that lists them") + continue + if name in cls.VERIFIED: + continue + setattr(cls, name, _guarded(name, getattr(QuadCortex, name))) + + def __init__(self, transport, _owned_resources=None, + support: Support = Support.VERIFIED): self._t = transport # Set by pyquadcortex.protocol.connect() so close() can tear down the transport # and HID device it opened on the caller's behalf. When a caller wires @@ -265,6 +359,22 @@ def __init__(self, transport, _owned_resources=None): self._owned = _owned_resources or [] # Populated on first use of .catalog (a ~47 KB fetch from the device). self._catalog = None + # How this connection treats an operation its profile has not verified + # (ADR-0020). Read by the guard `__init_subclass__` installs. + self._support = support + self._warned: set = set() + + @property + def support(self) -> Support: + """How this connection treats operations its profile has not verified.""" + return self._support + + @property + def unverified_operations(self) -> frozenset: + """Operation names this profile has not verified - empty on `QuadCortex`.""" + return frozenset( + name for name in QuadCortex.operations() + if getattr(getattr(type(self), name), "_unverified", False)) # -- catalog ------------------------------------------------------------- diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 5896296..92603d4 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -1,8 +1,13 @@ """The device profile seam (ADR-0020, spec 2026-09-03).""" import importlib +import logging -from pyquadcortex.protocol import models, options, params +import pytest + +from pyquadcortex.protocol import client, errors, models, options, params, support from pyquadcortex.protocol.catalogs import coros_4_0_1 +from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa +from tests.test_client import FakeTransport # the offline transport double def test_the_baseline_shims_re_export_the_4_0_1_snapshot(): @@ -19,3 +24,123 @@ def test_the_old_import_paths_still_resolve_as_modules(): for name in ("models", "params", "options"): importlib.import_module(f"pyquadcortex.protocol.{name}") importlib.import_module(f"pyquadcortex.protocol.catalogs.coros_4_0_1.{name}") + + +def test_quadcortex_declares_the_4_0_1_profile(): + qc = client.QuadCortex + assert qc.DEVICE_TYPE == pa.VersionMessage.QC + assert qc.MEASURED_ON == ("4.0.1",) + assert qc.CC_VERSION == "4.0.1" + assert qc.EVIDENCE is support.Evidence.MAINTAINER + assert qc.HARDWARE == support.Hardware(footswitches=8, expression_ports=2) + assert qc.VERIFIED is support.EVERYTHING + assert qc.models is coros_4_0_1.models + assert qc.params is coros_4_0_1.params + assert qc.options is coros_4_0_1.options + + +def test_always_holds_only_the_lifecycle_and_each_entry_has_a_reason(): + assert set(client.QuadCortex.ALWAYS) == { + "version", "catalog", "close", "disconnect", "add_listener", "remove_listener", + "support", "unverified_operations"} + for name, reason in client.QuadCortex.ALWAYS.items(): + assert isinstance(reason, str) and len(reason) > 20, name + + +def test_operations_are_every_public_method_not_in_always(): + ops = client.QuadCortex.operations() + public = {n for n, v in vars(client.QuadCortex).items() + if not n.startswith("_") and (callable(v) or isinstance(v, property))} + assert ops == frozenset(public - set(client.QuadCortex.ALWAYS)) + assert "set_scene_label" in ops and "version" not in ops + assert len(ops) > 100 + + +def _profile(verified=frozenset(), name="Probe"): + """A throwaway subclass; deleted from _PROFILES afterwards by the fixture.""" + return type(name, (client.QuadCortex,), { + "MEASURED_ON": ("9.9.9",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": verified}) + + +@pytest.fixture +def forget_probes(): + yield + client.QuadCortex._PROFILES[:] = [ + c for c in client.QuadCortex._PROFILES if c.__name__ != "Probe"] + + +def test_a_subclass_registers_itself_and_inherits_what_it_does_not_declare(forget_probes): + Probe = _profile() + assert Probe in client.QuadCortex._PROFILES + assert Probe.CC_VERSION == "4.0.1" and Probe.DEVICE_TYPE == pa.VersionMessage.QC + + +def test_every_operation_is_guarded_on_a_subclass_that_verifies_nothing(forget_probes): + Probe = _profile() + for name in client.QuadCortex.operations(): + assert getattr(getattr(Probe, name), "_unverified", False), name + for name in client.QuadCortex.ALWAYS: + assert not getattr(getattr(Probe, name), "_unverified", False), name + + +def test_a_guarded_operation_refuses_under_verified_with_all_three_fields(forget_probes): + Probe = _profile() + fake = FakeTransport() + qc = Probe(fake) + with pytest.raises(errors.ControlNotDrivable) as caught: + qc.set_scene_label(0, "x") + err = caught.value + assert err.control == "set_scene_label" + assert err.evidence == "not yet verified on Probe (CorOS 9.9.9)" + assert "--verifies set_scene_label" in err.workaround + assert fake.sent == [] # nothing reached the wire + + +def test_a_guarded_operation_runs_and_warns_once_under_experimental(forget_probes, caplog): + Probe = _profile() + fake = FakeTransport() + qc = Probe(fake, support=support.Support.EXPERIMENTAL) + with caplog.at_level(logging.WARNING, logger="pyquadcortex.protocol.client"): + qc.switch_scene(1) + qc.switch_scene(2) + assert len(fake.sent) == 2, "the inherited method ran both times" + warnings = [r for r in caplog.records if "switch_scene" in r.getMessage()] + assert len(warnings) == 1, "one warning per operation name per instance" + assert "not yet verified on Probe" in warnings[0].getMessage() + + +def test_a_verified_operation_is_not_guarded_and_an_override_is_left_alone(forget_probes): + class Probe(client.QuadCortex): + MEASURED_ON = ("9.9.9",) + EVIDENCE = support.Evidence.STUB + VERIFIED = frozenset({"switch_scene", "set_scene_label"}) + + def set_scene_label(self, scene, label): + return "mine" + + assert not getattr(Probe.switch_scene, "_unverified", False) + assert Probe(FakeTransport()).set_scene_label(0, "x") == "mine" + + +def test_an_override_must_also_be_listed_in_verified(forget_probes): + """An override IS the subclass's measured behaviour, so the set must say so: + VERIFIED stays the single statement of what the class knows.""" + with pytest.raises(TypeError, match="overrides set_scene_label but does not list it"): + type("Probe", (client.QuadCortex,), { + "MEASURED_ON": ("9.9.9",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset(), + "set_scene_label": lambda self, scene, label: None}) + + +def test_unverified_operations_is_empty_on_the_base_and_full_on_a_stub(forget_probes): + assert client.QuadCortex(FakeTransport()).unverified_operations == frozenset() + Probe = _profile(verified=frozenset({"switch_scene"})) + got = Probe(FakeTransport()).unverified_operations + assert got == client.QuadCortex.operations() - {"switch_scene"} + + +def test_support_defaults_to_verified_and_is_readable(): + assert client.QuadCortex(FakeTransport()).support is support.Support.VERIFIED + qc = client.QuadCortex(FakeTransport(), support=support.Support.EXPERIMENTAL) + assert qc.support is support.Support.EXPERIMENTAL From 094c5709ff27df24f82bf643810b6e18fde40013 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 22:29:13 -0500 Subject: [PATCH 07/33] fix: a subclass the guard rejects is never registered as a profile --- pyquadcortex/protocol/client.py | 22 +++++++++++++--------- tests/test_profiles.py | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index a412abc..bf0ebc0 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -335,20 +335,24 @@ def operations(cls) -> frozenset: def __init_subclass__(cls, **kwargs): super().__init_subclass__(**kwargs) - QuadCortex._PROFILES.append(cls) if cls.VERIFIED is EVERYTHING: + QuadCortex._PROFILES.append(cls) return + # Validate every override before touching anything else: a class + # Python is about to refuse must never be partially guarded, and + # must never reach _PROFILES (ADR-0020's registry contract for + # profiles.registry()). for name in QuadCortex.operations(): - if name in cls.__dict__: - if name not in cls.VERIFIED: - raise TypeError( - f"{cls.__name__} overrides {name} but does not list it in " - f"VERIFIED; an override is the profile's own measured " - f"behaviour, so say so in the one place that lists them") - continue - if name in cls.VERIFIED: + if name in cls.__dict__ and name not in cls.VERIFIED: + raise TypeError( + f"{cls.__name__} overrides {name} but does not list it in " + f"VERIFIED; an override is the profile's own measured " + f"behaviour, so say so in the one place that lists them") + for name in QuadCortex.operations(): + if name in cls.__dict__ or name in cls.VERIFIED: continue setattr(cls, name, _guarded(name, getattr(QuadCortex, name))) + QuadCortex._PROFILES.append(cls) def __init__(self, transport, _owned_resources=None, support: Support = Support.VERIFIED): diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 92603d4..a0e495a 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -133,6 +133,20 @@ def test_an_override_must_also_be_listed_in_verified(forget_probes): "set_scene_label": lambda self, scene, label: None}) +def test_a_rejected_subclass_is_never_registered(): + """__init_subclass__ raises before touching _PROFILES; the rejected class + must not appear in it at all - not under its own name, not partially + guarded. Compares the list before/after rather than filtering by name, + so this does not rely on the `forget_probes` fixture's name filter.""" + before = list(client.QuadCortex._PROFILES) + with pytest.raises(TypeError, match="overrides set_scene_label but does not list it"): + type("RejectedProbe", (client.QuadCortex,), { + "MEASURED_ON": ("9.9.9",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset(), + "set_scene_label": lambda self, scene, label: None}) + assert client.QuadCortex._PROFILES == before + + def test_unverified_operations_is_empty_on_the_base_and_full_on_a_stub(forget_probes): assert client.QuadCortex(FakeTransport()).unverified_operations == frozenset() Probe = _profile(verified=frozenset({"switch_scene"})) From d2489cd79748603b2eec3cf2b9e5988ae556fa68 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 22:36:48 -0500 Subject: [PATCH 08/33] feat: the profile registry, resolve(), and the two stubs that show how the next profiles arrive --- pyquadcortex/protocol/client.py | 18 ++-- pyquadcortex/protocol/profiles.py | 142 ++++++++++++++++++++++++++++++ tests/test_profiles.py | 67 +++++++++++++- 3 files changed, 220 insertions(+), 7 deletions(-) create mode 100644 pyquadcortex/protocol/profiles.py diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index bf0ebc0..94b1bb6 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -291,7 +291,9 @@ class QuadCortex: #: Exact `zenos_git_hash` strings a hardware-suite run has been done against. #: A patch release not listed here refuses to connect until someone adds it #: after a run - "probably only bug fixes" is the guess the rule stops. - MEASURED_ON = ("4.0.1",) + #: Annotated `tuple[str, ...]`, not the narrower literal mypy would infer + #: from this initializer, because a stub profile declares it empty. + MEASURED_ON: tuple[str, ...] = ("4.0.1",) #: How well this profile is known. This one is the maintainer's own unit. EVIDENCE = Evidence.MAINTAINER #: Facts the model layer needs. Eight footswitches, two expression ports. @@ -299,14 +301,18 @@ class QuadCortex: #: Operation names verified on this profile. Every method this class has #: carries 4.0.1 evidence, so the base verifies everything; a subclass #: starts from an empty set and grows it from the hardware suite's report. - VERIFIED = EVERYTHING + #: Annotated `Any`: this holds either the `EVERYTHING` sentinel or a + #: `frozenset[str]`, and both only need to answer `in`. + VERIFIED: typing.Any = EVERYTHING #: The constants snapshot read from this firmware. A subclass rebinds these. #: Dynamic on purpose: `qc.models` follows the connection, at the price of #: mypy seeing `Any` through it - import a snapshot module directly for - #: static unit checking (ADR-0018). - models = coros_4_0_1.models - params = coros_4_0_1.params - options = coros_4_0_1.options + #: static unit checking (ADR-0018). Annotated `Any` explicitly, so a profile + #: that has not measured this firmware can rebind it to `NoSnapshot` instead + #: of a real snapshot module. + models: typing.Any = coros_4_0_1.models + params: typing.Any = coros_4_0_1.params + options: typing.Any = coros_4_0_1.options #: Public methods that must work on ANY profile, because connecting and #: cleaning up depend on them. Everything public and not here is an #: OPERATION and is guarded on a subclass that has not verified it. Each diff --git a/pyquadcortex/protocol/profiles.py b/pyquadcortex/protocol/profiles.py new file mode 100644 index 0000000..4c8105e --- /dev/null +++ b/pyquadcortex/protocol/profiles.py @@ -0,0 +1,142 @@ +"""The device profiles this library knows, and how a connection picks one. + +A profile is a client class (ADR-0020). ``QuadCortex`` in ``client.py`` is the +Quad Cortex on CorOS 4.0.1 and the base of every other profile. This module +holds the two profiles we know are coming and have not measured, and the +registry ``connect()`` resolves through. Adding a profile is: subclass +``QuadCortex``, declare the class attributes, and the registry sees it. +""" +from __future__ import annotations + +from pyquadcortex.protocol.client import QuadCortex +from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa +from pyquadcortex.protocol.support import Evidence, Hardware, NoSnapshot + +_DEVICE_NAMES = {pa.VersionMessage.QC: "Quad Cortex", + pa.VersionMessage.ATMA: "Quad Cortex Mini"} + + +class QuadCortex41(QuadCortex): + """Quad Cortex on CorOS 4.1 - connects, and verifies nothing yet. + + A contributor ran the whole hardware suite against a 4.1.0 unit with this + handshake and announce string, so the connection is known to work. Which + operations behave as on 4.0.1 is not known per name, so every inherited + operation refuses under ``Support.VERIFIED`` and runs with a warning under + ``Support.EXPERIMENTAL``. The snapshot is deliberately absent: binding the + 4.0.1 constants would hand a 4.1 user names their unit does not use. + + To finish this profile, on a 4.1 unit: + + 1. ``scripts/generate_models.py --snapshot coros_4_1_0`` and the params and + options generators; bind the three modules below. + 2. ``pytest tests/hardware --hardware``; the report at the end lists the + operations whose tests passed. Put those names in ``VERIFIED``. + 3. Record any operation that behaved differently in ``docs/protocol.md`` + beside the 4.0.1 record, dated and named, and override it here. + """ + + MEASURED_ON = ("4.1.0",) + EVIDENCE = Evidence.CONTRIBUTED + VERIFIED = frozenset() + models = NoSnapshot("coros_4_1_0") + params = NoSnapshot("coros_4_1_0") + options = NoSnapshot("coros_4_1_0") + + +class QuadCortexMini(QuadCortex): + """Quad Cortex Mini - recognised, not supported, and here to be finished. + + Nothing has been measured: no Mini has connected through this library. The + schema names it (``DeviceType.ATMA``, ``Mode.atma_page``, ``AtmaPowerOnMode``), + which is inference from field names, not a measurement. Four footswitches + is from the product page. Because ``MEASURED_ON`` is empty this class is + never resolved; a Mini refuses to connect with a message naming this class. + + To start, on a Mini: ``connect(profile=QuadCortexMini, + support=Support.EXPERIMENTAL)``. If the handshake works, run the hardware + suite and send the report. Expect the eight-footswitch assumptions in + ``QuadCortex`` to need overrides here, and expect this class to want a + different base than ``QuadCortex`` once its shape is known. + """ + + DEVICE_TYPE = pa.VersionMessage.ATMA + MEASURED_ON = () + EVIDENCE = Evidence.STUB + HARDWARE = Hardware(footswitches=4, expression_ports=2) + VERIFIED = frozenset() + models = NoSnapshot("coros_mini") + params = NoSnapshot("coros_mini") + options = NoSnapshot("coros_mini") + + +class UnsupportedDevice(Exception): + """The unit is not one this library has a measured profile for. + + Raised at connect, before the handshake. The message names what the unit + said and what is registered. It never picks a profile for the caller: the + ``profile=`` argument is how a person chooses to measure an unknown unit. + """ + + def __init__(self, device_type, coros_version, message): + super().__init__(message) + self.device_type = device_type + self.coros_version = coros_version + + +def _all_profiles() -> list[type[QuadCortex]]: + return [QuadCortex, *QuadCortex._PROFILES] + + +def registry() -> dict[tuple[int, str], type[QuadCortex]]: + """``(device_type, coros_version) -> class``, one entry per measured version.""" + reg: dict[tuple[int, str], type[QuadCortex]] = {} + for cls in _all_profiles(): + for coros in cls.MEASURED_ON: + reg[(cls.DEVICE_TYPE, coros)] = cls + return reg + + +def stubs() -> list[type[QuadCortex]]: + """Profiles that cannot be resolved because nothing was measured on them.""" + return [cls for cls in _all_profiles() if not cls.MEASURED_ON] + + +def _describe(cls: type[QuadCortex]) -> str: + level = {Evidence.MAINTAINER: "verified on the maintainer's unit", + Evidence.CONTRIBUTED: "contributed, not verified by the maintainer", + Evidence.STUB: "stub"}[cls.EVIDENCE] + return f"{_DEVICE_NAMES.get(cls.DEVICE_TYPE, cls.DEVICE_TYPE)} {', '.join(cls.MEASURED_ON)} ({level})" + + +def resolve(reply: pa.VersionMessage) -> type[QuadCortex]: + """The class for the unit that sent ``reply``, or ``UnsupportedDevice``.""" + if not (reply.HasField("device_type") and reply.HasField("zenos_git_hash")): + raise UnsupportedDevice(None, None, + "the unit did not report device_type and zenos_git_hash in " + "its Version reply, so no profile can be chosen") + key = (reply.device_type, reply.zenos_git_hash) + found = registry().get(key) + if found is not None: + return found + device = _DEVICE_NAMES.get(reply.device_type, pa.VersionMessage.DeviceType.Name(reply.device_type)) + known = "; ".join(_describe(c) for c in _all_profiles() if c.MEASURED_ON) + same_device = [c for c in _all_profiles() if c.DEVICE_TYPE == reply.device_type] + if same_device and all(c.EVIDENCE is Evidence.STUB for c in same_device): + stub = same_device[0] + hint = (f"The {device} is recognised and not yet supported; {stub.__name__} is the " + f"stub to finish. To start: connect(profile={stub.__name__}, " + f"support=Support.EXPERIMENTAL), then `pytest tests/hardware --hardware` " + f"and send the report. See its docstring.") + elif same_device: + nearest = max(same_device, key=lambda c: c.MEASURED_ON) + hint = (f"Pass profile={nearest.__name__} to treat it as " + f"{', '.join(nearest.MEASURED_ON)} while you measure it, with " + f"support=Support.EXPERIMENTAL; then add {reply.zenos_git_hash!r} to " + f"{nearest.__name__}.MEASURED_ON.") + else: + hint = "No profile exists for this device type." + raise UnsupportedDevice( + reply.device_type, reply.zenos_git_hash, + f"the unit reports {pa.VersionMessage.DeviceType.Name(reply.device_type)}, " + f"CorOS {reply.zenos_git_hash}; this library has profiles for: {known}. {hint}") diff --git a/tests/test_profiles.py b/tests/test_profiles.py index a0e495a..2f45a2e 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -4,7 +4,7 @@ import pytest -from pyquadcortex.protocol import client, errors, models, options, params, support +from pyquadcortex.protocol import client, errors, models, options, params, profiles, support from pyquadcortex.protocol.catalogs import coros_4_0_1 from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa from tests.test_client import FakeTransport # the offline transport double @@ -158,3 +158,68 @@ def test_support_defaults_to_verified_and_is_readable(): assert client.QuadCortex(FakeTransport()).support is support.Support.VERIFIED qc = client.QuadCortex(FakeTransport(), support=support.Support.EXPERIMENTAL) assert qc.support is support.Support.EXPERIMENTAL + + +def test_the_4_1_stub_connects_but_verifies_nothing_and_has_no_snapshot(): + cls = profiles.QuadCortex41 + assert issubclass(cls, client.QuadCortex) + assert cls.MEASURED_ON == ("4.1.0",) + assert cls.EVIDENCE is support.Evidence.CONTRIBUTED + assert cls.VERIFIED == frozenset() + assert cls.CC_VERSION == "4.0.1", "inherited: the contributor's runs announced 4.0.1" + assert isinstance(cls.models, support.NoSnapshot) + with pytest.raises(AttributeError, match="coros_4_1_0"): + cls.models.Delay + assert len(cls(FakeTransport()).unverified_operations) == len(client.QuadCortex.operations()) + + +def test_the_mini_stub_is_recognised_but_cannot_connect(): + cls = profiles.QuadCortexMini + assert cls.DEVICE_TYPE == pa.VersionMessage.ATMA + assert cls.MEASURED_ON == () + assert cls.EVIDENCE is support.Evidence.STUB + assert cls.HARDWARE == support.Hardware(footswitches=4, expression_ports=2) + assert cls in profiles.stubs() + assert cls not in profiles.registry().values() + + +def test_the_registry_has_one_entry_per_measured_version(): + reg = profiles.registry() + assert reg[(pa.VersionMessage.QC, "4.0.1")] is client.QuadCortex + assert reg[(pa.VersionMessage.QC, "4.1.0")] is profiles.QuadCortex41 + assert all(len(k) == 2 for k in reg) + + +def _reply(device_type, coros): + return pa.VersionMessage(action=pa.MessageAction.UPDATE, device_type=device_type, + zenos_git_hash=coros, device_serial_number="QA00EE910") + + +def test_resolve_maps_known_pairs_to_their_class(): + assert profiles.resolve(_reply(pa.VersionMessage.QC, "4.0.1")) is client.QuadCortex + assert profiles.resolve(_reply(pa.VersionMessage.QC, "4.1.0")) is profiles.QuadCortex41 + + +def test_resolve_refuses_an_unknown_firmware_naming_what_exists_without_taking_it(): + with pytest.raises(profiles.UnsupportedDevice) as caught: + profiles.resolve(_reply(pa.VersionMessage.QC, "4.2.0")) + err = caught.value + assert (err.device_type, err.coros_version) == (pa.VersionMessage.QC, "4.2.0") + text = str(err) + assert "QC, CorOS 4.2.0" in text + assert "4.0.1" in text and "4.1.0" in text + assert "profile=QuadCortex41" in text and "Support.EXPERIMENTAL" in text + + +def test_resolve_refuses_a_mini_naming_the_stub_and_how_to_start(): + with pytest.raises(profiles.UnsupportedDevice) as caught: + profiles.resolve(_reply(pa.VersionMessage.ATMA, "1.0.0")) + text = str(caught.value) + assert "Quad Cortex Mini" in text and "QuadCortexMini" in text + assert "not yet supported" in text + assert "profile=QuadCortexMini" in text and "pytest tests/hardware --hardware" in text + + +def test_resolve_refuses_a_reply_with_no_identity(): + with pytest.raises(profiles.UnsupportedDevice, match="did not report"): + profiles.resolve(pa.VersionMessage(action=pa.MessageAction.UPDATE)) From 59dc98e4f9dd533c38d4ddbc2b7c2436b58e83c7 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 22:51:48 -0500 Subject: [PATCH 09/33] feat: connect() resolves the device profile before the handshake and refuses the unknown --- pyquadcortex/device/device.py | 10 ++- pyquadcortex/protocol/__init__.py | 9 +++ pyquadcortex/protocol/session.py | 37 ++++++++++- tests/test_device.py | 38 ++++++++++- tests/test_session.py | 101 +++++++++++++++++++++++++++++- tests/typing/wrong_units.py | 7 +++ 6 files changed, 193 insertions(+), 9 deletions(-) diff --git a/pyquadcortex/device/device.py b/pyquadcortex/device/device.py index dd8e22d..297c185 100644 --- a/pyquadcortex/device/device.py +++ b/pyquadcortex/device/device.py @@ -232,7 +232,8 @@ def __repr__(self) -> str: def connect(*, timeout: float = 5.0, settle: float = 2.0, - handshake_patience: float = 30.0) -> Device: + handshake_patience: float = 30.0, + profile=None, support=protocol.Support.VERIFIED) -> Device: """Open a Quad Cortex over USB and return it as a :class:`Device`. Finds and opens the device, starts the transport, and performs the connect @@ -251,6 +252,10 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, handshake_patience: total seconds to keep re-attempting the handshake while the unit is openable but silent. See :func:`pyquadcortex.protocol.connect`, which this passes through to. + profile: a profile class to use instead of the one the unit's identity + resolves to. See :func:`pyquadcortex.protocol.connect` (ADR-0020). + support: how the connection treats an operation its profile has not + verified. See :func:`pyquadcortex.protocol.connect` (ADR-0020). The model subscribes to the unit's pushes BEFORE the handshake runs, which is the only moment early enough to hear the handshake's own burst of state - @@ -274,5 +279,6 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, state = DeviceState() client = protocol.connect(timeout=timeout, settle=settle, handshake_patience=handshake_patience, - before_handshake=state.listen_on) + before_handshake=state.listen_on, + profile=profile, support=support) return Device(client, _owns_client=True, _state=state) diff --git a/pyquadcortex/protocol/__init__.py b/pyquadcortex/protocol/__init__.py index 195ee18..4836b4c 100644 --- a/pyquadcortex/protocol/__init__.py +++ b/pyquadcortex/protocol/__init__.py @@ -51,6 +51,9 @@ TempoSubdivision, TimeSignature) from pyquadcortex.protocol.session import DeviceNotFoundError, connect, open_device +from pyquadcortex.protocol.support import Support, Evidence, Hardware # noqa: F401 +from pyquadcortex.protocol.profiles import (UnsupportedDevice, QuadCortex41, # noqa: F401 + QuadCortexMini) from pyquadcortex.protocol import models # generated factory-block constants from pyquadcortex.protocol import params # generated parameter constants from pyquadcortex.protocol import options # generated option constants @@ -152,4 +155,10 @@ "Model", "ModelCatalog", "Parameter", + "Support", + "Evidence", + "Hardware", + "UnsupportedDevice", + "QuadCortex41", + "QuadCortexMini", ] diff --git a/pyquadcortex/protocol/session.py b/pyquadcortex/protocol/session.py index 9103fbb..d0eff19 100644 --- a/pyquadcortex/protocol/session.py +++ b/pyquadcortex/protocol/session.py @@ -20,8 +20,10 @@ import time -from pyquadcortex.protocol import hid_ids +from pyquadcortex.protocol import hid_ids, profiles from pyquadcortex.protocol.client import QuadCortex +from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa +from pyquadcortex.protocol.support import Support from pyquadcortex.protocol.transport import Transport @@ -81,7 +83,9 @@ def open_device(): def connect(*, timeout: float = 5.0, settle: float = 2.0, handshake_patience: float = 30.0, - before_handshake=None) -> QuadCortex: + before_handshake=None, + profile=None, + support: Support = Support.VERIFIED) -> QuadCortex: """Open a Quad Cortex and return a connected, ready-to-use client. Finds and opens the device, starts the transport, and performs the connect @@ -118,12 +122,26 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, cheapest way to learn what the unit is currently doing. Called once, not once per handshake attempt. An exception from it aborts the connect and releases the device, like any other bring-up failure. + profile: a profile class to use instead of the one the unit's identity + resolves to (ADR-0020). For measuring a unit this library has no + profile for: the class's ``DEVICE_TYPE`` must still match what the + unit reports, and ``MEASURED_ON`` is not checked. Combine with + ``support=Support.EXPERIMENTAL`` to run operations the profile has + not verified. + support: how the connection treats an operation its profile has not + verified. ``Support.VERIFIED`` (default) refuses it; + ``Support.EXPERIMENTAL`` runs it with a warning. On ``QuadCortex`` + every operation is verified, so this changes nothing there. Returns: A connected :class:`~pyquadcortex.protocol.client.QuadCortex`. Raises: DeviceNotFoundError: if no Quad Cortex could be opened. + UnsupportedDevice: if the unit reports a device type and CorOS version + no profile has measured, or ``profile`` names a class for a + different device type. Raised before the handshake; the device is + released. """ device = open_device() transport = Transport(device) @@ -135,7 +153,20 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, # burst the handshake provokes rather than joining after it. if before_handshake is not None: before_handshake(transport) - qc = QuadCortex(transport, _owned_resources=owned) + # Who are we talking to? Read before the handshake, through the base + # class, whose version() is in ALWAYS and works on any unit (ADR-0020). + identity = QuadCortex(transport).version(timeout=timeout) + if profile is None: + cls = profiles.resolve(identity) + else: + cls = profile + if identity.HasField("device_type") and identity.device_type != cls.DEVICE_TYPE: + raise profiles.UnsupportedDevice( + identity.device_type, identity.zenos_git_hash, + f"you asked for {cls.__name__}, which serves " + f"{pa.VersionMessage.DeviceType.Name(cls.DEVICE_TYPE)}, and the unit " + f"says {pa.VersionMessage.DeviceType.Name(identity.device_type)}") + qc = cls(transport, _owned_resources=owned, support=support) deadline = time.monotonic() + handshake_patience attempt = 0 while True: diff --git a/tests/test_device.py b/tests/test_device.py index a147a5a..3f7c5aa 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -8,7 +8,7 @@ import pyquadcortex from pyquadcortex import Device, protocol -from pyquadcortex.protocol import client, session +from pyquadcortex.protocol import client, profiles, session, support from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa @@ -136,6 +136,9 @@ class FakeTransport: instances = [] + #: What the unit says it is. Tests set this before connect() runs. + version_reply = None + def __init__(self, device, keepalive_interval=5.0): self.device = device self.started = False @@ -158,6 +161,18 @@ def request(self, message, timeout=None): self.happened.append(f"request {type(message).__name__}") return message # the handshake only needs *a* reply + def await_broadcast(self, expected_class, trigger, timeout=40.0, match=None): + self.happened.append(f"await {expected_class.__name__}") + trigger() + reply = type(self).version_reply + if reply is None: + reply = pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC, + zenos_git_hash="4.0.1", + device_serial_number="QCS0000001") + assert match is None or match(reply), "the canned reply must satisfy version()'s predicate" + return reply + def add_listener(self, listener): self.listeners.append(listener) self.happened.append("add_listener") @@ -179,6 +194,7 @@ def push(self, message): def fake_stack(monkeypatch): """Patch the protocol session's device+transport so connect() runs dry.""" FakeTransport.instances = [] + FakeTransport.version_reply = None device = FakeDevice() monkeypatch.setattr(session, "open_device", lambda: device) monkeypatch.setattr(session, "Transport", FakeTransport) @@ -229,6 +245,20 @@ def test_from_client_exposes_the_client_it_was_given(): assert Device.from_client(qc).client is qc +def test_connect_passes_profile_and_support_through(monkeypatch): + seen = {} + + def fake_connect(**kw): + seen.update(kw) + return FakeClient() + + monkeypatch.setattr(protocol, "connect", fake_connect) + pyquadcortex.connect(profile=profiles.QuadCortex41, support=support.Support.EXPERIMENTAL) + assert seen["profile"] is profiles.QuadCortex41 + assert seen["support"] is support.Support.EXPERIMENTAL + assert "before_handshake" in seen + + def test_from_client_does_not_close_a_connection_it_did_not_open(): qc = FakeClient() with Device.from_client(qc) as device: @@ -375,14 +405,16 @@ def test_connect_hands_every_argument_to_the_protocol_layer(monkeypatch): seen = _spy_on_protocol_connect(monkeypatch) pyquadcortex.connect(timeout=1.5, settle=0.25, handshake_patience=45.0) assert _without_the_hook(seen) == { - "timeout": 1.5, "settle": 0.25, "handshake_patience": 45.0} + "timeout": 1.5, "settle": 0.25, "handshake_patience": 45.0, + "profile": None, "support": support.Support.VERIFIED} def test_connect_passes_its_defaults_through_unchanged(monkeypatch): seen = _spy_on_protocol_connect(monkeypatch) pyquadcortex.connect() assert _without_the_hook(seen) == { - "timeout": 5.0, "settle": 2.0, "handshake_patience": 30.0} + "timeout": 5.0, "settle": 2.0, "handshake_patience": 30.0, + "profile": None, "support": support.Support.VERIFIED} def _spy_on_protocol_connect(monkeypatch): diff --git a/tests/test_session.py b/tests/test_session.py index 18d871c..918560a 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -9,6 +9,7 @@ import pytest from pyquadcortex.protocol import client, session +from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa class FakeDevice: @@ -24,11 +25,15 @@ class FakeTransport: instances = [] + #: What the unit says it is. Tests set this before connect() runs. + version_reply = None + def __init__(self, device, keepalive_interval=5.0): self.device = device self.started = False self.stopped = False self.sent = [] + self.happened = [] FakeTransport.instances.append(self) def start(self): @@ -39,16 +44,31 @@ def stop(self, join_timeout=1.0): def send(self, message): self.sent.append(message) + self.happened.append(f"send {type(message).__name__}") def request(self, message, timeout=None): self.sent.append(message) + self.happened.append(f"request {type(message).__name__}") return message # the handshake only needs *a* reply + def await_broadcast(self, expected_class, trigger, timeout=40.0, match=None): + self.happened.append(f"await {expected_class.__name__}") + trigger() + reply = type(self).version_reply + if reply is None: + reply = pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC, + zenos_git_hash="4.0.1", + device_serial_number="QCS0000001") + assert match is None or match(reply), "the canned reply must satisfy version()'s predicate" + return reply + @pytest.fixture def fake_stack(monkeypatch): """Patch session's device+transport so connect() runs without hardware.""" FakeTransport.instances = [] + FakeTransport.version_reply = None device = FakeDevice() monkeypatch.setattr(session, "open_device", lambda: device) monkeypatch.setattr(session, "Transport", FakeTransport) @@ -113,7 +133,9 @@ def before(t): assert got is t, "the hook gets the transport a listener registers on" assert started, "the RX thread must already be reading" assert sent_by_then == [], "the hook ran after the handshake had begun" - assert type(t.sent[0]).__name__ == "ResetCommsBuffersMessage" + # ADR-0020: the profile identity read goes out first, before the handshake. + assert type(t.sent[0]).__name__ == "VersionMessage" + assert type(t.sent[1]).__name__ == "ResetCommsBuffersMessage" qc.close() @@ -288,6 +310,16 @@ def start(self): def stop(self, join_timeout=1.0): pass + def send(self, message): + pass + + def await_broadcast(self, expected_class, trigger, timeout=40.0, match=None): + trigger() + return pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC, + zenos_git_hash="4.0.1", + device_serial_number="QCS0000001") + attempts = {"n": 0} def flaky_hello(self, timeout=5.0, settle=2.0): @@ -322,6 +354,16 @@ def start(self): def stop(self, join_timeout=1.0): pass + def send(self, message): + pass + + def await_broadcast(self, expected_class, trigger, timeout=40.0, match=None): + trigger() + return pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC, + zenos_git_hash="4.0.1", + device_serial_number="QCS0000001") + def never_answers(self, timeout=5.0, settle=2.0): raise TimeoutError("no response for request_id=1") @@ -330,3 +372,60 @@ def never_answers(self, timeout=5.0, settle=2.0): monkeypatch.setattr(session.QuadCortex, "_hello", never_answers) with pytest.raises(TimeoutError, match="openable-but-silent"): session.connect(timeout=0.01, settle=0, handshake_patience=0.05) + + +# -- ADR-0020: connect() resolves the profile before the handshake ----------- + +from pyquadcortex.protocol import errors, profiles, support + + +def test_connect_resolves_the_profile_from_the_units_version_before_the_handshake(fake_stack): + qc = session.connect() + t = FakeTransport.instances[0] + assert type(qc) is client.QuadCortex + assert qc.support is support.Support.VERIFIED + order = [h for h in t.happened if h.startswith(("await Version", "request ResetComms", "send Version"))] + assert order[0] == "await VersionMessage", "identity is read before anything else is sent" + assert order.index("await VersionMessage") < order.index("request ResetCommsBuffersMessage") + + +def test_connect_hands_back_the_4_1_class_for_a_4_1_unit(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.1.0", device_serial_number="QCS0000001") + qc = session.connect() + assert type(qc) is profiles.QuadCortex41 + assert qc.unverified_operations == client.QuadCortex.operations() + with pytest.raises(errors.ControlNotDrivable): + qc.switch_scene(1) + + +def test_connect_refuses_an_unknown_unit_and_releases_the_device(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.2.0", device_serial_number="QCS0000001") + with pytest.raises(profiles.UnsupportedDevice, match="4.2.0"): + session.connect() + t = FakeTransport.instances[0] + assert t.stopped and t.device.closed + assert not any(h.startswith("request ResetComms") for h in t.happened), "no handshake ran" + + +def test_connect_with_profile_skips_the_registry_but_checks_the_device_type(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.2.0", device_serial_number="QCS0000001") + qc = session.connect(profile=profiles.QuadCortex41, support=support.Support.EXPERIMENTAL) + assert type(qc) is profiles.QuadCortex41 + assert qc.support is support.Support.EXPERIMENTAL + with pytest.raises(profiles.UnsupportedDevice, match="asked for QuadCortexMini"): + session.connect(profile=profiles.QuadCortexMini) + + +def test_the_announce_string_is_the_resolved_profiles(fake_stack): + FakeTransport.version_reply = pa.VersionMessage( + action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, + zenos_git_hash="4.1.0", device_serial_number="QCS0000001") + session.connect() + t = FakeTransport.instances[0] + assert "send VersionMessage" in t.happened, "the announce went out on the resolved class" diff --git a/tests/typing/wrong_units.py b/tests/typing/wrong_units.py index a78efcb..ea699c2 100644 --- a/tests/typing/wrong_units.py +++ b/tests/typing/wrong_units.py @@ -67,3 +67,10 @@ # -- rejected: a bare number, which the runtime refuses too ------------------- qc.set_param(LaneOutput(0), params.LaneOutputParam.VOLUME, -3.1) # want: error qc.set_param(LaneOutput(0), params.LaneOutputParam.VOLUME, level_wrong := Hertz(1)) # want: error + +# -- ADR-0020: the support mode is an enum, and connect() returns the base type +from pyquadcortex import protocol + +verified: protocol.QuadCortex = protocol.connect(support=protocol.Support.EXPERIMENTAL) +protocol.connect(support="experimental") # want: error +protocol.connect(profile=protocol.QuadCortex41) From 216eee8907a233a7967538a62dba0f5c7d92ac39 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 23:04:04 -0500 Subject: [PATCH 10/33] fix: the identity read shares the handshake's patience, and the announce test asserts the announce --- pyquadcortex/device/device.py | 3 +- pyquadcortex/device/entries.py | 20 +++++--- pyquadcortex/protocol/client.py | 16 +++--- pyquadcortex/protocol/session.py | 86 ++++++++++++++++++++++---------- tests/test_session.py | 44 +++++++++++++++- tests/typing/wrong_units.py | 1 + 6 files changed, 127 insertions(+), 43 deletions(-) diff --git a/pyquadcortex/device/device.py b/pyquadcortex/device/device.py index 297c185..e26df53 100644 --- a/pyquadcortex/device/device.py +++ b/pyquadcortex/device/device.py @@ -233,7 +233,8 @@ def __repr__(self) -> str: def connect(*, timeout: float = 5.0, settle: float = 2.0, handshake_patience: float = 30.0, - profile=None, support=protocol.Support.VERIFIED) -> Device: + profile: type[protocol.QuadCortex] | None = None, + support: protocol.Support = protocol.Support.VERIFIED) -> Device: """Open a Quad Cortex over USB and return it as a :class:`Device`. Finds and opens the device, starts the transport, and performs the connect diff --git a/pyquadcortex/device/entries.py b/pyquadcortex/device/entries.py index 7558341..afa037f 100644 --- a/pyquadcortex/device/entries.py +++ b/pyquadcortex/device/entries.py @@ -248,13 +248,19 @@ def _carries_unknown_fields(message) -> bool: #: ``CLAUDE.md``). That is an inference from scope rather than a measurement, #: which is why the read is still the fallback rather than a one-time fill. #: -#: The unit does not announce this. The one ``Version`` the connect burst carries -#: is the unit's answer to our version announce: it sets -#: ``cortex_control_version_valid`` and none of the unit's own fields. So the -#: burst does not warm this entry - and, because that field is one the entry does -#: not keep, it MARKS it untrusted on every connect and never answers it. Either -#: way first access reads, which is the case section 9's third column exists for: -#: where the unit does not tell us, we ask. +#: Since ADR-0020, ``connect()`` reads identity itself - a ``Version`` READ - +#: before the handshake runs, and a listener registered through +#: ``before_handshake`` is already live by then, so that reply DOES reach this +#: entry's cache ahead of the burst. It still does not WARM the entry, though: +#: the reply carries fields this entry does not keep (``device_type``, +#: ``zenos_git_hash`` and the rest, alongside the ``app_fw_version`` / +#: ``device_serial_number`` it does), and a message carrying an unkept field +#: marks the copy untrusted rather than answered, whatever else it also said +#: (``_apply_one`` in ``device/state.py``: the `arrived`/`why` bookkeeping at +#: state.py:233-240, and the "answered" check at state.py:280-281, which +#: requires no unkept field). So ``needs_read`` stays set and first access still +#: reads, which is the case section 9's third column exists for: where the +#: unit's own push cannot be trusted whole, we ask. #: #: **The read costs two messages, and only one of them says anything.** The #: protocol is symmetric, so the unit answers a ``Version`` READ and then asks diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index 94b1bb6..5f210e4 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -544,12 +544,16 @@ def _hello(self, timeout: float = 5.0, settle: float = 2.0): # disambiguate and _dispatch gives an id-less reply to whichever waiter # is first in line. # - # Skipping it costs nothing and quietens the link: the device's own - # Version READ is the tail of its answer to a host Version READ, so with - # none sent here it asks nothing back. Measured 2026-08-27 on d14e - one - # inbound Version through connect and the whole burst, an UPDATE - # carrying cortex_control_version_valid in answer to this announce, and - # none in the eight seconds of idling after it. + # _hello itself still sends no Version READ - that part of the + # measurement below is about THIS announce and holds unchanged: an + # UPDATE carrying cortex_control_version_valid in answer to it, and + # none in the eight seconds of idling after it. But connect() (ADR-0020) + # now reads identity once, through its OWN Version READ, before ever + # calling _hello - and the unit answers that: the full reply, then its + # own Version{READ} tail ~1 ms later (protocol.md section 4.4, "A + # Version READ is answered twice"). So a connect() no longer sees just + # the one inbound Version this was measured against on 2026-08-27 (d14e) + # - it sees that identity exchange's two, plus this announce's one. self._t.send( pa.VersionMessage( action=pa.MessageAction.UPDATE, cortex_control_version=self.CC_VERSION diff --git a/pyquadcortex/protocol/session.py b/pyquadcortex/protocol/session.py index d0eff19..5323717 100644 --- a/pyquadcortex/protocol/session.py +++ b/pyquadcortex/protocol/session.py @@ -81,10 +81,46 @@ def open_device(): ) from exc +def _patience_exhausted(attempt: int, handshake_patience: float) -> TimeoutError: + """The ``TimeoutError`` raised when ``handshake_patience`` elapses. + + Shared between the identity read and the handshake loop below (ADR-0020): + both are just this library asking the control protocol something, and the + measured 9-17s openable-but-silent window after a boot covers either one + equally - so a caller gets the same guidance no matter which one hit it, + from one place rather than two copies drifting apart. + """ + return TimeoutError( + f"the device is enumerated and open but the control " + f"protocol did not answer in {attempt} handshake " + f"attempt(s) over {handshake_patience:.0f}s. This " + f"openable-but-silent window has measured 9-17s after a " + f"reboot or cold boot; if it persists far longer, see " + f"the USB-link-death section of troubleshooting.md." + ) + + +def _retry_until_patient(attempt_fn, deadline: float, handshake_patience: float): + """Call ``attempt_fn()`` and retry it on ``TimeoutError`` until ``deadline``. + + ``deadline`` is computed once by the caller and shared across every phase + retried this way: ``handshake_patience`` is a total budget for getting the + unit to answer at all, not a per-phase allowance (ADR-0020). + """ + attempt = 0 + while True: + attempt += 1 + try: + return attempt_fn() + except TimeoutError: + if time.monotonic() >= deadline: + raise _patience_exhausted(attempt, handshake_patience) from None + + def connect(*, timeout: float = 5.0, settle: float = 2.0, handshake_patience: float = 30.0, before_handshake=None, - profile=None, + profile: type[QuadCortex] | None = None, support: Support = Support.VERIFIED) -> QuadCortex: """Open a Quad Cortex and return a connected, ready-to-use client. @@ -104,14 +140,18 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, settle: seconds to wait after the handshake before returning. The device needs a moment before it treats the client as connected; lowering this makes the first command less reliable. - handshake_patience: total seconds to keep re-attempting the handshake - when the device is OPENABLE BUT SILENT. That window is real and - varies: ~9-12 s post-enumeration in one session's measurements, and - ~17 s in a live host-triggered reboot here - a successful open - proves nothing about readiness, and a 15 s budget was measured - failing, which is why the default is 30. Each attempt restarts the - full handshake (safe: it begins with a fresh session id). Set to 0 - for the old single-attempt behaviour. + handshake_patience: total seconds to keep re-attempting the identity + read and the handshake when the device is OPENABLE BUT SILENT. That + window is real and varies: ~9-12 s post-enumeration in one + session's measurements, and ~17 s in a live host-triggered reboot + here - a successful open proves nothing about readiness, and a + 15 s budget was measured failing, which is why the default is 30. + This is ONE budget for both phases, not one each: the identity read + below is the first thing this library asks of the unit, and it + lands in the same silent window as the handshake that follows it. + Each attempt restarts fully (safe: the identity read is a bare READ, + and the handshake begins with a fresh session id). Set to 0 for the + old single-attempt behaviour. before_handshake: optional ``callable(transport)``, called once with the started :class:`~pyquadcortex.protocol.transport.Transport` after it starts and before the handshake runs. This is the only way to @@ -153,9 +193,16 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, # burst the handshake provokes rather than joining after it. if before_handshake is not None: before_handshake(transport) + # One budget for the whole bring-up (ADR-0020): the identity read below + # and the handshake that follows it both land in the same + # openable-but-silent window, so they share one deadline rather than + # each getting handshake_patience of their own. + deadline = time.monotonic() + handshake_patience # Who are we talking to? Read before the handshake, through the base # class, whose version() is in ALWAYS and works on any unit (ADR-0020). - identity = QuadCortex(transport).version(timeout=timeout) + identity = _retry_until_patient( + lambda: QuadCortex(transport).version(timeout=timeout), + deadline, handshake_patience) if profile is None: cls = profiles.resolve(identity) else: @@ -167,23 +214,8 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, f"{pa.VersionMessage.DeviceType.Name(cls.DEVICE_TYPE)}, and the unit " f"says {pa.VersionMessage.DeviceType.Name(identity.device_type)}") qc = cls(transport, _owned_resources=owned, support=support) - deadline = time.monotonic() + handshake_patience - attempt = 0 - while True: - attempt += 1 - try: - qc._hello(timeout=timeout, settle=settle) - break - except TimeoutError: - if time.monotonic() >= deadline: - raise TimeoutError( - f"the device is enumerated and open but the control " - f"protocol did not answer in {attempt} handshake " - f"attempt(s) over {handshake_patience:.0f}s. This " - f"openable-but-silent window has measured 9-17s after a " - f"reboot or cold boot; if it persists far longer, see " - f"the USB-link-death section of troubleshooting.md." - ) from None + _retry_until_patient(lambda: qc._hello(timeout=timeout, settle=settle), + deadline, handshake_patience) # Say goodbye BEFORE the transport and handle go away, since the send needs # a live transport. close() pops this list, so appending last runs it first. owned.append(qc.disconnect) diff --git a/tests/test_session.py b/tests/test_session.py index 918560a..49e18c0 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -379,6 +379,39 @@ def never_answers(self, timeout=5.0, settle=2.0): from pyquadcortex.protocol import errors, profiles, support +def test_connect_retries_the_identity_read_within_the_same_patience(monkeypatch, fake_stack): + """The identity read is the first thing connect() asks of the unit, and it + lands in the same 9-17s openable-but-silent window the handshake retry + loop exists for - so it must share handshake_patience rather than fail + outright at a bare `timeout`.""" + real_await = FakeTransport.await_broadcast + calls = {"n": 0} + + def flaky_await(self, expected_class, trigger, timeout=40.0, match=None): + calls["n"] += 1 + if calls["n"] < 3: + trigger() + raise TimeoutError("no response for request_id=1") + return real_await(self, expected_class, trigger, timeout=timeout, match=match) + + monkeypatch.setattr(FakeTransport, "await_broadcast", flaky_await) + qc = session.connect(handshake_patience=30.0) + assert calls["n"] == 3, "the identity read was retried, not failed outright" + assert type(qc) is client.QuadCortex + + +def test_connect_gives_up_on_a_silent_identity_read_after_its_patience(monkeypatch, fake_stack): + def never_answers(self, expected_class, trigger, timeout=40.0, match=None): + trigger() + raise TimeoutError("no response for request_id=1") + + monkeypatch.setattr(FakeTransport, "await_broadcast", never_answers) + with pytest.raises(TimeoutError, match="openable-but-silent"): + session.connect(timeout=0.05, handshake_patience=0.3) + t = FakeTransport.instances[0] + assert t.stopped and t.device.closed + + def test_connect_resolves_the_profile_from_the_units_version_before_the_handshake(fake_stack): qc = session.connect() t = FakeTransport.instances[0] @@ -423,9 +456,16 @@ def test_connect_with_profile_skips_the_registry_but_checks_the_device_type(fake def test_the_announce_string_is_the_resolved_profiles(fake_stack): + """The handshake announces cortex_control_version for the RESOLVED class, + not always the base QuadCortex - "send VersionMessage" is in `happened` + for the identity read's own trigger too, so that alone can't fail here.""" FakeTransport.version_reply = pa.VersionMessage( action=pa.MessageAction.UPDATE, device_type=pa.VersionMessage.QC, zenos_git_hash="4.1.0", device_serial_number="QCS0000001") - session.connect() + qc = session.connect() + assert type(qc) is profiles.QuadCortex41 t = FakeTransport.instances[0] - assert "send VersionMessage" in t.happened, "the announce went out on the resolved class" + announces = [m for m in t.sent + if isinstance(m, pa.VersionMessage) and m.HasField("cortex_control_version")] + assert announces, "the handshake sent a Version announce" + assert announces[0].cortex_control_version == profiles.QuadCortex41.CC_VERSION diff --git a/tests/typing/wrong_units.py b/tests/typing/wrong_units.py index ea699c2..b6e39b1 100644 --- a/tests/typing/wrong_units.py +++ b/tests/typing/wrong_units.py @@ -74,3 +74,4 @@ verified: protocol.QuadCortex = protocol.connect(support=protocol.Support.EXPERIMENTAL) protocol.connect(support="experimental") # want: error protocol.connect(profile=protocol.QuadCortex41) +protocol.connect(profile="garbage") # want: error From 1130350f88a8bf98c5689e1461540e0a2c72f2d5 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 23:17:01 -0500 Subject: [PATCH 11/33] feat: set_block refuses a model id the unit's own catalog does not list --- pyquadcortex/protocol/client.py | 15 +++++++++-- tests/test_client.py | 47 ++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index 5f210e4..e1a2c8c 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -1266,6 +1266,10 @@ def set_block(self, cell, verify: bool = True, timeout: float = 5.0): arrives within ``timeout``, this raises :class:`BlockRefused`. Pass ``verify=False`` to send and return immediately, in which case a save and read-back is the only way to learn whether the block is there. + + Refused, before sending, for a model id the unit's own catalog does not + list - a constant from another firmware's snapshot, for instance + (ADR-0020). """ if cell.model_id in units_module.UNPLACEABLE_MODELS: raise ValueError( @@ -1273,8 +1277,15 @@ def set_block(self, cell, verify: bool = True, timeout: float = 5.0): f"{units_module.UNPLACEABLE_MODELS[cell.model_id]} Recovering " f"needs a power cycle, so this is refused rather than tried." ) - row, column, model = cell.row, cell.column, cell.model_id - model_id = int(getattr(model, "id", model)) + model_id = int(getattr(cell.model_id, "id", cell.model_id)) + if self.catalog.get(model_id) is None: + raise ControlNotDrivable( + f"model {model_id}", + f"not in this unit's catalog (CorOS {', '.join(type(self).MEASURED_ON)}); " + f"the catalog is read from the unit, so this id does not exist on it", + "use a constant from this connection's own snapshot (qc.models), or " + "look the model up in qc.catalog by name") + row, column = cell.row, cell.column msg = pa.GridMessage(action=pa.MessageAction.UPDATE) chain = msg.preset.chains.add() chain.row = row diff --git a/tests/test_client.py b/tests/test_client.py index b8edb22..daa4377 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -578,6 +578,7 @@ def test_set_block_sends_row_column_keyed_grid_update(): # UPDATE as set_param, carrying `hash` instead of params. The device's own # broadcast when a block is added on the unit has this exact shape. qc = client.QuadCortex(FakeTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) qc.set_block(Block(0, 2, 5005)) sent = qc._t.sent[-1] assert isinstance(sent, pa.GridMessage) @@ -592,6 +593,7 @@ def test_set_block_accepts_a_catalog_model(): model = catalog.Model(id=4005, name="Graphic-9", category="Equalizer", category_id=4) qc = client.QuadCortex(FakeTransport()) + qc._catalog = catalog.ModelCatalog(models={4005: model}) qc.set_block(Block(1, 3, model)) assert qc._t.sent[-1].preset.chains[0].models[0].hash == 4005 @@ -1372,6 +1374,7 @@ class _Capture: def test_set_capture_applies_params_after_the_file_name(): """Loading a capture resets the block's knobs, so order is data integrity.""" qc = client.QuadCortex(EchoingTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) # model_id on the cell is what to place, so this both places and points. qc.set_capture(Block(0, 2, 14000), capture=_Capture(), params={4: Encoded(0.56)}) @@ -1400,6 +1403,7 @@ def test_set_capture_does_not_rewrite_a_values_scale(): reported as success. """ qc = client.QuadCortex(EchoingTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) with pytest.raises(TypeError, match="which model is there"): qc.set_capture(Block(0, 2, 14000), capture=_Capture(), params={4: Real(0.5)}) @@ -1417,6 +1421,7 @@ def test_set_capture_does_not_rewrite_a_values_scale(): def test_set_capture_refuses_a_bare_number_like_set_param_does(): """The docstring taught `params={4: 0.56}` while `set_param` refused it.""" qc = client.QuadCortex(EchoingTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) with pytest.raises(TypeError, match="two number lines"): qc.set_capture(Block(0, 2, 14000), capture=_Capture(), params={4: 0.56}) @@ -1498,6 +1503,7 @@ def await_broadcast(self, expected_class, trigger, timeout=40.0, match=None): def test_set_block_verifies_the_device_accepted_the_cell(): qc = client.QuadCortex(EchoingTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) qc.set_block(Block(1, 0, 5005)) chain = qc._t.sent[-1].preset.chains[0] assert chain.row == 1 @@ -1506,19 +1512,22 @@ def test_set_block_verifies_the_device_accepted_the_cell(): def test_set_block_raises_when_the_device_never_echoes_the_cell(): - qc = client.QuadCortex(EchoingTransport(refuse={21005})) + qc = client.QuadCortex(EchoingTransport(refuse={19000})) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) with pytest.raises(client.BlockRefused, match="no DSP capacity"): - qc.set_block(Block(1, 4, 21005)) + qc.set_block(Block(1, 4, 19000)) def test_set_block_can_skip_verification_for_fire_and_forget_placement(): - qc = client.QuadCortex(EchoingTransport(refuse={21005})) - qc.set_block(Block(1, 4, 21005), verify=False) # must not raise - assert qc._t.sent[-1].preset.chains[0].models[0].hash == 21005 + qc = client.QuadCortex(EchoingTransport(refuse={19000})) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) + qc.set_block(Block(1, 4, 19000), verify=False) # must not raise + assert qc._t.sent[-1].preset.chains[0].models[0].hash == 19000 def test_set_block_echo_match_ignores_an_echo_for_a_different_cell(): qc = client.QuadCortex(FakeTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) captured = {} def await_broadcast(expected_class, trigger, timeout=40.0, match=None): @@ -3568,6 +3577,7 @@ def __init__(self, key, name): def test_set_capture_writes_the_hash_and_name_as_one_string(): qc = client.QuadCortex(EchoingTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) entry = _Entry("0200eff9df18229325d1816aeb8445eca03604f2a9f95fd3732ceaed167c25c1", "Kyle Pb 1") qc.set_capture(Block(1, 0, 14000), capture=entry) @@ -3949,20 +3959,22 @@ def test_a_missing_echo_is_not_a_refusal_if_the_block_actually_landed(monkeypatc echo is not evidence of a refusal, and the unit has to be asked. """ qc = client.QuadCortex(FakeTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) def no_echo(*args, **kwargs): raise TimeoutError("no echo") monkeypatch.setattr(qc._t, "await_broadcast", no_echo, raising=False) monkeypatch.setattr(qc, "read_current_preset", - lambda *a, **k: _preset_holding(1, 1, 7040)) - assert qc.set_block(Block(1, 1, 7040)) is None + lambda *a, **k: _preset_holding(1, 1, 19000)) + assert qc.set_block(Block(1, 1, 19000)) is None def test_a_missing_echo_AND_an_empty_cell_names_both_known_causes(monkeypatch): """DSP capacity was called "the known cause" for a long time. It is one of two: a port conflict puts a modal on the unit that the host never sees.""" qc = client.QuadCortex(FakeTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) def no_echo(*args, **kwargs): raise TimeoutError("no echo") @@ -3971,7 +3983,7 @@ def no_echo(*args, **kwargs): monkeypatch.setattr(qc, "read_current_preset", lambda *a, **k: _preset_holding(3, 7, 9999)) with pytest.raises(client.BlockRefused) as excinfo: - qc.set_block(Block(1, 1, 7040)) + qc.set_block(Block(1, 1, 19000)) message = str(excinfo.value) assert "DSP capacity" in message assert "PORT CONFLICT" in message @@ -3981,6 +3993,7 @@ def test_a_read_that_fails_does_not_swallow_the_refusal(monkeypatch): """If the unit cannot be asked, the refusal stands - it does not become a silent success.""" qc = client.QuadCortex(FakeTransport()) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) def no_echo(*args, **kwargs): raise TimeoutError("no echo") @@ -3991,7 +4004,7 @@ def broken(*args, **kwargs): monkeypatch.setattr(qc._t, "await_broadcast", no_echo, raising=False) monkeypatch.setattr(qc, "read_current_preset", broken) with pytest.raises(client.BlockRefused): - qc.set_block(Block(1, 1, 7040)) + qc.set_block(Block(1, 1, 19000)) # -- the two number lines, through the public entry point ---------------------- @@ -4367,3 +4380,19 @@ def test_version_insists_on_the_full_reply_and_ignores_the_units_own_read(): app_fw_version="d14e")) is True assert match(pa.VersionMessage(action=pa.MessageAction.UPDATE, device_serial_number="QA00EE910")) is True + + +def test_set_block_refuses_a_model_the_unit_does_not_have_before_sending(): + """A 4.1 constant on a 4.0.1 unit (ADR-0020): the unit would accept the + hash silently and the block would simply not be there, reported as a DSP + or port problem. Checking the live catalog first names the real cause.""" + fake = FakeTransport() + qc = client.QuadCortex(fake) + qc._catalog = catalog.parse_model_repo(_sample_repo_payload()) + missing = 6026 # Crystal Delay, CorOS 4.1.0 only; not in the sample payload either + assert qc.catalog.get(missing) is None + with pytest.raises(ControlNotDrivable) as caught: + qc.set_block(Block(0, 3, missing), verify=False) + assert caught.value.control == "model 6026" + assert "not in this unit's catalog" in caught.value.evidence + assert fake.sent == [] From 4e6a2fb52d8bc37facd60e8c832b3ca742688657 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 23:29:46 -0500 Subject: [PATCH 12/33] feat: generators write a named snapshot and render the docstring example from the catalog --- .../protocol/catalogs/coros_4_0_1/models.py | 2 +- .../protocol/catalogs/coros_4_0_1/options.py | 2 +- .../protocol/catalogs/coros_4_0_1/params.py | 4 +- scripts/generate_models.py | 40 ++++++++-- scripts/generate_options.py | 40 ++++++++-- scripts/generate_params.py | 51 ++++++++++-- tests/test_generators.py | 77 +++++++++++++++++++ 7 files changed, 191 insertions(+), 25 deletions(-) create mode 100644 tests/test_generators.py diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py index 44f0bc0..c968481 100644 --- a/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/models.py @@ -1,6 +1,6 @@ """Constants for the factory blocks every Quad Cortex has. -GENERATED by scripts/generate_models.py - do not edit by hand. +GENERATED by scripts/generate_models.py --snapshot coros_4_0_1 - do not edit by hand. Each class is a model category and each constant a block's wire id, so a constant can be passed straight to :meth:`pyquadcortex.protocol.QuadCortex.set_block`:: diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py index 18943ee..84a7fb4 100644 --- a/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/options.py @@ -1,6 +1,6 @@ """The choices a list-valued parameter offers, as enums. -GENERATED by ``scripts/generate_options.py``. Do not edit by hand. +GENERATED by ``scripts/generate_options.py --snapshot coros_4_0_1``. Do not edit by hand. A list parameter stores ``index / (count - 1)`` on the wire, so picking an option means knowing its position. These name the positions:: diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py index 0151b8a..baedad3 100644 --- a/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py @@ -1,6 +1,6 @@ """Parameter constants for the factory blocks every Quad Cortex has. -GENERATED by scripts/generate_params.py - do not edit by hand. +GENERATED by scripts/generate_params.py --snapshot coros_4_0_1 - do not edit by hand. Each class is a model and each member a parameter's wire index, so a member goes straight to :meth:`pyquadcortex.protocol.QuadCortex.set_param`:: @@ -20,7 +20,7 @@ its two mic selectors - while the wire carries 22. So a cab is CHOSEN by its `models.*` id and DRIVEN through :class:`Cabsim`:: - cab = Block(0, 5, models.CabsimBassM.N212_DARKGLASS_NEO_M) + cab = Block(0, 5, models.CabsimBassM.N210C_DARKGLASS_M) qc.set_block(cab) qc.set_param(cab, params.Cabsim.MIC_1_DISTANCE, Real(3.0)) diff --git a/scripts/generate_models.py b/scripts/generate_models.py index e0f70cb..7d61d5e 100644 --- a/scripts/generate_models.py +++ b/scripts/generate_models.py @@ -30,8 +30,29 @@ from pyquadcortex.protocol import catalog # noqa: E402 -OUTPUT = (pathlib.Path(__file__).resolve().parents[1] - / "pyquadcortex" / "protocol" / "models.py") +CATALOGS = pathlib.Path("pyquadcortex/protocol/catalogs") + + +def _snapshot_version(snapshot: str) -> str: + """'coros_4_0_1' -> '4.0.1', for the snapshot package's __init__ docstring.""" + return snapshot.removeprefix("coros_").replace("_", ".") + + +def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: + """Create ``catalogs//`` and its ``__init__.py`` if absent.""" + directory = CATALOGS / snapshot + directory.mkdir(parents=True, exist_ok=True) + init = directory / "__init__.py" + if not init.exists(): + init.write_text( + f'"""The Quad Cortex catalog on CorOS {_snapshot_version(snapshot)}, ' + 'read from the maintainer\'s unit."""\n' + f"from pyquadcortex.protocol.catalogs.{snapshot} import models, options, params # noqa: F401\n" + "\n" + '__all__ = ["models", "params", "options"]\n', + encoding="utf-8", + ) + return directory def class_name(category: str) -> str: @@ -53,7 +74,7 @@ def const_name(model: str) -> str: return cleaned -def render(cat: catalog.ModelCatalog) -> str: +def render(cat: catalog.ModelCatalog, snapshot: str) -> str: by_category: dict[str, list[catalog.Model]] = {} for model in cat.factory_models(): by_category.setdefault(model.category, []).append(model) @@ -61,7 +82,7 @@ def render(cat: catalog.ModelCatalog) -> str: lines = [ '"""Constants for the factory blocks every Quad Cortex has.', "", - "GENERATED by scripts/generate_models.py - do not edit by hand.", + f"GENERATED by scripts/generate_models.py --snapshot {snapshot} - do not edit by hand.", "", "Each class is a model category and each constant a block's wire id, so a", "constant can be passed straight to :meth:`pyquadcortex.protocol.QuadCortex.set_block`::", @@ -124,14 +145,17 @@ def load_payload(path: str | None) -> bytes: def main() -> int: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--payload", help="a saved ModelRepo payload; omit to read a device") - parser.add_argument("--out", default=str(OUTPUT), help=f"output path (default {OUTPUT})") + parser.add_argument("--snapshot", required=True, + help="snapshot package to write, named by CorOS version, e.g. coros_4_1_0") args = parser.parse_args() cat = catalog.parse_model_repo(load_payload(args.payload)) factory = cat.factory_models() - source = render(cat) - pathlib.Path(args.out).write_text(source) - print(f"wrote {args.out}: {len(factory)} factory models " + source = render(cat, snapshot=args.snapshot) + directory = _ensure_snapshot_package(args.snapshot) + out = directory / "models.py" + out.write_text(source, encoding="utf-8") + print(f"wrote {out}: {len(factory)} factory models " f"of {len(cat)} total, {len({m.category for m in factory})} categories") return 0 diff --git a/scripts/generate_options.py b/scripts/generate_options.py index 17b0735..e177dec 100644 --- a/scripts/generate_options.py +++ b/scripts/generate_options.py @@ -38,6 +38,31 @@ from pyquadcortex.protocol import catalog # noqa: E402 +CATALOGS = pathlib.Path("pyquadcortex/protocol/catalogs") + + +def _snapshot_version(snapshot: str) -> str: + """'coros_4_0_1' -> '4.0.1', for the snapshot package's __init__ docstring.""" + return snapshot.removeprefix("coros_").replace("_", ".") + + +def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: + """Create ``catalogs//`` and its ``__init__.py`` if absent.""" + directory = CATALOGS / snapshot + directory.mkdir(parents=True, exist_ok=True) + init = directory / "__init__.py" + if not init.exists(): + init.write_text( + f'"""The Quad Cortex catalog on CorOS {_snapshot_version(snapshot)}, ' + 'read from the maintainer\'s unit."""\n' + f"from pyquadcortex.protocol.catalogs.{snapshot} import models, options, params # noqa: F401\n" + "\n" + '__all__ = ["models", "params", "options"]\n', + encoding="utf-8", + ) + return directory + + #: Lists that are a boolean wearing a costume. Their parameters take ``True`` and #: ``False``; no enum is emitted. BOOLEAN_LISTS = {("off", "on")} @@ -207,7 +232,7 @@ def render_enum(name: str, labels: tuple, users: list) -> list[str]: return lines -def render(cat: catalog.ModelCatalog) -> str: +def render(cat: catalog.ModelCatalog, snapshot: str) -> str: lists = collect(cat) names = name_lists(lists) total = sum(len(v) for v in lists.values()) @@ -215,7 +240,7 @@ def render(cat: catalog.ModelCatalog) -> str: lines = [ '"""The choices a list-valued parameter offers, as enums.', "", - "GENERATED by ``scripts/generate_options.py``. Do not edit by hand.", + f"GENERATED by ``scripts/generate_options.py --snapshot {snapshot}``. Do not edit by hand.", "", "A list parameter stores ``index / (count - 1)`` on the wire, so picking", "an option means knowing its position. These name the positions::", @@ -276,13 +301,16 @@ def load_payload(path: str | None) -> bytes: def main(): ap = argparse.ArgumentParser() ap.add_argument("--payload") - ap.add_argument("--out", default="pyquadcortex/protocol/options.py") + ap.add_argument("--snapshot", required=True, + help="snapshot package to write, named by CorOS version, e.g. coros_4_1_0") args = ap.parse_args() cat = catalog.parse_model_repo(load_payload(args.payload)) - text = render(cat) - pathlib.Path(args.out).write_text(text) - print(f"wrote {args.out} ({text.count('class ')} enums)") + text = render(cat, snapshot=args.snapshot) + directory = _ensure_snapshot_package(args.snapshot) + out = directory / "options.py" + out.write_text(text, encoding="utf-8") + print(f"wrote {out} ({text.count('class ')} enums)") if __name__ == "__main__": diff --git a/scripts/generate_params.py b/scripts/generate_params.py index 1fb3155..89e2a1a 100644 --- a/scripts/generate_params.py +++ b/scripts/generate_params.py @@ -39,8 +39,31 @@ import sys sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) from pyquadcortex.protocol import catalog # noqa: E402 +import generate_models # noqa: E402 (for class_name/const_name - the docstring example) + +CATALOGS = pathlib.Path("pyquadcortex/protocol/catalogs") + + +def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: + """Create ``catalogs//`` and its ``__init__.py`` if absent.""" + directory = CATALOGS / snapshot + directory.mkdir(parents=True, exist_ok=True) + init = directory / "__init__.py" + if not init.exists(): + version = snapshot.removeprefix("coros_").replace("_", ".") + init.write_text( + f'"""The Quad Cortex catalog on CorOS {version}, ' + 'read from the maintainer\'s unit."""\n' + f"from pyquadcortex.protocol.catalogs.{snapshot} import models, options, params # noqa: F401\n" + "\n" + '__all__ = ["models", "params", "options"]\n', + encoding="utf-8", + ) + return directory + #: The cab layout every cab model actually uses on the wire. Its repeated #: eight-parameter block is a microphone. @@ -160,11 +183,22 @@ def render_enum(cls: str, doc: str, model, group=None) -> list[str]: return lines -def render(cat: catalog.ModelCatalog) -> str: +def example_cab(cat: catalog.ModelCatalog) -> str: + """The cab the module docstring's example places: the lowest-id factory + model whose category name starts with "Cabsim", so the example names a + constant that exists in the snapshot being written, by construction.""" + cabs = [m for m in cat.factory_models() if m.category.startswith("Cabsim")] + if not cabs: + raise SystemExit("no Cabsim category in this catalog; the docstring example needs one") + cab = min(cabs, key=lambda m: m.id) + return f"models.{generate_models.class_name(cab.category)}.{generate_models.const_name(cab.name)}" + + +def render(cat: catalog.ModelCatalog, snapshot: str) -> str: lines = [ '"""Parameter constants for the factory blocks every Quad Cortex has.', "", - "GENERATED by scripts/generate_params.py - do not edit by hand.", + f"GENERATED by scripts/generate_params.py --snapshot {snapshot} - do not edit by hand.", "", "Each class is a model and each member a parameter's wire index, so a", "member goes straight to :meth:`pyquadcortex.protocol.QuadCortex.set_param`::", @@ -184,7 +218,7 @@ def render(cat: catalog.ModelCatalog) -> str: "its two mic selectors - while the wire carries 22. So a cab is CHOSEN by", "its `models.*` id and DRIVEN through :class:`Cabsim`::", "", - " cab = Block(0, 5, models.CabsimBassM.N212_DARKGLASS_NEO_M)", + f" cab = Block(0, 5, {example_cab(cat)})", " qc.set_block(cab)", " qc.set_param(cab, params.Cabsim.MIC_1_DISTANCE, Real(3.0))", "", @@ -290,13 +324,16 @@ def load_payload(path): def main() -> int: ap = argparse.ArgumentParser(description=__doc__) ap.add_argument("--payload", help="a saved ModelRepo payload") - ap.add_argument("--out", default="pyquadcortex/protocol/params.py") + ap.add_argument("--snapshot", required=True, + help="snapshot package to write, named by CorOS version, e.g. coros_4_1_0") args = ap.parse_args() cat = catalog.parse_model_repo(load_payload(args.payload)) - text = render(cat) - pathlib.Path(args.out).write_text(text) - print(f"wrote {args.out} ({len(text.splitlines())} lines)") + text = render(cat, snapshot=args.snapshot) + directory = _ensure_snapshot_package(args.snapshot) + out = directory / "params.py" + out.write_text(text, encoding="utf-8") + print(f"wrote {out} ({len(text.splitlines())} lines)") return 0 diff --git a/tests/test_generators.py b/tests/test_generators.py new file mode 100644 index 0000000..fdf702f --- /dev/null +++ b/tests/test_generators.py @@ -0,0 +1,77 @@ +"""The catalog generators write per-firmware snapshots (ADR-0020, spec section 2).""" +import importlib.util +import pathlib +import sys + +import pytest + +from pyquadcortex.protocol import catalog + +ROOT = pathlib.Path(__file__).parent.parent + + +def _load(name): + spec = importlib.util.spec_from_file_location(name, ROOT / "scripts" / f"{name}.py") + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +# The two Cabsim models give generate_params.example_cab a real "lowest id +# starts-with-Cabsim" choice. The Delay model exercises an ordinary factory +# model. The Internal category supplies the ids generate_params.render() +# indexes directly - CABSIM_LAYOUT and the CONTAINERS table - which are not +# in cat.factory_models() (internal="true") but must still exist in the +# catalog for cat[id] to resolve. +XML = b""" + + + + + + + + + + + + + + + + + +""" + + +@pytest.fixture +def cat(): + return catalog.parse_model_repo(XML) + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_the_header_names_the_snapshot_it_was_written_for(name, cat): + mod = _load(name) + text = mod.render(cat, snapshot="coros_9_9_9") + assert "--snapshot coros_9_9_9" in text.splitlines()[2], text.splitlines()[:4] + + +def test_the_params_docstring_example_uses_the_lowest_id_cab_in_the_catalog(cat): + mod = _load("generate_params") + assert mod.example_cab(cat) == "models.CabsimBassM.N210C_DARKGLASS_M" + assert "Block(0, 5, models.CabsimBassM.N210C_DARKGLASS_M)" in mod.render(cat, snapshot="coros_9_9_9") + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_snapshot_is_required_and_decides_the_output_path(name, tmp_path, monkeypatch, cat): + mod = _load(name) + monkeypatch.setattr(mod, "load_payload", lambda path: XML) + monkeypatch.chdir(tmp_path) + monkeypatch.setattr(sys, "argv", [name, "--payload", "x"]) + with pytest.raises(SystemExit): # argparse: --snapshot is required + mod.main() + monkeypatch.setattr(sys, "argv", [name, "--payload", "x", "--snapshot", "coros_9_9_9"]) + mod.main() + written = tmp_path / "pyquadcortex" / "protocol" / "catalogs" / "coros_9_9_9" + assert (written / f"{name.split('_')[1]}.py").exists() From efec4127aeba3dd1d55537f5603d48324abbccde Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 23:39:31 -0500 Subject: [PATCH 13/33] fix: the params docstring example is the lowest-id cab across every Cabsim category --- .../protocol/catalogs/coros_4_0_1/params.py | 2 +- tests/test_generators.py | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py index baedad3..6c9c907 100644 --- a/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/params.py @@ -20,7 +20,7 @@ its two mic selectors - while the wire carries 22. So a cab is CHOSEN by its `models.*` id and DRIVEN through :class:`Cabsim`:: - cab = Block(0, 5, models.CabsimBassM.N210C_DARKGLASS_M) + cab = Block(0, 5, models.CabsimGuitarM.N412_CA_STAND_OS_S_V30_90S_M) qc.set_block(cab) qc.set_param(cab, params.Cabsim.MIC_1_DISTANCE, Real(3.0)) diff --git a/tests/test_generators.py b/tests/test_generators.py index fdf702f..f850141 100644 --- a/tests/test_generators.py +++ b/tests/test_generators.py @@ -18,18 +18,25 @@ def _load(name): return module -# The two Cabsim models give generate_params.example_cab a real "lowest id -# starts-with-Cabsim" choice. The Delay model exercises an ordinary factory -# model. The Internal category supplies the ids generate_params.render() -# indexes directly - CABSIM_LAYOUT and the CONTAINERS table - which are not -# in cat.factory_models() (internal="true") but must still exist in the -# catalog for cat[id] to resolve. +# Two Cabsim-prefixed categories, not one: generate_params.example_cab must +# find the lowest id ACROSS categories whose name starts with "Cabsim", not +# just the lowest id within the first such category it meets. Cabsim Guitar +# (M) is placed AFTER Cabsim Bass (M) in this document and carries the lower +# id (12001 < 21001), so document order cannot be what the test measures - +# only a genuine cross-category minimum passes. The Delay model exercises an +# ordinary factory model. The Internal category supplies the ids +# generate_params.render() indexes directly - CABSIM_LAYOUT and the +# CONTAINERS table - which are not in cat.factory_models() (internal="true") +# but must still exist in the catalog for cat[id] to resolve. XML = b""" + + + @@ -59,8 +66,8 @@ def test_the_header_names_the_snapshot_it_was_written_for(name, cat): def test_the_params_docstring_example_uses_the_lowest_id_cab_in_the_catalog(cat): mod = _load("generate_params") - assert mod.example_cab(cat) == "models.CabsimBassM.N210C_DARKGLASS_M" - assert "Block(0, 5, models.CabsimBassM.N210C_DARKGLASS_M)" in mod.render(cat, snapshot="coros_9_9_9") + assert mod.example_cab(cat) == "models.CabsimGuitarM.N412_STAND_M" + assert "Block(0, 5, models.CabsimGuitarM.N412_STAND_M)" in mod.render(cat, snapshot="coros_9_9_9") @pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) From 835604c765c272d3328ebad84442cab754e5a7e1 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sat, 5 Sep 2026 23:53:01 -0500 Subject: [PATCH 14/33] test: the hardware suite names the operations it verifies and reports them per profile --- tests/conftest.py | 17 +++ tests/hardware/conftest.py | 126 +++++++++++++++- tests/hardware/test_expression_targets.py | 7 + tests/hardware/test_generated_constants.py | 33 +++-- tests/hardware/test_model_state.py | 2 + tests/hardware/test_pedal_surface.py | 4 + tests/hardware/test_preset_surface.py | 3 + tests/hardware/test_settings_values.py | 4 + tests/hardware/test_tempo_mode.py | 1 + tests/hardware/test_write_echo.py | 6 + tests/test_hardware_gate.py | 5 + tests/test_hardware_markers.py | 161 +++++++++++++++++++++ 12 files changed, 357 insertions(+), 12 deletions(-) create mode 100644 tests/test_hardware_markers.py diff --git a/tests/conftest.py b/tests/conftest.py index 0831ba5..882b918 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,8 @@ It lives here rather than in ``tests/hardware/`` because pytest only reads command-line options from the rootdir's conftest, and the flag has to be recognised even on a run that never descends into the hardware directory. +``--verifies`` and the ``verifies`` marker are registered here for the same +reason, although only the hardware suite acts on them (ADR-0020). See ADR-0005. The offline suite (ADR-0002) must stay runnable, and stay meaningful, with no unit attached - so the hardware tests are never merely @@ -20,4 +22,19 @@ def pytest_addoption(parser): help="run the hardware-in-the-loop suite against a connected Quad Cortex " "(ADR-0005). Requires Cortex Control to be quit. Never used in CI.", ) + parser.addoption( + "--verifies", + action="store", + default=None, + metavar="OPERATION", + help="with --hardware: run only the tests marked verifies(OPERATION) " + "(ADR-0020). pytest's -m cannot match a marker's arguments.", + ) + + +def pytest_configure(config): + config.addinivalue_line( + "markers", + "verifies(*operations): the QuadCortex operations a hardware test exercises " + "(ADR-0020). Names are checked against QuadCortex.operations() at collection.") diff --git a/tests/hardware/conftest.py b/tests/hardware/conftest.py index ccd486e..8a8d3e4 100644 --- a/tests/hardware/conftest.py +++ b/tests/hardware/conftest.py @@ -25,6 +25,16 @@ SUITE = pathlib.Path(__file__).resolve().parent ROOT = SUITE.parent.parent +#: ``nodeid -> operation names`` for every collected hardware test, filled at +#: collection. ``pytest_runtest_logreport`` is handed a report and not an item, +#: so the markers have to be looked up by node id; building the map at +#: collection also means the report and the ``--verifies`` selection read the +#: same names. +_VERIFIES = {} + +#: ``operation -> list of outcomes``, one entry per phase that decided a test. +_OUTCOMES = {} + def pytest_ignore_collect(collection_path, config): # Not merely skipped - not collected. A hardware test that silently "passes" @@ -61,6 +71,14 @@ def _resolved(item): def pytest_collection_modifyitems(session, config, items): """Stop the run when a hardware test is named directly without the flag. + With ``--hardware`` it does the profile bookkeeping instead (ADR-0020): + every ``verifies()`` name is checked against ``QuadCortex.operations()``, + the names are recorded for the end-of-run report, and ``--verifies`` narrows + the run to the tests that name one operation. The check runs at COLLECTION + so a marker naming an operation that no longer exists stops the run before + the unit is touched, and ``tests/test_hardware_gate.py`` - which collects + this tree offline with ``hid`` poisoned - sees it too. + pytest does not consult ``pytest_ignore_collect`` for a path given as a command-line argument - only for paths reached by walking a directory - so narrowing a run to one file used to walk straight past the gate. With a unit @@ -88,6 +106,28 @@ def pytest_collection_modifyitems(session, config, items): ยง 6), and nothing at their module scope touches a device. """ if config.getoption("--hardware"): + from pyquadcortex.protocol.client import QuadCortex + + operations = QuadCortex.operations() + for item in items: + names = {n for m in item.iter_markers("verifies") for n in m.args} + # Checked here rather than at run time so a renamed operation is a + # collection error on every run, including the offline one in + # tests/test_hardware_gate.py, rather than a marker that quietly + # stops naming anything. + for name in sorted(names): + if name not in operations: + raise pytest.UsageError( + f"{item.nodeid}: verifies({name!r}) is not an operation") + _VERIFIES[item.nodeid] = names + wanted = config.getoption("--verifies") + if wanted: + keep, drop = [], [] + for item in items: + names = _VERIFIES.get(item.nodeid, set()) + (keep if wanted in names else drop).append(item) + items[:] = keep + config.hook.pytest_deselected(items=drop) return gated = sorted({ str(path.relative_to(ROOT)) @@ -193,7 +233,7 @@ def names(self): @pytest.fixture(scope="session") -def _connection(): +def _connection(request): """The run's single connection, with the handshake burst recorded. One connection, because the handshake is expensive - and because the unit @@ -233,8 +273,14 @@ def subscribe(transport): burst.attach(transport) cache.listen_on(transport) - with protocol.connect(before_handshake=subscribe) as client: + # EXPERIMENTAL always: on a new profile this suite IS the verification, and a + # VERIFIED client would refuse everything before a test could look. On + # QuadCortex it changes nothing. + with protocol.connect(before_handshake=subscribe, + support=protocol.Support.EXPERIMENTAL) as client: cache.bind(client) + # Read by pytest_terminal_summary, which has a config and no fixtures. + request.config._profile = type(client) burst.record_until("RecallPresetMessage", patience=30.0) # Taken here, before any test can read through the cache, so "the burst # warmed this" cannot later be confused with "some test read it". @@ -251,6 +297,12 @@ def qc(_connection): return _connection[0] +@pytest.fixture(scope="session") +def profile(qc): + """The connected profile class (ADR-0020).""" + return type(qc) + + @pytest.fixture(scope="session") def handshake_burst(_connection): """The :class:`HandshakeBurst` that listened through the connect handshake.""" @@ -291,3 +343,73 @@ def restores(): raise AssertionError( "COULD NOT RESTORE THE UNIT - fix these by hand:\n " + "\n ".join(failed)) + + +@pytest.fixture +def scratch_preset(qc): + """A disposable copy of the loaded preset in a free User slot. + + Yields ``(folder_key, position, name)``. Teardown recalls the original slot + and deletes the copy, so a test that must edit, save or undo never touches + one of the owner's presets. Requires the loaded preset to be clean. + """ + from pyquadcortex.protocol import Setlist + before = qc.loaded_position() + assert qc.preset_dirty() is False, "the loaded preset has unsaved edits; save or reload it first" + listing = qc.list_presets(Setlist.USER, include_empty=True) + free = next(e.index for e in listing if not e.name) + name = "pyquadcortex scratch" + stored = qc.save_current_preset(Setlist.USER, free, name, confirm=True, confirm_timeout=30.0) + assert stored == name + qc.recall_preset(Setlist.USER, free) + time.sleep(3.0) + try: + yield Setlist.USER, free, name + finally: + qc.recall_preset(before.folder_key, before.position) + time.sleep(3.0) + qc.delete_preset(Setlist.USER, name) + + +def pytest_runtest_logreport(report): + """Record how each operation's tests came out, for the end-of-run report. + + A test decides an operation in whichever phase stops it: a ``call`` report + always counts, and a ``setup`` that failed or skipped counts too, because + then no ``call`` report follows and the operation was not exercised. A + passing ``setup`` or ``teardown`` says nothing on its own and is ignored. + """ + names = _VERIFIES.get(report.nodeid) + if not names: + return + if report.when == "call" or (report.when == "setup" and report.outcome != "passed"): + for name in names: + _OUTCOMES.setdefault(name, []).append(report.outcome) + + +def pytest_terminal_summary(terminalreporter, exitstatus, config): + """Print which operations this run measured on the connected profile. + + The suite IS the instrument (ADR-0020): what passed here is what a profile + may list in ``VERIFIED``, and the two differences are the two things a + maintainer wants - what has newly earned a place, and what has lost one. + """ + if not config.getoption("--hardware"): + return + from pyquadcortex.protocol.support import EVERYTHING + + cls = getattr(config, "_profile", None) + if cls is None: # the session never connected, so there is nothing to report + return + passed = {op for op, outcomes in _OUTCOMES.items() + if outcomes and all(o == "passed" for o in outcomes)} + failed = {op for op, outcomes in _OUTCOMES.items() + if any(o != "passed" for o in outcomes)} + verified = set(cls.VERIFIED) if cls.VERIFIED is not EVERYTHING else cls.operations() + tr = terminalreporter + tr.section(f"operations on {cls.__name__} " + f"(CorOS {', '.join(cls.MEASURED_ON)}, {cls.EVIDENCE.name})") + tr.line(f"passed: {sorted(passed)}") + tr.line(f"failed or skipped: {sorted(failed)}") + tr.line(f"passed, not VERIFIED: {sorted(passed - verified)} <- candidates to add") + tr.line(f"VERIFIED, not passed: {sorted(verified - passed)} <- regressions by name") diff --git a/tests/hardware/test_expression_targets.py b/tests/hardware/test_expression_targets.py index f03ce66..d813ec8 100644 --- a/tests/hardware/test_expression_targets.py +++ b/tests/hardware/test_expression_targets.py @@ -79,6 +79,7 @@ def _restore(qc, was, row=ROW): qc.set_param(LaneOutput(row), "VOLUME", Encoded(was["value"])) +@pytest.mark.verifies("set_param", "read_current_preset") def test_reads_and_writes_agree_on_which_row(qc, restores): """The chain INDEX a read returns is the row number a write is keyed to. @@ -105,6 +106,7 @@ def test_reads_and_writes_agree_on_which_row(qc, restores): f"writes disagree about which lane is which") +@pytest.mark.verifies("set_expression", "clear_expression") def test_a_pedal_assigns_to_the_lane_volume_and_clears_again(qc, restores): """The whole round trip: assign, read back, clear, read back.""" was = _snapshot(qc) @@ -125,6 +127,7 @@ def test_a_pedal_assigns_to_the_lane_volume_and_clears_again(qc, restores): assert p.expression_max == pytest.approx(1.0, abs=1e-4) +@pytest.mark.verifies("set_expression") def test_the_assignment_leaves_scene_mode_alone(qc, restores): """The unit does not promote a parameter to scene-following when IT assigns. @@ -155,6 +158,7 @@ def test_the_two_unassignable_parameters_refuse_rather_than_failing_silently(qc, qc.clear_expression(LaneOutput(ROW), param=param) +@pytest.mark.verifies("set_param") def test_the_lane_volume_speaks_dB_through_real(qc, restores): """`real=` converts through the MEASURED -40..+12 dB span. @@ -204,6 +208,7 @@ def _params(qc, target): return getattr(chain, target.collection)[0].params +@pytest.mark.verifies("set_expression", "clear_expression") @pytest.mark.parametrize("label,target,name", ASSIGNABLE, ids=[c[0] for c in ASSIGNABLE]) def test_every_target_takes_an_expression_pedal(qc, restores, label, target, name): @@ -234,6 +239,7 @@ def restore(): f"{label}: {name} did not clear") +@pytest.mark.verifies("set_expression") def test_a_block_switch_parameter_takes_one_too(qc, restores): """The case that disproved "switch parameters are refused". @@ -272,6 +278,7 @@ def test_a_block_switch_parameter_takes_one_too(qc, restores): # -- expAssignable is the unit's OWN rule, not one the host is held to --------- +@pytest.mark.verifies("set_expression") def test_a_parameter_the_catalog_calls_unassignable_still_takes_a_host_pedal( qc, restores): """The catalog marks 14 parameters ``expAssignable="false"``. It is advice. diff --git a/tests/hardware/test_generated_constants.py b/tests/hardware/test_generated_constants.py index f9eef45..b49975b 100644 --- a/tests/hardware/test_generated_constants.py +++ b/tests/hardware/test_generated_constants.py @@ -5,12 +5,17 @@ parameter or add a model, and nothing offline can notice - the generated file is its own yardstick. This regenerates from the connected unit and compares. +Which snapshot it compares against comes from the CONNECTED PROFILE (ADR-0020) +rather than from a fixed path, so a unit on some other firmware is held against +its own snapshot, or told it has none yet. + A failure here is not necessarily a bug. It means the snapshot is stale, and the -fix is to regenerate and read the diff before committing it: +fix is to regenerate that profile's snapshot and read the diff before committing +it: - python scripts/generate_models.py - python scripts/generate_params.py - python scripts/generate_options.py + python scripts/generate_models.py --snapshot coros_4_0_1 + python scripts/generate_params.py --snapshot coros_4_0_1 + python scripts/generate_options.py --snapshot coros_4_0_1 Read the diff. A renumbered parameter is a real protocol change and belongs in `docs/protocol.md`; a new model is routine. @@ -21,6 +26,7 @@ import pytest from pyquadcortex.protocol import catalog +from pyquadcortex.protocol.support import NoSnapshot REPO = pathlib.Path(__file__).resolve().parents[2] @@ -39,10 +45,16 @@ def live_catalog(qc): @pytest.mark.parametrize("name", ["models", "params", "options"]) -def test_the_committed_file_matches_this_unit(live_catalog, name): - """Read-only: nothing is written to the unit, so no restore is needed.""" - generated = _generator(name).render(live_catalog) - committed = (REPO / "pyquadcortex" / "protocol" / f"{name}.py").read_text() +def test_the_committed_snapshot_matches_this_unit(live_catalog, profile, name): + """Read-only. Compares against the CONNECTED profile's snapshot (ADR-0020), + so a snapshot for another firmware never turns this unit's run red.""" + snapshot = getattr(profile, name) + if isinstance(snapshot, NoSnapshot): + pytest.fail(f"{profile.__name__} has no {name} snapshot yet; run " + f"scripts/generate_{name}.py --snapshot against this unit") + generated = _generator(name).render(live_catalog, + snapshot=snapshot.__name__.rsplit(".", 2)[-2]) + committed = pathlib.Path(snapshot.__file__).read_text(encoding="utf-8") if generated == committed: return @@ -51,11 +63,12 @@ def test_the_committed_file_matches_this_unit(live_catalog, name): first = next((i for i, (a, b) in enumerate(zip(gen_lines, com_lines)) if a != b), min(len(gen_lines), len(com_lines))) pytest.fail( - f"pyquadcortex/protocol/{name}.py no longer matches this unit's catalog. " + f"{snapshot.__name__} no longer matches this unit's catalog. " f"First difference at line {first + 1}:\n" f" committed: {com_lines[first] if first < len(com_lines) else ''}\n" f" this unit: {gen_lines[first] if first < len(gen_lines) else ''}\n" - f"Regenerate with `python scripts/generate_{name}.py` and READ the diff - " + f"Regenerate with `python scripts/generate_{name}.py --snapshot " + f"{snapshot.__name__.rsplit('.', 2)[-2]}` and READ the diff - " f"a renumbered parameter is a protocol change, not a routine update." ) diff --git a/tests/hardware/test_model_state.py b/tests/hardware/test_model_state.py index 0d5a406..780a702 100644 --- a/tests/hardware/test_model_state.py +++ b/tests/hardware/test_model_state.py @@ -278,6 +278,7 @@ def test_state_the_unit_never_announces_costs_one_read_and_then_none( # -- a change the model did not make ------------------------------------------- +@pytest.mark.verifies("set_param") def test_an_edit_the_model_did_not_make_reaches_its_cache(qc, model_cache, counted, restores, record_property): @@ -326,6 +327,7 @@ def test_an_edit_the_model_did_not_make_reaches_its_cache(qc, model_cache, assert counted.reads["preset_dirty"] == 0, "the model asked instead of listening" +@pytest.mark.verifies("set_param") def test_a_write_through_the_cache_is_settled_by_what_the_unit_says( qc, model_cache, restores, record_property): """Section 10's outcomes, against the unit that produces them. diff --git a/tests/hardware/test_pedal_surface.py b/tests/hardware/test_pedal_surface.py index 2f7470b..d9a4fba 100644 --- a/tests/hardware/test_pedal_surface.py +++ b/tests/hardware/test_pedal_surface.py @@ -77,6 +77,7 @@ def _assignment(qc): return found[0] if found else None +@pytest.mark.verifies("set_expression") def test_an_assignment_written_reads_back_the_same(qc, restores): was = _snapshot(qc) restores(f"row {ROW} lane {PARAM} expression", lambda: _restore(qc, was)) @@ -93,6 +94,7 @@ def test_an_assignment_written_reads_back_the_same(qc, restores): assert not now.reversed +@pytest.mark.verifies("set_expression") def test_a_reversed_sweep_survives_the_round_trip(qc, restores): """The pair is not ordered - min above max inverts the pedal, and the unit stores it that way round. A reader that sorted would lose the setting.""" @@ -108,6 +110,7 @@ def test_a_reversed_sweep_survives_the_round_trip(qc, restores): assert now.reversed, "the unit stored the sweep and the reader sorted it" +@pytest.mark.verifies("set_expression", "clear_expression") def test_clearing_makes_the_assignment_absent_rather_than_pedal_zero(qc, restores): """`expression: 0` is what a clear writes, and the device SENDS it - so the reader has to read a present zero as "no assignment" rather than as a pedal @@ -124,6 +127,7 @@ def test_clearing_makes_the_assignment_absent_rather_than_pedal_zero(qc, restore assert _assignment(qc) is None +@pytest.mark.verifies("set_expression") def test_the_off_detent_reads_as_off_rather_than_minus_forty(qc, restores): """The bug the offline suite could not see until its catalog grew knobs. diff --git a/tests/hardware/test_preset_surface.py b/tests/hardware/test_preset_surface.py index f750528..aa83662 100644 --- a/tests/hardware/test_preset_surface.py +++ b/tests/hardware/test_preset_surface.py @@ -41,6 +41,7 @@ def wire(qc): # -- the model and the protocol layer agree about one real preset ------------- +@pytest.mark.verifies("read_current_preset") def test_the_model_reads_the_preset_the_unit_has_loaded(device, qc): assert device.preset is not None assert device.preset.name == qc.read_current_preset().name @@ -149,6 +150,7 @@ def test_every_scene_label_matches(device, wire): assert scene.name == expected, f"scene {scene.letter}" +@pytest.mark.verifies("active_scene") def test_the_active_scene_matches_what_the_unit_reports(device, qc): assert device.preset.scenes.active.letter == \ translate.scene_from_wire(qc.active_scene()) @@ -292,6 +294,7 @@ def __exit__(self, *exc): # -- the one write, and it puts the unit back --------------------------------- +@pytest.mark.verifies("switch_scene", "active_scene") def test_activating_a_scene_lands_and_is_confirmed(device, qc, restores): """The model's first write. Audible: the unit changes scene and changes back.""" diff --git a/tests/hardware/test_settings_values.py b/tests/hardware/test_settings_values.py index 0ff5f3c..4bc0b51 100644 --- a/tests/hardware/test_settings_values.py +++ b/tests/hardware/test_settings_values.py @@ -37,6 +37,7 @@ def _input_level(qc, port_id): raise AssertionError(f"no in_port entry for {port_id}") +@pytest.mark.verifies("set_input_port") def test_an_input_gain_written_in_db_reads_back_as_that_db(qc, restores): """The one setting with a measured span, driven both ways. @@ -57,6 +58,7 @@ def test_an_input_gain_written_in_db_reads_back_as_that_db(qc, restores): assert units.input_level_db(wire) == pytest.approx(24.0, abs=0.05) +@pytest.mark.verifies("set_input_port") def test_zero_db_is_exactly_one_sixth_on_the_unit(qc, restores): """The point that fixes the span's zero, checked on the device rather than in a fixture: 0 dB over -12..+60 is 12/72, and nothing else lands there.""" @@ -69,6 +71,7 @@ def test_zero_db_is_exactly_one_sixth_on_the_unit(qc, restores): assert _input_level(qc, PORT) == pytest.approx(1 / 6, abs=1e-4) +@pytest.mark.verifies("set_global_eq") def test_a_global_eq_gain_in_db_lands_where_the_manuals_span_says(qc, restores): """The span here is the MANUAL's on two points, so this is the weakest claim in the file and is labelled as such rather than presented beside the @@ -93,6 +96,7 @@ def test_a_global_eq_gain_in_db_lands_where_the_manuals_span_says(qc, restores): client._GLOBAL_EQ_GAIN.to_normalized(-3.0), abs=1e-4) +@pytest.mark.verifies("set_hold_timing") def test_the_hold_threshold_takes_milliseconds_and_stores_an_index(qc, restores): """No 0..1 line at all: the wire carries the index, the caller says ms.""" before = qc.hold_timing_ms() diff --git a/tests/hardware/test_tempo_mode.py b/tests/hardware/test_tempo_mode.py index 9d2ddea..a0c3917 100644 --- a/tests/hardware/test_tempo_mode.py +++ b/tests/hardware/test_tempo_mode.py @@ -153,6 +153,7 @@ def test_capture_tempo_mode_state(qc): SETTLE_SECONDS = 10.0 +@pytest.mark.verifies("tempo_mode", "set_tempo_mode") def test_tempo_mode_is_writable(qc, restores): """Drive MODE from the host, and prove which scope the write landed in. diff --git a/tests/hardware/test_write_echo.py b/tests/hardware/test_write_echo.py index dc57bc2..e7842ee 100644 --- a/tests/hardware/test_write_echo.py +++ b/tests/hardware/test_write_echo.py @@ -195,6 +195,7 @@ def _landed(ms, what, probe): f"mean the documented latencies need remeasuring.") +@pytest.mark.verifies("set_param") def test_parameter_echo_latency_is_the_control(qc, probe, restores, record_property): """A known quantity, measured with the same harness as everything else. @@ -235,6 +236,7 @@ def test_parameter_echo_latency_is_the_control(qc, probe, restores, record_prope f"message, so every other latency in this file is suspect.") +@pytest.mark.verifies("set_bypass") def test_bypass_echo_latency(qc, probe, restores, record_property): preset = qc.read_current_preset() row, column = 0, next(c for c, m in enumerate(preset.chains[0].models) if m.hash) @@ -269,6 +271,7 @@ def test_bypass_echo_latency(qc, probe, restores, record_property): _landed(ms, "bypass", probe) +@pytest.mark.verifies("set_chain_input") def test_routing_echo_latency(qc, probe, restores, record_property): preset = qc.read_current_preset() original = preset.chains[0].in_portid @@ -284,6 +287,7 @@ def test_routing_echo_latency(qc, probe, restores, record_property): _landed(ms, "routing", probe) +@pytest.mark.verifies("set_scene_label") def test_scene_label_echo_latency(qc, probe, restores, record_property): preset = qc.read_current_preset() original = (preset.scene_labels[SCENE_INDEX] @@ -312,6 +316,7 @@ def test_scene_label_echo_latency(qc, probe, restores, record_property): _landed(ms, "scene label", probe) +@pytest.mark.verifies("set_scene_color") def test_scene_color_echo_latency(qc, probe, restores, record_property): preset = qc.read_current_preset() original = (preset.scene_colors[SCENE_INDEX] @@ -329,6 +334,7 @@ def test_scene_color_echo_latency(qc, probe, restores, record_property): _landed(ms, "scene colour", probe) +@pytest.mark.verifies("update_settings") def test_global_settings_echo_latency(qc, probe, restores, record_property): original = qc.settings().stomp_mode_auto_assign restores("stomp_mode_auto_assign", diff --git a/tests/test_hardware_gate.py b/tests/test_hardware_gate.py index 89bb324..c95533e 100644 --- a/tests/test_hardware_gate.py +++ b/tests/test_hardware_gate.py @@ -97,6 +97,11 @@ def collected_with_the_flag(_poisoned_hid): "tests/hardware") assert result.returncode == pytest.ExitCode.OK, ( result.stdout + result.stderr) + # A verifies() name that is not an operation. Matched on the refusal's own + # words rather than on "UsageError": pytest renders a UsageError raised from + # a collection hook as a bare "ERROR: " on stderr and never prints + # the class name, so a check for that spelling could not fail. + assert "is not an operation" not in result.stderr, result.stderr ids = [line.strip() for line in result.stdout.splitlines() if line.startswith("tests/hardware") and "::" in line] assert ids, result.stdout diff --git a/tests/test_hardware_markers.py b/tests/test_hardware_markers.py new file mode 100644 index 0000000..2ef8000 --- /dev/null +++ b/tests/test_hardware_markers.py @@ -0,0 +1,161 @@ +"""Every operation is named by a hardware test, or says why not (spec section 4). + +Source-reading, like tests/test_translation.py: the hardware modules are never +imported here, so this runs with no unit attached. +""" +import ast +import pathlib + +from pyquadcortex.protocol import client + +HARDWARE = pathlib.Path(__file__).parent / "hardware" + +#: Operations no hardware test names, each with the reason. A new operation +#: has to come through this dict or through a marker; there is no third way. +UNMARKED_OPERATIONS = { + # -- read back by a marked test, but never the subject of one -------------- + # These are how another test observes a write. That makes them exercised, + # not verified: nothing asserts what the READ itself should return, so a + # reader that lost a field would leave every test that uses it green. + "global_eq": "the Global EQ gain test reads it back as its instrument; nothing asserts what global_eq() itself reports", + "hold_timing_ms": "the HOLD threshold test reads it back as its instrument; nothing asserts the reader against a value set on the unit's own screen", + "io_settings": "the input gain tests read it back as their instrument; nothing asserts the port listing against what the unit shows", + "preset_dirty": "test_model_state.py calls it only to decide which branch to expect; nothing asserts the flag across a known-clean and known-dirty preset", + "settings": "the global-settings echo test reads it only to find the value to flip; nothing asserts a settings() field against the unit's screen", + "list_presets": "the scratch_preset fixture reads it to find a free slot; nothing asserts the listing against the unit's own Directory", + + # -- the preset library: writes that would touch the owner's own presets --- + # The scratch_preset fixture is what these would be built on - it saves a + # copy into a free User slot and deletes it again - but no test uses it yet. + "save_current_preset": "no hardware test yet; scratch_preset is the fixture for one, and it must save into a free User slot rather than over the owner's work", + "recall_preset": "no hardware test yet; a recall discards the loaded preset's unsaved edits, so it needs scratch_preset around it", + "delete_preset": "no hardware test yet; only scratch_preset's teardown deletes anything, and a teardown asserts nothing", + "copy_preset": "no hardware test yet; it writes into a second setlist, so a failed run leaves a stray preset in the owner's Directory", + "move_preset": "no hardware test yet; it rearranges the slots a player has laid out for a gig, which a restore cannot make invisible mid-run", + "read_preset": "no hardware test yet; it RECALLS the preset it reads, so it is a write in disguise and needs scratch_preset", + "find_preset": "no hardware test yet; it needs a name that exists on the unit, which the loaded preset supplies - just not written", + "wait_for_listing": "no hardware test yet; it is the polling wrapper round list_presets and says nothing until a write changes a listing", + "create_setlist": "no hardware test yet; it adds a folder to the owner's Directory that a failed run would leave behind", + "delete_setlist": "no hardware test yet; it deletes a folder and everything in it, which is the one preset-library mistake nothing can undo", + "duplicate_setlist": "no hardware test yet; it copies a whole setlist preset by preset, so a failed run leaves a partial folder behind", + + # -- library listings whose CONTENT belongs to the owner ------------------- + # Each returns whatever this unit happens to hold, so a test can assert the + # shape and not the answer. Worth writing; none is written. + "list_folders": "no hardware test yet; the folders are the owner's, so a test can only assert the shape of the listing", + "list_irs": "no hardware test yet; the IR library is the owner's and may be empty, so a test can only assert the shape", + "captures": "no hardware test yet; the capture library is the owner's and may be empty, so a test can only assert the shape", + "favorites": "no hardware test yet; the FAVORITES list is the owner's and may be empty, so a test can only assert the shape", + "recents": "no hardware test yet; RECENTS changes with every recall, so a test can only assert the shape", + "pinned_models": "no hardware test yet; which models are pinned is the owner's choice, so a test can only assert the shape", + "loaded_position": "no hardware test yet; scratch_preset reads it, and asserting it needs a recall to a slot the test chose", + "read_current_preset_push": "no hardware test yet; it returns the RecallPreset wrapper round the same payload read_current_preset returns", + "mode": "no hardware test yet; which footswitch mode slots exist is the owner's configuration", + "mode_cycle": "no hardware test yet; the cycle order is the owner's configuration, so a test can only assert the shape", + "looper": "no hardware test yet; it answers only when a Looper X block is on the grid, which the loaded preset decides", + "master_volume": "no hardware test yet; the level is one the owner set by ear, so a test can only assert the shape", + "tuner": "no hardware test yet; the tuner state is meaningful only while the tuner is open, which is a write this suite does not make", + + # -- grid writes with no test yet ------------------------------------------ + "set_block": "only placed as setup by an expression test, with verify=False; nothing asserts set_block's own echo or its verify path", + "remove_block": "reached only by an expression test's restore, and a restore asserts nothing about what it undid", + "move_block": "no hardware test yet; it needs a free cell and a block to move, both of which depend on the loaded preset", + "write_preset": "no hardware test yet, and none is wanted: it is the wholesale grid path the row/column writes replaced (CLAUDE.md)", + "set_chain_output": "no hardware test yet; the echo test drives the INPUT side, and an output write is audible on a rig that is plugged in", + "reroute_grid_input": "no hardware test yet; it rewrites every row on a port at once, so a partial restore leaves the preset re-routed", + "set_split": "no hardware test yet; branching a row changes what the player hears and needs a preset with a free slot to branch at", + "clear_split": "no hardware test yet; it can only run on a row that already branches, which the loaded preset decides", + "set_split_mute": "no hardware test yet; it is audible and only means anything on a row that already branches", + "set_param_option": "no hardware test yet; it needs a list-valued parameter on a block the loaded preset happens to carry", + "set_param_scene_mode": "no hardware test yet; making a parameter follow scenes changes what every OTHER scene stores for it", + "set_capture": "no hardware test yet; it needs a Neural Capture block on the grid and a capture in the owner's library", + "set_ir": "no hardware test yet; it needs an IR Loader block on the grid and an IR in the owner's library", + "set_expression_bypass": "no hardware test yet; the expression tests assign to parameters, and the bypass assignment is a different message", + "copy_scene": "no hardware test yet; it overwrites a whole scene, so the restore is a second whole-scene copy taken first", + "set_scene_bypass_behavior": "no hardware test yet; it changes how every later bypass edit is stored, so a mid-run failure changes what other tests mean", + "set_stomp_assignment": "no hardware test yet; it re-labels a footswitch the player uses on stage", + "clear_stomp_assignment": "no hardware test yet; it can only run on a footswitch that already has an assignment to lose", + "set_stomp_label": "no hardware test yet; it changes what a footswitch reads on stage and needs the preset's own label saved first", + "set_stomp_momentary": "no hardware test yet; latching versus momentary is a feel the player set, and the change is silent on screen", + + # -- global settings: the owner's rig, restored only by writing it back ---- + "set_master_volume": "the settings test proves it REFUSES a Db, not that it writes; driving master volume is audible and the level is one the owner set by ear", + "set_master_volume_assignment": "no hardware test yet; it changes which outputs the knob governs, which is a rig decision rather than a preset one", + "set_input_level": "no hardware test yet; the input gain tests drive set_input_port with level=, and this narrower method is never called", + "set_output_level": "no hardware test yet; it is audible on a rig that is plugged in and takes Encoded only, so there is no screen value to assert against", + "set_output_mute": "no hardware test yet; muting an output on a rig that is plugged in is audible in the worst direction", + "set_output_pairing": "no hardware test yet; unpairing makes two ports stop sharing settings, so restoring the pairing does not restore the settings", + "set_output_port": "no hardware test yet; the port settings are the owner's rig, and a partial restore leaves the wrong one in place", + "set_usb_port": "no hardware test yet; the USB audio settings carry the link this suite runs over", + "set_global_eq_band": "reached only by the Global EQ test's restore, which asserts nothing; the band write itself has no test", + "set_global_eq_bypassed": "no hardware test yet; the Global EQ applies to every preset, so a failed restore changes the owner's whole rig", + "set_global_eq_output": "no hardware test yet; it takes Encoded only, so there is no screen value a test could assert against", + "set_global_bypass": "no hardware test yet; it bypasses Cab or IR blocks across ALL presets, which a failed restore leaves that way", + "set_midi_out": "no hardware test yet; it rewrites what a footswitch sends to the rest of the rig", + "set_midi_thru": "no hardware test yet; MIDI Thru affects the rest of the rig and the change is invisible on the unit", + "set_preset_load_midi_out": "no hardware test yet; it stores up to twelve messages on the preset, so the restore is the whole list read first", + "set_gig_view": "no hardware test yet; it opens Gig View on the unit's screen, and nothing restores the screen the player left it on", + "set_mode": "no hardware test yet; it changes which footswitch mode the player is looking at", + "set_mode_cycle": "no hardware test yet; it rewrites the mode cycle the player configured for a gig", + "set_tuner_input": "no hardware test yet; the tuner input is a rig decision and the write is invisible until the tuner is open", + "set_tuner_mute": "no hardware test yet; it changes whether the unit goes silent when the player tunes on stage", + "set_tuner_reference": "no hardware test yet; a reference pitch left off 440 is the kind of change nobody notices until a gig", + "show_tuner": "measured to do NOTHING on firmware d14e (client.py), so there is no effect on the unit to assert", + "restore_audio": "no hardware test yet; it undoes the silence a host tuner write causes, and nothing here writes the tuner", + "show_capture_dialog": "answers a request the DEVICE makes; the suite cannot make the unit ask, so there is no state-neutral way to reach it", + "add_favorite": "no hardware test yet; it edits the FAVORITES list the player uses to find presets on stage", + "remove_favorite": "no hardware test yet; it can only run on a preset that is already a favourite, which is the owner's choice", + "pin_model": "no hardware test yet; it reorders the device list the player picks blocks from", + "unpin_model": "no hardware test yet; it removes EVERY entry for a model, so a restore has to know how many there were", + + # -- the metronome and the tempo block ------------------------------------ + # Audible by definition, and seven of the settings belong to the PRESET in + # PRESET mode and to the device in GLOBAL mode - so which one a write lands + # in depends on a switch test_tempo_mode.py moves. + "set_metronome_running": "no hardware test yet; starting the metronome is audible, and its scope depends on the MODE switch test_tempo_mode.py moves", + "set_metronome_muted": "no hardware test yet; the mute is only observable while the metronome is running, which is a second audible write", + "set_metronome_volume": "no hardware test yet; it is audible and its scope depends on the MODE switch test_tempo_mode.py moves", + "set_metronome_sound": "no hardware test yet; it is audible and its scope depends on the MODE switch test_tempo_mode.py moves", + "set_metronome_routing": "no hardware test yet; it decides which outputs the click reaches on a rig that is plugged in", + "set_beat": "no hardware test yet; one beat's sound is audible and belongs to the preset in PRESET mode", + "set_beats": "no hardware test yet; it writes several beats at once and is audible in the same way set_beat is", + "set_time_signature": "no hardware test yet; it changes the bar the click counts, which is preset state in PRESET mode", + "set_tempo_subdivision": "no hardware test yet; it is the metronome's SUBDIVISIONS by name and is audible while the click runs", + "set_tempo_option": "no hardware test yet; it addresses a list-valued tempo parameter by option number and needs one of those measured first", + "set_tempo_led": "no hardware test yet; the TEMPO LED is on the unit's face and nothing in a reply reports it", +} + + + +def marked_operations(): + names = set() + for path in sorted(HARDWARE.rglob("test_*.py")): + tree = ast.parse(path.read_text(encoding="utf-8")) + for node in ast.walk(tree): + if not isinstance(node, ast.FunctionDef): + continue + for deco in node.decorator_list: + if (isinstance(deco, ast.Call) and isinstance(deco.func, ast.Attribute) + and deco.func.attr == "verifies"): + for arg in deco.args: + assert isinstance(arg, ast.Constant) and isinstance(arg.value, str), ( + f"{path.name}:{node.lineno} verifies() takes string literals") + names.add(arg.value) + return names + + +def test_every_marker_names_a_real_operation(): + unknown = marked_operations() - client.QuadCortex.operations() + assert not unknown, f"markers name operations QuadCortex does not have: {sorted(unknown)}" + + +def test_every_operation_is_marked_or_excused_with_a_reason(): + missing = client.QuadCortex.operations() - marked_operations() - set(UNMARKED_OPERATIONS) + assert not missing, ( + f"operations no hardware test verifies and no reason excuses: {sorted(missing)}. " + f"Mark the test that drives each one with @pytest.mark.verifies(...), or add it " + f"to UNMARKED_OPERATIONS with the reason.") + stale = set(UNMARKED_OPERATIONS) & marked_operations() + assert not stale, f"excused AND marked; drop the excuse: {sorted(stale)}" + for name, reason in UNMARKED_OPERATIONS.items(): + assert len(reason) > 20, name From f663c38b62484c935b636676deadccd79d780055 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:09:58 -0500 Subject: [PATCH 15/33] fix: the hardware report counts teardown, claims only what tests claim, and the scratch fixture cannot leak --- tests/hardware/conftest.py | 158 ++++++++++++--- tests/hardware/test_values_on_unit.py | 2 + tests/test_hardware_gate.py | 44 ++++ tests/test_hardware_report.py | 278 ++++++++++++++++++++++++++ 4 files changed, 452 insertions(+), 30 deletions(-) create mode 100644 tests/test_hardware_report.py diff --git a/tests/hardware/conftest.py b/tests/hardware/conftest.py index 8a8d3e4..bf5b1c8 100644 --- a/tests/hardware/conftest.py +++ b/tests/hardware/conftest.py @@ -321,6 +321,18 @@ def burst_warmed(_connection): return _connection[3] +def _unrestored(failed): + """The failure a restore that did not finish is reported as (ADR-0005). + + Written once, and called by both restore paths, because it is an + instruction to the owner about their own unit: two spellings of it is two + of them to keep right. ``tests/test_hardware_report.py`` holds the count. + """ + return AssertionError( + "COULD NOT RESTORE THE UNIT - fix these by hand:\n " + + "\n ".join(failed)) + + @pytest.fixture def restores(): """Register undo callables; they run in reverse, failure or not. @@ -340,9 +352,65 @@ def restores(): except Exception as exc: # noqa: BLE001 - reported, not swallowed failed.append(f"{description}: {exc!r}") if failed: - raise AssertionError( - "COULD NOT RESTORE THE UNIT - fix these by hand:\n " - + "\n ".join(failed)) + raise _unrestored(failed) + + +#: The name every scratch copy is saved under. Fixed rather than unique per run +#: (spec section 4), so a leftover copy is recognisable on the unit's screen - +#: and so :func:`_scratch_slot` has one name to refuse. +SCRATCH_NAME = "pyquadcortex scratch" + + +def _scratch_slot(listing, name): + """The free User slot to save the scratch copy into. + + Refuses a listing that already holds ``name``: ``delete_preset`` deletes BY + NAME, so a leftover copy from an interrupted run plus a new one under the + same name is ambiguous, and the fixture would be choosing which of the + owner's presets to delete. The owner deletes the leftover instead - that + they can see which is which is the point of the fixed name. + """ + for entry in listing: + if entry.name == name: + pytest.fail( + f"a preset called {name!r} is already in the User setlist - a " + f"leak from an interrupted run. Delete it on the unit by hand " + f"and re-run; this fixture deletes by name and will not guess " + f"which copy is which.") + for entry in listing: + if not entry.name: + return entry.index + pytest.fail("the User setlist has no free slot for the scratch copy; " + "free one on the unit and re-run") + + +def _release_scratch(qc, before, setlist, name, settle=3.0): + """Put the unit back after :func:`scratch_preset`, whatever went wrong. + + The recall and the delete are INDEPENDENT: a recall that raises must not + take the delete with it, or the copy stays behind under a name the next run + refuses. Both failures are collected and reported in the same words + ``restores`` uses, so a teardown that could not finish reads the same + whichever fixture owned it. + + ``settle`` is the pause after the recall, and only the offline test in + ``tests/test_hardware_report.py`` passes anything but the real 3 s. + """ + failed = [] + try: + qc.recall_preset(before.folder_key, before.position) + time.sleep(settle) + except Exception as exc: # noqa: BLE001 - reported, not swallowed + failed.append( + f"recall the preset that was loaded " + f"({before.folder_key}, {before.position}): {exc!r}") + try: + qc.delete_preset(setlist, name) + except Exception as exc: # noqa: BLE001 - reported, not swallowed + failed.append( + f"delete the scratch preset {name!r} from the User setlist: {exc!r}") + if failed: + raise _unrestored(failed) @pytest.fixture @@ -356,37 +424,73 @@ def scratch_preset(qc): from pyquadcortex.protocol import Setlist before = qc.loaded_position() assert qc.preset_dirty() is False, "the loaded preset has unsaved edits; save or reload it first" - listing = qc.list_presets(Setlist.USER, include_empty=True) - free = next(e.index for e in listing if not e.name) - name = "pyquadcortex scratch" - stored = qc.save_current_preset(Setlist.USER, free, name, confirm=True, confirm_timeout=30.0) - assert stored == name + free = _scratch_slot(qc.list_presets(Setlist.USER, include_empty=True), + SCRATCH_NAME) + stored = qc.save_current_preset(Setlist.USER, free, SCRATCH_NAME, + confirm=True, confirm_timeout=30.0) + assert stored == SCRATCH_NAME qc.recall_preset(Setlist.USER, free) time.sleep(3.0) try: - yield Setlist.USER, free, name + yield Setlist.USER, free, SCRATCH_NAME finally: - qc.recall_preset(before.folder_key, before.position) - time.sleep(3.0) - qc.delete_preset(Setlist.USER, name) + _release_scratch(qc, before, Setlist.USER, SCRATCH_NAME) -def pytest_runtest_logreport(report): - """Record how each operation's tests came out, for the end-of-run report. +def _decides(when, outcome): + """Whether one phase report decides the operations its test names. + + A ``call`` report always counts - that is the test running. A ``setup`` or + ``teardown`` counts only when it did NOT pass, because a passing one says + nothing the ``call`` report has not already said. - A test decides an operation in whichever phase stops it: a ``call`` report - always counts, and a ``setup`` that failed or skipped counts too, because - then no ``call`` report follows and the operation was not exercised. A - passing ``setup`` or ``teardown`` says nothing on its own and is ignored. + Teardown is the half that was missing and it is the important half: both + ``restores`` and ``scratch_preset`` report a restore they could not finish + there and nowhere else (see :func:`_unrestored`), so ignoring it printed the + operation under ``passed:`` - and offered it as a ``VERIFIED`` candidate - + on a run that left the owner's unit changed. """ + return when == "call" or outcome != "passed" + + +def pytest_runtest_logreport(report): + """Record how each operation's tests came out, for the end-of-run report.""" names = _VERIFIES.get(report.nodeid) if not names: return - if report.when == "call" or (report.when == "setup" and report.outcome != "passed"): + if _decides(report.when, report.outcome): for name in names: _OUTCOMES.setdefault(name, []).append(report.outcome) +def _report_lines(cls, outcomes, claimed): + """The end-of-run report, as ``(label, names, note)`` rows. + + Pure, so ``tests/test_hardware_report.py`` holds the arithmetic with no unit + attached. ``claimed`` is every operation some COLLECTED test says it + verifies, and it is what keeps the last line readable: ``QuadCortex`` + verifies EVERYTHING, so the plain difference against ``VERIFIED`` names all + ~89 operations no test has ever driven, each tagged as a regression. Only + something a test claims can regress - nothing else was measured. + """ + from pyquadcortex.protocol.support import EVERYTHING + + passed = {op for op, seen in outcomes.items() + if seen and all(o == "passed" for o in seen)} + failed = {op for op, seen in outcomes.items() + if any(o != "passed" for o in seen)} + verified = (set(cls.operations()) if cls.VERIFIED is EVERYTHING + else set(cls.VERIFIED)) + return [ + ("passed", sorted(passed), ""), + ("failed or skipped", sorted(failed), ""), + ("passed, not VERIFIED", sorted(passed - verified), + "<- candidates to add"), + ("VERIFIED and claimed by a test, not passed", + sorted((verified & claimed) - passed), "<- regressions by name"), + ] + + def pytest_terminal_summary(terminalreporter, exitstatus, config): """Print which operations this run measured on the connected profile. @@ -396,20 +500,14 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config): """ if not config.getoption("--hardware"): return - from pyquadcortex.protocol.support import EVERYTHING - cls = getattr(config, "_profile", None) if cls is None: # the session never connected, so there is nothing to report return - passed = {op for op, outcomes in _OUTCOMES.items() - if outcomes and all(o == "passed" for o in outcomes)} - failed = {op for op, outcomes in _OUTCOMES.items() - if any(o != "passed" for o in outcomes)} - verified = set(cls.VERIFIED) if cls.VERIFIED is not EVERYTHING else cls.operations() + claimed = set().union(*_VERIFIES.values()) if _VERIFIES else set() + lines = _report_lines(cls, _OUTCOMES, claimed) + width = max(len(label) for label, _names, _note in lines) tr = terminalreporter tr.section(f"operations on {cls.__name__} " f"(CorOS {', '.join(cls.MEASURED_ON)}, {cls.EVIDENCE.name})") - tr.line(f"passed: {sorted(passed)}") - tr.line(f"failed or skipped: {sorted(failed)}") - tr.line(f"passed, not VERIFIED: {sorted(passed - verified)} <- candidates to add") - tr.line(f"VERIFIED, not passed: {sorted(verified - passed)} <- regressions by name") + for label, names, note in lines: + tr.line(f"{label + ':':<{width + 1}} {names} {note}".rstrip()) diff --git a/tests/hardware/test_values_on_unit.py b/tests/hardware/test_values_on_unit.py index 7317837..12adf1a 100644 --- a/tests/hardware/test_values_on_unit.py +++ b/tests/hardware/test_values_on_unit.py @@ -41,6 +41,7 @@ def _stored(qc, target, index): return entry.params[index].param_values[0].float_value +@pytest.mark.verifies("set_param") @pytest.mark.parametrize("label,target,param,written", WRITES, ids=[w[0] for w in WRITES]) def test_the_unit_agrees_with_the_value_we_wrote(qc, restores, label, target, @@ -66,6 +67,7 @@ def test_the_unit_agrees_with_the_value_we_wrote(qc, restores, label, target, assert float(back) == pytest.approx(float(written), abs=0.05) +@pytest.mark.verifies("set_param") def test_encoded_and_real_zero_land_in_different_places_on_the_unit(qc, restores): """The pair the whole design rests on, against the device rather than a fake. diff --git a/tests/test_hardware_gate.py b/tests/test_hardware_gate.py index c95533e..5469a0d 100644 --- a/tests/test_hardware_gate.py +++ b/tests/test_hardware_gate.py @@ -289,6 +289,50 @@ def test_the_whole_tree_collects_with_the_flag(_poisoned_hid): "the offline suite is not in a --hardware run of the whole tree") +def test_a_marker_naming_no_operation_stops_the_run(_poisoned_hid): + """The refusal above, made to fire (ADR-0020). + + ``collected_with_the_flag`` asserts the message is ABSENT, which a check + that can never fire satisfies as happily as a working one. This is the + other direction: a test marked ``verifies("no_such_operation")`` is + collected with the flag, and the run stops before anything reaches a unit. + + The probe module is written into the real ``tests/hardware/`` and deleted + again, because the hook only sees items its own conftest was loaded for: a + module outside the tree, named on the same command line, is collected + without the hook running at all (measured on pytest 9.1.1 - 100 collected, + exit 0, and ``--verifies`` silently stopped deselecting too). So the probe + has to live where the real markers live. Its name is one no offline module + owns, and the ``finally`` removes it; a run killed between the two leaves a + file that fails ``tests/test_hardware_markers.py`` loudly rather than + quietly. This is also why the offline suite is run serially - a parallel + runner could collect the tree while the probe exists. + + Collection only, and ``hid`` is poisoned like every subprocess here, so + nothing can reach a unit even though the gate is deliberately open. + """ + probe = SUITE / "test_zz_marker_probe_tmp.py" + probe.write_text( + "import pytest\n\n\n" + '@pytest.mark.verifies("no_such_operation")\n' + "def test_probe():\n" + " pass\n") + try: + result = _pytest(_poisoned_hid, "--hardware", "--collect-only", "-q", + str(probe.relative_to(ROOT))) + finally: + probe.unlink(missing_ok=True) + + # The same exit code the offline refusal uses: pytest reports a UsageError + # raised from a collection hook as a usage error whoever raised it. + assert result.returncode == pytest.ExitCode.USAGE_ERROR, ( + "a verifies() name that is not an operation did not stop the run:\n" + + result.stdout + result.stderr) + assert "is not an operation" in result.stderr, result.stderr + assert "no_such_operation" in result.stderr, result.stderr + assert "test_zz_marker_probe_tmp.py::test_probe" in result.stderr, result.stderr + + def test_the_flag_opens_the_gate_for_every_module(collected_with_the_flag): """With ``--hardware``, every module in the directory is collected again.""" for module in MODULES: diff --git a/tests/test_hardware_report.py b/tests/test_hardware_report.py new file mode 100644 index 0000000..1877269 --- /dev/null +++ b/tests/test_hardware_report.py @@ -0,0 +1,278 @@ +"""The hardware suite's bookkeeping, checked offline. + +``tests/hardware/conftest.py`` does three things no hardware test can see for +itself, because each one is about a run rather than about the unit: + +* it decides which phase report DECIDES an operation. A restore that failed is + reported in ``teardown`` and nowhere else (``restores`` and + ``scratch_preset`` both raise there), so a rule that reads only ``call`` + prints an operation under ``passed:`` on a run that left the unit changed - + which is the one outcome ADR-0005 exists to make loud; +* it works out the four lines of the end-of-run report. The regression line is + set arithmetic, and on ``QuadCortex`` - whose ``VERIFIED`` is ``EVERYTHING`` - + the naive difference names every operation nobody has ever tested; +* it puts the unit back after ``scratch_preset``. The recall and the delete are + independent failures, and the delete is the one that must happen anyway: it + removes the copy, and the copy's name is fixed, so a leak makes the NEXT run + ambiguous. + +None of that needs a unit, so it is held here rather than being taken on trust +until somebody plugs one in. The conftest is loaded by path under its own module +name, the way ``tests/test_handshake_burst_recorder.py`` reaches +``HandshakeBurst``: without ``--hardware`` there is no other way into that +directory from the offline suite, and pytest's own copy of the module is +untouched by this. +""" +import importlib.util +from pathlib import Path + +import pytest + +from pyquadcortex.protocol.support import EVERYTHING, Evidence + +_HARDWARE_CONFTEST = ( + Path(__file__).resolve().parent / "hardware" / "conftest.py") + + +@pytest.fixture(scope="module") +def conftest(): + """The hardware suite's conftest, loaded by path.""" + spec = importlib.util.spec_from_file_location( + "hardware_conftest_report", _HARDWARE_CONFTEST) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +# --- which phase decides an operation --------------------------------------- + +@pytest.mark.parametrize("when,outcome,decides", [ + ("setup", "passed", False), + ("setup", "failed", True), + ("setup", "skipped", True), + ("call", "passed", True), + ("call", "failed", True), + ("call", "skipped", True), + ("teardown", "passed", False), + ("teardown", "failed", True), + ("teardown", "skipped", True), +]) +def test_a_phase_decides_an_operation_when_it_ran_it_or_broke( + conftest, when, outcome, decides): + """A passing setup or teardown says nothing; a failing one says everything. + + The teardown rows are the ones with a bug behind them: ``restores`` raises + its ``COULD NOT RESTORE THE UNIT`` there, so a rule that ignored teardown + reported the operation as passed on a run that left the unit changed. + """ + assert conftest._decides(when, outcome) is decides + + +def test_a_failed_restore_is_not_a_pass(conftest): + """End to end through the recording, in the order pytest reports the phases.""" + outcomes = {} + for when, outcome in [("setup", "passed"), ("call", "passed"), + ("teardown", "failed")]: + if conftest._decides(when, outcome): + outcomes.setdefault("set_param", []).append(outcome) + + lines = dict(_named(conftest._report_lines( + _Profile, outcomes, claimed={"set_param"}))) + assert "set_param" not in lines["passed"] + assert "set_param" in lines["failed or skipped"] + + +# --- the end-of-run report --------------------------------------------------- + +class _Profile: + """A profile that has verified two operations and knows of four.""" + + MEASURED_ON = ("4.0.1",) + EVIDENCE = Evidence.MAINTAINER + VERIFIED = frozenset({"set_param", "set_bypass"}) + + @classmethod + def operations(cls): + return {"set_param", "set_bypass", "set_ir", "set_block"} + + +class _Everything(_Profile): + """A profile like ``QuadCortex``: it claims every operation it has.""" + + VERIFIED = EVERYTHING + + +def _named(lines): + """``(label, names)`` pairs, with the label's trailing note dropped.""" + return [(label, names) for label, names, _note in lines] + + +def test_the_report_names_the_four_things_a_maintainer_asks_for(conftest): + outcomes = {"set_param": ["passed"], "set_ir": ["passed"], + "set_bypass": ["failed"]} + lines = dict(_named(conftest._report_lines( + _Profile, outcomes, claimed={"set_param", "set_ir", "set_bypass"}))) + + assert lines["passed"] == ["set_ir", "set_param"] + assert lines["failed or skipped"] == ["set_bypass"] + # set_ir passed and the profile does not claim it: a candidate. + assert lines["passed, not VERIFIED"] == ["set_ir"] + # set_bypass is claimed by the profile, a test names it, and it did not pass. + assert lines["VERIFIED and claimed by a test, not passed"] == ["set_bypass"] + + +def test_one_failing_run_of_an_operation_sinks_all_of_them(conftest): + """Two tests name an operation and one fails: it did not pass.""" + lines = dict(_named(conftest._report_lines( + _Profile, {"set_param": ["passed", "failed"]}, claimed={"set_param"}))) + + assert lines["passed"] == [] + assert lines["failed or skipped"] == ["set_param"] + + +def test_a_regression_is_only_an_operation_some_test_claims(conftest): + """The line that was unreadable on the maintainer's own unit. + + ``QuadCortex.VERIFIED`` is ``EVERYTHING``, so the difference against + ``operations()`` names all ~89 operations no test has ever driven, every + one of them tagged as a regression. A regression is an operation a test + SAYS it verifies and that did not pass; nothing else can regress, because + nothing else was measured. + """ + lines = dict(_named(conftest._report_lines( + _Everything, {"set_param": ["failed"], "set_bypass": ["passed"]}, + claimed={"set_param", "set_bypass"}))) + + # set_ir and set_block are VERIFIED here too - EVERYTHING says so - and no + # test names either, so neither is a regression. Only set_param is. + assert lines["VERIFIED and claimed by a test, not passed"] == ["set_param"] + assert lines["passed, not VERIFIED"] == [], ( + "a profile that verifies everything can have no candidates") + + +def test_an_operation_no_test_claims_is_never_a_regression(conftest): + """The 89. Nothing names them, so the run says nothing about them.""" + lines = dict(_named(conftest._report_lines( + _Everything, {"set_param": ["passed"]}, claimed={"set_param"}))) + + assert lines["VERIFIED and claimed by a test, not passed"] == [] + + +def test_a_profile_with_nothing_claimed_reports_nothing_as_a_regression(conftest): + """``--verifies`` can deselect every marked test; that is not 105 regressions.""" + lines = dict(_named(conftest._report_lines(_Profile, {}, claimed=set()))) + + assert all(names == [] for names in lines.values()) + + +# --- putting the unit back after scratch_preset ------------------------------ + +class _Position: + """What ``loaded_position()`` hands back, as far as the teardown reads it.""" + + folder_key = "user" + position = 3 + + +class _FakeQc: + """The two methods the teardown calls, each able to fail on demand.""" + + def __init__(self, recall_raises=None, delete_raises=None): + self.calls = [] + self._recall_raises = recall_raises + self._delete_raises = delete_raises + + def recall_preset(self, folder_key, position): + self.calls.append(("recall", folder_key, position)) + if self._recall_raises is not None: + raise self._recall_raises + + def delete_preset(self, setlist, name): + self.calls.append(("delete", setlist, name)) + if self._delete_raises is not None: + raise self._delete_raises + + +def test_the_scratch_copy_is_deleted_even_when_the_recall_fails(conftest): + """The leak this fixture exists to prevent. + + A recall that raises used to skip the delete, so the copy stayed in the + owner's User setlist under a FIXED name - and the next run's delete, which + deletes by name, could no longer tell the two copies apart. + """ + qc = _FakeQc(recall_raises=TimeoutError("no reply")) + + with pytest.raises(AssertionError) as caught: + conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", + settle=0.0) + + assert ("delete", "USER", "pyquadcortex scratch") in qc.calls + assert "COULD NOT RESTORE THE UNIT" in str(caught.value) + assert "TimeoutError" in str(caught.value) + + +def test_both_failures_are_named_at_once(conftest): + qc = _FakeQc(recall_raises=TimeoutError("no reply"), + delete_raises=RuntimeError("refused")) + + with pytest.raises(AssertionError) as caught: + conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", + settle=0.0) + + message = str(caught.value) + assert "TimeoutError" in message and "RuntimeError" in message + assert "pyquadcortex scratch" in message + + +def test_a_clean_teardown_recalls_then_deletes_and_says_nothing(conftest): + qc = _FakeQc() + + conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", + settle=0.0) + + assert qc.calls == [("recall", "user", 3), + ("delete", "USER", "pyquadcortex scratch")] + + +def test_the_restore_wording_is_written_once(conftest): + """``restores`` and ``scratch_preset`` report in the same words. + + Two spellings of the owner's instructions is two of them to keep right, so + the source may carry the sentence exactly once - in the helper both call. + """ + source = _HARDWARE_CONFTEST.read_text(encoding="utf-8") + assert source.count("COULD NOT RESTORE THE UNIT") == 1 + assert "COULD NOT RESTORE THE UNIT" in str(conftest._unrestored(["x: y"])) + + +# --- choosing the scratch slot ----------------------------------------------- + +class _Entry: + def __init__(self, index, name): + self.index = index + self.name = name + + +def test_the_scratch_slot_is_the_first_empty_one(conftest): + listing = [_Entry(0, "Gig"), _Entry(1, ""), _Entry(2, "")] + + assert conftest._scratch_slot(listing, "pyquadcortex scratch") == 1 + + +def test_a_leftover_scratch_preset_stops_the_run(conftest): + """A copy from an interrupted run makes a delete-by-name ambiguous. + + The name is fixed by the spec, so the fixture cannot dodge the collision by + picking another one; the owner is told to delete the leftover by hand. + """ + listing = [_Entry(0, "pyquadcortex scratch"), _Entry(1, "")] + + with pytest.raises(pytest.fail.Exception, match="already"): + conftest._scratch_slot(listing, "pyquadcortex scratch") + + +def test_a_full_user_setlist_stops_the_run(conftest): + listing = [_Entry(0, "Gig"), _Entry(1, "Rehearsal")] + + with pytest.raises(pytest.fail.Exception, match="free slot"): + conftest._scratch_slot(listing, "pyquadcortex scratch") From 5da6bee2fc82014633b8a69a5f3849af377b8ab2 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:20:21 -0500 Subject: [PATCH 16/33] docs: the profile seam in STEERING, CLAUDE, protocol, architecture, contributing, changelog, api --- CLAUDE.md | 4 ++-- changelog.md | 20 ++++++++++++++++++++ contributing.md | 22 ++++++++++++++++++++++ docs/STEERING.md | 23 ++++++++++++++++++++++- docs/api.md | 1 + docs/architecture.md | 30 ++++++++++++++++++++++-------- docs/protocol.md | 6 ++++-- 7 files changed, 93 insertions(+), 13 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 983f4f5..0b217c1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ Read `docs/STEERING.md` before non-trivial work (new operations, transport or fr ## Conventions -- Dev setup: `uv venv && uv pip install -e ".[dev]"` (or plain venv + pip, see contributing.md). Run tests with `.venv/bin/python -m pytest`. The suite passes offline - no hardware, no `hid` import, no `DYLD_LIBRARY_PATH`. The hardware suite's `--hardware` gate is two hooks in `tests/hardware/conftest.py` and stays two: pytest skips `pytest_ignore_collect` for a path named on the command line, so `pytest_collection_modifyitems` refuses that one loudly. Never fold them into one; `tests/test_hardware_gate.py` proves both. A module in `tests/hardware/` also needs a basename no module under `tests/` owns - pytest maps `tests/hardware/test_scales.py` and `tests/test_scales.py` to one module name and refuses the second, which is why two files there end `_on_unit`. Rename; do not reach for `__init__.py` or `consider_namespace_packages`, because three offline modules do `from waiting import ...` and that works only while pytest puts `tests/` on `sys.path`. +- Dev setup: `uv venv && uv pip install -e ".[dev]"` (or plain venv + pip, see contributing.md). Run tests with `.venv/bin/python -m pytest`. The suite passes offline - no hardware, no `hid` import, no `DYLD_LIBRARY_PATH`. The hardware suite's `--hardware` gate is two hooks in `tests/hardware/conftest.py` and stays two: pytest skips `pytest_ignore_collect` for a path named on the command line, so `pytest_collection_modifyitems` refuses that one loudly. Never fold them into one; `tests/test_hardware_gate.py` proves both. A module in `tests/hardware/` also needs a basename no module under `tests/` owns - pytest maps `tests/hardware/test_scales.py` and `tests/test_scales.py` to one module name and refuses the second, which is why two files there end `_on_unit`. Rename; do not reach for `__init__.py` or `consider_namespace_packages`, because three offline modules do `from waiting import ...` and that works only while pytest puts `tests/` on `sys.path`. A hardware test names what it verifies AND actually asserts on with `@pytest.mark.verifies(*operations)`, checked against `QuadCortex.operations()` at collection; `--verifies NAME` narrows a run to the tests naming it. `scratch_preset` is the fixture for getting a disposable copy of the loaded preset to edit. An operation no hardware test names has to appear in `tests/test_hardware_markers.py`'s `UNMARKED_OPERATIONS`, with the reason - that dict is the list a new operation must come through if no hardware test names it. - Two namespaces, one package (ADR-0006): `pyquadcortex` is the model of the unit, `pyquadcortex.protocol` is the message-level API. The model's code lives in `pyquadcortex/device/` - not `model/`, because in this codebase the identifier `model` means an amp or pedal block (`protocol/models.py`, `catalog.Model`, `ModelCatalog`, `set_block(model=...)`). The model imports the protocol layer; nothing under `pyquadcortex/protocol/` may import from `pyquadcortex/device/`. - Every conversion between a screen value and a wire value lives in the `pyquadcortex/device/translate/` PACKAGE and nowhere else in the package outside `pyquadcortex/protocol/` - the whole package, not just `device/`, because a rule scoped to a directory is satisfied by moving the code one directory up. It covers rows 1-4, slots 1-8, scene and footswitch letters, preset addresses and display units. Outside the boundary that means no `+1`/`-1` on a coordinate AND none of the other spellings of the same conversion (`ord`/`chr`, a letter table in any container, `divmod` on a position, a one-based `enumerate`, `ROWS.index(...)`), and no module reaching past the boundary for a protocol-layer name that carries a coordinate or a raw scale - the converters and also the readers that hand back wire indexes, such as `protocol.stomp_assignments`. `tests/test_translation.py` reads the source and proves both, and pins where each check stops seeing rather than implying it sees everything. The boundary is a package, so its exemption covers a DIRECTORY: `BOUNDARY_MODULES` in that file names the modules inside it, and adding `translate/anything.py` has to come through that list with a reason - otherwise the arithmetic scan skips the new file for the same reason it skips the real converters. The same file now carries a second list, `PROTOCOL_NON_CONVERSIONS`, for protocol-layer names the boundary uses that are NOT conversions (`field_present`, the port enums). It exists because the boundary reads whole presets now, so "everything it reaches for is a conversion" stopped being true; a name has to be on one list or the other, and which one is a judgement a reviewer makes from the reason written beside it. A model API takes `FootswitchLetter`, never a bare footswitch integer, because a footswitch index and a block's column are different numbers that usually agree. A new conversion goes in that module with its own test, however small it is, and its protocol-layer name joins that file's allowlist in the same commit. - The model represents what the unit shows, in the unit's own words, and never guesses. A control we understand but cannot yet drive is modelled and REFUSES the operation (ADR-0007); a control we do not understand is omitted, with the reason recorded in `docs/domain-model.md`'s appendix. Nothing ships with a "this might be stale or wrong" caveat. A refusal is `protocol.ControlNotDrivable(control, evidence, workaround)` - never a bare `ValueError` and never a message-only raise. All three fields are required, and `evidence` records what was actually tried, because a refusal nobody can audit is the guess the rule exists to prevent. Before writing one, ADR-0010 applies: the differential capture comes first, and "the unit broadcasts nothing" is not on its own a finding about the wire. Do not derive a refusal from a RULE about parameter types either - the first instance had three plausible rules tried against hardware and all three were false, so `LANE_OUTPUT_UNASSIGNABLE` is a measured list with the disproofs written beside it. @@ -25,7 +25,7 @@ Read `docs/STEERING.md` before non-trivial work (new operations, transport or fr - A parameter value SAYS WHICH SCALE IT IS ON (ADR-0016). Every knob has two number lines: the screen's, which differs per knob, and the device's, which is 0..1 for all 3,809 of them. `set_param` takes one value and it must be typed - `Real` for the screen's line, `Db`/`Hertz`/`Percent`/`Milliseconds`/`Seconds`/`Semitones`/`Cents`/`Bpm` to name the unit and have it checked against the catalog, `Encoded` for the device's line, and a bare string for a string parameter. A bare number is REFUSED, because on a lane VOLUME `Real(0.0)` is unity and `Encoded(0.0)` is silence and nothing in a plain `0.0` says which was meant. `Encoded` stays accepted everywhere and is NEVER advertised where a unit type would serve. Two source-reading tests hold that, and between them they say exactly how far it reaches: `tests/test_examples.py` covers `examples/`, and `tests/test_docs.py` covers the code blocks inside docstrings. Each use must carry a written reason nearby. NOT covered, deliberately: prose in `docs/`, which needs judgement rather than a regex, and the error messages that OFFER `Encoded` to a caller who has just been refused - that is the message's job. `values.py` is exempt because it is where the two scales are defined against each other. Only `Encoded` works with no device attached, since the other two need the catalog. This is protocol-layer work on purpose - the translation boundary governs coordinates this library CHOOSES (rows 1-4, scene letters), not units the device PUBLISHES. - EVERY method that writes a value takes a typed one, not just `set_param` (ADR-0017). The settings are not catalog models, so the scale comes from somewhere else - and there are three cases, which must not be blurred. A wire 0..1 with a KNOWN scale (an input port's GAIN, -12..+60 dB; a Global EQ band's GAIN, -12..+12 dB - and those are NOT known equally well, see below) takes the unit type and converts, through a real `catalog.Parameter` so it gets the one law rather than a private copy. A wire 0..1 with NO known scale (output level, USB level, master volume, Global EQ frequency/Q/OUT level, a Global EQ index) takes `Encoded` only, and a `Real` raises `ControlNotDrivable` naming what would settle it - never an invented span. A setting with no 0..1 line at all (the HOLD threshold in ms, the tuner offset in Hz) refuses `Encoded`, because the wire carries the real number. `units.SETTING_SPANS` holds the two known spans WITH how well each is known, and they differ: four measured points against the manual plus two. SELECTORS are not values and stay plain - impedance, input type, ground lift, hp_select, dry_wet, filter type, mute and bypass take an enum or a bool. - A generated parameter constant CARRIES ITS UNIT in its type (ADR-0018), so a type checker rejects `set_param(LaneOutputParam.VOLUME, Hertz(217))` before it runs. mypy is a BLOCKING CI job over the whole package, with ONE suppression in the whole config (`ignore_missing_imports` for `hid`, which ships no stubs) - the ~195 phantom errors from the generated bindings are fixed by committing `*_pb2.pyi` stubs emitted in the same protoc run. `scripts/compile_protos.sh` refuses to write bindings without them AND rewrites their cross-references package-relative: protoc emits `import Preset_pb2` flat, the bindings survive that through the sys.path shim in `proto/__init__.py`, and a type checker cannot - so every field carrying a `Preset` type would read as `Any` while mypy reported success. `tests/test_packaging.py` holds both halves. The runtime check is unchanged and still covers every other caller. What is easy to break: `set_param`'s three overloads. A `Param` IS an `int`, so an int overload that accepts real values swallows every wrong-unit call - overload resolution takes the first MATCH and a failing first overload falls through. The int overload therefore takes only `Encoded`, a string or a switch, which makes `set_param(target, 21, Real(3))` a static error although it runs; address by index and say `Encoded`, or name the parameter. `tests/test_typing.py` holds both directions and is mutation-tested, because a checker that stops catching things stays green and one that cries wolf gets turned off. -- A connection resolves a DEVICE PROFILE before the handshake (ADR-0020; the rule is decided, the seam is not built yet): `device_type` plus `zenos_git_hash` from the unit's own `Version` reply, looked up in a registry of measured profiles. An unknown pair REFUSES to connect; there is no fallback to the nearest profile, and `profile=` is the deliberate way to measure an unmeasured unit. Everything that differs by firmware or model lives on the profile - the generated constants snapshot, the announce string, the hardware facts, the operations measured to differ - and no other module tests a version string. A profile that has not measured an operation refuses it with `ControlNotDrivable` whose evidence says so. Name a profile by CorOS version, never by `app_fw`: a contributor reports d14e on 4.1.0 as well as 4.0.1 (PR #44). Until the seam is built, `protocol.models`/`params`/`options` mean the QC 4.0.1 snapshot, and an observation from another profile goes BESIDE the 4.0.1 record in `docs/protocol.md`, dated and named, never in its place. `version()` accepts only a `Version` carrying an identity field (serial or firmware) because the unit answers a `Version` READ twice and `request()` cannot tell the full reply from the device's own READ; a PARTIAL reply is still accepted, because the per-field cache rule owns incomplete answers. +- A connection resolves a DEVICE PROFILE before the handshake (ADR-0020): `device_type` plus `zenos_git_hash` from the unit's own `Version` reply, looked up in a registry of measured profiles. An unknown pair REFUSES to connect; there is no fallback to the nearest profile, and `profile=` is the deliberate way to measure an unmeasured unit. Everything that differs by firmware or model lives on the profile - the generated constants snapshot, the announce string, the hardware facts, the operations measured to differ - and no other module tests a version string. A profile that has not measured an operation refuses it with `ControlNotDrivable` whose evidence says so. Name a profile by CorOS version, never by `app_fw`: a contributor reports d14e on 4.1.0 as well as 4.0.1 (PR #44). `protocol.models`/`params`/`options` are shims over the QC 4.0.1 snapshot in `protocol/catalogs/coros_4_0_1/`; a connection's own snapshot is `qc.models`. An observation from another profile goes BESIDE the 4.0.1 record in `docs/protocol.md`, dated and named, never in its place. `version()` accepts only a `Version` carrying an identity field (serial or firmware) because the unit answers a `Version` READ twice and `request()` cannot tell the full reply from the device's own READ; a PARTIAL reply is still accepted, because the per-field cache rule owns incomplete answers. A subclass of `QuadCortex` lists what it has verified in `VERIFIED`; everything else it inherits is guarded and refuses under `Support.VERIFIED`. Never put a version check in a method body - override on the profile class, and list the override in `VERIFIED`. - Docstrings state their evidence: confirmed on hardware vs inferred from the schema. When you verify something on hardware, record it (docstring + coverage table) in the same change. - The frame trailer's two flag bytes are REPORTED, and never decide what happens to a payload (ADR-0019). `framing.decode_reports` returns a `Frame` naming all of it: type, `encrypted` (`n+4`), `compressed` (`n+5`), `device_bytes` (`n+6`, still meaningless). Compression is detected by the gzip magic bytes and NOT by the flag - CortexUSB reads the flag and needed a skip-list for types 32 and 33 to make it work, which is the argument. The RX path does compare the two and logs a line when they disagree, because the 15675/15675 agreement was measured on CorOS 4.0.1 only and a firmware that broke it must not do so quietly. And nothing here decrypts: an encrypted payload gets labelled and dropped, because the messages behind that flag are `License` and `CloudLogin` and the key derivation would be reimplemented from someone else's MIT source. Both flags describe the FRAME, not the type - a `License` READ is unflagged and its reply is encrypted - so never key either one off a message type. Wanting the decryption means reopening ADR-0019, not adding coverage. - Code in the RX path preserves "the RX thread never dies": wrap every decode, skip unknown types at debug level, reset the reassembly buffer on anything malformed. diff --git a/changelog.md b/changelog.md index f8a4139..fee06c0 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,26 @@ correction. ## Unreleased +### BREAKING: the generators take `--snapshot`, and constants moved + +`scripts/generate_models.py`, `generate_params.py` and `generate_options.py` +require `--snapshot coros_x_y_z` and write `pyquadcortex/protocol/catalogs//`; +`--out` is gone. The generated modules moved there; `pyquadcortex.protocol.models`, +`params` and `options` still import and still mean CorOS 4.0.1, as shims. + +### The connection knows which unit it is talking to (ADR-0020) + +`connect()` reads the unit's `Version` first and picks the profile class for +`(device_type, zenos_git_hash)`: `QuadCortex` for a Quad Cortex on 4.0.1, +`QuadCortex41` for 4.1.0, and `UnsupportedDevice` for anything else, before +the handshake. `connect(profile=...)` names a class deliberately for a unit +nobody has measured. `connect(support=Support.EXPERIMENTAL)` runs operations +a profile has not verified, with one warning each; the default +`Support.VERIFIED` refuses them. `qc.models`, `qc.params`, `qc.options` are the +connection's own constants; `qc.unverified_operations` says what its profile +has not verified. `set_block` refuses a model id the unit's catalog lacks. +The Quad Cortex Mini is recognised and refused with instructions. + ### The repo describes device profiles, not one baseline (ADR-0020) A profile is what the unit reports in its `Version` reply: `device_type` and diff --git a/contributing.md b/contributing.md index 0113850..9b7e398 100644 --- a/contributing.md +++ b/contributing.md @@ -111,6 +111,28 @@ When you confirm behavior on hardware, say so in the pull request: which operati which CorOS version, and how you verified it (a read-back, or watching the unit). That evidence is what keeps [docs/protocol.md](docs/protocol.md) trustworthy. +## Adding a device profile + +A new CorOS release, or a new model, is a new `QuadCortex` subclass (ADR-0020), +not a change to the existing baseline. On the unit it covers: + +1. **Generate the snapshot.** `scripts/generate_models.py --snapshot coros_x_y_z` + and the params and options generators; bind the three modules on the new class. +2. **Run the suite.** `pytest tests/hardware --hardware` against the unit, + connected `Support.EXPERIMENTAL` so nothing refuses before it can be measured. +3. **Fill `VERIFIED`.** The report at the end of the run names which operations + passed; put those names in the class's `VERIFIED` set. +4. **Record differences beside the 4.0.1 record.** Anything that behaved + differently goes in [docs/protocol.md](docs/protocol.md), dated and named + next to the existing entry, never in its place, and overridden on the new + class. + +Profiles are named by CorOS version, never by `app_fw` - a contributor reports +firmware `d14e` on both CorOS 4.0.1 and 4.1.0 (PR #44), so the app firmware +string distinguishes nothing. `MEASURED_ON` lists the exact `zenos_git_hash` +strings a suite run has covered; a patch release is added to it after a suite +run confirms it, not assumed to behave like the version already there. + ## Style Match the style of the surrounding code. Keep changes focused - unrelated cleanups are diff --git a/docs/STEERING.md b/docs/STEERING.md index aac7c81..e4d7264 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -61,6 +61,7 @@ The model layer holds the state (design in [`domain-model.md`](domain-model.md) | Keyed grid edits | Mutations are row/column-keyed `Grid` UPDATEs | The device applies grid updates by key; wholesale preset writes are silently ignored (see [`architecture.md`](architecture.md), "write_preset is a trap") | `QuadCortex.set_bypass` in `pyquadcortex/protocol/client.py` | Read paths, and non-grid operations | | One translation boundary | Screen values become wire values in exactly one PACKAGE, and a source-reading test proves no other module in the package does it - the whole package outside `protocol/`, not just `device/`. The exemption covers a directory, so a test names the package's modules and a new one has to come through that list | An off-by-one row is silent - the write lands on a real row and reads back perfectly - so a convention cannot be trusted to hold (design principle 5 in [`domain-model.md`](domain-model.md)) | `pyquadcortex/device/translate/` | The protocol layer, which keeps its zero-based COORDINATES. Its scales come from the catalog, and quoting the device's own units is not translating - see ADR-0016 | | Model state goes through the cache | A model property reads `Device.state.value(entry, field)`; what it tracks is a `StateEntry` in `device/entries.py`, not an attribute the property fills in itself | One account of what the model believes and how it learned it. A property with its own cached attribute answers from a copy nothing invalidates, and a closed connection cannot take it away (see ADR-0011) | `Device.firmware` in `pyquadcortex/device/device.py` | Values derived from an entry rather than read from the unit, which compute from `value()` rather than caching alongside it | +| Profile is the class | A connection resolves `(device_type, zenos_git_hash)` to a client class before the handshake; `QuadCortex` is 4.0.1 and the base, a subclass declares what differs and refuses what it has not verified | One `if firmware ==` in a method body is the smell polymorphism removes; the decision is made once, by which class is instantiated (see ADR-0020) | `QuadCortex41` in `pyquadcortex/protocol/profiles.py` | `ALWAYS`: the lifecycle methods every profile needs to connect and clean up | ## 6. Constraints @@ -68,7 +69,8 @@ The model layer holds the state (design in [`domain-model.md`](domain-model.md) - **The protobuf runtime pin is coupled to the committed gencode, and so is the generator floor.** The runtime validates `runtime >= gencode` at import time; a mismatch is a hard `ImportError` for every user. Currently gencode 7.35.1, pinned `>=7.35.1,<8` (see ADR-0001). The generator is `grpcio-tools`, which carries its own protoc and so decides the gencode by which version is installed, hence the `grpcio-tools>=1.83.0` floor in the dev extra. Older gencode still imports, so both guards are explicit: `scripts/compile_protos.sh` refuses to write a downgrade, and `tests/test_packaging.py` proves the committed gencode and the pin floor are the same number (see ADR-0008). - **Python >= 3.11.** - **The default test suite runs fully offline.** No test imports `hid`, touches hardware, or needs `DYLD_LIBRARY_PATH`; CI runs the real suite on plain runners for every PR (see ADR-0002). A separate hardware-in-the-loop suite - state-neutral on success, best-effort restore on failure, never run in CI - lives in `tests/hardware/` and runs only under `pytest --hardware` (see ADR-0005). That gate is TWO hooks in `tests/hardware/conftest.py`, not one: pytest offers `pytest_ignore_collect` only the paths it reaches by walking a directory, so a path named on the command line is caught instead by `pytest_collection_modifyitems`, which stops the run with an error naming the flag. `tests/test_hardware_gate.py` holds both halves up through a subprocess. Its modules must stay import-safe offline, and two offline tests hold that: `tests/test_hardware_gate.py` collects the whole tree under `--hardware` with `hid` poisoned, which imports every module in the directory, and `tests/test_scene_echo_predicates.py` imports `tests/hardware/test_write_echo.py` to exercise its predicates with no unit attached - the only way a predicate that can never match gets caught cheaply. -- **Wire behaviour is stated per device profile, and a profile is named by CorOS version, never by `app_fw`** (ADR-0020). The measured baseline is Quad Cortex, CorOS 4.0.1, firmware d14e; a contributor reports d14e on 4.1.0 too (PR #44), so the app firmware string distinguishes nothing. Once the seam is built, an unknown profile will refuse to connect rather than borrow the nearest one. An observation from another profile is recorded beside the 4.0.1 record in `protocol.md`, dated and named. The protocol is unversioned, so no behavior is guaranteed across firmware updates; [`architecture.md`](architecture.md) has the re-verification checklist. +- **Wire behaviour is stated per device profile, and a profile is named by CorOS version, never by `app_fw`** (ADR-0020). The measured baseline is Quad Cortex, CorOS 4.0.1, firmware d14e; a contributor reports d14e on 4.1.0 too (PR #44), so the app firmware string distinguishes nothing. An unknown profile refuses to connect rather than borrow the nearest one. An observation from another profile is recorded beside the 4.0.1 record in `protocol.md`, dated and named. The protocol is unversioned, so no behavior is guaranteed across firmware updates; [`architecture.md`](architecture.md) has the re-verification checklist. +- **A hardware test names what it verifies, and it must actually verify it.** `@pytest.mark.verifies(*operations)` names the `QuadCortex` operations a test both exercises and asserts on - checked against `QuadCortex.operations()` at collection, so a renamed operation is a collection error rather than a marker that quietly stops naming anything. `pytest tests/hardware --hardware --verifies NAME` narrows a run to the tests that name it. `scratch_preset` is the fixture a test uses to get a disposable copy of the loaded preset to edit, rather than touching the owner's own library. An operation no hardware test names has to appear in `tests/test_hardware_markers.py`'s `UNMARKED_OPERATIONS`, with the reason beside it - there is no third way. - **Exclusive device access.** Cortex Control holds the HID interface exclusively, so the library and Cortex Control cannot be connected at the same time. ## 7. Decision Records @@ -136,6 +138,25 @@ Single-device, single-connection USB HID at interactive rates (129-byte reports) ## Change Log +### 2026-09-04 - The profile seam is built (ADR-0020) + +**What changed:** `connect()` reads the unit's `Version` before the handshake, +resolves `(device_type, zenos_git_hash)` in a registry of profile classes, and +refuses an unknown pair with `UnsupportedDevice`. `QuadCortex` declares itself +as the 4.0.1 profile; `QuadCortex41` connects and verifies nothing until a 4.1 +unit's suite run fills its `VERIFIED` set; `QuadCortexMini` is recognised and +refused. An operation a profile has not verified refuses under the default +`Support.VERIFIED` and runs with one warning under `Support.EXPERIMENTAL`. +Generated constants live in `pyquadcortex/protocol/catalogs/coros_4_0_1/`; +`protocol.models` and friends are shims over it. `set_block` checks the live +catalog before sending. The hardware suite marks the operations each test +verifies and prints, per profile, which passed. + +**Why:** the ADR-0020 entry below records the decision; this is the code. + +**What did NOT change, on purpose:** `protocol.models` still means 4.0.1; +`CC_VERSION` still announces 4.0.1 on every profile; no 4.1 snapshot ships. + ### 2026-09-03 - One baseline becomes a registry of device profiles (ADR-0020) **What changed:** the repo stops describing one firmware as "the" baseline and diff --git a/docs/api.md b/docs/api.md index a845644..c34a0ce 100644 --- a/docs/api.md +++ b/docs/api.md @@ -43,6 +43,7 @@ already read and need no connection; calling them as methods raises | | | |---|---| +| **Connect** | `protocol.connect(profile=, support=)` resolves the unit's own device profile before the handshake (ADR-0020) and returns it, already connected; an unrecognised `(device_type, zenos_git_hash)` raises `UnsupportedDevice`. `Support.VERIFIED` (default) refuses an operation its profile has not verified; `Support.EXPERIMENTAL` runs it with one warning. `qc.models`, `qc.params`, `qc.options` are that connection's own constants snapshot | | **Inspect** | `version()`, `list_presets(setlist)`, `find_preset(name, setlist)`, `read_preset(setlist, slot)` | | **Navigate** | `recall_preset(setlist, slot)`, `switch_scene(scene)` | | **Edit the grid** | `set_chain_input(row, input)`, `reroute_grid_input(preset, input)`, `set_param(target, param, value)`, `set_bypass(Block(row, column), bypassed)` | diff --git a/docs/architecture.md b/docs/architecture.md index a2a660c..52b4654 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -25,7 +25,7 @@ shapes), see [`protocol.md`](protocol.md). This document covers the code. - [Capturing the device's traffic](#capturing-the-devices-traffic) - [Testing philosophy](#testing-philosophy) - [What is not implemented yet](#what-is-not-implemented-yet) -- [Adapting to a new CorOS version](#adapting-to-a-new-coros-version) +- [Adding a device profile (a new CorOS version or a new model)](#adding-a-device-profile-a-new-coros-version-or-a-new-model) ## Layer map @@ -684,19 +684,33 @@ next, roughly in order of how well the ground is prepared: reports both and acts on neither, because compression is still detected by the gzip magic bytes and an encrypted payload is labelled rather than decrypted. -## Adapting to a new CorOS version +## Adding a device profile (a new CorOS version or a new model) **The protocol carries no version number.** There is no capability negotiation and no schema version on the wire, so nothing tells you at runtime that a firmware update changed a message. Assume nothing survives a major update until you re-check it. -A new CorOS release is a new DEVICE PROFILE, not a replacement of the baseline -(ADR-0020). Its constants, announce string and measured behaviours arrive as a -entry in the profile registry ADR-0020 calls for (not built yet), beside the -existing profile, and its observations are recorded in `protocol.md` beside the -4.0.1 record, dated and named. Name it by `zenos_git_hash`, the CorOS version, -never by `app_fw`: a contributor reports d14e on 4.1.0 as well as 4.0.1 (PR #44). +A new CorOS release, or a new model, is a new DEVICE PROFILE - a `QuadCortex` +subclass, not a replacement of the baseline (ADR-0020). `connect()` resolves +`(device_type, zenos_git_hash)` in the registry of profile classes before the +handshake and refuses an unknown pair rather than borrowing the nearest one. +Name the profile by `zenos_git_hash`, the CorOS version, never by `app_fw`: a +contributor reports d14e on CorOS 4.1.0 as well as 4.0.1 (PR #44). Building one, +on the unit it covers - the four steps `QuadCortex41` is written mid-way through, +in `pyquadcortex/protocol/profiles.py`: + +1. **Generate the snapshot.** `scripts/generate_models.py --snapshot coros_x_y_z` + and the params and options generators, against the new unit; bind the three + modules on the new class. +2. **Run the suite.** `pytest tests/hardware --hardware` against that unit, + connected `Support.EXPERIMENTAL` so nothing refuses before it can be + measured - on a new profile the suite IS the verification. +3. **Fill `VERIFIED`.** The report at the end of the run names which operations + passed on this profile; put those names in the class's `VERIFIED` set. +4. **Record differences beside the 4.0.1 record.** Anything that behaved + differently is written into `protocol.md` next to the existing entry, dated + and named, never in its place, and overridden on the new class. When measuring a new CorOS / Cortex Control release: diff --git a/docs/protocol.md b/docs/protocol.md index 389001a..abfce09 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -6,7 +6,9 @@ established by observing real Cortex Control sessions on the wire and then confirming each finding live against hardware. > **Applies to a device profile, and says which.** A profile is what the unit -> reports in its `Version` reply: `device_type` and `zenos_git_hash`, the CorOS +> reports in its `Version` reply and is a client class: `QuadCortex` (4.0.1), +> `QuadCortex41`, `QuadCortexMini` in `pyquadcortex/protocol/profiles.py`. It is +> identified by `device_type` and `zenos_git_hash`, the CorOS > version (ADR-0020). Every statement below was measured on **Quad Cortex, CorOS > 4.0.1** (`zenos` 4.0.1, `app_fw` d14e), the maintainer's unit, unless it says > otherwise. An observation from another profile is written beside the 4.0.1 @@ -17,7 +19,7 @@ confirming each finding live against hardware. > protocol version, so none of this is guaranteed across a CorOS update. The > profile is read from the unit's own `Version` reply at connect, which is the > only version information the wire offers. Re-verify after a firmware change (see -> [architecture.md](architecture.md#adapting-to-a-new-coros-version)). +> [architecture.md](architecture.md#adding-a-device-profile-a-new-coros-version-or-a-new-model)). > > Unofficial: this project is not affiliated with, endorsed by, or supported by > Neural DSP. From 9a489abe0ba92fecfc88c08ed946c8d997c9782b Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:31:28 -0500 Subject: [PATCH 17/33] docs: QuadCortex lives in client.py, and the seam entry carries the day it landed --- docs/STEERING.md | 2 +- docs/protocol.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/STEERING.md b/docs/STEERING.md index e4d7264..bdd8511 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -138,7 +138,7 @@ Single-device, single-connection USB HID at interactive rates (129-byte reports) ## Change Log -### 2026-09-04 - The profile seam is built (ADR-0020) +### 2026-09-06 - The profile seam is built (ADR-0020) **What changed:** `connect()` reads the unit's `Version` before the handshake, resolves `(device_type, zenos_git_hash)` in a registry of profile classes, and diff --git a/docs/protocol.md b/docs/protocol.md index abfce09..cfbe453 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -6,8 +6,9 @@ established by observing real Cortex Control sessions on the wire and then confirming each finding live against hardware. > **Applies to a device profile, and says which.** A profile is what the unit -> reports in its `Version` reply and is a client class: `QuadCortex` (4.0.1), -> `QuadCortex41`, `QuadCortexMini` in `pyquadcortex/protocol/profiles.py`. It is +> reports in its `Version` reply and is a client class: `QuadCortex` (4.0.1) in +> `pyquadcortex/protocol/client.py`; `QuadCortex41` and `QuadCortexMini` in +> `pyquadcortex/protocol/profiles.py`. It is > identified by `device_type` and `zenos_git_hash`, the CorOS > version (ADR-0020). Every statement below was measured on **Quad Cortex, CorOS > 4.0.1** (`zenos` 4.0.1, `app_fw` d14e), the maintainer's unit, unless it says From 2eb162d8f19e68e1bf80d4d6392e3abf6d6e207d Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:46:48 -0500 Subject: [PATCH 18/33] fix: a profile subclasses QuadCortex directly, and operations() counts plain functions only __init_subclass__ took every guard's implementation from QuadCortex, so a class two levels down was guarded against the BASE - silently discarding the measured override its parent profile made. ADR-0020 is one class per measured unit, so that case is now refused with a TypeError before anything else runs, and the guard site says why the base is the right source given the rule. operations()'s predicate failed open. A staticmethod object is callable, so a future public static helper would have been guarded and handed self as its first argument; a property would have been replaced by a plain function and never refused. The predicate now counts plain functions only, and a new test holds that every public property is an ALWAYS entry with its reason. unverified_text reads cls.__name__ plainly; the test's stand-in is a real class rather than an object carrying __name__ as an attribute. --- pyquadcortex/protocol/client.py | 28 ++++++++++++++-- pyquadcortex/protocol/support.py | 2 +- tests/test_profiles.py | 55 ++++++++++++++++++++++++++++++-- tests/test_support.py | 11 +++++-- 4 files changed, 88 insertions(+), 8 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index e1a2c8c..c4a5137 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -31,6 +31,7 @@ import functools import logging import time +import types import typing import uuid import warnings @@ -332,15 +333,35 @@ class QuadCortex: @classmethod def operations(cls) -> frozenset: - """Every public method of `QuadCortex` that is an operation on the unit.""" + """Every public method of `QuadCortex` that is an operation on the unit. + + A PLAIN FUNCTION and nothing else. `callable()` would fail open: a + `staticmethod` object is callable, and the guard would wrap it and pass + `self` as its first argument; a `property` is not callable but would + have been swept in by the `isinstance` half and replaced with a plain + function, so reading it would return the guard rather than refuse. + A property is never an operation - it belongs in `ALWAYS`, which + `tests/test_profiles.py` holds for every public one. + """ return frozenset( name for name, value in vars(QuadCortex).items() if not name.startswith("_") - and (callable(value) or isinstance(value, property)) + and isinstance(value, types.FunctionType) and name not in QuadCortex.ALWAYS) def __init_subclass__(cls, **kwargs): super().__init_subclass__(**kwargs) + # ADR-0020 is one class per measured unit, so a profile subclasses + # QuadCortex DIRECTLY. Checked before anything else, because the guard + # below takes its implementation from QuadCortex: a class two levels + # down would be guarded against the base and would silently discard + # its parent profile's measured override. + if cls.__bases__ != (QuadCortex,): + raise TypeError( + f"{cls.__name__} must subclass QuadCortex directly; ADR-0020 is " + f"one class per measured unit. A deeper class is guarded against " + f"QuadCortex's implementation, which would silently discard the " + f"measured override on {cls.__bases__[0].__name__}") if cls.VERIFIED is EVERYTHING: QuadCortex._PROFILES.append(cls) return @@ -357,6 +378,9 @@ def __init_subclass__(cls, **kwargs): for name in QuadCortex.operations(): if name in cls.__dict__ or name in cls.VERIFIED: continue + # The base's implementation is the right source because a profile + # subclasses QuadCortex directly (checked above), so QuadCortex is + # the only class this name could be inherited from. setattr(cls, name, _guarded(name, getattr(QuadCortex, name))) QuadCortex._PROFILES.append(cls) diff --git a/pyquadcortex/protocol/support.py b/pyquadcortex/protocol/support.py index f3bca8e..648888c 100644 --- a/pyquadcortex/protocol/support.py +++ b/pyquadcortex/protocol/support.py @@ -103,7 +103,7 @@ def unverified_text(cls: type[_ProfileClass], name: str) -> tuple[str, str]: connect-time hint, so they cannot say three different things. """ firmware = ", ".join(cls.MEASURED_ON) or "no firmware measured" - class_name = cls.__dict__.get('__name__', cls.__name__) + class_name = cls.__name__ evidence = f"not yet verified on {class_name} (CorOS {firmware})" workaround = ( f"connect(support=Support.EXPERIMENTAL) to try it, or run " diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 2f45a2e..95e122e 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -1,6 +1,7 @@ """The device profile seam (ADR-0020, spec 2026-09-03).""" import importlib import logging +import types import pytest @@ -47,15 +48,31 @@ def test_always_holds_only_the_lifecycle_and_each_entry_has_a_reason(): assert isinstance(reason, str) and len(reason) > 20, name -def test_operations_are_every_public_method_not_in_always(): +def test_operations_are_every_public_plain_function_not_in_always(): ops = client.QuadCortex.operations() public = {n for n, v in vars(client.QuadCortex).items() - if not n.startswith("_") and (callable(v) or isinstance(v, property))} + if not n.startswith("_") and isinstance(v, types.FunctionType)} assert ops == frozenset(public - set(client.QuadCortex.ALWAYS)) assert "set_scene_label" in ops and "version" not in ops assert len(ops) > 100 +def test_every_public_property_is_in_always(): + """A property is never an operation, so the guard must never see one. + + `operations()` counts plain functions, which means a property is neither + guarded nor refused - and a property outside `ALWAYS` would therefore be a + device read a stub profile answers as if it had measured it. There is one + place that cannot happen: `ALWAYS`, where each entry carries its reason. + """ + properties = {n for n, v in vars(client.QuadCortex).items() + if not n.startswith("_") and isinstance(v, property)} + assert properties, "the introspection found no properties at all" + assert not properties - set(client.QuadCortex.ALWAYS), ( + f"public properties outside ALWAYS: {sorted(properties - set(client.QuadCortex.ALWAYS))}. " + f"A property cannot be guarded, so it must be an ALWAYS entry with a reason.") + + def _profile(verified=frozenset(), name="Probe"): """A throwaway subclass; deleted from _PROFILES afterwards by the fixture.""" return type(name, (client.QuadCortex,), { @@ -147,6 +164,40 @@ def test_a_rejected_subclass_is_never_registered(): assert client.QuadCortex._PROFILES == before +def test_a_profile_must_subclass_quadcortex_directly(forget_probes): + """A sub-subclass would be guarded against the BASE implementation. + + `__init_subclass__` installs `_guarded(name, getattr(QuadCortex, name))`, + so a class two levels down that does not list a name in its own VERIFIED + gets the base's method wrapped - silently discarding the measured override + its parent profile made. ADR-0020 is one class per measured unit, so the + case is refused rather than made to work. + """ + Parent = _profile(verified=frozenset({"switch_scene"})) + before = list(client.QuadCortex._PROFILES) + with pytest.raises(TypeError, match="subclass QuadCortex directly"): + type("DeeperProbe", (Parent,), { + "MEASURED_ON": ("9.9.9",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset()}) + assert client.QuadCortex._PROFILES == before + + +def test_a_public_staticmethod_is_never_guarded(forget_probes, monkeypatch): + """`operations()` counts plain functions, so a static helper is not one. + + A `staticmethod` object is callable, so the older predicate made a public + one an operation - and the guard would then wrap it and pass `self` as its + first argument, breaking a method that touches no device at all. + """ + monkeypatch.setattr(client.QuadCortex, "describe_wire_format", + staticmethod(lambda: "a helper, not an operation"), + raising=False) + assert "describe_wire_format" not in client.QuadCortex.operations() + Probe = _profile() + assert not getattr(Probe.describe_wire_format, "_unverified", False) + assert Probe.describe_wire_format() == "a helper, not an operation" + + def test_unverified_operations_is_empty_on_the_base_and_full_on_a_stub(forget_probes): assert client.QuadCortex(FakeTransport()).unverified_operations == frozenset() Probe = _profile(verified=frozenset({"switch_scene"})) diff --git a/tests/test_support.py b/tests/test_support.py index 43c9549..168fa9d 100644 --- a/tests/test_support.py +++ b/tests/test_support.py @@ -37,13 +37,18 @@ def test_no_snapshot_refuses_every_attribute_and_names_the_generator(): assert repr(missing) == "NoSnapshot('coros_4_1_0')" -class _Fake: - __name__ = "QuadCortex41" +class QuadCortex41: + """A stand-in profile class; only its name and MEASURED_ON are read. + + A real class, not an object carrying `__name__` as an attribute, because + that is what `unverified_text` is handed at every call site. + """ + MEASURED_ON = ("4.1.0",) def test_unverified_text_names_the_profile_the_firmware_and_both_ways_out(): - evidence, workaround = support.unverified_text(_Fake, "set_scene_label") + evidence, workaround = support.unverified_text(QuadCortex41, "set_scene_label") assert evidence == "not yet verified on QuadCortex41 (CorOS 4.1.0)" assert "connect(support=Support.EXPERIMENTAL)" in workaround assert "pytest tests/hardware --hardware --verifies set_scene_label" in workaround From 9f0008630d52e6e6a8de1b4e2ac3d27a0746a8b7 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:47:45 -0500 Subject: [PATCH 19/33] fix: generators write into the repo's catalogs package wherever they are run from CATALOGS was a relative path, so a run from anywhere but the repo root built a fresh pyquadcortex/protocol/catalogs tree beside the working directory and reported success, leaving the real snapshot untouched. contributing.md and architecture.md both give the command with no working directory, so that was the ordinary case, not the exotic one. All three generators now anchor on the script's own location. The output-path test redirects CATALOGS instead of the working directory, and a second test holds the anchor itself. --- scripts/generate_models.py | 6 +++++- scripts/generate_options.py | 6 +++++- scripts/generate_params.py | 6 +++++- tests/test_generators.py | 23 ++++++++++++++++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/scripts/generate_models.py b/scripts/generate_models.py index 7d61d5e..e51bf5b 100644 --- a/scripts/generate_models.py +++ b/scripts/generate_models.py @@ -30,7 +30,11 @@ from pyquadcortex.protocol import catalog # noqa: E402 -CATALOGS = pathlib.Path("pyquadcortex/protocol/catalogs") +# Anchored on this script's own location, never on the working directory: +# the docs give this command with no cwd, and a relative path silently built +# a whole new catalogs tree wherever the run started while reporting success. +CATALOGS = (pathlib.Path(__file__).resolve().parents[1] + / "pyquadcortex" / "protocol" / "catalogs") def _snapshot_version(snapshot: str) -> str: diff --git a/scripts/generate_options.py b/scripts/generate_options.py index e177dec..b0681fd 100644 --- a/scripts/generate_options.py +++ b/scripts/generate_options.py @@ -38,7 +38,11 @@ from pyquadcortex.protocol import catalog # noqa: E402 -CATALOGS = pathlib.Path("pyquadcortex/protocol/catalogs") +# Anchored on this script's own location, never on the working directory: +# the docs give this command with no cwd, and a relative path silently built +# a whole new catalogs tree wherever the run started while reporting success. +CATALOGS = (pathlib.Path(__file__).resolve().parents[1] + / "pyquadcortex" / "protocol" / "catalogs") def _snapshot_version(snapshot: str) -> str: diff --git a/scripts/generate_params.py b/scripts/generate_params.py index 89e2a1a..d3ea71b 100644 --- a/scripts/generate_params.py +++ b/scripts/generate_params.py @@ -44,7 +44,11 @@ from pyquadcortex.protocol import catalog # noqa: E402 import generate_models # noqa: E402 (for class_name/const_name - the docstring example) -CATALOGS = pathlib.Path("pyquadcortex/protocol/catalogs") +# Anchored on this script's own location, never on the working directory: +# the docs give this command with no cwd, and a relative path silently built +# a whole new catalogs tree wherever the run started while reporting success. +CATALOGS = (pathlib.Path(__file__).resolve().parents[1] + / "pyquadcortex" / "protocol" / "catalogs") def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: diff --git a/tests/test_generators.py b/tests/test_generators.py index f850141..25c1a7c 100644 --- a/tests/test_generators.py +++ b/tests/test_generators.py @@ -72,9 +72,16 @@ def test_the_params_docstring_example_uses_the_lowest_id_cab_in_the_catalog(cat) @pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) def test_snapshot_is_required_and_decides_the_output_path(name, tmp_path, monkeypatch, cat): + """`CATALOGS` decides the directory and `--snapshot` decides the leaf. + + The redirection is `CATALOGS` rather than the working directory, because + the working directory is what the generators used to write relative to - + a run from anywhere but the repo root built a whole new tree there. + """ mod = _load(name) monkeypatch.setattr(mod, "load_payload", lambda path: XML) - monkeypatch.chdir(tmp_path) + monkeypatch.setattr( + mod, "CATALOGS", tmp_path / "pyquadcortex" / "protocol" / "catalogs") monkeypatch.setattr(sys, "argv", [name, "--payload", "x"]) with pytest.raises(SystemExit): # argparse: --snapshot is required mod.main() @@ -82,3 +89,17 @@ def test_snapshot_is_required_and_decides_the_output_path(name, tmp_path, monkey mod.main() written = tmp_path / "pyquadcortex" / "protocol" / "catalogs" / "coros_9_9_9" assert (written / f"{name.split('_')[1]}.py").exists() + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_the_output_tree_is_the_repos_catalogs_package_wherever_the_run_starts(name): + """An absolute path anchored on the script's own location. + + `contributing.md` and `architecture.md` give the command with no working + directory, so a cwd-relative `CATALOGS` wrote a `pyquadcortex/protocol/ + catalogs/` tree wherever the maintainer happened to be standing, and the + real snapshot was left untouched with the run reporting success. + """ + mod = _load(name) + assert mod.CATALOGS.is_absolute() + assert mod.CATALOGS == ROOT / "pyquadcortex" / "protocol" / "catalogs" From 86cdb8a705b27771bd34f41449feb6d131723c3b Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:49:51 -0500 Subject: [PATCH 20/33] fix: the hardware report claims only what ran, the scratch fixture cannot leak on a failed recall, and excuses cannot rot --verifies NAME made the end-of-run report lie. The markers were recorded for every COLLECTED test and the deselection happened afterwards, so `claimed` named operations the run never touched - and each one that a profile VERIFIES was printed as a regression. The recording is now a function, _claims, which narrows first and records what survives; tests/test_hardware_report.py drives the hook with a config double and holds both. scratch_preset opened its try: after the name check and the recall, so either failing left the copy in the owner's User setlist under the fixed name - the leak _release_scratch exists to prevent, and the one that makes the next run's delete-by-name ambiguous. The try: now opens the moment the copy exists. UNMARKED_OPERATIONS could name an operation that no longer exists; a renamed one left its excuse behind and nothing said so. --- tests/hardware/conftest.py | 71 +++++++++++++++--------- tests/test_hardware_markers.py | 5 ++ tests/test_hardware_report.py | 99 ++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 25 deletions(-) diff --git a/tests/hardware/conftest.py b/tests/hardware/conftest.py index bf5b1c8..bc77bb1 100644 --- a/tests/hardware/conftest.py +++ b/tests/hardware/conftest.py @@ -68,13 +68,47 @@ def _resolved(item): return None if path is None else path.resolve() +def _claims(items, operations, wanted, deselect): + """What the tests that will RUN say they verify, keyed by node id. + + Narrows ``items`` in place to the tests naming ``wanted`` (when there is + one), hands the rest to ``deselect``, and returns the claims of what is + left. The order matters and is the whole point: ``claimed`` in the + end-of-run report is the union of this, and a deselected test measured + nothing - recording it printed every operation the run never touched under + ``VERIFIED and claimed by a test, not passed``, which reads as a + regression. Held offline by ``tests/test_hardware_report.py``. + """ + marks = {} + for item in items: + names = {n for m in item.iter_markers("verifies") for n in m.args} + # Checked here rather than at run time so a renamed operation is a + # collection error on every run, including the offline one in + # tests/test_hardware_gate.py, rather than a marker that quietly + # stops naming anything. Checked over EVERY collected test, not just + # the surviving ones: a stale marker is a mistake in the suite, and + # --verifies must not hide it. + for name in sorted(names): + if name not in operations: + raise pytest.UsageError( + f"{item.nodeid}: verifies({name!r}) is not an operation") + marks[item.nodeid] = names + if wanted: + keep = [item for item in items if wanted in marks[item.nodeid]] + drop = [item for item in items if wanted not in marks[item.nodeid]] + items[:] = keep + deselect(drop) + return {item.nodeid: marks[item.nodeid] for item in items} + + def pytest_collection_modifyitems(session, config, items): """Stop the run when a hardware test is named directly without the flag. With ``--hardware`` it does the profile bookkeeping instead (ADR-0020): every ``verifies()`` name is checked against ``QuadCortex.operations()``, - the names are recorded for the end-of-run report, and ``--verifies`` narrows - the run to the tests that name one operation. The check runs at COLLECTION + ``--verifies`` narrows the run to the tests that name one operation, and the + names of what SURVIVES that are recorded for the end-of-run report (see + :func:`_claims`). The check runs at COLLECTION so a marker naming an operation that no longer exists stops the run before the unit is touched, and ``tests/test_hardware_gate.py`` - which collects this tree offline with ``hid`` poisoned - sees it too. @@ -108,26 +142,9 @@ def pytest_collection_modifyitems(session, config, items): if config.getoption("--hardware"): from pyquadcortex.protocol.client import QuadCortex - operations = QuadCortex.operations() - for item in items: - names = {n for m in item.iter_markers("verifies") for n in m.args} - # Checked here rather than at run time so a renamed operation is a - # collection error on every run, including the offline one in - # tests/test_hardware_gate.py, rather than a marker that quietly - # stops naming anything. - for name in sorted(names): - if name not in operations: - raise pytest.UsageError( - f"{item.nodeid}: verifies({name!r}) is not an operation") - _VERIFIES[item.nodeid] = names - wanted = config.getoption("--verifies") - if wanted: - keep, drop = [], [] - for item in items: - names = _VERIFIES.get(item.nodeid, set()) - (keep if wanted in names else drop).append(item) - items[:] = keep - config.hook.pytest_deselected(items=drop) + _VERIFIES.update(_claims( + items, QuadCortex.operations(), config.getoption("--verifies"), + lambda dropped: config.hook.pytest_deselected(items=dropped))) return gated = sorted({ str(path.relative_to(ROOT)) @@ -428,10 +445,14 @@ def scratch_preset(qc): SCRATCH_NAME) stored = qc.save_current_preset(Setlist.USER, free, SCRATCH_NAME, confirm=True, confirm_timeout=30.0) - assert stored == SCRATCH_NAME - qc.recall_preset(Setlist.USER, free) - time.sleep(3.0) + # The copy EXISTS from here on, so everything after this line is inside the + # try: a failed assert or a failed recall used to leave it in the owner's + # User setlist under the fixed name, which makes the next run's + # delete-by-name ambiguous - the leak _release_scratch exists to prevent. try: + assert stored == SCRATCH_NAME + qc.recall_preset(Setlist.USER, free) + time.sleep(3.0) yield Setlist.USER, free, SCRATCH_NAME finally: _release_scratch(qc, before, Setlist.USER, SCRATCH_NAME) diff --git a/tests/test_hardware_markers.py b/tests/test_hardware_markers.py index 2ef8000..d6e02f5 100644 --- a/tests/test_hardware_markers.py +++ b/tests/test_hardware_markers.py @@ -157,5 +157,10 @@ def test_every_operation_is_marked_or_excused_with_a_reason(): f"to UNMARKED_OPERATIONS with the reason.") stale = set(UNMARKED_OPERATIONS) & marked_operations() assert not stale, f"excused AND marked; drop the excuse: {sorted(stale)}" + gone = set(UNMARKED_OPERATIONS) - client.QuadCortex.operations() + assert not gone, ( + f"excuses naming no operation: {sorted(gone)}. A renamed or deleted " + f"operation leaves its excuse behind, and an excuse for nothing is a " + f"reason nobody will ever re-read; drop it.") for name, reason in UNMARKED_OPERATIONS.items(): assert len(reason) > 20, name diff --git a/tests/test_hardware_report.py b/tests/test_hardware_report.py index 1877269..d49e4e1 100644 --- a/tests/test_hardware_report.py +++ b/tests/test_hardware_report.py @@ -165,6 +165,86 @@ def test_a_profile_with_nothing_claimed_reports_nothing_as_a_regression(conftest assert all(names == [] for names in lines.values()) +# --- what a run CLAIMS to verify --------------------------------------------- + +class _Mark: + def __init__(self, *args): + self.args = args + + +class _Item: + """A collected test, as far as the collection hook reads one.""" + + def __init__(self, nodeid, *names): + self.nodeid = nodeid + self._marks = [_Mark(*names)] if names else [] + + def iter_markers(self, name): + return list(self._marks) if name == "verifies" else [] + + +class _Config: + """A `--hardware` config that records what the hook deselects.""" + + def __init__(self, verifies=None): + self._options = {"--hardware": True, "--verifies": verifies} + self.deselected = [] + self.hook = self + + def getoption(self, name): + return self._options[name] + + def pytest_deselected(self, items): + self.deselected.extend(items) + + +@pytest.fixture +def collection(conftest): + """The hook's recording, emptied around each test that drives it.""" + conftest._VERIFIES.clear() + yield conftest._VERIFIES + conftest._VERIFIES.clear() + + +def test_every_collected_test_claims_its_operations(conftest, collection): + items = [_Item("t.py::a", "set_param"), _Item("t.py::b", "set_bypass")] + + conftest.pytest_collection_modifyitems(None, _Config(), items) + + assert collection == {"t.py::a": {"set_param"}, "t.py::b": {"set_bypass"}} + + +def test_a_deselected_test_claims_nothing(conftest, collection): + """`--verifies NAME` narrows the run, so it must narrow the report too. + + The recording used to happen before the deselection, so `claimed` was + built from every COLLECTED test - and an operation whose test never ran + was printed under `VERIFIED and claimed by a test, not passed`, which the + report labels a regression. A run of one test reported ~104 of them. + """ + items = [_Item("t.py::a", "set_param"), _Item("t.py::b", "set_bypass")] + config = _Config(verifies="set_param") + + conftest.pytest_collection_modifyitems(None, config, items) + + assert [i.nodeid for i in items] == ["t.py::a"] + assert [i.nodeid for i in config.deselected] == ["t.py::b"] + assert collection == {"t.py::a": {"set_param"}} + + claimed = set().union(*collection.values()) + lines = dict(_named(conftest._report_lines( + _Everything, {"set_param": ["passed"]}, claimed))) + assert lines["VERIFIED and claimed by a test, not passed"] == [], ( + "set_bypass was deselected, so this run measured nothing about it") + + +def test_a_marker_naming_no_operation_stops_the_collection(conftest, collection): + items = [_Item("t.py::a", "set_paramm")] + + with pytest.raises(pytest.UsageError, match="is not an operation"): + conftest.pytest_collection_modifyitems(None, _Config(), items) + + # --- putting the unit back after scratch_preset ------------------------------ class _Position: @@ -234,6 +314,25 @@ def test_a_clean_teardown_recalls_then_deletes_and_says_nothing(conftest): ("delete", "USER", "pyquadcortex scratch")] +def test_nothing_after_the_copy_exists_sits_outside_the_try(conftest): + """The `try:` opens the moment the copy is on the unit, not later. + + `save_current_preset` returning IS the copy existing, so the check on its + name and the recall that follows must be inside the block whose `finally` + deletes it. They were outside, and either failing left the copy in the + owner's User setlist under the fixed name. Read from the source because + the fixture needs a unit; the ORDER of the lines is the whole fix. + """ + body = _HARDWARE_CONFTEST.read_text(encoding="utf-8").split( + "def scratch_preset(")[1] + lines = [line.strip() for line in body.splitlines()] + opened = lines.index("try:") + for guarded in ("assert stored == SCRATCH_NAME", + "qc.recall_preset(Setlist.USER, free)"): + assert lines.index(guarded) > opened, ( + f"{guarded!r} runs before the try: that deletes the copy") + + def test_the_restore_wording_is_written_once(conftest): """``restores`` and ``scratch_preset`` report in the same words. From 31ed28850a08bdee452ae1ee7e4f1f956462ef65 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 00:51:04 -0500 Subject: [PATCH 21/33] docs: the snapshot header carries the name only; tidy imports and the set_block evidence Spec section 2 promised the generated header would record the zenos_git_hash of the unit the payload came from. It does not, and should not: the snapshot name carries the CorOS version by construction, a --payload run has no hash to record, and embedding one would break the byte comparison with the committed file. The clause is dropped rather than built. set_block's catalog refusal says which kind of evidence it rests on - the catalog's contract, since the catalog is read from the unit - because no unit has been asked to place a model it does not have. tests/test_session.py's mid-file import moves to the header; tests/test_profiles.py imports FakeTransport the way pytest already has the module, rather than importing the 4,400-line file a second time under another name. --- .../specs/2026-09-03-device-profile-seam-design.md | 8 +++++--- pyquadcortex/protocol/client.py | 5 ++++- tests/test_profiles.py | 2 +- tests/test_session.py | 4 +--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md b/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md index a3b04cc..c1cfe97 100644 --- a/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md +++ b/docs/superpowers/specs/2026-09-03-device-profile-seam-design.md @@ -179,9 +179,11 @@ pyquadcortex/protocol/options.py (shim) ``` - The three generators take `--snapshot NAME` and write into - `catalogs/NAME/`. The generated header records the snapshot name and the - `zenos_git_hash` of the unit it was read from. `--out` is removed; one way to - place a file. + `catalogs/NAME/`. The generated header records the snapshot name; the name + carries the CorOS version by construction, and a `--payload` run has no + `zenos_git_hash` to record (embedding one would also break the byte + comparison with the committed file). `--out` is removed; one way to place a + file. - Each shim is hand-written, three lines: a docstring saying it is the maintainer's baseline per ADR-0020, `from .catalogs.coros_4_0_1.models import *`, and `from .catalogs.coros_4_0_1.models import ALL, __all__` (the names diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index c4a5137..e7c931b 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -1293,7 +1293,10 @@ def set_block(self, cell, verify: bool = True, timeout: float = 5.0): Refused, before sending, for a model id the unit's own catalog does not list - a constant from another firmware's snapshot, for instance - (ADR-0020). + (ADR-0020). Inferred from the catalog's contract rather than measured: + the catalog is READ FROM THE UNIT and describes what that unit has, so + an id it does not list does not exist there. No unit has been asked to + place a model it does not have. """ if cell.model_id in units_module.UNPLACEABLE_MODELS: raise ValueError( diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 95e122e..166e049 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -8,7 +8,7 @@ from pyquadcortex.protocol import client, errors, models, options, params, profiles, support from pyquadcortex.protocol.catalogs import coros_4_0_1 from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa -from tests.test_client import FakeTransport # the offline transport double +from test_client import FakeTransport # the offline transport double def test_the_baseline_shims_re_export_the_4_0_1_snapshot(): diff --git a/tests/test_session.py b/tests/test_session.py index 49e18c0..17f318f 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -8,7 +8,7 @@ import pytest -from pyquadcortex.protocol import client, session +from pyquadcortex.protocol import client, errors, profiles, session, support from pyquadcortex.protocol.proto import ProductionAutomation_pb2 as pa @@ -376,8 +376,6 @@ def never_answers(self, timeout=5.0, settle=2.0): # -- ADR-0020: connect() resolves the profile before the handshake ----------- -from pyquadcortex.protocol import errors, profiles, support - def test_connect_retries_the_identity_read_within_the_same_patience(monkeypatch, fake_stack): """The identity read is the first thing connect() asks of the unit, and it From b8492ba69c88019ff4803b84a7c72574787b2fd3 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:03:20 -0500 Subject: [PATCH 22/33] feat: --profile points the hardware suite at a unit the registry refuses The suite is the instrument that measures a profile, and it could not be run against the unit that needs measuring: it connected with no profile= and refused before a test could look. --profile CLASSNAME resolves a name over QuadCortex and everything registered under it, and an unknown name stops the run naming the real ones. The 4.1 docstring also cites its evidence: PR #42's description, 2026-09-03, 2742 passed / 8 skipped on CorOS 4.1.0 / d14e, by tony-xmelon - a contributor's report the maintainer has not reproduced. --- contributing.md | 7 +++++-- docs/architecture.md | 9 ++++++--- pyquadcortex/protocol/profiles.py | 29 +++++++++++++++++----------- tests/conftest.py | 13 +++++++++++-- tests/hardware/conftest.py | 32 +++++++++++++++++++++++++++++++ tests/hardware/readme.md | 17 ++++++++++++++++ tests/test_hardware_report.py | 20 +++++++++++++++++++ 7 files changed, 109 insertions(+), 18 deletions(-) diff --git a/contributing.md b/contributing.md index 9b7e398..adfbbb6 100644 --- a/contributing.md +++ b/contributing.md @@ -118,8 +118,11 @@ not a change to the existing baseline. On the unit it covers: 1. **Generate the snapshot.** `scripts/generate_models.py --snapshot coros_x_y_z` and the params and options generators; bind the three modules on the new class. -2. **Run the suite.** `pytest tests/hardware --hardware` against the unit, - connected `Support.EXPERIMENTAL` so nothing refuses before it can be measured. +2. **Run the suite.** `pytest tests/hardware --hardware --profile QuadCortexMini` + against the unit, naming your new class. `--profile` connects as that class + instead of the one the unit's identity resolves to, which is what lets the + suite run at all on a unit the registry would refuse; the suite always + connects `Support.EXPERIMENTAL`, so nothing refuses before it is measured. 3. **Fill `VERIFIED`.** The report at the end of the run names which operations passed; put those names in the class's `VERIFIED` set. 4. **Record differences beside the 4.0.1 record.** Anything that behaved diff --git a/docs/architecture.md b/docs/architecture.md index 52b4654..1fa5a12 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -703,9 +703,12 @@ in `pyquadcortex/protocol/profiles.py`: 1. **Generate the snapshot.** `scripts/generate_models.py --snapshot coros_x_y_z` and the params and options generators, against the new unit; bind the three modules on the new class. -2. **Run the suite.** `pytest tests/hardware --hardware` against that unit, - connected `Support.EXPERIMENTAL` so nothing refuses before it can be - measured - on a new profile the suite IS the verification. +2. **Run the suite.** `pytest tests/hardware --hardware --profile QuadCortexMini` + against that unit, naming your new class. `--profile` connects as that class + rather than the one the unit's identity resolves to, so the suite runs on a + unit the registry would otherwise refuse; it always connects + `Support.EXPERIMENTAL`, so nothing refuses before it can be measured - on a + new profile the suite IS the verification. 3. **Fill `VERIFIED`.** The report at the end of the run names which operations passed on this profile; put those names in the class's `VERIFIED` set. 4. **Record differences beside the 4.0.1 record.** Anything that behaved diff --git a/pyquadcortex/protocol/profiles.py b/pyquadcortex/protocol/profiles.py index 4c8105e..19ae372 100644 --- a/pyquadcortex/protocol/profiles.py +++ b/pyquadcortex/protocol/profiles.py @@ -19,19 +19,24 @@ class QuadCortex41(QuadCortex): """Quad Cortex on CorOS 4.1 - connects, and verifies nothing yet. - A contributor ran the whole hardware suite against a 4.1.0 unit with this - handshake and announce string, so the connection is known to work. Which - operations behave as on 4.0.1 is not known per name, so every inherited - operation refuses under ``Support.VERIFIED`` and runs with a warning under - ``Support.EXPERIMENTAL``. The snapshot is deliberately absent: binding the - 4.0.1 constants would hand a 4.1 user names their unit does not use. + PR #42's description (2026-09-03) reports ``pytest --hardware``: 2742 + passed, 8 skipped, on a Quad Cortex running CorOS 4.1.0 / app firmware + d14e, by tony-xmelon. That is a contributor's report and the maintainer has + not reproduced it, which is what ``Evidence.CONTRIBUTED`` says here. The + connection is therefore known to work with this handshake and announce + string. Which operations behave as on 4.0.1 is not known per name, so every + inherited operation refuses under ``Support.VERIFIED`` and runs with a + warning under ``Support.EXPERIMENTAL``. The snapshot is deliberately absent: + binding the 4.0.1 constants would hand a 4.1 user names their unit does not + use. To finish this profile, on a 4.1 unit: 1. ``scripts/generate_models.py --snapshot coros_4_1_0`` and the params and options generators; bind the three modules below. - 2. ``pytest tests/hardware --hardware``; the report at the end lists the - operations whose tests passed. Put those names in ``VERIFIED``. + 2. ``pytest tests/hardware --hardware --profile QuadCortex41``; the report + at the end lists the operations whose tests passed. Put those names in + ``VERIFIED``. 3. Record any operation that behaved differently in ``docs/protocol.md`` beside the 4.0.1 record, dated and named, and override it here. """ @@ -53,9 +58,11 @@ class QuadCortexMini(QuadCortex): is from the product page. Because ``MEASURED_ON`` is empty this class is never resolved; a Mini refuses to connect with a message naming this class. - To start, on a Mini: ``connect(profile=QuadCortexMini, - support=Support.EXPERIMENTAL)``. If the handshake works, run the hardware - suite and send the report. Expect the eight-footswitch assumptions in + To start, on a Mini: ``pytest tests/hardware --hardware --profile + QuadCortexMini``. That connects as this class rather than the one the unit + resolves to - which is nothing, so a plain run refuses - and the suite + connects ``Support.EXPERIMENTAL`` itself. If the handshake works, send the + report at the end of the run. Expect the eight-footswitch assumptions in ``QuadCortex`` to need overrides here, and expect this class to want a different base than ``QuadCortex`` once its shape is known. """ diff --git a/tests/conftest.py b/tests/conftest.py index 882b918..2de6325 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,8 +3,8 @@ It lives here rather than in ``tests/hardware/`` because pytest only reads command-line options from the rootdir's conftest, and the flag has to be recognised even on a run that never descends into the hardware directory. -``--verifies`` and the ``verifies`` marker are registered here for the same -reason, although only the hardware suite acts on them (ADR-0020). +``--verifies``, ``--profile`` and the ``verifies`` marker are registered here +for the same reason, although only the hardware suite acts on them (ADR-0020). See ADR-0005. The offline suite (ADR-0002) must stay runnable, and stay meaningful, with no unit attached - so the hardware tests are never merely @@ -30,6 +30,15 @@ def pytest_addoption(parser): help="with --hardware: run only the tests marked verifies(OPERATION) " "(ADR-0020). pytest's -m cannot match a marker's arguments.", ) + parser.addoption( + "--profile", + action="store", + default=None, + metavar="CLASSNAME", + help="names a profile class from pyquadcortex.protocol.profiles or " + "QuadCortex; used with --hardware to measure a unit the registry " + "would refuse (ADR-0020).", + ) def pytest_configure(config): diff --git a/tests/hardware/conftest.py b/tests/hardware/conftest.py index bc77bb1..e401a33 100644 --- a/tests/hardware/conftest.py +++ b/tests/hardware/conftest.py @@ -249,6 +249,32 @@ def names(self): return list(self._names) +def _profile_named(name): + """The profile class ``--profile NAME`` asks for (ADR-0020). + + This suite IS the instrument that measures a profile, so it has to be able + to run against a unit the registry would refuse - a firmware in nobody's + ``MEASURED_ON``, or a Mini. ``connect(profile=...)`` is the deliberate way + to do that, and without an option for it the one suite that could produce + the measurement was the one thing that could not be pointed at the unit. + + Resolved by class name over ``QuadCortex`` and everything registered under + it, which is every profile there is: a subclass registers itself, and + importing :mod:`pyquadcortex.protocol.profiles` is what puts the shipped + ones in that list. An unknown name stops the run naming the valid ones, + rather than connecting to somebody's unit as the wrong profile. + """ + from pyquadcortex.protocol import profiles + + candidates = profiles._all_profiles() + for cls in candidates: + if cls.__name__ == name: + return cls + raise pytest.UsageError( + f"--profile {name!r} is not a profile class; the profiles are: " + + ", ".join(sorted(c.__name__ for c in candidates))) + + @pytest.fixture(scope="session") def _connection(request): """The run's single connection, with the handshake burst recorded. @@ -290,10 +316,16 @@ def subscribe(transport): burst.attach(transport) cache.listen_on(transport) + # `--profile CLASSNAME` connects as that class instead of the one the unit's + # identity resolves to, which is how a unit the registry would refuse - an + # unmeasured firmware, or a Mini - gets measured by the suite that would + # measure it. Without it, connect() refuses before a test can look. + wanted = request.config.getoption("--profile") # EXPERIMENTAL always: on a new profile this suite IS the verification, and a # VERIFIED client would refuse everything before a test could look. On # QuadCortex it changes nothing. with protocol.connect(before_handshake=subscribe, + profile=_profile_named(wanted) if wanted else None, support=protocol.Support.EXPERIMENTAL) as client: cache.bind(client) # Read by pytest_terminal_summary, which has a config and no fixtures. diff --git a/tests/hardware/readme.md b/tests/hardware/readme.md index 77c9666..09bc311 100644 --- a/tests/hardware/readme.md +++ b/tests/hardware/readme.md @@ -11,6 +11,23 @@ pytest tests/hardware --hardware below, and it runs BOTH suites - the offline one and this one, against your unit. Name the directory unless you want that. +Two more options go with the flag, both from ADR-0020: + +- `--verifies OPERATION` narrows the run to the tests marked + `verifies(OPERATION)`. pytest's own `-m` cannot match a marker's arguments. +- `--profile CLASSNAME` connects as that profile class instead of the one the + unit's identity resolves to: + + ```bash + pytest tests/hardware --hardware --profile QuadCortexMini + ``` + + That is how a unit the registry would refuse - an unmeasured firmware, or a + Mini - gets measured by the suite that would measure it. The name is a class + in `pyquadcortex.protocol.profiles`, or `QuadCortex` itself; an unknown one + stops the run naming the real ones. Without `--hardware` it is ignored, since + nothing here runs at all. + Without `--hardware` nothing here runs. A hardware test that reports itself as a skip in an offline run is a test nobody notices has stopped running, so it is never a skip - which of the two stronger things happens depends on how the path diff --git a/tests/test_hardware_report.py b/tests/test_hardware_report.py index d49e4e1..ffd76ff 100644 --- a/tests/test_hardware_report.py +++ b/tests/test_hardware_report.py @@ -245,6 +245,26 @@ def test_a_marker_naming_no_operation_stops_the_collection(conftest, collection) conftest.pytest_collection_modifyitems(None, _Config(), items) +# --- which profile the run connects as --------------------------------------- + +def test_profile_names_resolve_to_their_class(conftest): + """`--profile` is how the suite measures a unit the registry would refuse.""" + from pyquadcortex.protocol import client, profiles + + assert conftest._profile_named("QuadCortex") is client.QuadCortex + assert conftest._profile_named("QuadCortexMini") is profiles.QuadCortexMini + assert conftest._profile_named("QuadCortex41") is profiles.QuadCortex41 + + +def test_an_unknown_profile_name_stops_the_run_naming_the_real_ones(conftest): + """Naming a class that does not exist must not connect to somebody's unit.""" + with pytest.raises(pytest.UsageError) as caught: + conftest._profile_named("QuadCortexMinni") + text = str(caught.value) + assert "QuadCortexMinni" in text + assert "QuadCortex" in text and "QuadCortexMini" in text + + # --- putting the unit back after scratch_preset ------------------------------ class _Position: From d57bb9db0808282aca23f68d52406b4d88479d3b Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:05:57 -0500 Subject: [PATCH 23/33] fix: connect waits for a Version it can resolve a profile from version() accepts a reply carrying only the serial or only the firmware, which is right for a caller and right for the per-field cache rule - the unit answers a Version READ twice. Resolution needs device_type AND zenos_git_hash, so reading identity through that looser predicate refused a unit this library has a profile for, whenever the first answer was partial. The identity read now waits on the strict predicate inside the same handshake_patience budget, and the exhaustion message says which question went unanswered. The profile= device-type check compares unconditionally, since the field is now guaranteed. --- docs/protocol.md | 5 +++ pyquadcortex/protocol/session.py | 67 ++++++++++++++++++++++++++------ tests/test_session.py | 64 ++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 12 deletions(-) diff --git a/docs/protocol.md b/docs/protocol.md index cfbe453..642773d 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -586,6 +586,11 @@ what the unit sent and re-reads for the rest. A sparse host `Version{UPDATE, cus (a rename) is echoed once with the same two fields, does not re-run the handshake gate, and leaves reads answering - measured three times the same day. +`connect()` waits on a stricter predicate than `version()` does: a profile is +resolved from `device_type` and `zenos_git_hash`, so the identity read waits for +a reply carrying both and treats a partial one as not yet the answer, inside the +same `handshake_patience` budget (ADR-0020). + After the burst the device needs a moment before it treats the client as connected; a command sent too soon gets no push (observed as flaky preset-read timeouts). `connect(settle=...)` waits 2 seconds by default. diff --git a/pyquadcortex/protocol/session.py b/pyquadcortex/protocol/session.py index 5323717..30de9b0 100644 --- a/pyquadcortex/protocol/session.py +++ b/pyquadcortex/protocol/session.py @@ -81,26 +81,38 @@ def open_device(): ) from exc -def _patience_exhausted(attempt: int, handshake_patience: float) -> TimeoutError: +#: What went unanswered, for each phase's ``_patience_exhausted``. The guidance +#: is one sentence in one place (below); only the clause naming what this +#: library asked for differs, because "no answer at all" and "no answer +#: carrying what the registry resolves on" are different things to go and look +#: at on the unit. +_NO_HANDSHAKE = "the control protocol did not answer" +_NO_IDENTITY = ("the unit answered no Version carrying device_type and " + "zenos_git_hash, the two fields a profile is resolved from") + + +def _patience_exhausted(attempt: int, handshake_patience: float, + unanswered: str = _NO_HANDSHAKE) -> TimeoutError: """The ``TimeoutError`` raised when ``handshake_patience`` elapses. Shared between the identity read and the handshake loop below (ADR-0020): both are just this library asking the control protocol something, and the measured 9-17s openable-but-silent window after a boot covers either one equally - so a caller gets the same guidance no matter which one hit it, - from one place rather than two copies drifting apart. + from one place rather than two copies drifting apart. ``unanswered`` is the + only part that differs, and it says which question went unanswered. """ return TimeoutError( - f"the device is enumerated and open but the control " - f"protocol did not answer in {attempt} handshake " - f"attempt(s) over {handshake_patience:.0f}s. This " + f"the device is enumerated and open but {unanswered} in {attempt} " + f"handshake attempt(s) over {handshake_patience:.0f}s. This " f"openable-but-silent window has measured 9-17s after a " f"reboot or cold boot; if it persists far longer, see " f"the USB-link-death section of troubleshooting.md." ) -def _retry_until_patient(attempt_fn, deadline: float, handshake_patience: float): +def _retry_until_patient(attempt_fn, deadline: float, handshake_patience: float, + unanswered: str = _NO_HANDSHAKE): """Call ``attempt_fn()`` and retry it on ``TimeoutError`` until ``deadline``. ``deadline`` is computed once by the caller and shared across every phase @@ -114,7 +126,31 @@ def _retry_until_patient(attempt_fn, deadline: float, handshake_patience: float) return attempt_fn() except TimeoutError: if time.monotonic() >= deadline: - raise _patience_exhausted(attempt, handshake_patience) from None + raise _patience_exhausted( + attempt, handshake_patience, unanswered) from None + + +def _resolves_a_profile(reply: pa.VersionMessage) -> bool: + """Whether a ``Version`` reply carries what a profile is resolved from. + + ``version()`` accepts a reply carrying the serial OR the firmware, which is + right for a caller and right for the cache rule - the unit answers a + ``Version`` READ twice, and a partial answer is kept rather than thrown + away (protocol.md section 4.4). Resolution is a stricter question: it needs + ``device_type`` AND ``zenos_git_hash``, so a reply carrying only identity + fields is not the answer to it and the wait goes on. + """ + return reply.HasField("device_type") and reply.HasField("zenos_git_hash") + + +def _read_identity(transport, timeout: float) -> pa.VersionMessage: + """Send a ``Version`` READ and wait for a reply a profile can be resolved from.""" + return transport.await_broadcast( + pa.VersionMessage, + lambda: transport.send(pa.VersionMessage(action=pa.MessageAction.READ)), + timeout=timeout, + match=_resolves_a_profile, + ) def connect(*, timeout: float = 5.0, settle: float = 2.0, @@ -178,6 +214,10 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, Raises: DeviceNotFoundError: if no Quad Cortex could be opened. + TimeoutError: if ``handshake_patience`` runs out. Either the unit + answered nothing at all, or - for the identity read - it answered + no ``Version`` carrying both ``device_type`` and + ``zenos_git_hash``; the message says which. UnsupportedDevice: if the unit reports a device type and CorOS version no profile has measured, or ``profile`` names a class for a different device type. Raised before the handshake; the device is @@ -198,16 +238,19 @@ def connect(*, timeout: float = 5.0, settle: float = 2.0, # openable-but-silent window, so they share one deadline rather than # each getting handshake_patience of their own. deadline = time.monotonic() + handshake_patience - # Who are we talking to? Read before the handshake, through the base - # class, whose version() is in ALWAYS and works on any unit (ADR-0020). + # Who are we talking to? Read before the handshake. This is a stricter + # wait than version()'s: the unit answers a Version READ twice and a + # reply may carry only the serial, which version() rightly accepts and + # a profile cannot be resolved from. A partial answer is left unmatched + # and the wait goes on, inside the same budget (ADR-0020). identity = _retry_until_patient( - lambda: QuadCortex(transport).version(timeout=timeout), - deadline, handshake_patience) + lambda: _read_identity(transport, timeout), + deadline, handshake_patience, _NO_IDENTITY) if profile is None: cls = profiles.resolve(identity) else: cls = profile - if identity.HasField("device_type") and identity.device_type != cls.DEVICE_TYPE: + if identity.device_type != cls.DEVICE_TYPE: raise profiles.UnsupportedDevice( identity.device_type, identity.zenos_git_hash, f"you asked for {cls.__name__}, which serves " diff --git a/tests/test_session.py b/tests/test_session.py index 17f318f..e67846d 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -410,6 +410,70 @@ def never_answers(self, expected_class, trigger, timeout=40.0, match=None): assert t.stopped and t.device.closed +def test_connect_waits_for_a_version_carrying_both_fields_it_resolves_on( + monkeypatch, fake_stack): + """A partial identity reply is waited THROUGH, not refused. + + The unit answers a `Version` READ twice, and `version()`'s predicate rightly + accepts a reply carrying only the serial or only the firmware - the cache + keeps what the unit sent. Resolution needs `device_type` AND + `zenos_git_hash`, and reading identity through that looser predicate meant a + partial first answer raised `UnsupportedDevice` on a unit this library has a + profile for. The wait is now the strict one, inside the same patience. + """ + partial = pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_serial_number="QCS0000001") + full = pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC, + zenos_git_hash="4.0.1", + device_serial_number="QCS0000001") + reads = {"n": 0} + + def two_answers(self, expected_class, trigger, timeout=40.0, match=None): + reads["n"] += 1 + trigger() + assert match is not None, "the identity read must carry a predicate" + if reads["n"] == 1: + # What the real transport does with a message the predicate + # rejects: keep waiting, and time out with nothing to hand back. + assert not match(partial), "a serial-only reply cannot resolve a profile" + raise TimeoutError("no response for request_id=1") + assert match(full) + return full + + monkeypatch.setattr(FakeTransport, "await_broadcast", two_answers) + qc = session.connect(settle=0, handshake_patience=30.0) + assert reads["n"] == 2, "the partial answer was waited through, not taken" + assert type(qc) is client.QuadCortex + + +def test_connect_says_what_went_unanswered_when_no_identity_ever_arrives( + monkeypatch, fake_stack): + """The guidance is one sentence; the clause naming the question differs.""" + def never_resolves(self, expected_class, trigger, timeout=40.0, match=None): + trigger() + raise TimeoutError("no response for request_id=1") + + monkeypatch.setattr(FakeTransport, "await_broadcast", never_resolves) + with pytest.raises(TimeoutError) as caught: + session.connect(timeout=0.05, handshake_patience=0.3) + text = str(caught.value) + assert "device_type and zenos_git_hash" in text + assert "openable-but-silent" in text + + +def test_connect_with_a_profile_for_another_device_refuses_a_quad_cortex(fake_stack): + """The device-type check compares unconditionally now that the identity + read guarantees the field is there. A Mini profile against a QC must not + reach the handshake.""" + with pytest.raises(profiles.UnsupportedDevice, match="asked for QuadCortexMini"): + session.connect(profile=profiles.QuadCortexMini, + support=support.Support.EXPERIMENTAL) + t = FakeTransport.instances[0] + assert t.stopped and t.device.closed + assert not any(h.startswith("request ResetComms") for h in t.happened) + + def test_connect_resolves_the_profile_from_the_units_version_before_the_handshake(fake_stack): qc = session.connect() t = FakeTransport.instances[0] From 4957b6aae076ab4e54f20c4f0de91ac0d5dd4531 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:08:13 -0500 Subject: [PATCH 24/33] docs: set_block says the catalog check fetches, and a stub renders no firmware The check reads qc.catalog, so the first set_block of a connection pays a ~47 KB fetch even with verify=False, and a fetch that does not answer raises the transport's TimeoutError rather than refusing the placement. Both are now in the docstring. The firmware in that refusal came from a private join, which rendered "(CorOS )" for a profile with an empty MEASURED_ON. support.measured_firmware renders it once, for the refusal and for unverified_text. --- pyquadcortex/protocol/client.py | 11 +++++++++-- pyquadcortex/protocol/support.py | 16 ++++++++++++++-- tests/test_profiles.py | 19 +++++++++++++++++++ tests/test_support.py | 22 ++++++++++++++++++++++ 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index e7c931b..96cd376 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -53,7 +53,8 @@ from pyquadcortex.protocol.errors import (BlockRefused, # noqa: F401 ControlNotDrivable) from pyquadcortex.protocol.support import (EVERYTHING, Evidence, Hardware, - Support, unverified_text) + Support, measured_firmware, + unverified_text) from pyquadcortex.protocol.targets import ( # noqa: F401 LANE_OUTPUT_UNASSIGNABLE, Block, LaneInput, LaneOutput, Mixer, ParamTarget, Splitter, Tempo, _require_even_row) @@ -1297,6 +1298,12 @@ def set_block(self, cell, verify: bool = True, timeout: float = 5.0): the catalog is READ FROM THE UNIT and describes what that unit has, so an id it does not list does not exist there. No unit has been asked to place a model it does not have. + + **That check reads :attr:`catalog`**, so the first ``set_block`` of a + connection fetches the unit's ModelRepo - a ~47 KB transfer, cached for + the session afterwards - even with ``verify=False``. A fetch that does + not answer in time raises the transport's ``TimeoutError``, which is a + failure to read the catalog and not a refused placement. """ if cell.model_id in units_module.UNPLACEABLE_MODELS: raise ValueError( @@ -1308,7 +1315,7 @@ def set_block(self, cell, verify: bool = True, timeout: float = 5.0): if self.catalog.get(model_id) is None: raise ControlNotDrivable( f"model {model_id}", - f"not in this unit's catalog (CorOS {', '.join(type(self).MEASURED_ON)}); " + f"not in this unit's catalog ({measured_firmware(type(self))}); " f"the catalog is read from the unit, so this id does not exist on it", "use a constant from this connection's own snapshot (qc.models), or " "look the model up in qc.catalog by name") diff --git a/pyquadcortex/protocol/support.py b/pyquadcortex/protocol/support.py index 648888c..436919a 100644 --- a/pyquadcortex/protocol/support.py +++ b/pyquadcortex/protocol/support.py @@ -96,15 +96,27 @@ class _ProfileClass(Protocol): MEASURED_ON: tuple[str, ...] +def measured_firmware(cls: type[_ProfileClass]) -> str: + """``"CorOS 4.0.1"``, or ``"no firmware measured"`` when there is none. + + The word "CorOS" belongs to the version, not to the sentence around it, so + it is written here and nowhere else: a stub profile has an empty + ``MEASURED_ON``, and a caller told their model is "not in this unit's + catalog (CorOS )" learns nothing from the empty parenthesis. Every message + that names a profile's firmware goes through this. + """ + firmware = ", ".join(cls.MEASURED_ON) + return f"CorOS {firmware}" if firmware else "no firmware measured" + + def unverified_text(cls: type[_ProfileClass], name: str) -> tuple[str, str]: """The evidence and the workaround for an operation ``cls`` has not verified. One function, used by the refusal, the experimental-mode warning and the connect-time hint, so they cannot say three different things. """ - firmware = ", ".join(cls.MEASURED_ON) or "no firmware measured" class_name = cls.__name__ - evidence = f"not yet verified on {class_name} (CorOS {firmware})" + evidence = f"not yet verified on {class_name} ({measured_firmware(cls)})" workaround = ( f"connect(support=Support.EXPERIMENTAL) to try it, or run " f"`pytest tests/hardware --hardware --verifies {name}` on your unit " diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 166e049..ed86853 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -198,6 +198,25 @@ def test_a_public_staticmethod_is_never_guarded(forget_probes, monkeypatch): assert Probe.describe_wire_format() == "a helper, not an operation" +def test_set_blocks_refusal_says_so_when_the_profile_measured_no_firmware(forget_probes): + """A stub profile has an empty `MEASURED_ON`, and the refusal used to build + its own text: `not in this unit's catalog (CorOS )`. One renderer, so the + parenthesis is never empty.""" + from pyquadcortex.protocol import catalog + + Probe = type("Probe", (client.QuadCortex,), { + "MEASURED_ON": (), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset({"set_block"})}) + qc = Probe(FakeTransport()) + qc._catalog = catalog.parse_model_repo(b'') + + with pytest.raises(errors.ControlNotDrivable) as caught: + qc.set_block(client.Block(0, 3, 6026), verify=False) + + assert "(no firmware measured)" in caught.value.evidence + assert "CorOS )" not in caught.value.evidence + + def test_unverified_operations_is_empty_on_the_base_and_full_on_a_stub(forget_probes): assert client.QuadCortex(FakeTransport()).unverified_operations == frozenset() Probe = _profile(verified=frozenset({"switch_scene"})) diff --git a/tests/test_support.py b/tests/test_support.py index 168fa9d..0dc2586 100644 --- a/tests/test_support.py +++ b/tests/test_support.py @@ -47,6 +47,28 @@ class QuadCortex41: MEASURED_ON = ("4.1.0",) +class NothingMeasured: + """A stub profile: it exists to show where the measurements go.""" + + MEASURED_ON = () + + +def test_measured_firmware_says_so_when_there_is_no_firmware(): + """`(CorOS )` is an empty parenthesis, not a firmware. + + The word "CorOS" belongs to the version rather than to the sentence around + it, so it is written in one place and a profile with nothing measured + renders as words instead of a hole. + """ + assert support.measured_firmware(QuadCortex41) == "CorOS 4.1.0" + assert support.measured_firmware(NothingMeasured) == "no firmware measured" + + +def test_unverified_text_says_so_too_for_a_profile_with_nothing_measured(): + evidence, _workaround = support.unverified_text(NothingMeasured, "set_block") + assert evidence == "not yet verified on NothingMeasured (no firmware measured)" + + def test_unverified_text_names_the_profile_the_firmware_and_both_ways_out(): evidence, workaround = support.unverified_text(QuadCortex41, "set_scene_label") assert evidence == "not yet verified on QuadCortex41 (CorOS 4.1.0)" From bf823f088f9c23b10574b9ea90fc83d970726611 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:10:36 -0500 Subject: [PATCH 25/33] fix: the scratch fixture cannot leak on a failed save, and --verifies is checked save_current_preset writes and then waits for the unit to confirm, so a confirm that timed out raised with the copy already in the owner's User setlist - the one line the try was opened after. The try now opens before the save, and _release_scratch lists the setlist before deleting, so a save that never wrote is not reported as a restore that could not finish. --verifies now refuses a name that is not an operation, and one no collected test names. Either deselected every test, and pytest reports that as a green run of nothing. The list_presets excuse says what is true: the fixture reads it, and no test uses the fixture yet. --- tests/hardware/conftest.py | 50 ++++++++++++++++--- tests/test_hardware_markers.py | 2 +- tests/test_hardware_report.py | 89 ++++++++++++++++++++++++++++++---- 3 files changed, 122 insertions(+), 19 deletions(-) diff --git a/tests/hardware/conftest.py b/tests/hardware/conftest.py index e401a33..17615d9 100644 --- a/tests/hardware/conftest.py +++ b/tests/hardware/conftest.py @@ -94,8 +94,23 @@ def _claims(items, operations, wanted, deselect): f"{item.nodeid}: verifies({name!r}) is not an operation") marks[item.nodeid] = names if wanted: + # Both refusals are loud for the same reason the gate above is: a + # `--verifies` nobody matches deselects EVERY test, and pytest reports + # that as a green run of nothing. A typo and an untested operation look + # identical from there, so each says which of the two it is and where + # the answer is written down. + if wanted not in operations: + raise pytest.UsageError( + f"--verifies {wanted!r} is not an operation; the names are the " + f"ones in QuadCortex.operations()") keep = [item for item in items if wanted in marks[item.nodeid]] drop = [item for item in items if wanted not in marks[item.nodeid]] + if not keep: + raise pytest.UsageError( + f"--verifies {wanted!r} is an operation, and no collected test " + f"names it - this run would measure nothing. It should be in " + f"UNMARKED_OPERATIONS in tests/test_hardware_markers.py, with " + f"the reason no test drives it") items[:] = keep deselect(drop) return {item.nodeid: marks[item.nodeid] for item in items} @@ -442,6 +457,14 @@ def _release_scratch(qc, before, setlist, name, settle=3.0): ``restores`` uses, so a teardown that could not finish reads the same whichever fixture owned it. + The copy may not be there at all: the fixture's ``try`` opens BEFORE the + save, so a save that failed outright runs this teardown with nothing to + delete - and a ``delete_preset`` of a name the unit does not have would + report a restore that could not finish when the unit is already as it was. + So the setlist is listed first and the delete happens only for a copy that + exists. A listing that fails is itself reported, since it is the reason the + delete was not even attempted. + ``settle`` is the pause after the recall, and only the offline test in ``tests/test_hardware_report.py`` passes anything but the real 3 s. """ @@ -454,10 +477,18 @@ def _release_scratch(qc, before, setlist, name, settle=3.0): f"recall the preset that was loaded " f"({before.folder_key}, {before.position}): {exc!r}") try: - qc.delete_preset(setlist, name) + present = any(entry.name == name for entry in qc.list_presets(setlist)) except Exception as exc: # noqa: BLE001 - reported, not swallowed failed.append( - f"delete the scratch preset {name!r} from the User setlist: {exc!r}") + f"list the User setlist to see whether the scratch preset {name!r} " + f"is there: {exc!r} - delete it by hand if it is") + else: + if present: + try: + qc.delete_preset(setlist, name) + except Exception as exc: # noqa: BLE001 - reported, not swallowed + failed.append( + f"delete the scratch preset {name!r} from the User setlist: {exc!r}") if failed: raise _unrestored(failed) @@ -475,13 +506,16 @@ def scratch_preset(qc): assert qc.preset_dirty() is False, "the loaded preset has unsaved edits; save or reload it first" free = _scratch_slot(qc.list_presets(Setlist.USER, include_empty=True), SCRATCH_NAME) - stored = qc.save_current_preset(Setlist.USER, free, SCRATCH_NAME, - confirm=True, confirm_timeout=30.0) - # The copy EXISTS from here on, so everything after this line is inside the - # try: a failed assert or a failed recall used to leave it in the owner's - # User setlist under the fixed name, which makes the next run's - # delete-by-name ambiguous - the leak _release_scratch exists to prevent. + # The try opens BEFORE the save, because the save is itself a way to leave + # a copy behind: it writes and then waits for the unit to confirm, so a + # confirm that times out raises with the copy already in the owner's User + # setlist under the fixed name - which makes the next run's delete-by-name + # ambiguous, the leak _release_scratch exists to prevent. Everything that + # can leave the copy there is therefore inside the block whose finally + # deletes it, and _release_scratch tolerates there being nothing to delete. try: + stored = qc.save_current_preset(Setlist.USER, free, SCRATCH_NAME, + confirm=True, confirm_timeout=30.0) assert stored == SCRATCH_NAME qc.recall_preset(Setlist.USER, free) time.sleep(3.0) diff --git a/tests/test_hardware_markers.py b/tests/test_hardware_markers.py index d6e02f5..cfbc5a6 100644 --- a/tests/test_hardware_markers.py +++ b/tests/test_hardware_markers.py @@ -22,7 +22,7 @@ "io_settings": "the input gain tests read it back as their instrument; nothing asserts the port listing against what the unit shows", "preset_dirty": "test_model_state.py calls it only to decide which branch to expect; nothing asserts the flag across a known-clean and known-dirty preset", "settings": "the global-settings echo test reads it only to find the value to flip; nothing asserts a settings() field against the unit's screen", - "list_presets": "the scratch_preset fixture reads it to find a free slot; nothing asserts the listing against the unit's own Directory", + "list_presets": "read by the scratch_preset fixture, which no test uses yet; no test asserts on the listing itself", # -- the preset library: writes that would touch the owner's own presets --- # The scratch_preset fixture is what these would be built on - it saves a diff --git a/tests/test_hardware_report.py b/tests/test_hardware_report.py index ffd76ff..8748d2f 100644 --- a/tests/test_hardware_report.py +++ b/tests/test_hardware_report.py @@ -238,6 +238,38 @@ def test_a_deselected_test_claims_nothing(conftest, collection): "set_bypass was deselected, so this run measured nothing about it") +def test_a_verifies_naming_no_operation_stops_the_run(conftest, collection): + """A typo deselected every test, and pytest reports that as a green run. + + Nothing ran, nothing was measured, and the summary line says so only in a + deselected count nobody reads. The name is checked against the operations + instead. + """ + items = [_Item("t.py::a", "set_param")] + + with pytest.raises(pytest.UsageError) as caught: + conftest.pytest_collection_modifyitems( + None, _Config(verifies="set_paramm"), items) + + text = str(caught.value) + assert "set_paramm" in text and "QuadCortex.operations()" in text + + +def test_a_verifies_no_test_names_says_where_that_is_recorded(conftest, collection): + """A real operation with no test is not a typo, so it gets its own answer: + the excuse list, which is where an operation no test drives has to appear.""" + items = [_Item("t.py::a", "set_param")] + + with pytest.raises(pytest.UsageError) as caught: + conftest.pytest_collection_modifyitems( + None, _Config(verifies="set_bypass"), items) + + text = str(caught.value) + assert "set_bypass" in text + assert "UNMARKED_OPERATIONS" in text + assert "tests/test_hardware_markers.py" in text + + def test_a_marker_naming_no_operation_stops_the_collection(conftest, collection): items = [_Item("t.py::a", "set_paramm")] @@ -275,18 +307,27 @@ class _Position: class _FakeQc: - """The two methods the teardown calls, each able to fail on demand.""" + """The three methods the teardown calls, each able to fail on demand.""" - def __init__(self, recall_raises=None, delete_raises=None): + def __init__(self, recall_raises=None, delete_raises=None, + list_raises=None, listing=("pyquadcortex scratch",)): self.calls = [] self._recall_raises = recall_raises self._delete_raises = delete_raises + self._list_raises = list_raises + self._listing = listing def recall_preset(self, folder_key, position): self.calls.append(("recall", folder_key, position)) if self._recall_raises is not None: raise self._recall_raises + def list_presets(self, setlist): + self.calls.append(("list", setlist)) + if self._list_raises is not None: + raise self._list_raises + return [_Entry(i, name) for i, name in enumerate(self._listing)] + def delete_preset(self, setlist, name): self.calls.append(("delete", setlist, name)) if self._delete_raises is not None: @@ -331,23 +372,51 @@ def test_a_clean_teardown_recalls_then_deletes_and_says_nothing(conftest): settle=0.0) assert qc.calls == [("recall", "user", 3), + ("list", "USER"), ("delete", "USER", "pyquadcortex scratch")] -def test_nothing_after_the_copy_exists_sits_outside_the_try(conftest): - """The `try:` opens the moment the copy is on the unit, not later. +def test_a_copy_that_was_never_saved_is_not_reported_as_unrestored(conftest): + """The fixture's `try` opens before the save, so the teardown runs on a + failed save with nothing to delete. Deleting a name the unit does not have + would report a restore that could not finish when the unit is as it was.""" + qc = _FakeQc(listing=("Gig", "Rehearsal")) + + conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", + settle=0.0) + + assert qc.calls == [("recall", "user", 3), ("list", "USER")] + + +def test_a_listing_that_fails_is_reported_because_the_delete_never_ran(conftest): + qc = _FakeQc(list_raises=TimeoutError("no listing")) + + with pytest.raises(AssertionError) as caught: + conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", + settle=0.0) + + message = str(caught.value) + assert "COULD NOT RESTORE THE UNIT" in message + assert "delete it by hand" in message + assert "TimeoutError" in message + + +def test_nothing_that_can_leave_the_copy_behind_sits_outside_the_try(conftest): + """The `try:` opens BEFORE the save, not after it. - `save_current_preset` returning IS the copy existing, so the check on its - name and the recall that follows must be inside the block whose `finally` - deletes it. They were outside, and either failing left the copy in the - owner's User setlist under the fixed name. Read from the source because - the fixture needs a unit; the ORDER of the lines is the whole fix. + The save is itself a way to leave a copy behind: it writes and then waits + for the unit to confirm, so a confirm that times out raises with the copy + already in the owner's User setlist under the fixed name. The save, the + check on its name and the recall that follows must all be inside the block + whose `finally` deletes it. Read from the source because the fixture needs + a unit; the ORDER of the lines is the whole fix. """ body = _HARDWARE_CONFTEST.read_text(encoding="utf-8").split( "def scratch_preset(")[1] lines = [line.strip() for line in body.splitlines()] opened = lines.index("try:") - for guarded in ("assert stored == SCRATCH_NAME", + for guarded in ("stored = qc.save_current_preset(Setlist.USER, free, SCRATCH_NAME,", + "assert stored == SCRATCH_NAME", "qc.recall_preset(Setlist.USER, free)"): assert lines.index(guarded) > opened, ( f"{guarded!r} runs before the try: that deletes the copy") From de7fef11243d58e816f07d79af41bf09b9cefc09 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:14:22 -0500 Subject: [PATCH 26/33] fix: --snapshot is validated, and a half-generated snapshot still imports The three generators each carried their own copy of the snapshot-package helper, and all three created the __init__ once, naming models, options and params whether or not they existed - so a snapshot generated one module at a time, or an interrupted run, left a package that raised ImportError the moment anything touched it. scripts/_snapshots.py holds the one copy: it refuses a --snapshot that is not a package name, and rewrites the __init__ from what is on disk. With all three modules there the file it writes is the committed coros_4_0_1/__init__.py byte for byte. The module docstrings also give commands that work: --snapshot is required, and the output is a snapshot package rather than the old flat module. --- scripts/_snapshots.py | 81 ++++++++++++++++++++++++++ scripts/generate_models.py | 40 +++++-------- scripts/generate_options.py | 40 +++++-------- scripts/generate_params.py | 35 +++++------ tests/test_generators.py | 112 ++++++++++++++++++++++++++++++++++++ 5 files changed, 234 insertions(+), 74 deletions(-) create mode 100644 scripts/_snapshots.py diff --git a/scripts/_snapshots.py b/scripts/_snapshots.py new file mode 100644 index 0000000..476daae --- /dev/null +++ b/scripts/_snapshots.py @@ -0,0 +1,81 @@ +"""The snapshot package all three catalog generators write into (ADR-0020). + +``--snapshot coros_x_y_z`` names a package under +``pyquadcortex/protocol/catalogs/``, and each generator writes one module of +it. Which means each of them has to answer the same two questions - is this a +name we may create a directory for, and what does the package's ``__init__`` +import - and three copies of that answer is three of them to keep right. This +module is the one copy; the generators import it the way +``generate_params.py`` imports ``generate_models`` for its shared helpers. + +The ``__init__`` is REWRITTEN on every run rather than created once, because a +snapshot is generated one module at a time: a run that was interrupted, or a +contributor who has generated the models and not yet the params, left an +``__init__`` importing three modules of which one existed - a package that +raises ``ImportError`` the moment anything touches it. It now imports what is +actually on disk, so a half-generated snapshot imports and says what it has. +""" +import pathlib + +#: The modules a snapshot package can hold, in the order the ``__init__`` +#: imports them - alphabetical, as an import line is written. +MODULES = ("models", "options", "params") + +#: The same three in the order ``__all__`` lists them. It differs, and it is +#: kept because the committed ``coros_4_0_1/__init__.py`` is what this has to +#: reproduce byte for byte; ``tests/test_generators.py`` holds that. +EXPORTS = ("models", "params", "options") + + +def snapshot_version(snapshot: str) -> str: + """'coros_4_0_1' -> '4.0.1', for the snapshot package's __init__ docstring.""" + return snapshot.removeprefix("coros_").replace("_", ".") + + +def _check_name(snapshot: str) -> None: + """Refuse a ``--snapshot`` that is not a package name we may create. + + The value becomes a directory under the repo's own ``catalogs/`` package + AND a dotted name inside a generated import statement, so it has to be an + identifier before it is anything else. A separator or a ``..`` would write + outside the tree; a leading underscore is private by convention and the + package's ``__init__`` would not be the thing importing it. + """ + trouble = None + if any(bad in snapshot for bad in ("/", "\\", "..")): + trouble = "it must not contain '/', '\\' or '..'" + elif not snapshot.isidentifier(): + trouble = "it must be a Python identifier" + elif snapshot.startswith("_"): + trouble = "it must not start with '_'" + if trouble is not None: + raise SystemExit( + f"--snapshot {snapshot!r} is not a snapshot package name: {trouble}. " + f"Name it by CorOS version, e.g. coros_4_1_0.") + + +def ensure_snapshot_package(catalogs_root, snapshot: str) -> pathlib.Path: + """Create ``//`` and write its ``__init__.py``. + + Returns the directory. Call it BEFORE writing a module, which checks the + name and makes the directory, and again AFTER, so the ``__init__`` names + the module this run has just added; it is idempotent, and the second call + is the one that makes the package import. + """ + _check_name(snapshot) + directory = pathlib.Path(catalogs_root) / snapshot + directory.mkdir(parents=True, exist_ok=True) + present = [name for name in MODULES if (directory / f"{name}.py").exists()] + imports = ( + f"from pyquadcortex.protocol.catalogs.{snapshot} import " + f"{', '.join(present)} # noqa: F401\n" if present else "") + exports = ", ".join(f'"{name}"' for name in EXPORTS if name in present) + (directory / "__init__.py").write_text( + f'"""The Quad Cortex catalog on CorOS {snapshot_version(snapshot)}, ' + 'read from the maintainer\'s unit."""\n' + f"{imports}" + "\n" + f"__all__ = [{exports}]\n", + encoding="utf-8", + ) + return directory diff --git a/scripts/generate_models.py b/scripts/generate_models.py index e51bf5b..b7e330a 100644 --- a/scripts/generate_models.py +++ b/scripts/generate_models.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 -"""Generate ``pyquadcortex/protocol/models.py`` - constants for the FACTORY blocks. +"""Generate a snapshot's ``models.py`` - constants for the FACTORY blocks. + +Writes ``pyquadcortex/protocol/catalogs//models.py``; ``--snapshot`` +names the snapshot after the CorOS version it was read from (ADR-0020). A block is stored on the wire as an integer model id. Ids for factory content are the same on every Quad Cortex, so they can be constants a caller writes @@ -11,10 +14,11 @@ Source: a device's ModelRepo payload, either live or previously saved. # from a connected Quad Cortex (Cortex Control must be quit) - python scripts/generate_models.py + python scripts/generate_models.py --snapshot coros_4_1_0 # from a saved payload, for reproducible regeneration - python scripts/generate_models.py --payload model_repo_payload.bin + python scripts/generate_models.py --snapshot coros_4_1_0 \ + --payload model_repo_payload.bin Only identifiers and integers are emitted - no descriptions and no "Based on" attribution text. @@ -27,8 +31,10 @@ import sys sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) from pyquadcortex.protocol import catalog # noqa: E402 +import _snapshots # noqa: E402 (the snapshot package, written once for all three) # Anchored on this script's own location, never on the working directory: # the docs give this command with no cwd, and a relative path silently built @@ -37,28 +43,6 @@ / "pyquadcortex" / "protocol" / "catalogs") -def _snapshot_version(snapshot: str) -> str: - """'coros_4_0_1' -> '4.0.1', for the snapshot package's __init__ docstring.""" - return snapshot.removeprefix("coros_").replace("_", ".") - - -def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: - """Create ``catalogs//`` and its ``__init__.py`` if absent.""" - directory = CATALOGS / snapshot - directory.mkdir(parents=True, exist_ok=True) - init = directory / "__init__.py" - if not init.exists(): - init.write_text( - f'"""The Quad Cortex catalog on CorOS {_snapshot_version(snapshot)}, ' - 'read from the maintainer\'s unit."""\n' - f"from pyquadcortex.protocol.catalogs.{snapshot} import models, options, params # noqa: F401\n" - "\n" - '__all__ = ["models", "params", "options"]\n', - encoding="utf-8", - ) - return directory - - def class_name(category: str) -> str: """'Cabsim Bass (M)' -> 'CabsimBassM'.""" cleaned = re.sub(r"[^0-9a-zA-Z ]+", " ", category) @@ -156,9 +140,13 @@ def main() -> int: cat = catalog.parse_model_repo(load_payload(args.payload)) factory = cat.factory_models() source = render(cat, snapshot=args.snapshot) - directory = _ensure_snapshot_package(args.snapshot) + directory = _snapshots.ensure_snapshot_package(CATALOGS, args.snapshot) out = directory / "models.py" out.write_text(source, encoding="utf-8") + # Again, now the module is on disk: the package's __init__ imports + # exactly what is there, so a snapshot generated one module at a + # time imports at every step instead of only at the last. + _snapshots.ensure_snapshot_package(CATALOGS, args.snapshot) print(f"wrote {out}: {len(factory)} factory models " f"of {len(cat)} total, {len({m.category for m in factory})} categories") return 0 diff --git a/scripts/generate_options.py b/scripts/generate_options.py index b0681fd..05c80b9 100644 --- a/scripts/generate_options.py +++ b/scripts/generate_options.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 -"""Generate ``pyquadcortex/protocol/options.py`` - the choices a list offers. +"""Generate a snapshot's ``options.py`` - the choices a list offers. + +Writes ``pyquadcortex/protocol/catalogs//options.py``; ``--snapshot`` +names the snapshot after the CorOS version it was read from (ADR-0020). A list-valued parameter stores ``index / (count - 1)`` on the wire, so choosing "Lo Pass" means knowing it is the fourth entry. The names are in the device's @@ -9,8 +12,9 @@ Source: a device's ModelRepo payload, either live or previously saved. - python scripts/generate_options.py - python scripts/generate_options.py --payload model_repo_payload.bin + python scripts/generate_options.py --snapshot coros_4_1_0 + python scripts/generate_options.py --snapshot coros_4_1_0 \ + --payload model_repo_payload.bin Three decisions this generator makes: @@ -35,8 +39,10 @@ import sys sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) from pyquadcortex.protocol import catalog # noqa: E402 +import _snapshots # noqa: E402 (the snapshot package, written once for all three) # Anchored on this script's own location, never on the working directory: # the docs give this command with no cwd, and a relative path silently built @@ -45,28 +51,6 @@ / "pyquadcortex" / "protocol" / "catalogs") -def _snapshot_version(snapshot: str) -> str: - """'coros_4_0_1' -> '4.0.1', for the snapshot package's __init__ docstring.""" - return snapshot.removeprefix("coros_").replace("_", ".") - - -def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: - """Create ``catalogs//`` and its ``__init__.py`` if absent.""" - directory = CATALOGS / snapshot - directory.mkdir(parents=True, exist_ok=True) - init = directory / "__init__.py" - if not init.exists(): - init.write_text( - f'"""The Quad Cortex catalog on CorOS {_snapshot_version(snapshot)}, ' - 'read from the maintainer\'s unit."""\n' - f"from pyquadcortex.protocol.catalogs.{snapshot} import models, options, params # noqa: F401\n" - "\n" - '__all__ = ["models", "params", "options"]\n', - encoding="utf-8", - ) - return directory - - #: Lists that are a boolean wearing a costume. Their parameters take ``True`` and #: ``False``; no enum is emitted. BOOLEAN_LISTS = {("off", "on")} @@ -311,9 +295,13 @@ def main(): cat = catalog.parse_model_repo(load_payload(args.payload)) text = render(cat, snapshot=args.snapshot) - directory = _ensure_snapshot_package(args.snapshot) + directory = _snapshots.ensure_snapshot_package(CATALOGS, args.snapshot) out = directory / "options.py" out.write_text(text, encoding="utf-8") + # Again, now the module is on disk: the package's __init__ imports + # exactly what is there, so a snapshot generated one module at a + # time imports at every step instead of only at the last. + _snapshots.ensure_snapshot_package(CATALOGS, args.snapshot) print(f"wrote {out} ({text.count('class ')} enums)") diff --git a/scripts/generate_params.py b/scripts/generate_params.py index d3ea71b..d988bdf 100644 --- a/scripts/generate_params.py +++ b/scripts/generate_params.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 -"""Generate ``pyquadcortex/protocol/params.py`` - parameter constants per model. +"""Generate a snapshot's ``params.py`` - parameter constants per model. + +Writes ``pyquadcortex/protocol/catalogs//params.py``; ``--snapshot`` +names the snapshot after the CorOS version it was read from (ADR-0020). A parameter is written by its wire INDEX. Indices are positional and several are not visible knobs, so writing one by number is how you change stored data and @@ -8,10 +11,11 @@ Source: a device's ModelRepo payload, either live or previously saved. # from a connected Quad Cortex (Cortex Control must be quit) - python scripts/generate_params.py + python scripts/generate_params.py --snapshot coros_4_1_0 # from a saved payload, for reproducible regeneration - python scripts/generate_params.py --payload model_repo_payload.bin + python scripts/generate_params.py --snapshot coros_4_1_0 \ + --payload model_repo_payload.bin Three things this generator knows that the catalog does not: @@ -43,6 +47,7 @@ from pyquadcortex.protocol import catalog # noqa: E402 import generate_models # noqa: E402 (for class_name/const_name - the docstring example) +import _snapshots # noqa: E402 (the snapshot package, written once for all three) # Anchored on this script's own location, never on the working directory: # the docs give this command with no cwd, and a relative path silently built @@ -51,24 +56,6 @@ / "pyquadcortex" / "protocol" / "catalogs") -def _ensure_snapshot_package(snapshot: str) -> pathlib.Path: - """Create ``catalogs//`` and its ``__init__.py`` if absent.""" - directory = CATALOGS / snapshot - directory.mkdir(parents=True, exist_ok=True) - init = directory / "__init__.py" - if not init.exists(): - version = snapshot.removeprefix("coros_").replace("_", ".") - init.write_text( - f'"""The Quad Cortex catalog on CorOS {version}, ' - 'read from the maintainer\'s unit."""\n' - f"from pyquadcortex.protocol.catalogs.{snapshot} import models, options, params # noqa: F401\n" - "\n" - '__all__ = ["models", "params", "options"]\n', - encoding="utf-8", - ) - return directory - - #: The cab layout every cab model actually uses on the wire. Its repeated #: eight-parameter block is a microphone. CABSIM_LAYOUT = 12000 @@ -334,9 +321,13 @@ def main() -> int: cat = catalog.parse_model_repo(load_payload(args.payload)) text = render(cat, snapshot=args.snapshot) - directory = _ensure_snapshot_package(args.snapshot) + directory = _snapshots.ensure_snapshot_package(CATALOGS, args.snapshot) out = directory / "params.py" out.write_text(text, encoding="utf-8") + # Again, now the module is on disk: the package's __init__ imports + # exactly what is there, so a snapshot generated one module at a + # time imports at every step instead of only at the last. + _snapshots.ensure_snapshot_package(CATALOGS, args.snapshot) print(f"wrote {out} ({len(text.splitlines())} lines)") return 0 diff --git a/tests/test_generators.py b/tests/test_generators.py index 25c1a7c..f45f43e 100644 --- a/tests/test_generators.py +++ b/tests/test_generators.py @@ -1,6 +1,8 @@ """The catalog generators write per-firmware snapshots (ADR-0020, spec section 2).""" import importlib.util +import os import pathlib +import subprocess import sys import pytest @@ -91,6 +93,116 @@ def test_snapshot_is_required_and_decides_the_output_path(name, tmp_path, monkey assert (written / f"{name.split('_')[1]}.py").exists() +# --- the snapshot package itself --------------------------------------------- + +@pytest.fixture +def snapshots(): + """`scripts/_snapshots.py`, the one copy all three generators import.""" + return _load("_snapshots") + + +@pytest.mark.parametrize("bad", ["../../etc", "coros/4/1", "coros-4-1-0", + "_private", "4.1.0", ""]) +def test_a_snapshot_name_that_is_not_a_package_name_is_refused(snapshots, tmp_path, bad): + """The value becomes a directory in the repo AND a dotted name in a + generated import, so it is checked before either happens.""" + with pytest.raises(SystemExit) as caught: + snapshots.ensure_snapshot_package(tmp_path, bad) + assert "--snapshot" in str(caught.value) + assert not list(tmp_path.iterdir()), "nothing was created" + + +def test_a_full_snapshots_init_is_the_committed_one_byte_for_byte(snapshots, tmp_path): + """`coros_4_0_1/__init__.py` is what this generates, so it is the fixture. + + Regenerating the shipped snapshot must not rewrite the file that is in the + repo, which is the only way to know the generated one is the real thing. + """ + directory = tmp_path / "coros_4_0_1" + directory.mkdir() + for name in ("models", "params", "options"): + (directory / f"{name}.py").write_text("# generated\n", encoding="utf-8") + + snapshots.ensure_snapshot_package(tmp_path, "coros_4_0_1") + + committed = (ROOT / "pyquadcortex" / "protocol" / "catalogs" / + "coros_4_0_1" / "__init__.py") + assert (directory / "__init__.py").read_text(encoding="utf-8") == \ + committed.read_text(encoding="utf-8") + + +def test_a_half_generated_snapshot_imports_what_is_there(snapshots, tmp_path): + """The `__init__` used to be written once, naming all three modules. + + A snapshot is generated one module at a time, so an interrupted run - or a + contributor part-way through the three commands - left a package whose + `__init__` imported a module that did not exist. Anything touching it + raised ImportError, which reads as a broken library rather than as an + unfinished snapshot. + """ + catalogs = tmp_path / "pyquadcortex" / "protocol" / "catalogs" + for package in (catalogs.parent.parent, catalogs.parent, catalogs): + package.mkdir(parents=True, exist_ok=True) + (package / "__init__.py").write_text("", encoding="utf-8") + directory = snapshots.ensure_snapshot_package(catalogs, "coros_9_9_9") + (directory / "models.py").write_text("ALL = ()\n", encoding="utf-8") + snapshots.ensure_snapshot_package(catalogs, "coros_9_9_9") + + text = (directory / "__init__.py").read_text(encoding="utf-8") + assert "import models # noqa: F401" in text + assert "params" not in text and "options" not in text + assert '__all__ = ["models"]' in text + + # Imported for real, out of tmp_path and not out of the repo: the failure + # this guards is an ImportError at import time, which only importing sees. + proved = subprocess.run( + [sys.executable, "-c", + "import pyquadcortex.protocol.catalogs.coros_9_9_9 as s; print(s.__all__)"], + cwd=tmp_path, env={"PATH": os.environ.get("PATH", ""), "PYTHONPATH": ""}, + capture_output=True, text=True) + assert proved.returncode == 0, proved.stderr + assert proved.stdout.strip() == "['models']" + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_the_generators_share_one_copy_of_the_snapshot_package(name, snapshots): + """Three copies of the same helper is three of them to keep right.""" + mod = _load(name) + assert mod._snapshots.ensure_snapshot_package is snapshots.ensure_snapshot_package \ + or mod._snapshots.__file__ == snapshots.__file__ + source = (ROOT / "scripts" / f"{name}.py").read_text(encoding="utf-8") + assert "def ensure_snapshot_package" not in source + assert "def _ensure_snapshot_package" not in source + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_a_generated_snapshot_names_the_module_this_run_wrote( + name, tmp_path, monkeypatch, cat): + """The `__init__` is rewritten after the module lands, not before it.""" + mod = _load(name) + monkeypatch.setattr(mod, "load_payload", lambda path: XML) + monkeypatch.setattr( + mod, "CATALOGS", tmp_path / "pyquadcortex" / "protocol" / "catalogs") + monkeypatch.setattr(sys, "argv", [name, "--payload", "x", "--snapshot", "coros_9_9_9"]) + mod.main() + written = (tmp_path / "pyquadcortex" / "protocol" / "catalogs" / "coros_9_9_9" + / "__init__.py").read_text(encoding="utf-8") + module = name.split("_")[1] + assert f"import {module} # noqa: F401" in written + assert f'__all__ = ["{module}"]' in written + + +@pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) +def test_the_docstring_shows_the_command_that_actually_works(name): + """`--snapshot` is required, so an example without it fails at argparse.""" + mod = _load(name) + for line in mod.__doc__.splitlines(): + stripped = line.strip() + if stripped.startswith(f"python scripts/{name}.py"): + assert "--snapshot" in stripped or stripped.endswith("\\"), stripped + assert "pyquadcortex/protocol/catalogs//" in mod.__doc__ + + @pytest.mark.parametrize("name", ["generate_models", "generate_params", "generate_options"]) def test_the_output_tree_is_the_repos_catalogs_package_wherever_the_run_starts(name): """An absolute path anchored on the script's own location. From e2718a9deb641ebe989c28c8a3a93ae12f875eb8 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:15:56 -0500 Subject: [PATCH 27/33] fix: the nearest profile is the newest by version, and HARDWARE says who reads it max() over MEASURED_ON compared strings, so 4.9.0 read as newer than 4.10.0 and the hint offered the older profile to measure an unknown unit as. It now splits on "." and compares the numeric parts as numbers. _describe's evidence table falls back to the enum's own name rather than raising KeyError on a level nobody has added a phrase for yet. HARDWARE is declared ahead of its first reader, so it says so: the intended consumer is the model layer's footswitch and expression translation, which still hard-codes eight letters and reads this once a profile with a different count is measured on a unit. Tests cover both halves of resolve()'s presence check, and that the experimental warning is once per connection rather than once per process. --- pyquadcortex/protocol/client.py | 9 ++++- pyquadcortex/protocol/profiles.py | 21 +++++++++-- pyquadcortex/protocol/support.py | 6 ++++ tests/test_profiles.py | 58 +++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 3 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index 96cd376..1316f00 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -298,7 +298,14 @@ class QuadCortex: MEASURED_ON: tuple[str, ...] = ("4.0.1",) #: How well this profile is known. This one is the maintainer's own unit. EVIDENCE = Evidence.MAINTAINER - #: Facts the model layer needs. Eight footswitches, two expression ports. + #: What this unit physically has: eight footswitches, two expression ports. + #: Declared ahead of its first reader, and named here so a profile has one + #: place to put the count. The intended consumer is the model layer's + #: footswitch and expression translation + #: (`pyquadcortex/device/translate/letters.py`), which today hard-codes the + #: eight letters A to H through `enums.Footswitch`; it reads this when a + #: profile with a different count has actually been measured, which is not + #: yet - the Mini's four is off a product page, not off a unit. HARDWARE = Hardware(footswitches=8, expression_ports=2) #: Operation names verified on this profile. Every method this class has #: carries 4.0.1 evidence, so the base verifies everything; a subclass diff --git a/pyquadcortex/protocol/profiles.py b/pyquadcortex/protocol/profiles.py index 19ae372..6c880da 100644 --- a/pyquadcortex/protocol/profiles.py +++ b/pyquadcortex/protocol/profiles.py @@ -109,10 +109,23 @@ def stubs() -> list[type[QuadCortex]]: return [cls for cls in _all_profiles() if not cls.MEASURED_ON] +def _version_key(version: str) -> tuple: + """"4.10.0" sorts above "4.9.0", which it does not as a string. + + Compared per part, as integers where the part is one: a CorOS version is + dotted numbers today, and the string comparison this replaces called 4.9.0 + the newest of the two - so the hint below offered the older profile as the + nearest. A part that is not a number is left as itself rather than being + parsed into something it might not be. + """ + return tuple(int(part) if part.isdigit() else part + for part in version.split(".")) + + def _describe(cls: type[QuadCortex]) -> str: level = {Evidence.MAINTAINER: "verified on the maintainer's unit", Evidence.CONTRIBUTED: "contributed, not verified by the maintainer", - Evidence.STUB: "stub"}[cls.EVIDENCE] + Evidence.STUB: "stub"}.get(cls.EVIDENCE, cls.EVIDENCE.name.lower()) return f"{_DEVICE_NAMES.get(cls.DEVICE_TYPE, cls.DEVICE_TYPE)} {', '.join(cls.MEASURED_ON)} ({level})" @@ -136,7 +149,11 @@ def resolve(reply: pa.VersionMessage) -> type[QuadCortex]: f"support=Support.EXPERIMENTAL), then `pytest tests/hardware --hardware` " f"and send the report. See its docstring.") elif same_device: - nearest = max(same_device, key=lambda c: c.MEASURED_ON) + # `default=()` for a stub among them: it has measured nothing, and an + # empty tuple sorts below every version, which is where it belongs. + nearest = max(same_device, + key=lambda c: max((_version_key(v) for v in c.MEASURED_ON), + default=())) hint = (f"Pass profile={nearest.__name__} to treat it as " f"{', '.join(nearest.MEASURED_ON)} while you measure it, with " f"support=Support.EXPERIMENTAL; then add {reply.zenos_git_hash!r} to " diff --git a/pyquadcortex/protocol/support.py b/pyquadcortex/protocol/support.py index 436919a..7937d85 100644 --- a/pyquadcortex/protocol/support.py +++ b/pyquadcortex/protocol/support.py @@ -59,6 +59,12 @@ def __repr__(self) -> str: class Hardware: """Facts about the unit's hardware that the model layer needs. + Declared ahead of its first reader: nothing reads it yet, and the intended + consumer is the model layer's footswitch and expression translation + (``pyquadcortex/device/translate/letters.py``), which hard-codes eight + letters through ``enums.Footswitch`` and will read this instead once a + profile with a different count has been measured on a unit. + Extended only when a measurement needs a new field; a fact nobody reads is a guess with a name. """ diff --git a/tests/test_profiles.py b/tests/test_profiles.py index ed86853..7ec6058 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -127,6 +127,24 @@ def test_a_guarded_operation_runs_and_warns_once_under_experimental(forget_probe assert "not yet verified on Probe" in warnings[0].getMessage() +def test_the_warning_is_once_per_connection_not_once_per_process(forget_probes, caplog): + """`_warned` is per instance, so a second connection warns again. + + The warning says an operation is unverified and is running anyway, which is + something the person at THIS connection needs told. A set on the class + would say it once for the life of the process and leave every later + connection running unverified operations silently. + """ + Probe = _profile() + first = Probe(FakeTransport(), support=support.Support.EXPERIMENTAL) + second = Probe(FakeTransport(), support=support.Support.EXPERIMENTAL) + with caplog.at_level(logging.WARNING, logger="pyquadcortex.protocol.client"): + first.switch_scene(1) + second.switch_scene(1) + warnings = [r for r in caplog.records if "switch_scene" in r.getMessage()] + assert len(warnings) == 2, "each connection is told once" + + def test_a_verified_operation_is_not_guarded_and_an_override_is_left_alone(forget_probes): class Probe(client.QuadCortex): MEASURED_ON = ("9.9.9",) @@ -293,3 +311,43 @@ def test_resolve_refuses_a_mini_naming_the_stub_and_how_to_start(): def test_resolve_refuses_a_reply_with_no_identity(): with pytest.raises(profiles.UnsupportedDevice, match="did not report"): profiles.resolve(pa.VersionMessage(action=pa.MessageAction.UPDATE)) + + +def test_resolve_refuses_a_reply_carrying_only_the_device_type(): + """Half an identity is not an identity. The registry is keyed on the pair, + and protobuf answers `""` for a `zenos_git_hash` the unit never sent - so + without the presence check this would look up (QC, "") and refuse with a + message naming a firmware the unit never claimed.""" + with pytest.raises(profiles.UnsupportedDevice, match="did not report"): + profiles.resolve(pa.VersionMessage(action=pa.MessageAction.UPDATE, + device_type=pa.VersionMessage.QC)) + + +def test_resolve_refuses_a_reply_carrying_only_the_coros_version(): + """The other half, which protobuf answers as device_type 0 - a real enum + member, so the lookup would silently mean a device the unit never named.""" + with pytest.raises(profiles.UnsupportedDevice, match="did not report"): + profiles.resolve(pa.VersionMessage(action=pa.MessageAction.UPDATE, + zenos_git_hash="4.0.1")) + + +def test_the_nearest_profile_offered_is_the_newest_by_version_not_by_string(): + """"4.10.0" is newer than "4.9.0" and sorts below it as a string. + + The hint tells somebody which profile to measure their unit as, so the + string comparison this replaces offered them the older one - and did it on + exactly the version numbers a project reaches after nine patch releases. + """ + older = type("OlderProbe", (client.QuadCortex,), { + "MEASURED_ON": ("4.9.0",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset()}) + newer = type("NewerProbe", (client.QuadCortex,), { + "MEASURED_ON": ("4.10.0",), "EVIDENCE": support.Evidence.STUB, + "VERIFIED": frozenset()}) + try: + with pytest.raises(profiles.UnsupportedDevice) as caught: + profiles.resolve(_reply(pa.VersionMessage.QC, "4.11.0")) + assert "profile=NewerProbe" in str(caught.value) + finally: + client.QuadCortex._PROFILES[:] = [ + c for c in client.QuadCortex._PROFILES if c not in (older, newer)] From 10b865f7e1aeb49db79a4d108c66a24af44c5706 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:16:12 -0500 Subject: [PATCH 28/33] docs: the profile entry in the changelog describes what shipped It was written before the seam existed and still said the work was next, in the future tense, on the same page as the entry describing the seam that landed. --- changelog.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index fee06c0..9ea98c0 100644 --- a/changelog.md +++ b/changelog.md @@ -44,11 +44,12 @@ The Quad Cortex Mini is recognised and refused with instructions. A profile is what the unit reports in its `Version` reply: `device_type` and `zenos_git_hash`, the CorOS version. Everything that differs by firmware or -model will live on the profile, connect will resolve it before the handshake, -and an unknown profile will refuse to connect rather than borrow the nearest -one. This entry records the rules; the seam is the next piece of work. No code -branches on a version string yet, and `protocol.models`, `params` and `options` -still mean the Quad Cortex 4.0.1 snapshot. See `docs/ADR.md`. +model lives on the profile, connect resolves it before the handshake, and an +unknown profile refuses to connect rather than borrowing the nearest one. This +entry records the rules; the entry above is the seam that implements them. No +module tests a version string on its own, and `protocol.models`, `params` and +`options` still mean the Quad Cortex 4.0.1 snapshot, as shims over it. See +`docs/ADR.md`. ### `version()` no longer answers with the unit's own question From 20bdb1eab86cad1631783daa63a75841f9a9c550 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:19:53 -0500 Subject: [PATCH 29/33] fix: measured_firmware takes the versions, so mypy sees the one real call site The helper took the profile class, which mypy cannot match against a protocol carrying __name__ - a class object has one and an instance does not - so set_block's call was the only place with a real class rather than an Any, and it was the place that failed. Taking MEASURED_ON itself removes the question. --- pyquadcortex/protocol/client.py | 2 +- pyquadcortex/protocol/support.py | 13 +++++++++---- tests/test_support.py | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pyquadcortex/protocol/client.py b/pyquadcortex/protocol/client.py index 1316f00..4e9e102 100644 --- a/pyquadcortex/protocol/client.py +++ b/pyquadcortex/protocol/client.py @@ -1322,7 +1322,7 @@ def set_block(self, cell, verify: bool = True, timeout: float = 5.0): if self.catalog.get(model_id) is None: raise ControlNotDrivable( f"model {model_id}", - f"not in this unit's catalog ({measured_firmware(type(self))}); " + f"not in this unit's catalog ({measured_firmware(type(self).MEASURED_ON)}); " f"the catalog is read from the unit, so this id does not exist on it", "use a constant from this connection's own snapshot (qc.models), or " "look the model up in qc.catalog by name") diff --git a/pyquadcortex/protocol/support.py b/pyquadcortex/protocol/support.py index 7937d85..3c3777c 100644 --- a/pyquadcortex/protocol/support.py +++ b/pyquadcortex/protocol/support.py @@ -13,7 +13,7 @@ from dataclasses import dataclass from enum import Enum -from typing import Protocol +from typing import Protocol, Sequence class Support(Enum): @@ -102,7 +102,7 @@ class _ProfileClass(Protocol): MEASURED_ON: tuple[str, ...] -def measured_firmware(cls: type[_ProfileClass]) -> str: +def measured_firmware(measured_on: Sequence[str]) -> str: """``"CorOS 4.0.1"``, or ``"no firmware measured"`` when there is none. The word "CorOS" belongs to the version, not to the sentence around it, so @@ -110,8 +110,13 @@ def measured_firmware(cls: type[_ProfileClass]) -> str: ``MEASURED_ON``, and a caller told their model is "not in this unit's catalog (CorOS )" learns nothing from the empty parenthesis. Every message that names a profile's firmware goes through this. + + Takes the versions rather than the profile class: a class OBJECT cannot be + matched against a protocol carrying ``__name__``, so a signature naming the + class would have cost a type-checker suppression at the one call site that + has a real class rather than an ``Any``. """ - firmware = ", ".join(cls.MEASURED_ON) + firmware = ", ".join(measured_on) return f"CorOS {firmware}" if firmware else "no firmware measured" @@ -122,7 +127,7 @@ def unverified_text(cls: type[_ProfileClass], name: str) -> tuple[str, str]: connect-time hint, so they cannot say three different things. """ class_name = cls.__name__ - evidence = f"not yet verified on {class_name} ({measured_firmware(cls)})" + evidence = f"not yet verified on {class_name} ({measured_firmware(cls.MEASURED_ON)})" workaround = ( f"connect(support=Support.EXPERIMENTAL) to try it, or run " f"`pytest tests/hardware --hardware --verifies {name}` on your unit " diff --git a/tests/test_support.py b/tests/test_support.py index 0dc2586..ceec55b 100644 --- a/tests/test_support.py +++ b/tests/test_support.py @@ -60,8 +60,8 @@ def test_measured_firmware_says_so_when_there_is_no_firmware(): it, so it is written in one place and a profile with nothing measured renders as words instead of a hole. """ - assert support.measured_firmware(QuadCortex41) == "CorOS 4.1.0" - assert support.measured_firmware(NothingMeasured) == "no firmware measured" + assert support.measured_firmware(QuadCortex41.MEASURED_ON) == "CorOS 4.1.0" + assert support.measured_firmware(NothingMeasured.MEASURED_ON) == "no firmware measured" def test_unverified_text_says_so_too_for_a_profile_with_nothing_measured(): From 8844e9731dfb70d4e074a37d585f5273df333a39 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:20:56 -0500 Subject: [PATCH 30/33] docs: STEERING names the shared snapshot helper and the suite's --profile --- docs/STEERING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/STEERING.md b/docs/STEERING.md index bdd8511..69e123d 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -48,7 +48,7 @@ The model layer holds the state (design in [`domain-model.md`](domain-model.md) - `tests/` - the fully offline suite and its fixtures - `examples/` - runnable scripts, also used as hardware-verification shapes - `docs/` - protocol record, architecture, coverage, this file -- `scripts/` - `compile_protos.sh`, `check_artifacts.py`, `generate_models.py`, `generate_params.py`, `generate_options.py`, `extract_scale_fixture.py` +- `scripts/` - `compile_protos.sh`, `check_artifacts.py`, `generate_models.py`, `generate_params.py`, `generate_options.py`, `_snapshots.py` (the snapshot package all three generators write, in one copy), `extract_scale_fixture.py` - `.github/workflows/` - CI ## 5. Patterns in Use @@ -70,7 +70,7 @@ The model layer holds the state (design in [`domain-model.md`](domain-model.md) - **Python >= 3.11.** - **The default test suite runs fully offline.** No test imports `hid`, touches hardware, or needs `DYLD_LIBRARY_PATH`; CI runs the real suite on plain runners for every PR (see ADR-0002). A separate hardware-in-the-loop suite - state-neutral on success, best-effort restore on failure, never run in CI - lives in `tests/hardware/` and runs only under `pytest --hardware` (see ADR-0005). That gate is TWO hooks in `tests/hardware/conftest.py`, not one: pytest offers `pytest_ignore_collect` only the paths it reaches by walking a directory, so a path named on the command line is caught instead by `pytest_collection_modifyitems`, which stops the run with an error naming the flag. `tests/test_hardware_gate.py` holds both halves up through a subprocess. Its modules must stay import-safe offline, and two offline tests hold that: `tests/test_hardware_gate.py` collects the whole tree under `--hardware` with `hid` poisoned, which imports every module in the directory, and `tests/test_scene_echo_predicates.py` imports `tests/hardware/test_write_echo.py` to exercise its predicates with no unit attached - the only way a predicate that can never match gets caught cheaply. - **Wire behaviour is stated per device profile, and a profile is named by CorOS version, never by `app_fw`** (ADR-0020). The measured baseline is Quad Cortex, CorOS 4.0.1, firmware d14e; a contributor reports d14e on 4.1.0 too (PR #44), so the app firmware string distinguishes nothing. An unknown profile refuses to connect rather than borrow the nearest one. An observation from another profile is recorded beside the 4.0.1 record in `protocol.md`, dated and named. The protocol is unversioned, so no behavior is guaranteed across firmware updates; [`architecture.md`](architecture.md) has the re-verification checklist. -- **A hardware test names what it verifies, and it must actually verify it.** `@pytest.mark.verifies(*operations)` names the `QuadCortex` operations a test both exercises and asserts on - checked against `QuadCortex.operations()` at collection, so a renamed operation is a collection error rather than a marker that quietly stops naming anything. `pytest tests/hardware --hardware --verifies NAME` narrows a run to the tests that name it. `scratch_preset` is the fixture a test uses to get a disposable copy of the loaded preset to edit, rather than touching the owner's own library. An operation no hardware test names has to appear in `tests/test_hardware_markers.py`'s `UNMARKED_OPERATIONS`, with the reason beside it - there is no third way. +- **A hardware test names what it verifies, and it must actually verify it.** `@pytest.mark.verifies(*operations)` names the `QuadCortex` operations a test both exercises and asserts on - checked against `QuadCortex.operations()` at collection, so a renamed operation is a collection error rather than a marker that quietly stops naming anything. `pytest tests/hardware --hardware --verifies NAME` narrows a run to the tests that name it, and refuses a name that is not an operation or that no collected test names. `--profile CLASSNAME` connects as that profile class instead of the one the unit resolves to, which is how a unit the registry would refuse gets measured by the suite that measures it. `scratch_preset` is the fixture a test uses to get a disposable copy of the loaded preset to edit, rather than touching the owner's own library. An operation no hardware test names has to appear in `tests/test_hardware_markers.py`'s `UNMARKED_OPERATIONS`, with the reason beside it - there is no third way. - **Exclusive device access.** Cortex Control holds the HID interface exclusively, so the library and Cortex Control cannot be connected at the same time. ## 7. Decision Records From aca47f39cc35ace7a385dd2bcb43361f9c8e9ca2 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:36:45 -0500 Subject: [PATCH 31/33] fix: the scratch teardown deletes unconditionally, a bad --profile stops the run at collection delete_preset tolerates an absent name (it goes through _file_operation, which swallows TimeoutError and returns None), so the listing guard in _release_scratch only made a flaky list_presets skip a delete that would have worked - leaving the fixed-name scratch copy on the owner's unit. Drop the guard and call delete_preset unconditionally. --profile is now checked in pytest_collection_modifyitems too, beside the --verifies checks, so a typo'd class name is one UsageError before any test runs rather than one per test in the _connection fixture. The --verifies refusal for "no collected test names it" now also mentions a narrowed path as a cause. CLAUDE.md's hardware-suite convention line is updated to match docs/STEERING.md. --- CLAUDE.md | 2 +- tests/hardware/conftest.py | 40 ++++++++++++++---------- tests/test_hardware_report.py | 57 ++++++++++++++++------------------- 3 files changed, 51 insertions(+), 48 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0b217c1..eb7f794 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ Read `docs/STEERING.md` before non-trivial work (new operations, transport or fr ## Conventions -- Dev setup: `uv venv && uv pip install -e ".[dev]"` (or plain venv + pip, see contributing.md). Run tests with `.venv/bin/python -m pytest`. The suite passes offline - no hardware, no `hid` import, no `DYLD_LIBRARY_PATH`. The hardware suite's `--hardware` gate is two hooks in `tests/hardware/conftest.py` and stays two: pytest skips `pytest_ignore_collect` for a path named on the command line, so `pytest_collection_modifyitems` refuses that one loudly. Never fold them into one; `tests/test_hardware_gate.py` proves both. A module in `tests/hardware/` also needs a basename no module under `tests/` owns - pytest maps `tests/hardware/test_scales.py` and `tests/test_scales.py` to one module name and refuses the second, which is why two files there end `_on_unit`. Rename; do not reach for `__init__.py` or `consider_namespace_packages`, because three offline modules do `from waiting import ...` and that works only while pytest puts `tests/` on `sys.path`. A hardware test names what it verifies AND actually asserts on with `@pytest.mark.verifies(*operations)`, checked against `QuadCortex.operations()` at collection; `--verifies NAME` narrows a run to the tests naming it. `scratch_preset` is the fixture for getting a disposable copy of the loaded preset to edit. An operation no hardware test names has to appear in `tests/test_hardware_markers.py`'s `UNMARKED_OPERATIONS`, with the reason - that dict is the list a new operation must come through if no hardware test names it. +- Dev setup: `uv venv && uv pip install -e ".[dev]"` (or plain venv + pip, see contributing.md). Run tests with `.venv/bin/python -m pytest`. The suite passes offline - no hardware, no `hid` import, no `DYLD_LIBRARY_PATH`. The hardware suite's `--hardware` gate is two hooks in `tests/hardware/conftest.py` and stays two: pytest skips `pytest_ignore_collect` for a path named on the command line, so `pytest_collection_modifyitems` refuses that one loudly. Never fold them into one; `tests/test_hardware_gate.py` proves both. A module in `tests/hardware/` also needs a basename no module under `tests/` owns - pytest maps `tests/hardware/test_scales.py` and `tests/test_scales.py` to one module name and refuses the second, which is why two files there end `_on_unit`. Rename; do not reach for `__init__.py` or `consider_namespace_packages`, because three offline modules do `from waiting import ...` and that works only while pytest puts `tests/` on `sys.path`. A hardware test names what it verifies AND actually asserts on with `@pytest.mark.verifies(*operations)`, checked against `QuadCortex.operations()` at collection; `--verifies NAME` narrows a run to the tests naming it, and refuses a name that is not an operation or that no collected test names. `--profile CLASSNAME` (with `--hardware`) connects as that profile class instead of the one the unit resolves to, which is how a unit the registry would refuse - an unmeasured firmware, or a Mini - gets measured by the suite that measures it. `scratch_preset` is the fixture for getting a disposable copy of the loaded preset to edit. An operation no hardware test names has to appear in `tests/test_hardware_markers.py`'s `UNMARKED_OPERATIONS`, with the reason - that dict is the list a new operation must come through if no hardware test names it. - Two namespaces, one package (ADR-0006): `pyquadcortex` is the model of the unit, `pyquadcortex.protocol` is the message-level API. The model's code lives in `pyquadcortex/device/` - not `model/`, because in this codebase the identifier `model` means an amp or pedal block (`protocol/models.py`, `catalog.Model`, `ModelCatalog`, `set_block(model=...)`). The model imports the protocol layer; nothing under `pyquadcortex/protocol/` may import from `pyquadcortex/device/`. - Every conversion between a screen value and a wire value lives in the `pyquadcortex/device/translate/` PACKAGE and nowhere else in the package outside `pyquadcortex/protocol/` - the whole package, not just `device/`, because a rule scoped to a directory is satisfied by moving the code one directory up. It covers rows 1-4, slots 1-8, scene and footswitch letters, preset addresses and display units. Outside the boundary that means no `+1`/`-1` on a coordinate AND none of the other spellings of the same conversion (`ord`/`chr`, a letter table in any container, `divmod` on a position, a one-based `enumerate`, `ROWS.index(...)`), and no module reaching past the boundary for a protocol-layer name that carries a coordinate or a raw scale - the converters and also the readers that hand back wire indexes, such as `protocol.stomp_assignments`. `tests/test_translation.py` reads the source and proves both, and pins where each check stops seeing rather than implying it sees everything. The boundary is a package, so its exemption covers a DIRECTORY: `BOUNDARY_MODULES` in that file names the modules inside it, and adding `translate/anything.py` has to come through that list with a reason - otherwise the arithmetic scan skips the new file for the same reason it skips the real converters. The same file now carries a second list, `PROTOCOL_NON_CONVERSIONS`, for protocol-layer names the boundary uses that are NOT conversions (`field_present`, the port enums). It exists because the boundary reads whole presets now, so "everything it reaches for is a conversion" stopped being true; a name has to be on one list or the other, and which one is a judgement a reviewer makes from the reason written beside it. A model API takes `FootswitchLetter`, never a bare footswitch integer, because a footswitch index and a block's column are different numbers that usually agree. A new conversion goes in that module with its own test, however small it is, and its protocol-layer name joins that file's allowlist in the same commit. - The model represents what the unit shows, in the unit's own words, and never guesses. A control we understand but cannot yet drive is modelled and REFUSES the operation (ADR-0007); a control we do not understand is omitted, with the reason recorded in `docs/domain-model.md`'s appendix. Nothing ships with a "this might be stale or wrong" caveat. A refusal is `protocol.ControlNotDrivable(control, evidence, workaround)` - never a bare `ValueError` and never a message-only raise. All three fields are required, and `evidence` records what was actually tried, because a refusal nobody can audit is the guess the rule exists to prevent. Before writing one, ADR-0010 applies: the differential capture comes first, and "the unit broadcasts nothing" is not on its own a finding about the wire. Do not derive a refusal from a RULE about parameter types either - the first instance had three plausible rules tried against hardware and all three were false, so `LANE_OUTPUT_UNASSIGNABLE` is a measured list with the disproofs written beside it. diff --git a/tests/hardware/conftest.py b/tests/hardware/conftest.py index 17615d9..cd6c8e7 100644 --- a/tests/hardware/conftest.py +++ b/tests/hardware/conftest.py @@ -110,7 +110,8 @@ def _claims(items, operations, wanted, deselect): f"--verifies {wanted!r} is an operation, and no collected test " f"names it - this run would measure nothing. It should be in " f"UNMARKED_OPERATIONS in tests/test_hardware_markers.py, with " - f"the reason no test drives it") + f"the reason no test drives it, or you named a path that " + f"excludes the test carrying it") items[:] = keep deselect(drop) return {item.nodeid: marks[item.nodeid] for item in items} @@ -157,6 +158,17 @@ def pytest_collection_modifyitems(session, config, items): if config.getoption("--hardware"): from pyquadcortex.protocol.client import QuadCortex + wanted_profile = config.getoption("--profile") + if wanted_profile: + # Same reasoning as the --verifies checks above: fail at + # collection, once, rather than in the `_connection` fixture where + # every single test in the run would hit the same UsageError in + # turn. The fixture still calls `_profile_named` itself - it is + # cheap, and it is the one that must hand back the actual class - + # this call exists only to fail the whole run before anything else + # happens. + _profile_named(wanted_profile) + _VERIFIES.update(_claims( items, QuadCortex.operations(), config.getoption("--verifies"), lambda dropped: config.hook.pytest_deselected(items=dropped))) @@ -459,11 +471,15 @@ def _release_scratch(qc, before, setlist, name, settle=3.0): The copy may not be there at all: the fixture's ``try`` opens BEFORE the save, so a save that failed outright runs this teardown with nothing to - delete - and a ``delete_preset`` of a name the unit does not have would - report a restore that could not finish when the unit is already as it was. - So the setlist is listed first and the delete happens only for a copy that - exists. A listing that fails is itself reported, since it is the reason the - delete was not even attempted. + delete. That is fine to call anyway - ``delete_preset`` goes through + ``_file_operation``, which tolerates the device not replying and returns + ``None`` rather than raising, so deleting a name the unit does not have is + a no-op, not an error. A listing was tried here first as a guard, but + ``list_presets`` is itself documented as unreliable on a single READ + (:meth:`~pyquadcortex.protocol.client.QuadCortex.list_presets`), so a flaky + listing could skip a delete that would have worked and leave the copy + behind under the fixed scratch name. Call it unconditionally instead and + let device state be the arbiter, same as everywhere else in this module. ``settle`` is the pause after the recall, and only the offline test in ``tests/test_hardware_report.py`` passes anything but the real 3 s. @@ -477,18 +493,10 @@ def _release_scratch(qc, before, setlist, name, settle=3.0): f"recall the preset that was loaded " f"({before.folder_key}, {before.position}): {exc!r}") try: - present = any(entry.name == name for entry in qc.list_presets(setlist)) + qc.delete_preset(setlist, name) except Exception as exc: # noqa: BLE001 - reported, not swallowed failed.append( - f"list the User setlist to see whether the scratch preset {name!r} " - f"is there: {exc!r} - delete it by hand if it is") - else: - if present: - try: - qc.delete_preset(setlist, name) - except Exception as exc: # noqa: BLE001 - reported, not swallowed - failed.append( - f"delete the scratch preset {name!r} from the User setlist: {exc!r}") + f"delete the scratch preset {name!r} from the User setlist: {exc!r}") if failed: raise _unrestored(failed) diff --git a/tests/test_hardware_report.py b/tests/test_hardware_report.py index 8748d2f..69f89b1 100644 --- a/tests/test_hardware_report.py +++ b/tests/test_hardware_report.py @@ -186,8 +186,8 @@ def iter_markers(self, name): class _Config: """A `--hardware` config that records what the hook deselects.""" - def __init__(self, verifies=None): - self._options = {"--hardware": True, "--verifies": verifies} + def __init__(self, verifies=None, profile=None): + self._options = {"--hardware": True, "--verifies": verifies, "--profile": profile} self.deselected = [] self.hook = self @@ -277,6 +277,21 @@ def test_a_marker_naming_no_operation_stops_the_collection(conftest, collection) conftest.pytest_collection_modifyitems(None, _Config(), items) +def test_an_unknown_profile_stops_collection_before_the_run_starts(conftest, collection): + """`--profile` is validated here too, not only in the `_connection` fixture. + + The fixture's check would fire once per test, one UsageError per item in + the run; checked at collection, a typo is one clean error before anything + touches a unit - the same reasoning the `--verifies` checks above are + built on. + """ + items = [_Item("t.py::a", "set_param")] + + with pytest.raises(pytest.UsageError, match="is not a profile class"): + conftest.pytest_collection_modifyitems( + None, _Config(profile="QuadCortexMinni"), items) + + # --- which profile the run connects as --------------------------------------- def test_profile_names_resolve_to_their_class(conftest): @@ -307,27 +322,18 @@ class _Position: class _FakeQc: - """The three methods the teardown calls, each able to fail on demand.""" + """The two methods the teardown calls, each able to fail on demand.""" - def __init__(self, recall_raises=None, delete_raises=None, - list_raises=None, listing=("pyquadcortex scratch",)): + def __init__(self, recall_raises=None, delete_raises=None): self.calls = [] self._recall_raises = recall_raises self._delete_raises = delete_raises - self._list_raises = list_raises - self._listing = listing def recall_preset(self, folder_key, position): self.calls.append(("recall", folder_key, position)) if self._recall_raises is not None: raise self._recall_raises - def list_presets(self, setlist): - self.calls.append(("list", setlist)) - if self._list_raises is not None: - raise self._list_raises - return [_Entry(i, name) for i, name in enumerate(self._listing)] - def delete_preset(self, setlist, name): self.calls.append(("delete", setlist, name)) if self._delete_raises is not None: @@ -372,33 +378,22 @@ def test_a_clean_teardown_recalls_then_deletes_and_says_nothing(conftest): settle=0.0) assert qc.calls == [("recall", "user", 3), - ("list", "USER"), ("delete", "USER", "pyquadcortex scratch")] def test_a_copy_that_was_never_saved_is_not_reported_as_unrestored(conftest): """The fixture's `try` opens before the save, so the teardown runs on a - failed save with nothing to delete. Deleting a name the unit does not have - would report a restore that could not finish when the unit is as it was.""" - qc = _FakeQc(listing=("Gig", "Rehearsal")) + failed save with nothing to delete. ``delete_preset`` goes through + ``_file_operation``, which tolerates the device not replying and returns + ``None`` instead of raising, so deleting a name the unit does not have is a + no-op - there is no listing guard left to skip it, and none is needed.""" + qc = _FakeQc() conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", settle=0.0) - assert qc.calls == [("recall", "user", 3), ("list", "USER")] - - -def test_a_listing_that_fails_is_reported_because_the_delete_never_ran(conftest): - qc = _FakeQc(list_raises=TimeoutError("no listing")) - - with pytest.raises(AssertionError) as caught: - conftest._release_scratch(qc, _Position, "USER", "pyquadcortex scratch", - settle=0.0) - - message = str(caught.value) - assert "COULD NOT RESTORE THE UNIT" in message - assert "delete it by hand" in message - assert "TimeoutError" in message + assert qc.calls == [("recall", "user", 3), + ("delete", "USER", "pyquadcortex scratch")] def test_nothing_that_can_leave_the_copy_behind_sits_outside_the_try(conftest): From aa7eba2b9808011fbfbcb52be1620400469f3d9d Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:36:51 -0500 Subject: [PATCH 32/33] fix: resolve()'s hints name a command that actually works, and version keys never cross types Both hints in resolve() told a caller to connect(profile=X, support=Support.EXPERIMENTAL) and then run `pytest tests/hardware --hardware`, which cannot work since that command connects with no profile unless told. Reworded to `pytest tests/hardware --hardware --profile `, keeping a short clause for the Python caller. _version_key left a non-numeric segment as a str, so comparing a plain release against a pre-release ("4.1.0" vs "4.1.0-rc1") raised TypeError inside the refusal path. Each segment is now tagged (1, int) or (0, str) so ints and strings never compare directly and a numeric release still sorts above its own pre-release. --- pyquadcortex/protocol/profiles.py | 25 ++++++++++++++++--------- tests/test_profiles.py | 20 ++++++++++++++++++-- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/pyquadcortex/protocol/profiles.py b/pyquadcortex/protocol/profiles.py index 6c880da..18cd41e 100644 --- a/pyquadcortex/protocol/profiles.py +++ b/pyquadcortex/protocol/profiles.py @@ -115,10 +115,15 @@ def _version_key(version: str) -> tuple: Compared per part, as integers where the part is one: a CorOS version is dotted numbers today, and the string comparison this replaces called 4.9.0 the newest of the two - so the hint below offered the older profile as the - nearest. A part that is not a number is left as itself rather than being - parsed into something it might not be. + nearest. A part that is not a number (a pre-release suffix such as + "0-rc1") is kept as a string, tagged behind every numeric part so a + numeric part never compares against a string part - Python raises + `TypeError` on that, and a profile carrying one release candidate would + crash the refusal path that is supposed to explain the version mismatch, + not add its own. Tagging a numeric part ahead of a string one also keeps + the plain release sorting above its own pre-release at the same position. """ - return tuple(int(part) if part.isdigit() else part + return tuple((1, int(part)) if part.isdigit() else (0, part) for part in version.split(".")) @@ -145,18 +150,20 @@ def resolve(reply: pa.VersionMessage) -> type[QuadCortex]: if same_device and all(c.EVIDENCE is Evidence.STUB for c in same_device): stub = same_device[0] hint = (f"The {device} is recognised and not yet supported; {stub.__name__} is the " - f"stub to finish. To start: connect(profile={stub.__name__}, " - f"support=Support.EXPERIMENTAL), then `pytest tests/hardware --hardware` " - f"and send the report. See its docstring.") + f"stub to finish. To start: `pytest tests/hardware --hardware " + f"--profile {stub.__name__}` and send the report (a Python caller can " + f"also connect(profile={stub.__name__}, support=Support.EXPERIMENTAL)). " + f"See its docstring.") elif same_device: # `default=()` for a stub among them: it has measured nothing, and an # empty tuple sorts below every version, which is where it belongs. nearest = max(same_device, key=lambda c: max((_version_key(v) for v in c.MEASURED_ON), default=())) - hint = (f"Pass profile={nearest.__name__} to treat it as " - f"{', '.join(nearest.MEASURED_ON)} while you measure it, with " - f"support=Support.EXPERIMENTAL; then add {reply.zenos_git_hash!r} to " + hint = (f"Pass `--profile {nearest.__name__}` to `pytest tests/hardware " + f"--hardware` to treat it as {', '.join(nearest.MEASURED_ON)} while you " + f"measure it (a Python caller can also connect(profile={nearest.__name__}, " + f"support=Support.EXPERIMENTAL)); then add {reply.zenos_git_hash!r} to " f"{nearest.__name__}.MEASURED_ON.") else: hint = "No profile exists for this device type." diff --git a/tests/test_profiles.py b/tests/test_profiles.py index 7ec6058..4fd3c8f 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -296,7 +296,8 @@ def test_resolve_refuses_an_unknown_firmware_naming_what_exists_without_taking_i text = str(err) assert "QC, CorOS 4.2.0" in text assert "4.0.1" in text and "4.1.0" in text - assert "profile=QuadCortex41" in text and "Support.EXPERIMENTAL" in text + assert "--profile QuadCortex41" in text and "pytest tests/hardware --hardware" in text + assert "connect(profile=QuadCortex41" in text and "Support.EXPERIMENTAL" in text def test_resolve_refuses_a_mini_naming_the_stub_and_how_to_start(): @@ -305,7 +306,8 @@ def test_resolve_refuses_a_mini_naming_the_stub_and_how_to_start(): text = str(caught.value) assert "Quad Cortex Mini" in text and "QuadCortexMini" in text assert "not yet supported" in text - assert "profile=QuadCortexMini" in text and "pytest tests/hardware --hardware" in text + assert "--profile QuadCortexMini" in text and "pytest tests/hardware --hardware" in text + assert "connect(profile=QuadCortexMini" in text and "Support.EXPERIMENTAL" in text def test_resolve_refuses_a_reply_with_no_identity(): @@ -351,3 +353,17 @@ def test_the_nearest_profile_offered_is_the_newest_by_version_not_by_string(): finally: client.QuadCortex._PROFILES[:] = [ c for c in client.QuadCortex._PROFILES if c not in (older, newer)] + + +def test_version_key_never_compares_a_number_against_a_string(): + """A pre-release suffix ("4.1.0-rc1") keeps its last segment a string. + + Comparing that key against a plain numeric one ("4.1.0") used to raise + TypeError - int() vs str() - inside the refusal path that is supposed to + explain a version mismatch, not add its own. The numeric release must + still sort above the pre-release. + """ + numeric = profiles._version_key("4.1.0") + prerelease = profiles._version_key("4.1.0-rc1") + assert prerelease < numeric + assert numeric > prerelease From 7be6861cdf325948192a604e45dade95aa709b37 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Sun, 6 Sep 2026 17:36:57 -0500 Subject: [PATCH 33/33] docs: a generated snapshot's __init__ names any connected unit, not just the maintainer's The generator hard-coded "read from the maintainer's unit" in every snapshot's docstring, which stops being true the moment a second profile (a 4.1.0 unit, a Mini) is measured on someone else's hardware. Neutral wording names ADR-0020 instead. The committed coros_4_0_1/__init__.py is regenerated by hand to match byte for byte. --- pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py | 2 +- scripts/_snapshots.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py b/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py index 432d29a..6e65d95 100644 --- a/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py +++ b/pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py @@ -1,4 +1,4 @@ -"""The Quad Cortex catalog on CorOS 4.0.1, read from the maintainer's unit.""" +"""The Quad Cortex catalog on CorOS 4.0.1, generated by the scripts in `scripts/` from a connected unit (ADR-0020).""" from pyquadcortex.protocol.catalogs.coros_4_0_1 import models, options, params # noqa: F401 __all__ = ["models", "params", "options"] diff --git a/scripts/_snapshots.py b/scripts/_snapshots.py index 476daae..c3f54c8 100644 --- a/scripts/_snapshots.py +++ b/scripts/_snapshots.py @@ -72,7 +72,8 @@ def ensure_snapshot_package(catalogs_root, snapshot: str) -> pathlib.Path: exports = ", ".join(f'"{name}"' for name in EXPORTS if name in present) (directory / "__init__.py").write_text( f'"""The Quad Cortex catalog on CorOS {snapshot_version(snapshot)}, ' - 'read from the maintainer\'s unit."""\n' + "generated by the scripts in `scripts/` from a connected unit " + '(ADR-0020)."""\n' f"{imports}" "\n" f"__all__ = [{exports}]\n",