Re: [PD] Developing a python-mysqql-database-soundfile-player was: accessing mysql database

2007-04-14 Thread sven

What still does not work, but its not a problem since i hardcoded  
the connection setup to the server.
But sending the message

connect localhost root user pwd database(

gives me

could not log into MySQL Server.

defining the variables within the script does work.

mysql_host = localhost
mysql_user = root
mysql_pwd = user
mysql_db = pwd

The python-code is (Thanks to Georg Holzmann):
 ---
# methods

def connect(host_=, user_=, db_name_=, pwd_=):
 connect to MySQL server 
global db
global cursor
try:
db = MySQLdb.connect(host=str(host_), user=str(user_), 
passwd=str (pwd_), db=str(db_name_))
cursor = db.cursor()
print PD mysql: logged into MySQL server !
return 1
except:
print PD mysql: could not log into MySQL server !
return 0
 


there's lot's of different things that can go wrong when connecting to a db.
the very generic try,except clause here is problematic because it doesn't really
help you finding the exact error.
use the code below to know what exactly went wrong and let us know the error 
message.
add the print traceback.format_exc() also to your execute function.
concerning getting the results, indexing lists on so on the best idea is to 
store
the results inside python and access it via python functions so indexing is 
easy, clean and
reliable and you don't have to bother trying that directly in pd (which is a
major PITA if not impossible).
and while this is likely to become a bit more complex it's also a good idea to 
wrap up
the whole mess into a class anyway.
i can give you an example later today if you don't know what i mean.

- - -
import traceback

def connect(host_=, user_=, db_name_=, pwd_=):
 connect to MySQL server 
global db
global cursor
try:
db = MySQLdb.connect(host=str(host_), user=str(user_), passwd=str 
(pwd_), db=str(db_name_))
cursor = db.cursor()
print PD mysql: logged into MySQL server !
return 1
except:
print '-'*76
print MySQL Error!
print '-'*76
print traceback.format_exc()
print '-'*76
return 0
- - -


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Developing a python-mysqql-database-soundfile-player was: accessing mysql database

2007-04-14 Thread sven

What still does not work, but its not a problem since i hardcoded  
the connection setup to the server.
But sending the message

connect localhost root user pwd database(

gives me

could not log into MySQL Server.

defining the variables within the script does work.

(snip)

try:
db = MySQLdb.connect(host=str(host_), user=str(user_), 
 passwd=str (pwd_), db=str(db_name_))
cursor = db.cursor()
print PD mysql: logged into MySQL server !
return 1
except:
print PD mysql: could not log into MySQL server !
return 0

there's lot's of different things that can go wrong when connecting to a db.
the very generic try,except clause here is problematic because it doesn't really
help you finding the exact error.
use the code below to know what exactly went wrong and let us know the error 
message.
add the print traceback.format_exc() also to your execute function.
concerning getting the results, indexing lists on so on the best idea is to 
store
the results inside python and access it via python functions so indexing is 
easy, clean and
reliable and you don't have to bother trying that directly in pd (which is a
major PITA if not impossible).
and while this is likely to become a bit more complex it's also a good idea to 
wrap up
the whole mess into a class anyway.
i can give you an example later today or tommorrow if you don't know what i 
mean.

- - -
import traceback

def connect(host_=, user_=, db_name_=, pwd_=):
 connect to MySQL server 
global db
global cursor
try:
db = MySQLdb.connect(host=str(host_), user=str(user_), passwd=str 
(pwd_), db=str(db_name_))
cursor = db.cursor()
print PD mysql: logged into MySQL server !
return 1
except:
print '-'*76
print MySQL Error!
print '-'*76
print traceback.format_exc()
print '-'*76
return 0
- - -


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] hid, routing different devices

2007-04-14 Thread moritz
ola

i'm playing around with a lot of usb-devices (joysticks/gamepads)..

my problem is i want to route all this devices, but choosing a device by 
its hex value or name don't work with my hid. (compiled on Oct 9 2006 on 
übüntü däppr, i also tried a hid from a recent autobuild..)

