Re: [PD] Random test

2009-10-26 Thread Andrew Faraday

That is surely off topic, but why wouldn't I wish His blessings on everyone?

 Date: Mon, 26 Oct 2009 04:51:29 +0100
 From: ydego...@gmail.com
 To: jbtur...@hotmail.com
 CC: pd-list@iem.at
 Subject: Re: [PD] Random test
 
 
  God Bless
 
 God Bless who exactly?
 not everyone for sure...
  
_
New Windows 7: Find the right PC for you. Learn more.
http://www.microsoft.com/windows/buy/ ___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Pd-GUI-Rewrite test builds

2009-10-26 Thread colet . patrice

hello,

I've tried to build on cygwin, but no luck, it didn't work, simply crashes,
with --disable-asio --disable-portaudio, without disabling it doesn't build.

 So I tried a nightly build and submitted [openpanel] fix the other day,
I'd like to know how to enable tcl plugins, do I have to put a line in
pkgIndex.tcl and pd-gui.tcl for each plugin? Because I tried to drag the files
from there to there, it has no effect...

 Will it be possible to put sophisticated plugins like a (real) pianoroll?


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] PD in manchester?

2009-10-26 Thread Andrew Faraday

Hey All

I'm interested in the possibility of starting a PD workshop/patching circle in 
Manchester (england). There's a few things I'd like to check, tho. 

1: Is anyone interested in becoming part of a peer-to-peer learning PD group in 
Manchester?

2: Does anyone know of a similar project happening nearby?

Also any advice on the format of these workshops/meetings would be welcome.


Thanks and God Bless

Andrew
  
_
Download Messenger onto your mobile for free
http://clk.atdmt.com/UKM/go/174426567/direct/01/___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pdp_freeframe and pdp_fei0r for OSX

2009-10-26 Thread Hans-Christoph Steiner


Post your build errors and we can take it from there.

.hc

On Oct 26, 2009, at 6:22 AM, Kasper Jordaens wrote:

I'm interested in pdvjtools on OSX too, I quickly tried to compile  
them, so far no luck, I have to invest some more time in it, it  
definitely does not compile out of the box...


K
On Mon, Oct 26, 2009 at 5:33 AM, Hans-Christoph Steiner  
h...@at.or.at wrote:


On Oct 26, 2009, at 12:05 AM, ydego...@gmail.com wrote:

Pagano, Patrick wrote:
Is it possible to get these working for OSX?
I would like to use them for a project working with a macintosh I  
already have them working on ubuntu ppc linux, but i potentially  
have a faster mac that does not have linux on it.

Has anyone go them working on OSX?

pp
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


that gets us back to an old debate..

why pdvjtools is not in pd-extended?
and who decides in all the cases ?

sorry, makes me laugh you asked that just now...

sevy

cuanto pesa el cielo sobre nuestras cabezas y que denso es el mar  
que no quiere hundir la humanidad y solo espera el deshielo

madamE


No one has done the work to get it included...  that's the only  
thing I see that's preventing it.


.hc




Mistrust authority - promote decentralization.  - the hacker ethic




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list







Terrorism is not an enemy.  It cannot be defeated.  It's a tactic.   
It's about as sensible to say we declare war on night attacks and  
expect we're going to win that war.  We're not going to win the war on  
terrorism.- retired U.S. Army general, William Odom



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [multitouch] for Mac OS X/iPhoneOS

2009-10-26 Thread Hans-Christoph Steiner


It is based on the Apple MultitouchSupport.framework.  For Linux, it  
would have to use a Linux driver.  Since I don't have one of those  
trackpads, I haven't investigated the Linux options.


.hc

On Oct 26, 2009, at 4:48 AM, Kasper Jordaens wrote:


works smoothly! (see screenshot in attachment) up to 7 fingers

OSX 10.5.8 Macbook Pro 5,3
could I compile this for linux too? I also have ubuntu 9.04 on this  
laptop


regards

Kasper



On Mon, Oct 26, 2009 at 3:03 AM, Hans-Christoph Steiner  
h...@at.or.at wrote:


Hey all,

