# libpd

> libpd wrapper for nodejs

Latest version **0.0.3** (published 2022-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install libpd
pnpm add libpd
yarn add libpd
bun add libpd
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-11-27 |
| First published | 2022-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | David Konsumer |
| Maintainers | konsumer |
| Keywords | puredata, libpd |

## Links

- npm: https://www.npmjs.com/package/libpd
- Repository: https://github.com/konsumer/node-pd
- Homepage: https://github.com/konsumer/node-pd#readme
- Issues: https://github.com/konsumer/node-pd/issues
- npm.io page: https://npm.io/package/libpd

## Dependencies (1)

- [ffi-napi](https://npm.io/package/ffi-napi.md) ^4.0.3

## Recent versions

- 0.0.3 (latest) — 2022-11-27
- 0.0.2 — 2022-11-27

## README

# node-libpd

libpd wrapper for nodejs

This will allow you to load [puredata](https://puredata.info/) patches and interact with them in nodejs.

Tested on M1 & Intel mac, but it should work fine on anything that can install nodejs and libpd.

## installation

You will need libpd nstalled.

To install/build libpd:

```
git clone --recursive https://github.com/libpd/libpd.git
cd libpd
make UTIL=true EXTRA=true
sudo make install
```

## usage

See [test.js](./test.js) for example usage.

```js
const pd = require('libpd')

// open test.pd patch, from current dir
pd.open('test.pd', __dirname)
  .then(() => {
    console.log('ok.')
    // send a message to the patch
    pd.send('loadbang')
    
    // do nothing while audio-loop is running. Ctrl-C will break
    while (true) {
    // noop
    }
  })
```

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