grrrr / py Goto Github PK
View Code? Open in Web Editor NEWpy/pyext – Python scripting objects for Pure Data and Max
Home Page: http://grrrr.org/research/software/py
License: Other
py/pyext – Python scripting objects for Pure Data and Max
Home Page: http://grrrr.org/research/software/py
License: Other
In flext, i specified CXXFLAGS & CPPFLAGS = "-fPIC" make
and compiled flext. The compilation completes and the scrolling logs have "-fPIC -DPIC".
In py, when compiling, i get this error message about flext.
symbol `_ZTV11TableAnyMap' can not be used when making a shared object; recompile with -fPIC
How do i resolve this issue?
For beginners (e.g. me) it is very hard to follow the installation instructions in the README. It does not state what needs to be downloaded from where, nor where it should be saved. Might be obvious to regular pd users I guess.
(I still haven't figured this out, hints appreciated.)
Hello,
I have built both flext and py using ./build.sh pd gcc
and I can successfully run the py examples that do not make use of DSP (e.g.: simple-1.pd).
When I try to run an example that make use of DSP like sig-1.pd I get a segmentation fault error.
I put below the back trace.
Any suggestion or hint to solve this issue?
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pd...(no debugging symbols found)...done.
warning: core file may not match specified executable file.
[New LWP 4097]
[New LWP 4106]
[New LWP 4110]
[New LWP 4109]
[New LWP 4112]
[New LWP 4117]
[New LWP 4107]
[New LWP 4119]
[New LWP 4105]
[New LWP 4111]
[New LWP 4108]
[New LWP 4118]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `pd sig-1.pd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f84f24a97f2 in pydsp::NewBuffers() () from /usr/local/lib/pd/extra/py.pd_linux
[Current thread is 1 (Thread 0x7f84f6f33740 (LWP 4097))](gdb) bt
#0 0x00007f84f24a97f2 in pydsp::NewBuffers() () from /usr/local/lib/pd/extra/py.pd_linux
#1 0x00007f84f24a9a08 in pydsp::CbDsp() () from /usr/local/lib/pd/extra/py.pd_linux
#2 0x00007f84f24af96d in flext_dsp_multi::SetupDsp(_signal**) () from /usr/local/lib/pd/extra/py.pd_linux
#3 0x0000000000472241 in ?? ()
#4 0x000000000047277b in ?? ()
#5 0x00000000004739ae in ugen_done_graph ()
#6 0x00000000004138d7 in ?? ()
#7 0x000000000041395f in ?? ()
#8 0x000000000045d4c5 in binbuf_eval ()
#9 0x0000000000456879 in outlet_bang ()
#10 0x000000000045519c in pd_typedmess ()
#11 0x00000000004554f2 in pd_vmess ()
#12 0x000000000041518f in canvas_loadbangsubpatches ()
#13 0x000000000045519c in pd_typedmess ()
#14 0x00000000004554f2 in pd_vmess ()
#15 0x0000000000453a3e in pd_doloadbang ()
#16 0x000000000045e75a in glob_evalfile ()
#17 0x0000000000460f4b in ?? ()
#18 0x0000000000461eae in glob_initfromgui ()
#19 0x000000000045d4c5 in binbuf_eval ()
#20 0x0000000000464934 in socketreceiver_read ()
#21 0x0000000000463db5 in ?? ()
#22 0x0000000000460cc8 in m_mainloop ()
#23 0x00007f84f5d49ac0 in __libc_start_main (main=0x4125e0 <main>, argc=2, argv=0x7ffeca3ff408, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>,
stack_end=0x7ffeca3ff3f8) at libc-start.c:289
#24 0x0000000000412619 in _start ()
(gdb)
Hi,
I'm working on the Signal example in Max 7. As it is, the gain gets set with the "set gain" but the signal is not actually connected to the pyext. So, I connect it, but then when I connect the output from the pyext to, say, the speaker, there is no sound.
How exactly am I supposed to get signals into the pyext objects? They are working otherwise.
Thanks
Binaries will not run in Pd-Extended, no matter installation path. OSX 10.9 Mavericks 64bit.
I do not understand why externals are being compiled universal when it's very clear that Pd only deals with 32bit objects.
I had to modify some parts of the gnumake-mac-gcc.inc
in order to compile against an alternative Python installation (from brew). I'll put them here so it can serve as documentation to anyone having the same problem.
@@ -1,8 +1,8 @@
# don't use -framework Python, since this will stick to the default system version
-_LOCAL_FRAMEWORK := /Library/Frameworks/Python.framework/Versions/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
+_LOCAL_FRAMEWORK := /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework
_SYSTEM_FRAMEWORK := /System/Library/Frameworks/Python.framework/Versions/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
_LOCAL_LIBRARY := /Library/Python/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
_SYSTEM_LIBRARY := /System/Library/Python/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
DEFS += -DPY_EXPORTS
@@ -19,11 +19,11 @@ endif
ifdef PY_NUMARRAY
DEFS += -DPY_NUMARRAY
endif
ifdef PY_NUMPY
DEFS += -DPY_NUMPY
-INCPATH += -I$(_LOCAL_LIBRARY)/python$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)/site-packages/numpy/core/include
+INCPATH += -I/usr/local/lib/python2.7/site-packages/numpy/core/include
ifeq ($(PY_DEFAULT),1)
INCPATH += -I$(_SYSTEM_FRAMEWORK)/lib/python$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)/site-packages/numpy/core/include
INCPATH += -I$(_SYSTEM_FRAMEWORK)/Extras/lib/python/numpy/core/include
else
INCPATH += -I$(_LOCAL_FRAMEWORK)/lib/python$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)/site-packages/numpy/core/include
It would be awesome if this could be configured in config.txt
.
Hello! I am currently trying to use pyext with Max for Live on a Mac. I read the instructions here, downloaded py.package-i386-system-2.7.zip
, unzipped the file, and put them in ~/Documents/Max 8/Packages
. I then opened thread-1.mxb
, but when I opened it, the following error outputted in the Max console:
I'm new to developing in Max, and I would really appreciate some help :)
PyExt not running under Anaconda py2.7 OSX > 10.6
Apparently is a well known issue. Has the system been tested by the developers on Mac? Is there a route to make it work?
Hello,
Following the instructions for building the externals from source, I succeeded in building a 64 bit py object for Max. The only issue I am encountering is with the use of Buffers, as the "No array support" error is prompted on the console. Max's latest SDK has no "ext_types.h" file to change the lines suggested in the readme.txt to make the Array support available. Are there other ways to make it available?
Thank you
Hello,
The main impetus I have for using this external is to interface with MIT's excellent toolkit for computer-assisted musicology, "music21," which parses musicxml music notation files, midi, does musical analyses, and many other things. Unfortunately, music21 has not been compatible with python2 for a couple of years now. I was wondering if there was a way to still make calls to the music21 package without explicitly using Python3, as I know that pyext is a python2 external.
Thanks,
Nakul
Hello @grrrr !
Have you or anyone you know tried this external on ARM / RPi?
Ali
I need to copy py-objectmappings.txt to init folder, which init folder are you talking about. Really interested to get python working on max
Hi,
I've been trying to get PD working with Python 3 and even though I got this external to build with Python 3.6, PD says "can't load library". (A 2.7. build worked fine).
I heard that it is likely due to differences in the C API between Python 2.7 and Python 3, but I'm not too familiar with this area and lost on the topic.
Anyone have experience at this or any good resources? I found this, but don't really know where to go to from here.
I'm working on a Max 7 patch that I hope to use [py]
in. After building from source the first time, I encountered the following:
source/pybase.cpp:490:16: error: no matching function for call to 'locatefile_extended'
bool ok = !locatefile_extended(smod,&path,&type,&type,0);
^~~~~~~~~~~~~~~~~~~
/Users/Shared/Max 7/Packages/max-sdk/source/c74support/max-includes/ext_path.h:310:7: note:
candidate function not viable: no known conversion from 'long *' to 't_fourcc *'
(aka 'unsigned int *') for 3rd argument
short locatefile_extended(char *name, short *outvol, t_fourcc *outtype, C74_CONST t_f...
^
source/pybase.cpp:500:15: error: no matching function for call to 'locatefile_extended'
ok = !locatefile_extended(smod,&path,&type,&type,1);
^~~~~~~~~~~~~~~~~~~
/Users/Shared/Max 7/Packages/max-sdk/source/c74support/max-includes/ext_path.h:310:7: note:
candidate function not viable: no known conversion from 'long *' to 't_fourcc *'
(aka 'unsigned int *') for 3rd argument
short locatefile_extended(char *name, short *outvol, t_fourcc *outtype, C74_CONST t_f...
^
One quick change and it compiled. Suggested addendum to the Max SDK tweaks section:
In the Max 7 SDK change the file
source\c74support\max-includes\ext_path.h, line 310
from
short locatefile_extended(char *name, short *outvol, t_fourcc *outtype, C74_CONST t_fourcc *filetypelist, short numtypes);
to
short locatefile_extended(char *name, short *outvol, long *outtype, C74_CONST long *filetypelist, short numtypes);
Running Max 7.2.1, Mac OSX 10.9.5
Hello Thomas,
I am having a bit of an issue with the latest version available in deken. Everything works as expected until I want to quit Pd. It -just wont close unless I kill it in the terminal. By disabling pyext, pd goes back to working as usual. This is what loads
external py/pyext 0.2.2 - python script objects
(C)2002-2015 Thomas Grill - http://grrrr.org/ext
using Python 2.7.18 (default, Aug 4 2020, 11:16:42)
[GCC 9.3.0]
Python array support enabled
I am running ubuntustudio 20.04 and MXlinux 19.3, crash happens in both OSs,
thanks
Hi
I have pyext up and running on Mac OSX 10.11.5, built-in Python 2.7.10, Pd 0.47.0 64-bit, pyext-local 2.7 (from here: http://grrrr.org/data/dev/ext/macos/pd/py.pd_darwin-i386-x86_64-local-2.7.zip)
I can run the example patches and scripts, but the reload
message in patch sig-1.pd
and sig-2.pd
crashes Pd. It seems to work in other patches, such as sendrecv-1.pd
.
Ok, I actually do get a crash report. I've attached it to this issue.
[pd_2016-06-19-142311_vinnie.crash.zip](https://github.com/grrrr/py/files/322290/pd_2016-06-19-142311_vinnie.crash.zip)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.