Registry / ai-ml / tstosc

tstosc

JSON →
library0.0.2jsnpmunverified

A transpiler converting TypeScript to SuperCollider's SCLang. Version 0.0.2, experimental/unstable, released 2025-01-15 (first version). Differentiators: enables using TypeScript syntax/type-checking for SuperCollider music/audio programming, writes classes to SuperCollider User Extension folder. Built with Node.js, ESM-only, no peer dependencies.

npm install tstosc
INSTALL
IMPORT
SIG · TSTOSC
T
tstosc
ai-mljavascriptv0.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tstosc
✓ import tstosc from 'tstosc'
✗ const tstosc = require('tstosc')
Package is ESM-only, named export may change. Check README for CLI usage.

Shows global install and basic CLI transpilation from TypeScript to SuperCollider SCLang.

// Install globally npm install -g tstosc // Transpile a TypeScript file (e.g., test.ts) tstosc ./test.ts // Converts ./test.ts to ./test.sc // Example test.ts content: // const freq = 440; // const duration = 0.5; // Synth('sine', { freq, gate: 1, out: 0 }); // After running tstosc, check test.sc: // cat test.sc
tstosc --version
Debug
Known issues
gotchaPackage is highly experimental (v0.0.2). May produce unreliable or incorrect SCLang code.
fix
Always review generated .sc files before use in SuperCollider.
affects: >=0.0.0
gotchaClass definitions are written to SuperCollider's User Extension folder, potentially overwriting existing files.
fix
Back up your SuperCollider extensions or run in a test environment.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'tstosc'
Package not installed or not in PATH when using CLI.
fix
Ensure global installation: npm install -g tstosc
SyntaxError: Unexpected token 'export'
Running transpiled output with Node.js instead of SuperCollider.
fix
Use the .sc file in SuperCollider, not Node.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
tstosc — npm install tstosc · libregistry