@collabhut/plugin-sdk 0.1.0

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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1046 -0
  3. package/dist/helpers/note-utils.d.ts +128 -0
  4. package/dist/helpers/note-utils.d.ts.map +1 -0
  5. package/dist/helpers/note-utils.js +155 -0
  6. package/dist/index.d.ts +13 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +2 -0
  9. package/dist/types/audio-effect.d.ts +70 -0
  10. package/dist/types/audio-effect.d.ts.map +1 -0
  11. package/dist/types/audio-effect.js +1 -0
  12. package/dist/types/context.d.ts +39 -0
  13. package/dist/types/context.d.ts.map +1 -0
  14. package/dist/types/context.js +1 -0
  15. package/dist/types/events.d.ts +119 -0
  16. package/dist/types/events.d.ts.map +1 -0
  17. package/dist/types/events.js +19 -0
  18. package/dist/types/instrument.d.ts +83 -0
  19. package/dist/types/instrument.d.ts.map +1 -0
  20. package/dist/types/instrument.js +1 -0
  21. package/dist/types/licensing.d.ts +118 -0
  22. package/dist/types/licensing.d.ts.map +1 -0
  23. package/dist/types/licensing.js +27 -0
  24. package/dist/types/manifest.d.ts +90 -0
  25. package/dist/types/manifest.d.ts.map +1 -0
  26. package/dist/types/manifest.js +1 -0
  27. package/dist/types/midi-effect.d.ts +101 -0
  28. package/dist/types/midi-effect.d.ts.map +1 -0
  29. package/dist/types/midi-effect.js +1 -0
  30. package/dist/types/parameters.d.ts +76 -0
  31. package/dist/types/parameters.d.ts.map +1 -0
  32. package/dist/types/parameters.js +1 -0
  33. package/dist/types/shader.d.ts +110 -0
  34. package/dist/types/shader.d.ts.map +1 -0
  35. package/dist/types/shader.js +1 -0
  36. package/dist/types/vocal-preset.d.ts +149 -0
  37. package/dist/types/vocal-preset.d.ts.map +1 -0
  38. package/dist/types/vocal-preset.js +54 -0
  39. package/package.json +50 -0
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Vocal preset plugin type.
3
+ *
4
+ * Unlike audio/MIDI effect plugins, a vocal preset does **not** create Web
5
+ * Audio nodes. Instead it exports a static `VocalPreset` data object that
6
+ * the DAW's built-in vocal processing chain reads and applies.
7
+ *
8
+ * This means:
9
+ * - No sandbox risks from custom DSP code
10
+ * - Zero latency — processed natively by CollabDAW's vocal engine
11
+ * - Works with the Live Vocals module (`src/lib/live-vocals/`)
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import type { VocalPresetModule } from "@collabhut/plugin-sdk"
16
+ *
17
+ * const module: VocalPresetModule = {
18
+ * manifest: {
19
+ * id: "com.myorg.deep-trap-vocals",
20
+ * name: "Deep Trap Vocals",
21
+ * version: "1.0.0",
22
+ * type: "vocal-preset",
23
+ * description: "Hard-hitting trap vocal chain with heavy pitch correction",
24
+ * author: { name: "My Org" },
25
+ * pricing: "free",
26
+ * minApiVersion: "0.1.0",
27
+ * },
28
+ * preset: {
29
+ * inputGain: 0,
30
+ * outputGain: -3,
31
+ * eq: {
32
+ * enabled: true,
33
+ * bands: [
34
+ * { frequency: 80, gain: -6, q: 0.7, type: "highpass" },
35
+ * { frequency: 200, gain: -3, q: 1.2, type: "peaking" },
36
+ * { frequency: 3000, gain: 4, q: 1.5, type: "peaking" },
37
+ * { frequency: 8000, gain: 5, q: 0.8, type: "highshelf"},
38
+ * { frequency: 16000,gain: -2, q: 0.7, type: "highshelf"},
39
+ * ],
40
+ * },
41
+ * compressor: { enabled: true, threshold: -24, knee: 6, ratio: 6, attack: 0.003, release: 0.15, makeUpGain: 4 },
42
+ * pitchCorrection: { enabled: true, scale: "chromatic", strength: 0.9, speed: 0.05 },
43
+ * chorus: { enabled: false, rate: 0.5, depth: 0.3, delay: 0.02, mix: 0.3 },
44
+ * reverb: { enabled: true, roomSize: 0.2, damping: 0.8, preDelay: 0.01, mix: 0.15 },
45
+ * delay: { enabled: false, time: 0.25, feedback: 0.3, filter: 4000, mix: 0.2 },
46
+ * deEsser: { enabled: true, frequency: 7500, threshold: -30, range: 12 },
47
+ * saturation: { enabled: true, drive: 0.2, mix: 0.4 },
48
+ * },
49
+ * }
50
+ *
51
+ * export default module
52
+ * ```
53
+ */
54
+ /** EQ band filter type */
55
+ export type EqBandType = "peaking" | "lowshelf" | "highshelf" | "lowpass" | "highpass" | "notch";
56
+ /** A single parametric EQ band */
57
+ export interface EqBand {
58
+ readonly frequency: number;
59
+ readonly gain: number;
60
+ readonly q: number;
61
+ readonly type: EqBandType;
62
+ }
63
+ /** 5-band parametric EQ settings */
64
+ export interface VocalEqSettings {
65
+ readonly enabled: boolean;
66
+ readonly bands: readonly [EqBand, EqBand, EqBand, EqBand, EqBand];
67
+ }
68
+ /** Dynamic compressor settings */
69
+ export interface VocalCompressorSettings {
70
+ readonly enabled: boolean;
71
+ readonly threshold: number;
72
+ readonly knee: number;
73
+ readonly ratio: number;
74
+ readonly attack: number;
75
+ readonly release: number;
76
+ readonly makeUpGain: number;
77
+ }
78
+ /** De-esser settings */
79
+ export interface VocalDeEsserSettings {
80
+ readonly enabled: boolean;
81
+ readonly frequency: number;
82
+ readonly threshold: number;
83
+ readonly range: number;
84
+ }
85
+ /** Saturation / harmonic exciter */
86
+ export interface VocalSaturationSettings {
87
+ readonly enabled: boolean;
88
+ readonly drive: number;
89
+ readonly mix: number;
90
+ }
91
+ /** Pitch correction settings */
92
+ export interface VocalPitchCorrectionSettings {
93
+ readonly enabled: boolean;
94
+ /**
95
+ * Scale to snap to.
96
+ * Use a note array for custom scales: `["C", "D", "E", "G", "A"]`
97
+ */
98
+ readonly scale: "chromatic" | "major" | "minor" | "pentatonic" | readonly string[];
99
+ /** 0 = subtle, 1 = T-Pain hard-tune */
100
+ readonly strength: number;
101
+ /** Correction speed in seconds (lower = faster) */
102
+ readonly speed: number;
103
+ }
104
+ /** Chorus effect settings */
105
+ export interface VocalChorusSettings {
106
+ readonly enabled: boolean;
107
+ readonly rate: number;
108
+ readonly depth: number;
109
+ readonly delay: number;
110
+ readonly mix: number;
111
+ }
112
+ /** Convolution / algorithmic reverb settings */
113
+ export interface VocalReverbSettings {
114
+ readonly enabled: boolean;
115
+ readonly roomSize: number;
116
+ readonly damping: number;
117
+ readonly preDelay: number;
118
+ readonly mix: number;
119
+ }
120
+ /** Stereo delay settings */
121
+ export interface VocalDelaySettings {
122
+ readonly enabled: boolean;
123
+ readonly time: number;
124
+ readonly feedback: number;
125
+ readonly filter: number;
126
+ readonly mix: number;
127
+ }
128
+ /** Complete vocal signal chain preset */
129
+ export interface VocalPreset {
130
+ readonly inputGain: number;
131
+ readonly outputGain: number;
132
+ readonly eq: VocalEqSettings;
133
+ readonly compressor: VocalCompressorSettings;
134
+ readonly deEsser: VocalDeEsserSettings;
135
+ readonly saturation: VocalSaturationSettings;
136
+ readonly pitchCorrection: VocalPitchCorrectionSettings;
137
+ readonly chorus: VocalChorusSettings;
138
+ readonly reverb: VocalReverbSettings;
139
+ readonly delay: VocalDelaySettings;
140
+ }
141
+ import type { PluginManifest } from "./manifest";
142
+ /** Full vocal-preset module shape */
143
+ export interface VocalPresetModule {
144
+ readonly manifest: PluginManifest & {
145
+ readonly type: "vocal-preset";
146
+ };
147
+ readonly preset: VocalPreset;
148
+ }
149
+ //# sourceMappingURL=vocal-preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vocal-preset.d.ts","sourceRoot":"","sources":["../../src/types/vocal-preset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,0BAA0B;AAC1B,MAAM,MAAM,UAAU,GAChB,SAAS,GACT,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,OAAO,CAAA;AAEb,kCAAkC;AAClC,MAAM,WAAW,MAAM;IACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IACl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;IACtD,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAA;CACrC;AAED,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG;QAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;KAAE,CAAA;IACrE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC/B"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Vocal preset plugin type.
3
+ *
4
+ * Unlike audio/MIDI effect plugins, a vocal preset does **not** create Web
5
+ * Audio nodes. Instead it exports a static `VocalPreset` data object that
6
+ * the DAW's built-in vocal processing chain reads and applies.
7
+ *
8
+ * This means:
9
+ * - No sandbox risks from custom DSP code
10
+ * - Zero latency — processed natively by CollabDAW's vocal engine
11
+ * - Works with the Live Vocals module (`src/lib/live-vocals/`)
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import type { VocalPresetModule } from "@collabhut/plugin-sdk"
16
+ *
17
+ * const module: VocalPresetModule = {
18
+ * manifest: {
19
+ * id: "com.myorg.deep-trap-vocals",
20
+ * name: "Deep Trap Vocals",
21
+ * version: "1.0.0",
22
+ * type: "vocal-preset",
23
+ * description: "Hard-hitting trap vocal chain with heavy pitch correction",
24
+ * author: { name: "My Org" },
25
+ * pricing: "free",
26
+ * minApiVersion: "0.1.0",
27
+ * },
28
+ * preset: {
29
+ * inputGain: 0,
30
+ * outputGain: -3,
31
+ * eq: {
32
+ * enabled: true,
33
+ * bands: [
34
+ * { frequency: 80, gain: -6, q: 0.7, type: "highpass" },
35
+ * { frequency: 200, gain: -3, q: 1.2, type: "peaking" },
36
+ * { frequency: 3000, gain: 4, q: 1.5, type: "peaking" },
37
+ * { frequency: 8000, gain: 5, q: 0.8, type: "highshelf"},
38
+ * { frequency: 16000,gain: -2, q: 0.7, type: "highshelf"},
39
+ * ],
40
+ * },
41
+ * compressor: { enabled: true, threshold: -24, knee: 6, ratio: 6, attack: 0.003, release: 0.15, makeUpGain: 4 },
42
+ * pitchCorrection: { enabled: true, scale: "chromatic", strength: 0.9, speed: 0.05 },
43
+ * chorus: { enabled: false, rate: 0.5, depth: 0.3, delay: 0.02, mix: 0.3 },
44
+ * reverb: { enabled: true, roomSize: 0.2, damping: 0.8, preDelay: 0.01, mix: 0.15 },
45
+ * delay: { enabled: false, time: 0.25, feedback: 0.3, filter: 4000, mix: 0.2 },
46
+ * deEsser: { enabled: true, frequency: 7500, threshold: -30, range: 12 },
47
+ * saturation: { enabled: true, drive: 0.2, mix: 0.4 },
48
+ * },
49
+ * }
50
+ *
51
+ * export default module
52
+ * ```
53
+ */
54
+ export {};
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@collabhut/plugin-sdk",
3
+ "version": "0.1.0",
4
+ "description": "Type-safe SDK for building, publishing, and licensing CollabDAW plugins on CollabHut Marketplace",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "registry": "https://registry.npmjs.org/"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/rootlodge/collabdaw",
14
+ "directory": "packages/collabhut/plugin-sdk"
15
+ },
16
+ "keywords": [
17
+ "collabdaw",
18
+ "collabhut",
19
+ "plugin",
20
+ "audio",
21
+ "daw",
22
+ "web-audio",
23
+ "typescript",
24
+ "music",
25
+ "sdk"
26
+ ],
27
+ "main": "./dist/index.js",
28
+ "module": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "import": "./dist/index.js",
33
+ "types": "./dist/index.d.ts"
34
+ }
35
+ },
36
+ "files": [
37
+ "dist/**/*",
38
+ "README.md",
39
+ "LICENSE"
40
+ ],
41
+ "scripts": {
42
+ "build": "tsc",
43
+ "typecheck": "tsc --noEmit",
44
+ "prepublishOnly": "npm run build"
45
+ },
46
+ "devDependencies": {
47
+ "@collabdaw/typescript-config": "*",
48
+ "typescript": "^5.9.3"
49
+ }
50
+ }