I made an object for the 'apple' library called [multitouch] which  
gives you access to data from multitouch devices like the new fancy  
trackpads and the iPhone/iPod Touch.  Think of it like [hid] for the  
multitouch data.  You get the data all the time, separate from the  
OS, regardless of which app has focus.


I don't have one of those fancy trackpads, so please tell me if it  
works for you.


.hc






Information wants to be free.-Stewart Brand



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


PD_multitouch.png






Information wants to be free.-Stewart Brand


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [multitouch] for Mac OS X/iPhoneOS

2009-10-26 Thread Loic Kessous

could it work with the new apple kind of multi-touch mouse and an iMac ?
or with the new wacom multi-touch tablet ?
loic

On 26 oct. 09, at 09:48, Kasper Jordaens wrote:


works smoothly! (see screenshot in attachment) up to 7 fingers

OSX 10.5.8 Macbook Pro 5,3
could I compile this for linux too? I also have ubuntu 9.04 on this  
laptop


regards

Kasper



On Mon, Oct 26, 2009 at 3:03 AM, Hans-Christoph Steiner  
h...@at.or.at wrote:


Hey all,

I made an object for the 'apple' library called [multitouch] which  
gives you access to data from multitouch devices like the new fancy  
trackpads and the iPhone/iPod Touch.  Think of it like [hid] for the  
multitouch data.  You get the data all the time, separate from the  
OS, regardless of which app has focus.


I don't have one of those fancy trackpads, so please tell me if it  
works for you.


.hc






Information wants to be free.-Stewart Brand



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


PD_multitouch.png___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd-GUI-Rewrite test builds

2009-10-26 Thread Hans-Christoph Steiner


On Oct 26, 2009, at 7:03 AM, colet.patr...@free.fr wrote:



hello,

I've tried to build on cygwin, but no luck, it didn't work, simply  
crashes,
with --disable-asio --disable-portaudio, without disabling it  
doesn't build.


Hmm, I wonder what it is, I got it going on Cygwin when I tried, but  
haven't tried in a while.


So I tried a nightly build and submitted [openpanel] fix the other  
day,

I'd like to know how to enable tcl plugins, do I have to put a line in
pkgIndex.tcl and pd-gui.tcl for each plugin? Because I tried to drag  
the files

from there to there, it has no effect...


Any file called *-plugin.tcl in your Pd path will be loaded at start  
time.


Will it be possible to put sophisticated plugins like a (real)  
pianoroll?


Carmen did one a while back, you could make a GUI plugin pianoroll,  
but I think using mescalinum's tclpd, you could make a nice pianoroll  
object.


.hc




All mankind is of one author, and is one volume; when one man dies,  
one chapter is not torn out of the book, but translated into a better  
language; and every chapter must be so translated -John Donne




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [multitouch] for Mac OS X/iPhoneOS

2009-10-26 Thread Hans-Christoph Steiner


Donno, I have none of those things.  Just try it and report back.  Its  
easy to try.


.hc

On Oct 26, 2009, at 10:42 AM, Loic Kessous wrote:

could it work with the new apple kind of multi-touch mouse and an  
iMac ?

or with the new wacom multi-touch tablet ?
loic

On 26 oct. 09, at 09:48, Kasper Jordaens wrote:


works smoothly! (see screenshot in attachment) up to 7 fingers

OSX 10.5.8 Macbook Pro 5,3
could I compile this for linux too? I also have ubuntu 9.04 on this  
laptop


regards

Kasper



On Mon, Oct 26, 2009 at 3:03 AM, Hans-Christoph Steiner h...@at.or.at 
 wrote:


Hey all,

I made an object for the 'apple' library called [multitouch] which  
gives you access to data from multitouch devices like the new fancy  
trackpads and the iPhone/iPod Touch.  Think of it like [hid] for  
the multitouch data.  You get the data all the time, separate from  
the OS, regardless of which app has focus.


I don't have one of those fancy trackpads, so please tell me if it  
works for you.


.hc






Information wants to be free.-Stewart Brand



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


PD_multitouch.png___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list










Programs should be written for people to read, and only incidentally  
for machines to execute.

 - from Structure and Interpretation of Computer Programs

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Help - DIO errors jack+ffado+RT kernel

2009-10-26 Thread Ricardo Lameiro
hello everyone!