Because i want to connect the devices ignoring the order of plugging in, 
the devices are every time on a different /dev/input/*..

how can i route the different devices? the [info( -message outputs me a 
stressful symbol with spaces in the name.

thanx for any hints..

eo

moritz

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Osc--music made with PD

2007-04-14 Thread Steffen Leve Poulsen
Hi all,

Here- http://steffen.menneske.dk/ocs/ -is some live performed music, 
made with PD.


Enjoy

mvh/ Steffen Leve Poulsen

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] hid, routing different devices

2007-04-14 Thread Hans-Christoph Steiner

I don't quite understand what you want to do. You want to be able to  
select the same device everytime using the hex value?  If that's what  
you mean, unfortunately that onyl works on Mac OS X right now.  We  
are working on [hidio] now, the [hid] replacement, which should  
support this on all platforms.

.hc

On Apr 14, 2007, at 12:28 PM, moritz wrote:

 ola

 i'm playing around with a lot of usb-devices (joysticks/gamepads)..

 my problem is i want to route all this devices, but choosing a  
 device by
 its hex value or name don't work with my hid. (compiled on Oct 9  
 2006 on
 übüntü däppr, i also tried a hid from a recent autobuild..)

 Because i want to connect the devices ignoring the order of  
 plugging in,
 the devices are every time on a different /dev/input/*..

 how can i route the different devices? the [info( -message outputs  
 me a
 stressful symbol with spaces in the name.

 thanx for any hints..

 eo

 moritz

 ___
 [EMAIL PROTECTED] mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
 listinfo/pd-list



 


News is what people want to keep hidden and everything else is  
publicity.  - Bill Moyers



___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] hid, routing different devices

2007-04-14 Thread Frank Barknecht
Hallo,
moritz hat gesagt: // moritz wrote:

 i'm playing around with a lot of usb-devices (joysticks/gamepads)..
 
 my problem is i want to route all this devices, but choosing a device by 
 its hex value or name don't work with my hid. (compiled on Oct 9 2006 on 
 übüntü däppr, i also tried a hid from a recent autobuild..)
 
 Because i want to connect the devices ignoring the order of plugging in, 
 the devices are every time on a different /dev/input/*..
 
 how can i route the different devices? the [info( -message outputs me a 
 stressful symbol with spaces in the name.

Are you already using udev? It has this nice automatic labelling
system, where you can access devices by id and by name. For example
here it looks like this: 

$ ls -l  /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 9 Apr 14 19:16 usb-_0667-event-joystick - ../event5
lrwxrwxrwx 1 root root 9 Mar  4 11:53 
usb-Logitech_USB-PS.2_Optical_Mouse-event-mouse - ../event4
lrwxrwxrwx 1 root root 9 Mar  4 11:53 usb-Logitech_USB-PS.2_Optical_Mouse-mouse 
- ../mouse0

The device IDs will always stay the same. It is probably possible to use these 
for [hid].

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Osc--music made with PD

2007-04-14 Thread Javier García
do you have the lyrics?


From: Steffen Leve Poulsen [EMAIL PROTECTED]
To: PD List [EMAIL PROTECTED]
Subject: [PD] Osc--music made with PD
Date: Sat, 14 Apr 2007 19:27:53 +0200

Hi all,

Here- http://steffen.menneske.dk/ocs/ -is some live performed music,
made with PD.


Enjoy

mvh/ Steffen Leve Poulsen

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list

_
Moda para esta temporada. Ponte al día de todas las tendencias. 
http://www.msn.es/Mujer/moda/default.asp


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Osc--music made with PD

2007-04-14 Thread Andy Farnell
Strange synchronicity. I'm watching Dr Who tonight 
and the words King sized crustaceans crawl from the
sewer ... it's actually happening (on TV, not in my
house..fortunately I have my trusty anti-killer-lobster-hammer 
always close to hand)

how weird is that?

a.

On Sat, 14 Apr 2007 19:27:53 +0200
Steffen Leve Poulsen [EMAIL PROTECTED] wrote:

 Hi all,
 
 Here- http://steffen.menneske.dk/ocs/ -is some live performed music, 
 made with PD.
 
 
 Enjoy
 
 mvh/ Steffen Leve Poulsen
 
 ___
 [EMAIL PROTECTED] mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list


-- 
Use the source

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] hid, routing different devices

2007-04-14 Thread Hans-Christoph Steiner

On Apr 14, 2007, at 1:18 PM, Frank Barknecht wrote:

 Hallo,
 moritz hat gesagt: // moritz wrote:

 i'm playing around with a lot of usb-devices (joysticks/gamepads)..

 my problem is i want to route all this devices, but choosing a  
 device by
 its hex value or name don't work with my hid. (compiled on Oct 9  
 2006 on
 übüntü däppr, i also tried a hid from a recent autobuild..)

 Because i want to connect the devices ignoring the order of  
 plugging in,
 the devices are every time on a different /dev/input/*..

 how can i route the different devices? the [info( -message outputs  
 me a
 stressful symbol with spaces in the name.

 Are you already using udev? It has this nice automatic labelling
 system, where you can access devices by id and by name. For example
 here it looks like this:

 $ ls -l  /dev/input/by-id/
 total 0
 lrwxrwxrwx 1 root root 9 Apr 14 19:16 usb-_0667-event-joystick - 
  ../event5
 lrwxrwxrwx 1 root root 9 Mar  4 11:53 usb-Logitech_USB-PS. 
 2_Optical_Mouse-event-mouse - ../event4
 lrwxrwxrwx 1 root root 9 Mar  4 11:53 usb-Logitech_USB-PS. 
 2_Optical_Mouse-mouse - ../mouse0

 The device IDs will always stay the same. It is probably possible  
 to use these for [hid].

How does it do keep the device ID the same (i.e. what's the device ID  
based on)?  From what I have seen, there isn't a way to do this is  
the USB serial number field isn't used (and it's rarely used).   
Usually, USB device IDs are built up from port number, bus number and  
maybe some info from the device plugged in.  But obviously, if you  
plug a device into a different port, such a device ID will change.

Also, how does udev deal with multiple USB devices of the exact same  
type?

.hc


 Ciao
 -- 
  Frank Barknecht _ __footils.org_ __goto10.org__

 ___
 [EMAIL PROTECTED] mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
 listinfo/pd-list



 


There is no way to peace, peace is the way.   -A.J. Muste



___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] GEM: animations

2007-04-14 Thread Javier García
Hi,

Im interested in adding 3D models with integrated animations.

An example: I know is possible loading any .obj model, for example a 
helicopter, but if i animate the propellers of the helicopter in Wafefront, 
could i take not only the helicopter but even the animated propellers to GEM 
(OpenGL)?

_
Acepta el reto MSN Premium: Protección para tus hijos en internet. 
Descárgalo y pruébalo 2 meses gratis. 
http://join.msn.com?XAPID=1697DI=1055HL=Footer_mailsenviados_proteccioninfantil


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] GEM: animations

2007-04-14 Thread chris clepper

I added support for OBJ groups a few years ago.  You can load just a group
and rotate it for example.  Check the docs for your modeling app on how to
make and export groups into .obj.

The multimodel object allows for a range of models to be loaded and then
called using the right inlet.  The old Quake animations used a series of
models for the animations loaded into display lists.

On 4/14/07, Javier García [EMAIL PROTECTED] wrote:


Hi,

Im interested in adding 3D models with integrated animations.

An example: I know is possible loading any .obj model, for example a
helicopter, but if i animate the propellers of the helicopter in
Wafefront,
could i take not only the helicopter but even the animated propellers to
GEM
(OpenGL)?

_
Acepta el reto MSN Premium: Protección para tus hijos en internet.
Descárgalo y pruébalo 2 meses gratis.

http://join.msn.com?XAPID=1697DI=1055HL=Footer_mailsenviados_proteccioninfantil


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management -
http://lists.puredata.info/listinfo/pd-list

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] GEM: animations

2007-04-14 Thread Roman Haefeli
without being a gem proof at all, i'd export both, the body and the
propeller, as separate models. it shouldn't be that hard to 'join' them
again in gem space. since the animation is simply a rotation, this
should be easy to implement.

roman

On Sat, 2007-04-14 at 18:55 -0400, marius schebella wrote:
 I also would like to know, if that is possible.
 It could be possible with gl shaders. but I am not sure and would like 
 to hear an answer from chris or iohannes.
 max for example has a basic morphing feature between two shapes. 
 programs in which you can do realtime model animation on vertex basis 
 (or even higher level?) are as far as I know blender and gameengines 
 like ogre, to which you can talk through osc.
 marius.
 
 Javier García wrote:
  Hi,
  
  Im interested in adding 3D models with integrated animations.
  
  An example: I know is possible loading any .obj model, for example a 
  helicopter, but if i animate the propellers of the helicopter in Wafefront, 
  could i take not only the helicopter but even the animated propellers to 
  GEM 
  (OpenGL)?
  
  _
  Acepta el reto MSN Premium: Protección para tus hijos en internet. 
  Descárgalo y pruébalo 2 meses gratis. 
  http://join.msn.com?XAPID=1697DI=1055HL=Footer_mailsenviados_proteccioninfantil
  
  
  ___
  [EMAIL PROTECTED] mailing list
  UNSUBSCRIBE and account-management - 
  http://lists.puredata.info/listinfo/pd-list
  
 
 
 ___
 [EMAIL PROTECTED] mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list






___ 
Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] GEM: animations

2007-04-14 Thread chris clepper

GEM has an unfinished vertex_array branch that allows for per vertex
manipulations.  I never found a very satisfactory way to deal with large
sets of data in PD so the objects are very primitive.

On 4/14/07, marius schebella [EMAIL PROTECTED] wrote:


I also would like to know, if that is possible.
It could be possible with gl shaders. but I am not sure and would like
to hear an answer from chris or iohannes.
max for example has a basic morphing feature between two shapes.
programs in which you can do realtime model animation on vertex basis
(or even higher level?) are as far as I know blender and gameengines
like ogre, to which you can talk through osc.
marius.


___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Seeking Pd in Galway, Dublin, Zurich, Oslo, Basel

2007-04-14 Thread Greg Pond
To Pd'ers in Europe:

 I am going to be working for most of the month of May in western
Ireland, working on Pd- based sound installation in some old
buildings. I wont be too far from Galway and will be passing through
Oslo, Dublin and London. I will be working for a few days at the F+F
School of Art in Zurich and screening videos in Basel. If anyone can
point me to fellow Pd'ers or noteworthy projects in these places
please contact me off-list. I would like to see what is happening out
there.

thanks,

 Greg

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] [PD-announce] Pd-0.39.2-extended-rc1 released

2007-04-14 Thread Hans-Christoph Steiner

http://at.or.at/hans/pd/installers.html

Ok, finally another release for Pd-0.39.2-extended. After a long  
pause, it's time for a code freeze and debugging. That means Release  
Candidate 1. Yes, there are known bugs, and most definitely unknown  
bugs. Let's find them and make a final release!

There are two important changes in this release:

   * DejaVu Sans Mono is now default font
   * same sizes and layout on all platforms

That means you need to install the font DejaVu Sans Mono if you  
don't already have it installed:

http://dejavu.sourceforge.net/wiki/index.php/Main_Page

The use of this font is not set in stone, we can use another, but it  
needs to be free.  Here are some screenshots of the fonts that I tried:

http://pow.idmi.poly.edu/~hans/pdfonts/

.hc


 


Man has survived hitherto because he was too ignorant to know how to  
realize his wishes.  Now that he can realize them, he must either  
change them, or perish.-William Carlos Williams



___
PD-announce mailing list
[EMAIL PROTECTED]
http://lists.puredata.info/listinfo/pd-announce

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [PD-announce] Pd-0.39.2-extended-rc1 released

2007-04-14 Thread Kevin McCoy
I think that font looks great, much classier than courier... and it's
nice to have the same font size/layout.  Thanks for your work on that.

Kevin

On 4/14/07, Hans-Christoph Steiner [EMAIL PROTECTED] wrote:

 http://at.or.at/hans/pd/installers.html

 Ok, finally another release for Pd-0.39.2-extended. After a long
 pause, it's time for a code freeze and debugging. That means Release
 Candidate 1. Yes, there are known bugs, and most definitely unknown
 bugs. Let's find them and make a final release!

 There are two important changes in this release:

* DejaVu Sans Mono is now default font
* same sizes and layout on all platforms

 That means you need to install the font DejaVu Sans Mono if you
 don't already have it installed:

 http://dejavu.sourceforge.net/wiki/index.php/Main_Page

 The use of this font is not set in stone, we can use another, but it
 needs to be free.  Here are some screenshots of the fonts that I tried:

 http://pow.idmi.poly.edu/~hans/pdfonts/

 .hc


 
 

 Man has survived hitherto because he was too ignorant to know how to
 realize his wishes.  Now that he can realize them, he must either
 change them, or perish.-William Carlos Williams



 ___
 PD-announce mailing list
 [EMAIL PROTECTED]
 http://lists.puredata.info/listinfo/pd-announce

 ___
 [EMAIL PROTECTED] mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list



-- 



http://pocketkm.blogspot.com

___
[EMAIL PROTECTED] mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list