@vessel-dsp/compiler 0.8.0 → 0.9.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 (46) hide show
  1. package/dist/compile.d.ts.map +1 -1
  2. package/dist/compile.js +46 -0
  3. package/dist/compile.js.map +1 -1
  4. package/dist/device-laws.d.ts +20 -0
  5. package/dist/device-laws.d.ts.map +1 -1
  6. package/dist/device-laws.js +185 -17
  7. package/dist/device-laws.js.map +1 -1
  8. package/dist/diagnostics.d.ts +1 -1
  9. package/dist/diagnostics.d.ts.map +1 -1
  10. package/dist/diagnostics.js +1 -1
  11. package/dist/diagnostics.js.map +1 -1
  12. package/dist/fixtures/circuits.d.ts +29 -4
  13. package/dist/fixtures/circuits.d.ts.map +1 -1
  14. package/dist/fixtures/circuits.js +145 -4
  15. package/dist/fixtures/circuits.js.map +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/latch-seed.d.ts +76 -14
  21. package/dist/latch-seed.d.ts.map +1 -1
  22. package/dist/latch-seed.js +184 -41
  23. package/dist/latch-seed.js.map +1 -1
  24. package/dist/lower.d.ts.map +1 -1
  25. package/dist/lower.js +33 -14
  26. package/dist/lower.js.map +1 -1
  27. package/dist/netlist.d.ts.map +1 -1
  28. package/dist/netlist.js +96 -3
  29. package/dist/netlist.js.map +1 -1
  30. package/dist/part-catalog.d.ts.map +1 -1
  31. package/dist/part-catalog.js +130 -15
  32. package/dist/part-catalog.js.map +1 -1
  33. package/dist/partition.js +4 -4
  34. package/dist/partition.js.map +1 -1
  35. package/dist/registry-data/bjt.d.ts.map +1 -1
  36. package/dist/registry-data/bjt.js +318 -1
  37. package/dist/registry-data/bjt.js.map +1 -1
  38. package/dist/registry-data/index.d.ts.map +1 -1
  39. package/dist/registry-data/index.js +8 -4
  40. package/dist/registry-data/index.js.map +1 -1
  41. package/dist/registry-data/jfet.d.ts.map +1 -1
  42. package/dist/registry-data/jfet.js +163 -0
  43. package/dist/registry-data/jfet.js.map +1 -1
  44. package/dist/types.d.ts +110 -5
  45. package/dist/types.d.ts.map +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"part-catalog.d.ts","sourceRoot":"","sources":["../src/part-catalog.ts"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAeN,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI5D,OAAO,EACN,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAoIzD,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CA+B5D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAkC9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAkC5D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,GAAG,QAAQ,GACpB,SAAS,CAkEX;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CA6B5D;AA+BD,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAInD,CAAC;AA02QF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,SAAS,SAAS,EAAE,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AE,aAAa,GAAG,SAAS,CA6B5D;AA+BD,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAInD,CAAC;AA89QF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,IAAI,GAAE,SAAS,mBAAmB,EAAyB,EAC3D,UAAU,GAAE,aAAa,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAA0B,GAClH,SAAS,SAAS,EAAE,CAgHtB;AAeD,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAUlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC"}
@@ -5143,9 +5143,10 @@ const entries = [
5143
5143
  // `runoffgroove-tremulus-lune`'s packet cites a real VTL5C2 datasheet current-resistance curve
5144
5144
  // (R@1mA=5.5k, R@10mA=800, R@40mA=200, dark>=1M) that this row's placeholder bounds
5145
5145
  // (ldrMinOhms=100, ldrMaxOhms=10M with the generic exp(-1000*amps) law) put 56.7% of the way to
5146
- // fully dark at a genuinely-lit 0.567 mA. None of the other parts here carry a cited curve, so
5147
- // this row is untouched -- moving them to chase the one part that has evidence is the mistake
5148
- // this repo calls a seventeenth spelling table.
5146
+ // fully dark at a genuinely-lit 0.567 mA. The `P873G35` spellings split out the same way
5147
+ // below (a third-party measured power-law fit, provisional). None of the other parts here
5148
+ // carry a cited curve, so this row is untouched -- moving them to chase the parts that have
5149
+ // evidence is the mistake this repo calls a seventeenth spelling table.
5149
5150
  {
5150
5151
  "partIds": [
5151
5152
  "PC817",
@@ -5153,10 +5154,7 @@ const entries = [
5153
5154
  "VTL5C1",
5154
5155
  "VTL3C3",
5155
5156
  "VTL5C3",
5156
- "VTL5C4",
5157
- "P873G35-380",
5158
- "P873G35",
5159
- "P873G35380"
5157
+ "VTL5C4"
5160
5158
  ],
5161
5159
  "declaredTypes": [],
5162
5160
  "terminalRoleGroups": [
@@ -5212,6 +5210,115 @@ const entries = [
5212
5210
  ]
5213
5211
  }
5214
5212
  },
5213
+ // --- P873G35 / P873G35-380 (measured table cell; unblocks boss-aw-2) -------------------------------------------------------------
5214
+ //
5215
+ // Own entry, split out of the PC817/MOC3021 row above the way `VTL5C2` already was:
5216
+ // `boss-aw-2` files the part as `P873G35-38`, which exact folded equality does not
5217
+ // match to any existing id, so the device fell to the optocoupler class default and
5218
+ // sat at megohms through the lamp's whole 0.02-0.5 mA sweep. `P873G35-38` joins this
5219
+ // entry's `partIds` by the 2026-10-23 owner decision (the service note's `-38` reads
5220
+ // as the `-380` grade). The law is the geometric mean of 18 measured P873-G35-380
5221
+ // units in a 2005 hobbyist table (electro-music.org topic 27276, 22 C), stored as a
5222
+ // measured `ldrTableCurrentAmps`/`ldrTableOhms` table and evaluated by log-log
5223
+ // interpolation -- NOT a manufacturer curve; the Hamamatsu sheets available list
5224
+ // neither `-380` nor `-38` with a resistance-vs-current curve. A single power-law fit
5225
+ // cannot cover this cell: fitted over 0.3-20 mA (`ohms = 105.6 * amps^-0.4360`,
5226
+ // max residual x1.14) it gives ~11 kohm at 0.03 mA where the measured geometric
5227
+ // mean is 60.1 kohm, so a low-current circuit like the AW-2's lamp (0.02-0.5 mA)
5228
+ // cannot relax as low as the real pedal. The table carries the six measured points
5229
+ // directly (0.03, 0.1, 0.3, 1, 10, 20 mA -> 60.1, 11.5, 4.03, 1.88, 0.74, 0.64 kohm),
5230
+ // so no fit range has to be picked per pedal. The LED figures and both clamps
5231
+ // keep the generic row's values exactly (1.6 V, 1e-3, 100 ohm, 1e7). The table is
5232
+ // third-party evidence, so both table parameters ride `provisionalParams` and compile
5233
+ // raises `registry-provisional-value` for devices that run on them -- the same
5234
+ // mechanism the `2SC2458`/`2SC2459` community saturation currents use.
5235
+ {
5236
+ "partIds": [
5237
+ "P873G35",
5238
+ "P873G35-380",
5239
+ "P873G35380",
5240
+ "P873G35-38"
5241
+ ],
5242
+ "declaredTypes": [],
5243
+ "terminalRoleGroups": [
5244
+ [
5245
+ "ledanode",
5246
+ "anode",
5247
+ "led_anode",
5248
+ "pin1"
5249
+ ],
5250
+ [
5251
+ "ledcathode",
5252
+ "cathode",
5253
+ "led_cathode",
5254
+ "pin2"
5255
+ ],
5256
+ [
5257
+ "ldra",
5258
+ "a",
5259
+ "ldr_a",
5260
+ "pin3"
5261
+ ],
5262
+ [
5263
+ "ldrb",
5264
+ "b",
5265
+ "ldr_b",
5266
+ "pin4"
5267
+ ]
5268
+ ],
5269
+ "provisionalParams": [
5270
+ {
5271
+ "name": "ldrTableCurrentAmps",
5272
+ "url": "https://electro-music.org/forum/topic-27276.html"
5273
+ },
5274
+ {
5275
+ "name": "ldrTableOhms",
5276
+ "url": "https://electro-music.org/forum/topic-27276.html"
5277
+ }
5278
+ ],
5279
+ "model": {
5280
+ "kind": "sections",
5281
+ "sections": [
5282
+ {
5283
+ "law": {
5284
+ "kind": "optocoupler",
5285
+ "ledThresholdVolts": 1.6,
5286
+ "ledTransconductance": 0.001,
5287
+ "ldrMinOhms": 100,
5288
+ "ldrMaxOhms": 10000000,
5289
+ "ldrTableCurrentAmps": [
5290
+ 0.00003,
5291
+ 0.0001,
5292
+ 0.0003,
5293
+ 0.001,
5294
+ 0.01,
5295
+ 0.02
5296
+ ],
5297
+ "ldrTableOhms": [
5298
+ 60100,
5299
+ 11500,
5300
+ 4030,
5301
+ 1880,
5302
+ 740,
5303
+ 640
5304
+ ]
5305
+ },
5306
+ "terminals": [
5307
+ 0,
5308
+ 1,
5309
+ 2,
5310
+ 3
5311
+ ]
5312
+ }
5313
+ ],
5314
+ "pinout": [
5315
+ "led_anode",
5316
+ "led_cathode",
5317
+ "ldr_a",
5318
+ "ldr_b"
5319
+ ]
5320
+ }
5321
+ },
5215
5322
  // --- Vactec VTL5C2 (unblocks runoffgroove-tremulus-lune) ----------------------------------------------------------------------
5216
5323
  //
5217
5324
  // Own entry, split out of the PC817/MOC3021 row above (2026-09-15). `runoffgroove-tremulus-lune`
@@ -5220,12 +5327,12 @@ const entries = [
5220
5327
  // R@10mA=800, R@40mA=200, dark/off resistance >=1M. Those three points are linear in log-log
5221
5328
  // space (pairwise slopes -0.837 and -1.000), which the generic bucket's exponential-in-current
5222
5329
  // law cannot fit at any choice of constant -- confirmed by attempting the fit and finding no
5223
- // sane solution (see changelog). `ldrPowerLawCoefficientOhms`/`ldrPowerLawExponent` are a
5224
- // least-squares power-law fit to those three anchors instead: `ohms = 11.9861 *
5225
- // amps^-0.892233`, clamped to `[ldrMinOhms, ldrMaxOhms]`. Residuals against the cited anchors:
5226
- // +3.5% at 1 mA, -8.8% at 10 mA, +5.9% at 40 mA. `ldrMaxOhms` is tightened to 1e6 (the packet's
5227
- // own cited dark floor) from the generic bucket's placeholder 1e7; `ldrMinOhms` keeps the
5228
- // generic 100 ohm floor, which the datasheet does not further constrain below the 40 mA point.
5330
+ // sane solution (see changelog). The cell is the three cited anchors as a measured
5331
+ // `ldrTableCurrentAmps`/`ldrTableOhms` table (no fit): 1, 10, 40 mA -> 5.5k, 800, 200 ohm,
5332
+ // evaluated by log-log interpolation, clamped to `[ldrMinOhms, ldrMaxOhms]`. `ldrMaxOhms`
5333
+ // is tightened to 1e6 (the packet's own cited dark floor) from the generic bucket's
5334
+ // placeholder 1e7; `ldrMinOhms` keeps the generic 100 ohm floor, which the datasheet
5335
+ // does not further constrain below the 40 mA point.
5229
5336
  {
5230
5337
  "partIds": [
5231
5338
  "VTL5C2"
@@ -5267,8 +5374,16 @@ const entries = [
5267
5374
  "ledTransconductance": 0.001,
5268
5375
  "ldrMinOhms": 100,
5269
5376
  "ldrMaxOhms": 1000000,
5270
- "ldrPowerLawCoefficientOhms": 11.9861,
5271
- "ldrPowerLawExponent": -0.892233
5377
+ "ldrTableCurrentAmps": [
5378
+ 0.001,
5379
+ 0.01,
5380
+ 0.04
5381
+ ],
5382
+ "ldrTableOhms": [
5383
+ 5500,
5384
+ 800,
5385
+ 200
5386
+ ]
5272
5387
  },
5273
5388
  "terminals": [
5274
5389
  0,