GithubHelp home page GithubHelp logo

grrrr / py Goto Github PK

View Code? Open in Web Editor NEW
181.0 181.0 27.0 680 KB

py/pyext – Python scripting objects for Pure Data and Max

Home Page: http://grrrr.org/research/software/py

License: Other

Max 13.61% Python 7.34% C++ 61.12% Assembly 0.45% HTML 0.53% Makefile 16.95%
maxmsp maxmsp-external pure-data puredata

py's People

Contributors

danomatika avatar grrrr avatar katjav avatar omarcostahamido avatar umlaeute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py's Issues

Cannot compile py to use flext ( recompile to use -fPIC)

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?

Building for Python 3

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.

py external hangs Pd vanilla 0.51 when closing

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

Not running under Anaconda py2.7 OSX

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?

Is there a way to call music21 (python3 package) within pyext(currently python2)

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

py: unable to load object bundle executable when including Max packages

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:

screen shot 2019-01-27 at 10 43 53 pm

I'm new to developing in Max, and I would really appreciate some help :)

Using brew Python in OSX

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.

Installation instructions

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.)

installation osx - init folder

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

Problems running binaries on OSX

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.

reload msg crashes PD

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)

Building from source for Max 7 - compile tweaks

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

How to use signal Example on Max 7?

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

Segmentation fault with sig-1.pd example

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) 

"No array support" error

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

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.