Hi
I would like to know more about PD´s possibilities in order to create links between sound and image. Does to start a PD sript from Flash Animator be possible in order to create animations in which sound and image are manipulated in real-time? How can I do that?
Thanks
Alx
E-mail Premium BOL Antivírus, anti-spam e até 100 MB de espaço. Assine já! http://email.bol.com.br/
Hi, sorry for the belated answer. I sort of figured Olaf Matthes would grab this one. Anyway, there are several ways to do this but all require some sort of work around except for one, and that is using Olaf Matthes flashserver external at http://www.akustische-kunst.de/
Pall ----- Original Message ----- From: "afenerich" afenerich@bol.com.br To: pd-list@iem.kug.ac.at Sent: Sunday, March 30, 2003 1:54 PM Subject: [PD] Flash/PD
Hi
I would like to know more about PD´s possibilities in order to create links between sound and image. Does to start a PD sript from Flash Animator be possible in order to create animations in which sound and image are manipulated in real-time? How can I do that?
Thanks
Alx
E-mail Premium BOL Antivírus, anti-spam e até 100 MB de espaço. Assine já! http://email.bol.com.br/
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
Pall Thayer schrieb:
Hi, sorry for the belated answer. I sort of figured Olaf Matthes would grab this one.
Okay, here I am.... ;-)
Anyway, there are several ways to do this but all require some sort of work around except for one, and that is using Olaf Matthes flashserver external at http://www.akustische-kunst.de/
I just switched on my example patch on the server. At http://radio.akustische-kunst.org/projekt/ is a simple flash frontend that allows to control very simple FM synthesis. The sound is generated in Pd an streamed back to Flash. (only problem is my server: 200MHz Pentium -> Pd crashes quite often... ;-( , so in case there's no sound when clicking 'STREAM' just drop me a note)
Olaf
hey everybody.
I finally did it. Using flext, I've written an external that (at the moment) can play wav, ogg vorbis and mp3 data.
mp3's are decoded with madlib. the whole thing is based on readsf~ and is threaded. it can read mono or stereo, but there's no resampling.
you can download the first alpha (for testing purposes) version here:
http://aug.ment.org/software/readanysf~0.1.tar.gz
I could really use some help from more experience programmers. this is my first threaded app and I admit I don't know too much, just what I've gathered from online tutorials.
some questions:
a) is there any good way to tell if a file is an mp3 or not other
than to check the file ending for ".mp3" ? I can check if it has an "ID3" tag at the header, but most mp3's dont seem to have this.
b.) I sometimes get this error when using the open browser of pd
'invalid command name "0.c"'
c.) sometimes I get some clicking in the file and i dont know if
has to do with where I am placing my mutex.Lock()'s
d.) how do I properly terminate a thread in flext? at the moment
the object hangs pd when you try to delete it. anybody?
TODO:
1. other formats: aiff, nextstep, flac, speex
2. seeking [pcm and time]
3. resampling - up and downscaling
4. speed??
-august.
august wrote:
TODO:
- other formats: aiff, nextstep, flac, speex
this is great!
- seeking [pcm and time]
- resampling - up and downscaling
will you use libsamplerate? http://www.mega-nerd.com/SRC/
- speed??
On Mon, 31 Mar 2003, august wrote:
a) is there any good way to tell if a file is an mp3 or not other than to check the file ending for ".mp3" ? I can check if it has an "ID3" tag at the header, but most mp3's dont seem to have this.
files without the ID3 are detected by /usr/bin/file as MPEG 1.0 Audio Layer 3, which is what an MP3 is. Look in "/usr/share/misc/magic" and "man 5 magic" for details.
Mathieu Bouchard http://artengine.ca/matju
Hi August,
I finally did it. Using flext, I've written an external that (at the moment) can play wav, ogg vorbis and mp3 data.
that's great!
d.) how do I properly terminate a thread in flext? at the moment the object hangs pd when you try to delete it. anybody?
You should use "ShouldExit()" in the thread function to check if the thread should terminate (and if it yields true just return from the function). See the flext tutorial example thread2 for reference.
best greetings, Thomas
Hey Thomas,
thanks for the tip. but there seems to be some probs with the code.
i noticed in your thread2 example that it doesnt really stop the thread. at least not on my machine. I open a test patch with thread2 object and it looks like this with 'ps afmx'
| _ pd -noadc thread.pd | _usr/local/lib/pd/bin/pd-gui | _ pd -noadc thread.pd | _ pd -noadc thread.pd
if I delete the object on the canvas or even close the patch by clicking on the "close" icon from the Window Manager (window maker), it still looks the same as above with 'ps afmx'
with readanysf~ , I am now using the ShouldExit() check in my while statement. If true, I clean up and return. Funny enough, if I delete the object from the canvas, it WILL stop the thread...or at least it goes away with 'ps afmx'. But, if I click the patch away (close it without deleting the object first) the thread seems to stay alive.
hmm - august.
You should use "ShouldExit()" in the thread function to check if the thread should terminate (and if it yields true just return from the function). See the flext tutorial example thread2 for reference.
Hey Thomas,
thanks for the tip. but there seems to be some probs with the code.
i noticed in your thread2 example that it doesnt really stop the thread. at least not on my machine. I open a test patch with thread2 object and it looks like this with 'ps afmx'
| _ pd -noadc thread.pd | _usr/local/lib/pd/bin/pd-gui | _ pd -noadc thread.pd | _ pd -noadc thread.pd
if I delete the object on the canvas or even close the patch by clicking on the "close" icon from the Window Manager (window maker), it still looks the same as above with 'ps afmx'
Duh! I'll look into that... it's a fact that i'm hardly testing under Linux.....
thanks, Thomas
Hi August,
i noticed in your thread2 example that it doesnt really stop the thread. at least not on my machine. I open a test patch with thread2 object and it looks like this with 'ps afmx'
| _ pd -noadc thread.pd | _usr/local/lib/pd/bin/pd-gui | _ pd -noadc thread.pd | _ pd -noadc thread.pd
if I delete the object on the canvas or even close the patch by clicking on the "close" icon from the Window Manager (window maker), it still looks the same as above with 'ps afmx'
i'm not sure if there's anything wrong with that... when a thread is running (see the thread2.pd example patch to start 3 threads) there's a further entry in ps afx. When you delete the object this entry vanished properly.
with readanysf~ , I am now using the ShouldExit() check in my while statement. If true, I clean up and return. Funny enough, if I delete the object from the canvas, it WILL stop the thread...or at least it goes away with 'ps afmx'. But, if I click the patch away (close it without deleting the object first) the thread seems to stay alive.
here's everything just ok. Could you send me your updated source code?
best greetings, Thomas
ok, updated version here:
http://aug.ment.org/software/readanysf~0.1.tar.gz
i'm not sure if there's anything wrong with that... when a thread is running (see the thread2.pd example patch to start 3 threads) there's a further entry in ps afx. When you delete the object this entry vanished properly.
really? when I do it, it sticks around. could it be my gcc (version 3.2) or pd (version 36test10)
btw. I need to do 'ps afmx' if i want to 'see' the threading. i only get pd and the gui thread with 'ps afx'
here's everything just ok. Could you send me your updated source code?
ok. see above.
Thomas, I had a deconstructor where I was locking and unlocking a mutex. that was bad, I guess. I got rid of the mutex locks and now it can be removed from the canvas smoothly (well, it doesnt hang too much anymore, but still hangs).
It even looks as if it is deleting the thread OK. when I start a patch with two readanysf~ objs on the canvas, I can see 4 threads und 'ps aufmx'
when I delete one of the objs, I then only see 3 threads. [dont know what this means, but it looks as if it doing what it should]. however, no matter what I try, when I delete the 2nd obj from the canvas, PD is almost certain to seg fault.
You have any ideas why? the flext version I am using is from CVS, about 1 or 2 weeks old.
I've also tried with such a deconstructor:
readanysf::~readanysf() {
StopThreads();
}
the latest version is here:
http://aug.ment.org/software/readanysf~0.1.tar.gz
thanks - august.
I have a few samples you can look at: http://130.208.220.190 uses html to php to regular netreceive in PD http://130.208.220.190/harmony uses Flash to php to PD netreceive http://130.208.220.190/panse uses the flashserver external for bidirectional comunication between Flash and PD.
PANSE is an open access server. There are files on the website that you can look at for info on creating a Flash controller.
Pall
----- Original Message ----- From: "Olaf Matthes" olaf.matthes@gmx.de To: "pd-list" pd-list@iem.kug.ac.at Sent: Monday, March 31, 2003 6:00 PM Subject: Re: [PD] Flash/PD
Pall Thayer schrieb:
Hi, sorry for the belated answer. I sort of figured Olaf Matthes would
grab
this one.
Okay, here I am.... ;-)
Anyway, there are several ways to do this but all require some sort of work around except for one, and that is using Olaf Matthes flashserver external at http://www.akustische-kunst.de/
I just switched on my example patch on the server. At http://radio.akustische-kunst.org/projekt/ is a simple flash frontend that allows to control very simple FM synthesis. The sound is generated in Pd
an
streamed back to Flash. (only problem is my server: 200MHz Pentium -> Pd
crashes
quite often... ;-( , so in case there's no sound when clicking 'STREAM'
just
drop me a note)
Olaf
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
oops... sorry that middle one should have been http://130.208.220.190/nuharm
Actually Olaf, I'm wondering if flashserver has a bug in it. When I started playing around with it, I had no problem crashing it. I would open 4 or 5 simultaneous connections and then close them in a different order than I opened them and sure enough, it would crash every time. I know very little about programming so I had a friend of mine take a look at it and he was able to make some sort of quick fix. I have no idea what he did but it doesn't crash any more. Oh and another thing, if you're going to prepend a [broadcast] with something, you have to make sure that the prepended message is less than 6 characters long. Otherwise it will crash. I don't remember seeing that in the documentation.
Pall ----- Original Message ----- From: "Pall Thayer" pall@fa.is To: "Olaf Matthes" olaf.matthes@gmx.de; "pd-list" pd-list@iem.kug.ac.at; "afenerich" afenerich@bol.com.br Sent: Monday, March 31, 2003 10:21 PM Subject: Re: [PD] Flash/PD
I have a few samples you can look at: http://130.208.220.190 uses html to php to regular netreceive in PD http://130.208.220.190/harmony uses Flash to php to PD netreceive http://130.208.220.190/panse uses the flashserver external for
bidirectional
comunication between Flash and PD.
PANSE is an open access server. There are files on the website that you
can
look at for info on creating a Flash controller.
Pall
----- Original Message ----- From: "Olaf Matthes" olaf.matthes@gmx.de To: "pd-list" pd-list@iem.kug.ac.at Sent: Monday, March 31, 2003 6:00 PM Subject: Re: [PD] Flash/PD
Pall Thayer schrieb:
Hi, sorry for the belated answer. I sort of figured Olaf Matthes would
grab
this one.
Okay, here I am.... ;-)
Anyway, there are several ways to do this but all require some sort of work around except for one, and that is using Olaf Matthes flashserver external at http://www.akustische-kunst.de/
I just switched on my example patch on the server. At http://radio.akustische-kunst.org/projekt/ is a simple flash frontend
that
allows to control very simple FM synthesis. The sound is generated in Pd
an
streamed back to Flash. (only problem is my server: 200MHz Pentium -> Pd
crashes
quite often... ;-( , so in case there's no sound when clicking 'STREAM'
just
drop me a note)
Olaf
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
Pall Thayer schrieb:
Actually Olaf, I'm wondering if flashserver has a bug in it. When I started playing around with it, I had no problem crashing it. I would open 4 or 5 simultaneous connections and then close them in a different order than I opened them and sure enough, it would crash every time.
Do you use the latest version (which is 0.2d) ? There was a bug with the network sockets that were sometimes closed in a wrong order or left open completely.
Oh and another thing, if you're going to prepend a [broadcast] with something, you have to make sure that the prepended message is less than 6 characters long. Otherwise it will crash. I don't remember seeing that in the documentation.
Sorry, I didn't get what you mean. Could you please send me a patch demonstrating what you're doing?
Olaf