https://github.com/konsumer/node-pd
libpd wrapper for nodejs
https://github.com/konsumer/node-pd
Last synced: about 1 year ago
JSON representation
libpd wrapper for nodejs
- Host: GitHub
- URL: https://github.com/konsumer/node-pd
- Owner: konsumer
- Created: 2016-09-30T15:21:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-11-27T23:20:50.000Z (over 3 years ago)
- Last Synced: 2025-03-15T08:48:38.810Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```
Now you can install it in your nodejs project:
```
npm i libpd
```
## usage
See [test.js](./test.js) for example usage, but here is basic idea:
```js
const pd = require('libpd')
// open test.pd patch, from current dir
pd.open('test.pd', __dirname)
.then(() => {
// send a message to the patch
pd.send('loadbang')
// do nothing while audio-loop is running. Ctrl-C will break
while (true) {
// noop
}
})
```