Well I have a little problem with DIO errors in PD.
It seams that it doesn't like the period/buffer set to 3 in jack.
When I set the period/buffer in jack to 2 it works without DIO errors, but
as I am using firewire device, the external device gets really unstable
leading to a driver crash (normally it is recommended to use 3
periods/buffer in firewire devices). When I set de buffer/periods to 3, jack
and the device works great, but PD starts to have a lot of DIO errors.

For the record I tested a multitude of settings, both the PD side and jack
side.
I am using 2.6.24-24-rt Kernel, and starting jack and PD with the -rt flags.

Distro is UbuntuStudio 8.04.3.
I tested the diferent settings both at 48k and 44.1k and frames that go from
64 to 512 or eve 1024.
the only  more stable conf I made gave me an audio latency of 20 ms.

I ask is someone has some ideas in ho to solve this problem and also if the
20 ms latency is acceptable or not for a live performance, using PD as a
effect box with pitchifters, loopers, synth using fiddle etc...

P.S.I alsoio tried to use diferent values on PD's flags -audiobuf.

Sorry for this big and anoying mail.

Thanks

Ricardo Lameiro

-- 
Fagote / Contrafagote
Bassoon / Contra-bassoon
http://myspace.com/ricardolameiro
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [multitouch] for Mac OS X/iPhoneOS

2009-10-26 Thread Hans-Christoph Steiner


I don't know anything about the wii whiteboard, but I am sure its  
possible given enough work.


.hc

On Oct 26, 2009, at 11:03 AM, Ricardo Lameiro wrote:


Could it be possible to use the wii whiteboard for that multi pseudo
touch in linux or in macOSX? maybe it would be interesting for using
in projected images on a wall..

2009/10/26 Hans-Christoph Steiner h...@at.or.at:


It is based on the Apple MultitouchSupport.framework.  For Linux,  
it would
have to use a Linux driver.  Since I don't have one of those  
trackpads, I

haven't investigated the Linux options.
.hc
On Oct 26, 2009, at 4:48 AM, Kasper Jordaens wrote:

works smoothly! (see screenshot in attachment) up to 7 fingers

OSX 10.5.8 Macbook Pro 5,3
could I compile this for linux too? I also have ubuntu 9.04 on this  
laptop


regards

Kasper



On Mon, Oct 26, 2009 at 3:03 AM, Hans-Christoph Steiner h...@at.or.at 


wrote:


Hey all,

I made an object for the 'apple' library called [multitouch] which  
gives
you access to data from multitouch devices like the new fancy  
trackpads and
the iPhone/iPod Touch.  Think of it like [hid] for the multitouch  
data.  You
get the data all the time, separate from the OS, regardless of  
which app has

focus.

I don't have one of those fancy trackpads, so please tell me if it  
works

for you.

.hc







Information wants to be free.-Stewart Brand



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -
http://lists.puredata.info/listinfo/pd-list



PD_multitouch.png




Information wants to be free.-Stewart Brand


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -
http://lists.puredata.info/listinfo/pd-list






--
Fagote / Contrafagote
Bassoon / Contra-bassoon
http://myspace.com/ricardolameiro






Using ReBirth is like trying to play an 808 with a long stick.- 
David Zicarelli




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] list-tuplet

2009-10-26 Thread Ichabod
My computer is busy at the moment, but I'm really excited to add this to my
Pd avant-prog arsenal!  Also, I love the Zappaesque name.
--Stefán
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pdp_freeframe and pdp_fei0r for OSX

2009-10-26 Thread Pagano, Patrick
I think an initial problem might be if people have preinstalled pd-extended 
they may not have pd, pdp and pidip sources installed already.
Certainly Freeframe1.5 and fri0r latest will have to be built too



From: pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] On Behalf Of 
Pagano, Patrick
Sent: Monday, October 26, 2009 10:20 AM
To: Hans-Christoph Steiner; Kasper Jordaens
Cc: PD List
Subject: Re: [PD] pdp_freeframe and pdp_fei0r for OSX

I brought the machine today too...lets do this!

pp

From: pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] On Behalf Of 
Hans-Christoph Steiner
Sent: Monday, October 26, 2009 10:07 AM
To: Kasper Jordaens
Cc: PD List
Subject: Re: [PD] pdp_freeframe and pdp_fei0r for OSX


