# @supercollider/scapi

> Node to SuperCollider communication using OSC and the API quark.

Latest version **1.0.0** (published 2020-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @supercollider/scapi
pnpm add @supercollider/scapi
yarn add @supercollider/scapi
bun add @supercollider/scapi
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-01-09 |
| First published | 2019-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 506 |
| Author | Chris Sattinger |
| Maintainers | crucialfelix |
| Keywords | supercollider |

## Links

- npm: https://www.npmjs.com/package/@supercollider/scapi
- Repository: https://github.com/crucialfelix/supercolliderjs
- Homepage: https://crucialfelix.github.io/supercolliderjs/
- Issues: https://github.com/crucialfelix/supercolliderjs/issues
- npm.io page: https://npm.io/package/@supercollider/scapi

## Dependencies (5)

- [cuid](https://npm.io/package/cuid.md) ^2.1.6
- [tslib](https://npm.io/package/tslib.md) 1.10.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [@supercollider/osc](https://npm.io/package/@supercollider/osc.md) ^1.0.0
- [@supercollider/logger](https://npm.io/package/@supercollider/logger.md) ^1.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-01-09
- 1.0.0-beta.1 — 2019-11-27
- 1.0.0-beta.0 — 2019-11-24
- 1.0.0-alpha.2 — 2019-11-15
- 1.0.0-alpha.1 — 2019-11-05
- 1.0.0-alpha.0 — 2019-10-20

## README

# @supercollider/scapi
[![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url]

<i>Node to SuperCollider communication using OSC and the API quark.</i>

This works together with the 'API' quark to implement a simple two-way communication protocol for node <-> SuperCollider.

It connects with an sclang process using UDP OSC and then sends OSC messages to '/API/call'

The SuperCollider quark is here:
https://github.com/supercollider-quarks/API

And this package is the nodejs side.

Sent messages return a promise, the responses are received here from sclang and the promises are resolved (or rejected if there was an error).

This requires writing named handlers in SuperCollider and registering them with the API. From the node side, you make a call using that name and pass it some args and get back your response.

This was an older solution. Probably just using `@supercollider/lang` is easier now.

Note: this is not included in the [`supercolliderjs`](https://npmjs.org/package/supercolliderjs) package.

## Install

```shell
npm install @supercollider/scapi
```

Start SuperCollider
Install the API quark ( > 2.0 )

## Usage

Start SuperCollider and activate the OSC responders:

```supercollider
API.mountDuplexOSC
```

Documentation
-------------

[Documentation](https://crucialfelix.github.io/supercolliderjs/#/packages/scapi/api)

Compatibility
-------------

Works on Node 10+

Source code is written in TypeScript and is usable in JavaScript [es2018](https://2ality.com/2017/02/ecmascript-2018.html) or [TypeScript](https://www.typescriptlang.org/docs/home.html) projects.

Contribute
----------

- Issue Tracker: https://github.com/crucialfelix/supercolliderjs/issues
- Source Code: https://github.com/crucialfelix/supercolliderjs

License
-------

MIT license

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE

[npm-url]: https://npmjs.org/package/@supercollider/scapi
[npm-version-image]: http://img.shields.io/npm/v/@supercollider/scapi.svg?style=flat
[npm-downloads-image]: http://img.shields.io/npm/dm/@supercollider/scapi.svg?style=flat

[travis-url]: http://travis-ci.org/crucialfelix/supercolliderjs
[travis-image]: https://travis-ci.org/crucialfelix/supercolliderjs.svg?branch=master

---
_Source: https://npm.io/package/@supercollider/scapi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
