py4pd

py4pd allows write PureData objects using Python. The main goal is to allow easy IA, Scores, Graphics, and bring to Pd data types as array, np.arrays, list, dict, and others.

https://github.com/charlesneimog/py4pd

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords

puredata python
Last synced: 6 months ago · JSON representation ·

Repository

py4pd allows write PureData objects using Python. The main goal is to allow easy IA, Scores, Graphics, and bring to Pd data types as array, np.arrays, list, dict, and others.

Basic Info
Statistics
  • Stars: 21
  • Watchers: 3
  • Forks: 5
  • Open Issues: 0
  • Releases: 19
Topics
puredata python
Created over 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

Logo

py4pd

Python in the PureData environment.

License Release DOI

py4pd allows write PureData Objects using Python instead of C/C++. The main goal is to allow easy IA, Scores, Graphics, and bring to Pd possibilities with array, list and others types. With Python, you can: * Parse svg/draws as scores; * OpenMusic functions in libraries like om_py, music21, neoscore, and others; * Sound analisys with magenta, librosa, and pyAudioAnalaysis;

Wiki | How to install and Use

  • Go to Docs (outdated for now), check Sources/py4pd folder for examples.

New Pd Object using Python

``` py import puredata as pd import os

class pymetro(pd.NewObject): name: str = "pymetro"

def __init__(self, args):
    self.inlets = 2
    self.outlets = 1
    self.toggle = False
    if len(args) > 0:
        self.time = float(args[0])
    else:
        self.time = 1000
    self.metro = self.new_clock(self.tick)
    self.args = args
    pd.post("here", os.environ["PY4PD_PATH"])

def in_2_float(self, f: float):
    self.time = f

def in_1_float(self, f: float):
    if f:
        self.toggle = True
        self.tick()
    else:
        self.metro.unset()
        self.toggle = False

def in_1_reload(self, args: list):
    self.reload()

def tick(self):
    if self.toggle:
        self.metro.delay(self.time)
    self.out(0, pd.SYMBOL, "test238")

```

Building from Source

  • To build from the source code: sh cmake . -B build -DPYVERSION=3.12 cmake --build build

On windows you need Mingw64.

Owner

  • Name: Charles K. Neimog
  • Login: charlesneimog
  • Kind: user
  • Location: São Paulo - Brazil
  • Company: Universidade de São Paulo

Charles K. Neimog is a Ph.D. candidate at the University of São Paulo. I research Art/Music and Technology.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Neimog"
  given-names: "Charles K."
  orcid: "https://orcid.org/0000-0002-9780-0041"

title: "py4pd: Bringing Python to PureData"
version: 0.8.1
doi: 10.5281/zenodo.1234
date-released: 2023-10-04
url: "https://github.com/charlesneimog/py4pd"

GitHub Events

Total
  • Issues event: 2
  • Watch event: 7
  • Delete event: 1
  • Issue comment event: 5
  • Push event: 115
  • Pull request event: 4
  • Fork event: 3
  • Create event: 2
Last Year
  • Issues event: 2
  • Watch event: 7
  • Delete event: 1
  • Issue comment event: 5
  • Push event: 115
  • Pull request event: 4
  • Fork event: 3
  • Create event: 2