Post your build errors and we can take it from there.

.hc

On Oct 26, 2009, at 6:22 AM, Kasper Jordaens wrote:

I'm interested in pdvjtools on OSX too, I quickly tried to compile them, so far 
no luck, I have to invest some more time in it, it definitely does not compile 
out of the box...

K
On Mon, Oct 26, 2009 at 5:33 AM, Hans-Christoph Steiner 
h...@at.or.atmailto:h...@at.or.at wrote:

On Oct 26, 2009, at 12:05 AM, ydego...@gmail.commailto:ydego...@gmail.com 
wrote:
Pagano, Patrick wrote:
Is it possible to get these working for OSX?
I would like to use them for a project working with a macintosh I already have 
them working on ubuntu ppc linux, but i potentially have a faster mac that does 
not have linux on it.
Has anyone go them working on OSX?

pp
___
Pd-list@iem.atmailto:Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list
that gets us back to an old debate..

why pdvjtools is not in pd-extended?
and who decides in all the cases ?

sorry, makes me laugh you asked that just now...

sevy

cuanto pesa el cielo sobre nuestras cabezas y que denso es el mar que no 
quiere hundir la humanidad y solo espera el deshielo
madamE

No one has done the work to get it included...  that's the only thing I see 
that's preventing it.

.hc




Mistrust authority - promote decentralization.  - the hacker ethic




___
Pd-list@iem.atmailto:Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list






Terrorism is not an enemy.  It cannot be defeated.  It's a tactic.  It's about 
as sensible to say we declare war on night attacks and expect we're going to 
win that war.  We're not going to win the war on terrorism.- retired 
U.S. Army general, William Odom


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] PdLANParty

2009-10-26 Thread Chris McCormick
Hi All,

I've updated PdLANParty to make it easier to write your own servers:

http://mccormick.cx/projects/PdLANParty/

Example code from the README file:

Set up a new PdLANServer object:

p = PdLANParty() # create the server
p.Launch() # launch the server off in a separate thread

Use the PdLANServer object to communicate with all patches. Something like this
should go in your main-loop:

p.PostMessage(['drum', '5', 'bang'])# send a message to all 
connected patches
p.GetMesssages() # get an array of arrays containing messages from 
clients

Here is an example of what kind of data will be sent and received:

Pd Client connects
Server receives: ['connected', '1']
Pd Client receives: server ip 192.168.2.113;
Pd Client receives: server id 1;
Server sends: ['drum', '5', 'bang']
Pd Client receives: drum 5 bang;
Pd Client sends: this is my test;
Server receives: ['this', 'is', 'my', 'test']

Hope this is useful to someone.

Best,

Chris.

On Sun, Oct 25, 2009 at 10:32:05AM +, Chris McCormick wrote:
 Hi,
 
 This is a client-server system for associating Pd patches (Or RjDj scenes) 
 with
 eachother on the local area network, or wifi network automatically. Start the
 server lanparty.py and then put the object [lanparty] into your patch. Any
 message into the [lanparty] object will be replicated to all other connected
 patches on the network, at the outlet of their [lanparty] object.
 
 http://mccormick.cx/projects/PdLANParty/
 
 Chris.
 
 ---
 http://mccormick.cx
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
---
http://mccormick.cx

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] [PD-announce] Call for projects | PlayLab: Laboratory of experimentation with video games

2009-10-26 Thread Medialab-Prado comunicacion

*
Call for projects:
PlayLab: Laboratory of experimentation with video games**

*
Deadline: *November 25, 2009 *
Call for collaborators: *December 14, 2009 through January 20, 2010
*

Teachers: *Mar Canet, Antonin Fourneau*, and *Abelardo Gil-Fournier*. 
Coordinated by *Flavio Escribano

*Venue: *Medialab-Prado* in Madrid (Spain)*
*

Call for the presentation of proposals to be carried out within the 
collaborative production workshop that will take place in Medialab-Prado 
(Madrid, Spain) on January (21 to 24) and February (4 to 7), 2010.


PlayLab aims to explore the context of games and video games as a space 
for creativity, experimentation, learning and reflection. It also aims 
to create an environment that leads to collaborative work in which 
different disciplines come together.


