Hi Thomas,
I hope someone will find the time to integrate the flext-based externals into
the autobuild structure.
Sorry but I can't: it's beyond my skills.
I've got another problem now (ubuntu 9.04 64-bit machine PD 0.42.5):
in the example buffer-1.pd (py/pyext) there's a strange behaviour:
the message [mul array3 array1 array2< works only on the first half of the array3
instead the message [add array3 array1 array2<
the difference is in th buffer.py:
def mul(*args):
# create buffer objects
# as long as these variables live the underlying buffers are locked
c = pyext.Buffer(args[0])
a = pyext.Buffer(args[1])
b = pyext.Buffer(args[2])
# slicing causes Python arrays (mapped to buffers) to be created
# note the c[:] - to assign contents you must assign to a slice of the buffer
c[:] = a[:]*b[:]
def add(*args):
c = pyext.Buffer(args[0])
a = pyext.Buffer(args[1])
b = pyext.Buffer(args[2])
# explicit casting to arrays is also possible
c[:] = N.array(a,dtype=N.float32) + N.array(b,dtype=N.float32)
therefore I think that:
- the direct use of the buffer doesn't work well (printing the values give me something like "0 0.123 0 0.234 0 0.345 etc.. " - correct values followed by a zero)
- the casting works well
My questions are:
- am I missing some basic concept?
- this behaviour is correct (I don't think so)?
- this behaviour is due to the 64-bit?
Thanks, ciao, Dario.
PS: Sorry for the bad english.
thanks for your kind words. I haven't given up the hope that someday
someone will find the time to integrate the flext-based externals into
the autobuild structure and, consequently, pd-extended.
gr~~~
2010/3/9 Dario Pedrioli <dariopedrioli@gmail.com>:
> Thanks a lot Thomas.
>
> Now it compile fine!
>
> I pick the occasion to say that your work for pd (flext, pool, py, etc...)
> is fantastic. Many many many thanks!
>
> ciao, Dario
>
> 2010/3/9 Thomas Grill <gr@grrrr.org>
>>
>> Hi Dario,
>> please check out py from svn and try again.
>> gr~~~
>> Am 09.03.2010 um 09:48 schrieb Dario Pedrioli:
>>
>> Hi all,
>>
>> I'm trying to compile py/pyext on ubuntu 9.04 64-bit machine PD 0.42.5
>>
>> with flext rev 3659 I've got no problems.
>>
>> with flext rev 3723 I've got the error below:
>>
>> ubuntu@ubuntu-desktop:~/pd/
>> source/py_3723$ sh ../flext_3723/build.sh pd gcc
>> make -f ../flext_3723/buildsys/gnumake-sub.mak PLATFORM=lnx RTSYS=pd
>> COMPILER=gcc BUILDPATH=../flext_3723/buildsys/ PKGINFO=package.txt
>> BUILDCLASS=ext USRCONFIG=config.txt USRMAKE=build/gnumake-lnx-gcc.inc
>> TARGETMODE=release TARGETTYPE=multi THREADED=1 _build_
>> make[1]: ingresso nella directory ?/home/ubuntu/pd/source/py_3723?
>> mkdir -p pd-linux/release-multi/
>> g++ -c -pthread -fPIC -fvisibility-inlines-hidden -DPY_EXPORTS
>> -DPY_NUMPY -DPY_USE_GIL -DNDEBUG -DFLEXT_THREADS -DFLEXT_SYS=2 -DPD
>> -I/usr/include/python2.6 -I/home/ubuntu/pd/source/pd-0.42-5/src
>> -I/usr/local/include/stk -I/usr/local/include/sndobj
>> -I/usr/local/include/flext source/pybuffer.cpp -o
>> pd-linux/release-multi/pybuffer.opp
>> source/pybuffer.cpp:154: warning: deprecated conversion from string
>> constant
>> to ?char*?
>> source/pybuffer.cpp: In function ?int buffer_ass_slice(PyObject*,
>> Py_ssize_t, Py_ssize_t, PyObject*)?:
>> source/pybuffer.cpp:406: error: no matching function for call to
>> ?flext_multi::CopySamples(flext_multi::buffer::Element*, t_sample*, int&)?
>> /usr/local/include/flext/flsupport.h:425: note: candidates are: static
>> void
>> flext_multi::CopySamples(t_sample*, const t_sample*, int)
>>
>> Someone can help?
>>
>> PS: I'm trying rev 3723 because of 64-bit buffer patch (
>>
>> http://markmail.org/message/6v52tlvllwvcwilj#query:+page:1+mid:6hpplp4wfi4u6vkc+state:results<gr@grrrr.org>
>> )
>> My goal is to handle arrays directly in python, but with the rev 3659 I'm
>> only get half of the array inside py (the other half is set to zero). Am I
>> on the right way to fix my problem?
>>
>> Thanks and ciao!
>> _______________________________________________
>> Pd-dev mailing list
>> Pd-dev@iem.at
>> http://lists.puredata.info/listinfo/pd-dev
>>
>
>