hrithik18k/punck-tscircuit-recreation
A four-layer Eurorack drum/sampler controller PCB built around an STM32H743, dual QSPI flash, PCM5100 stereo DAC, TL074 analog audio circuitry, input clamps, 12V-to-3.3V power regulation, MIDI/USB/SWD connectors, controls, LEDs, and trigger/audio I/O.
- Version
- 1.0.3
- License
- unset
- Stars
- 0
scripts/render.ts
import fs from 'node:fs'
import {convertCircuitJsonToPcbSvg} from 'circuit-to-svg'
import sharp from 'sharp'
for(const n of ['Components','Controls','Panel']) {
const json=JSON.parse(fs.readFileSync(`prepared/${n.toLowerCase()}.circuit.json`,'utf8'))
const svg=convertCircuitJsonToPcbSvg(json)
fs.writeFileSync(`dist/${n}.svg`,svg)
await sharp(Buffer.from(svg)).resize({width:1000}).png().toFile(`dist/${n}.png`)
}