Git Product home page Git Product logo

topd's Introduction

A simple Python Interface to Pure Data

Introduction

->pd is a small collection of Python classes to communicate with Pure Data sending FUDI messages by socket.

It’s just a hack. For more serious solutions see PyPd and PyATA.

Prerequisites

To use ->pd you need Pure Data and Python installed:

$ sudo aptitude install puredata

$ sudo aptitude install python

Installation

Download the latest ->pd version at github.com:

$ git clone git://github.com/automata/topd.git

$ cd topd

Using

Run Pure Data:

$ pd receive.pd &

Run your Python interpreter:

$ python

Import ->pd:

>>> from topd import *

Create a “virtual” patch (a connection to receive.pd patch):

>>> p = Patch('receive.pd', 'localhost', 4242)

Create some PD objects:

>>> osc = Object(p, 'osc~ 440')

You can optionally specify x, y position of the object in the patch:

>>> dac = Object(p, 'dac~', 100, 200)

Connect them (note the use of inlets/outlets numbers):

>>> osc.connect(0, dac, 0)
>>> osc.connect(0, dac, 1)

Turn on the DSP:

>>> p.dsp(True)

Disconnect them:

>>> osc.disconnect(0, dac, 0)
>>> osc.disconnect(0, dac, 1)

Delete them:

>>> osc.delete()
>>> dac.delete()

Hack free and enjoy!

For a complete description of all ->pd functions see the API documentation at http://automata.cc/wiki/uploads/Main/topd.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.