charlesneimog / 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://charlesneimog.github.io/py4pd/
GNU General Public License v3.0
14 stars 2 forks source link

Docs in version 0.8.6, Deken in 0.8.5 #88

Closed jpecquais closed 5 months ago

jpecquais commented 6 months ago

Hello !

I'm trying to use py4pd, but I'm facing an issue. The pd.new_object() method does not seems to work.

CleanShot 2024-02-09 at 15 00 41@2x

The code I'm using is pretty much copy paste from the documentation.

import pd

def onBang():
    return 0

def py4pdLoadObjects():
    # pd.add_object(randomNumber,"test",py_out=True) # without this, py.random will not be available in the patch.
    # pd.add_object(prony_series_iir,"prony_series_iir",py_out=True)
    prony_series_iir = pd.new_object("prony_series_iir")
    prony_series_iir.addmethod_bang(onBang)
    prony_series_iir.add_object()

Am I doing something wrong ?

charlesneimog commented 6 months ago

Hi,

I am sorry, it was my error. I published the Docs before releasing the version in Deken. I had some bugs on Mac OS. The method pd.new_object was added in version 0.8.6.

If you want, you can replace the py4pd externals with the objects here (bottom of page): https://github.com/charlesneimog/py4pd/actions/runs/7845653801.

If you are using Mac OS and find some error on 0.8.6 please let me know!!

After the replacement, your code will work!

jpecquais commented 6 months ago

Hi Charles,

Thank you very much, it has fixed the issue ! I'll let you know if I encounter some problems under MacOS !