PlayLab's activities are proposed as an open and participatory research 
process from which one can approach video games, a phenomenon that is 
becoming more extensive and influent in Contemporary Society, and 
explore its critical potential, its learning possibilities and its 
capacity to create social spaces that go beyond the purely commercial 
and standardized. PlayLab is also interested in the history of games and 
video games as it examines its possible genealogies and studies its 
social, cognitive and psychological effects characteristic of video 
games today.



Check the call guidelines and submit your project before *November 25, 
2009. *No entry fees.*

*

More information and call guidelines:
http://medialab-prado.es/article/convocatoria_playlab_laboratorio_de_experimentacion_con_videojuegos
playlab (at) medialab-prado.es


With the collaboration of ArsGames and PlayStation®

*
Venue:*
Medialab-Prado
Plaza de las Letras
Calle Alameda, 15
28014 Madrid (Spain)


--
Nerea García Garmendia
Comunicación / Press
Medialab-Prado
Área de Las Artes, Ayuntamiento de Madrid
Plaza de las Letras
Alameda, 15 28014 Madrid
Tfno. +34 914 202 754
difus...@medialab-prado.es
www.medialab-prado.es



Antes de imprimir este documento asegúrate de que es realmente necesario. ¡Gracias 
por tu colaboración!

___
Pd-announce mailing list
pd-annou...@iem.at
http://lists.puredata.info/listinfo/pd-announce
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [multitouch] for Mac OS X/iPhoneOS

2009-10-26 Thread Loic Kessous
yeah... as soon as I will buy one of them ;-) ..so as soon as I will  
get some money to do this ...

loic

On 26 oct. 09, at 15:45, Hans-Christoph Steiner wrote:



Donno, I have none of those things.  Just try it and report back.   
Its easy to try.


.hc

On Oct 26, 2009, at 10:42 AM, Loic Kessous wrote:

could it work with the new apple kind of multi-touch mouse and an  
iMac ?

or with the new wacom multi-touch tablet ?
loic

On 26 oct. 09, at 09:48, Kasper Jordaens wrote:


works smoothly! (see screenshot in attachment) up to 7 fingers

OSX 10.5.8 Macbook Pro 5,3
could I compile this for linux too? I also have ubuntu 9.04 on  
this laptop


regards

Kasper



On Mon, Oct 26, 2009 at 3:03 AM, Hans-Christoph Steiner h...@at.or.at 
 wrote:


Hey all,

I made an object for the 'apple' library called [multitouch] which  
gives you access to data from multitouch devices like the new  
fancy trackpads and the iPhone/iPod Touch.  Think of it like [hid]  
for the multitouch data.  You get the data all the time, separate  
from the OS, regardless of which app has focus.


I don't have one of those fancy trackpads, so please tell me if it  
works for you.


.hc






Information wants to be free.-Stewart Brand



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


PD_multitouch.png___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list










Programs should be written for people to read, and only incidentally  
for machines to execute.

 - from Structure and Interpretation of Computer Programs



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] OSC

2009-10-26 Thread Jaime Oliver
Hi all,

Does anyone know of a later implementation of OSC for Pd, besides
Martin Peach's 2006?

best,

J

-- 
Jaime E Oliver LR

joliv...@ucsd.edu
www.realidadvisual.org/jaimeoliver
www-crca.ucsd.edu/
www.realidadvisual.org

858 202 1522
9168 Regents Rd. Apt. G
La Jolla, CA 92037
USA

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] OSC

2009-10-26 Thread Martin Peach

Jaime Oliver wrote:

Hi all,

Does anyone know of a later implementation of OSC for Pd, besides
Martin Peach's 2006?


Some changes since then:
http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/mrpeach/osc/

Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] pthread external template

2009-10-26 Thread patrick

hi,

here's a pthread template that works for me:
http://www.workinprogress.ca/pure-data-external-pthread-template/

pat


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] problem making an audio-thread-safe external

2009-10-26 Thread patrick

hi,

here's my template for a threaded external. i had to use pthread, 
because polling an usb device was causing glitches in pd. since i didn't 
want to have 2 instance of pd (1 for polling usb + netsend, 1 for audio 
+ netreceive) i came up with this solution. i am sure it's dirty and 
unstable, but at least no more glitches...


