@potatosalad775/eqcaps-device-bridge 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -2
- package/dist/device.d.ts +14 -6
- package/dist/device.d.ts.map +1 -1
- package/dist/device.js +40 -18
- package/dist/device.js.map +1 -1
- package/dist/handler.d.ts +25 -1
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js.map +1 -1
- package/dist/handlers/index.d.ts +3 -1
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +4 -0
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/qudelix-usb-hid.d.ts +20 -13
- package/dist/handlers/qudelix-usb-hid.d.ts.map +1 -1
- package/dist/handlers/qudelix-usb-hid.js +219 -87
- package/dist/handlers/qudelix-usb-hid.js.map +1 -1
- package/dist/handlers/qudelix-v2-usb-hid.d.ts +31 -0
- package/dist/handlers/qudelix-v2-usb-hid.d.ts.map +1 -0
- package/dist/handlers/qudelix-v2-usb-hid.js +266 -0
- package/dist/handlers/qudelix-v2-usb-hid.js.map +1 -0
- package/dist/handlers/qudelix.d.ts +185 -0
- package/dist/handlers/qudelix.d.ts.map +1 -0
- package/dist/handlers/qudelix.js +585 -0
- package/dist/handlers/qudelix.js.map +1 -0
- package/dist/handlers/topping-usb-hid.d.ts +51 -0
- package/dist/handlers/topping-usb-hid.d.ts.map +1 -0
- package/dist/handlers/topping-usb-hid.js +658 -0
- package/dist/handlers/topping-usb-hid.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocols.d.ts +9 -0
- package/dist/protocols.d.ts.map +1 -1
- package/dist/protocols.js +80 -33
- package/dist/protocols.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Filter } from '@potatosalad775/eqcaps-core';
|
|
2
|
+
import type { Codec, HidFrame, HidHandler } from '../handler.ts';
|
|
3
|
+
export type ToppingFamily = 'dx1' | 'dx5' | 'e50' | 'dx9d' | 'd900';
|
|
4
|
+
export interface ToppingHidOptions {
|
|
5
|
+
/** Which of the five session and read flows the device speaks. Default `dx1`. */
|
|
6
|
+
family?: ToppingFamily;
|
|
7
|
+
}
|
|
8
|
+
export interface ToppingFrame {
|
|
9
|
+
kind: number;
|
|
10
|
+
frames: number;
|
|
11
|
+
frame: number;
|
|
12
|
+
command: number;
|
|
13
|
+
data: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function toppingFrame(command: number, data: number, kind?: number, frames?: number, frame?: number): Uint8Array;
|
|
16
|
+
/** A report in the frame layout, with or without one byte in front; null for anything else. */
|
|
17
|
+
export declare function parseToppingFrame(d: ArrayLike<number>): ToppingFrame | null;
|
|
18
|
+
/** The pre-gain word for `db`: the app's table, or computed on the D900 as the app does there. */
|
|
19
|
+
export declare function toppingPreampWord(db: number, family?: ToppingFamily): number;
|
|
20
|
+
declare const OFF: {
|
|
21
|
+
type: number;
|
|
22
|
+
freq: number;
|
|
23
|
+
gain: number;
|
|
24
|
+
q: number;
|
|
25
|
+
on: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The frames that select `slot` and write the request to both channels: the pre-gain, then the 11
|
|
29
|
+
* bands, unused ones switched off at the app's defaults. The D900 gets all left bands before the
|
|
30
|
+
* right ones, as the app sends them, and its 11th band as `reserved` (the app writes back what it
|
|
31
|
+
* read there).
|
|
32
|
+
*/
|
|
33
|
+
export declare function toppingWriteFrames(request: {
|
|
34
|
+
filters: readonly Filter[];
|
|
35
|
+
preamp?: number;
|
|
36
|
+
slot?: number;
|
|
37
|
+
}, o: ToppingHidOptions, reserved?: {
|
|
38
|
+
left: typeof OFF;
|
|
39
|
+
right: typeof OFF;
|
|
40
|
+
}): HidFrame[];
|
|
41
|
+
export declare const toppingCodec: Codec<ToppingHidOptions, HidFrame>;
|
|
42
|
+
/** "2.39" from 0x239: the hex digits are the decimal ones. Null where they aren't. */
|
|
43
|
+
export declare function toppingFirmware(word: number): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The DX5 II's one-word settings: the command that writes each, and its word in the settings
|
|
46
|
+
* answer. The value is the device's own number.
|
|
47
|
+
*/
|
|
48
|
+
export declare const TOPPING_DX5_SETTINGS: Readonly<Record<string, readonly [command: number, word: number]>>;
|
|
49
|
+
export declare const toppingUsbHid: HidHandler<ToppingHidOptions>;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=topping-usb-hid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topping-usb-hid.d.ts","sourceRoot":"","sources":["../../src/handlers/topping-usb-hid.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAG1D,OAAO,KAAK,EACX,KAAK,EAGL,QAAQ,EACR,UAAU,EAEV,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IACjC,iFAAiF;IACjF,MAAM,CAAC,EAAE,aAAa,CAAC;CACvB;AA+ED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,YAAY,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,SAAQ,EACZ,MAAM,SAAI,EACV,KAAK,SAAI,GACP,UAAU,CAgBZ;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,YAAY,GAAG,IAAI,CAU3E;AAeD,kGAAkG;AAClG,wBAAgB,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