if anyone can tight it up, it could be a nice template for anyone who 
wants to build a thread safe external!


pat
#include m_pd.h
#include stdio.h
#include stdlib.h
#include string.h
#include pthread.h

typedef struct _pdexterna
{
	t_object 		p_ob;	// object header - ALL pd external MUST begin with this...
	void 			*outlets[OUTLETS];		// handle to the objects outlets
	intx_verbose;
	
	pthread_attr_t 	pdexterna_thread_attr;
	pthread_t	x_threadid;
} t_pdexterna;

void *pdexterna_class;	// global pointer to the object class - so pd can reference the object 

// ==
// Function Prototypes
// --
void *pdexterna_new(t_symbol *s);
void pdexterna_bang(t_pdexterna *x);

// =
// Thread crap
// =
static void *usb_thread_read(void *w)
{
	t_pdexterna *x = (t_pdexterna*) w;
	while(1) {
		pthread_testcancel();
		//sys_lock();
		pdexterna_bang(x);
		//sys_unlock();
	}
}

static void usb_thread_start(t_pdexterna *x)
{

	// create the worker thread
if(pthread_attr_init(x-pdexterna_thread_attr)  0)
	{
   error(pdexterna: could not launch receive thread);
   return;
}
if(pthread_attr_setdetachstate(x-pdexterna_thread_attr, PTHREAD_CREATE_DETACHED)  0)
	{
   error(pdexterna: could not launch receive thread);
   return;
}
if(pthread_create(x-x_threadid, x-pdexterna_thread_attr, usb_thread_read, x)  0)
	{
   error(pdexterna: could not launch receive thread);
   return;
}
else
{
   if(x-x_verbose)post(pdexterna: thread %d launched, (int)x-x_threadid );
}
}



//--
// - Message: bang  - poll pdexterna
//--
void pdexterna_bang(t_pdexterna *x)	// poll pdexterna
{
		//whatever
}


//--
// - Object creation and setup
//--
int pdexterna_setup(void)
{
	pdexterna_class = class_new ( gensym(pdexterna),(t_newmethod)pdexterna_new, 0, sizeof(t_pdexterna), 	CLASS_DEFAULT,0);
	
	// Add message handlers
	class_addbang(pdexterna_class, (t_method)pdexterna_bang);
	post(pdexterna version 0.1,0);
	return 1;
}

//--
void *pdexterna_new(t_symbol *s)		// s = optional argument typed into object box (A_SYM) -- defaults to 0 if no args are typed
{
	t_pdexterna *x;	// local variable (pointer to a t_pdexterna data structure)
	x = (t_pdexterna *)pd_new(pdexterna_class);			 // create a new instance of this object

x-x_verbose = 1;

	int i;
	
	// create outlets and assign it to our outlet variable in the instance's data structure
	for (i=0; i  OUTLETS; i++) {
		x-outlets[i] = outlet_new(x-p_ob, s_float);
	}	

usb_thread_start(x);

	return x; // return a reference to the object instance 
}

//--
// - Object destruction
//--
void pdexterna_free(t_pdexterna *x)
{
		while(pthread_cancel(x-x_threadid)  0)
			if(x-x_verbose)post(pdexterna: killing thread\n);
		if(x-x_verbose)post(pdexterna: thread canceled\n);
		
}
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] test

2009-10-26 Thread patrick

please ignore

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] OSC

2009-10-26 Thread Jaime Oliver
great thanks!

I'll check them out,

J

On Mon, Oct 26, 2009 at 8:15 PM, Martin Peach martin.pe...@sympatico.ca wrote:
 Jaime Oliver wrote:

 Hi all,

 Does anyone know of a later implementation of OSC for Pd, besides
 Martin Peach's 2006?

 Some changes since then:
 http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/mrpeach/osc/

 Martin





-- 
Jaime E Oliver LR

joliv...@ucsd.edu
www.realidadvisual.org/jaimeoliver
www-crca.ucsd.edu/
www.realidadvisual.org

858 202 1522
9168 Regents Rd. Apt. G
La Jolla, CA 92037
USA

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list