Hey Is there a way for pd to expose it's tables to another application and have both applications able to modify the table. For instance I would like to make a graphical interface to a patch using juce. I would like to be able to draw something in a graph in juce and have the table in pd instantly(as fast as drawing on a graph in pd) update. Would I have to compile the juce program as an external? Or is there a way for them to both read and write to the same data without compiling as an external? My programming skills are a bit rusty but I would like to get back to programming.
Sounds like something that would be best done in C or C++. Since JUCE
is already C++, then might as well stay with C++, right? Then just
look at any of the tab* objects to see how to read tables.
.hc
On Mar 28, 2011, at 9:45 PM, Billy Stiltner wrote:
Hey Is there a way for pd to expose it's tables to another application and have both applications able to modify the table. For instance I would like to make a graphical interface to a patch using juce. I would like to be able to draw something in a graph in juce and have the table in pd instantly(as fast as drawing on a graph in pd) update. Would I have to compile the juce program as an external? Or is there a way for them to both read and write to the same data without compiling as an external? My programming skills are a bit rusty but I would like to get back to programming.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
If you are not part of the solution, you are part of the problem.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Billy Stiltner wrote:
Hey Is there a way for pd to expose it's tables to another application and
I think there is [pix_share] using shared memory to communicate with another Pd instance, and there is the pdsend and pdreceive shell commands, which you could pipe stuff to and fro.
have both applications able to modify the table. For instance I would like to make a graphical interface to a patch using juce.
Or write stuff into a sound file and reload that into the table every time your data has updated. Possibly not very elegant either.
best, 23456 P
Le 29/03/2011 12:57, Peter Plessas a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Billy Stiltner wrote:
Hey Is there a way for pd to expose it's tables to another application and
I think there is [pix_share] using shared memory to communicate with another Pd instance, and there is the pdsend and pdreceive shell commands, which you could pipe stuff to and fro.
have both applications able to modify the table. For instance I would like to make a graphical interface to a patch using juce.
Or write stuff into a sound file and reload that into the table every time your data has updated. Possibly not very elegant either.
i think, having a table_share, that works like the pix_share object but for pd table would solve lot's of communication problem when working with pd~ ...
Cyrille
best, 23456 P -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk2RuxQACgkQrE8mG1pMpRqvZwCeOz6RHnkEuuAxCA/Yi5V1j2Jl HUoAn249Ue7Zt9waTnrk7SV6p7qY5h4v =pT3B -----END PGP SIGNATURE-----
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hans, thanks for the reply. I'm having second thoughts about using Juce.. 6Mb for a simple hello world app? I have some old handwritten code I just never decided on a graphics library to use it with except for my own bios routines. opengl seems to be the most common thing between mac, linux and ms so that is probably the best route for graphics. I had no idea that there were keyboard routines in glut. Something prevented me from using glut in the past I do not remember what it was. All of my opengl programs only used gl and glu. I do not know about GEM and another opengl app coexisting though. It is awesome to have GEM right there in PD but I'm having difficulty translating multiple objects like a 3d pixel space of say 300 x 300 x 300 cubes which are treated as pixels into a manageable gem implementation then there is the whole thing about binding responses to input to graphical objects. That is kind of hard for me to figure out how to model simply. But integrating a few GEM objects with audio and control signals is understood.
Peter, thanks as well. I will look into [pixmap]. I thought earlier duh if i'm drawing into a table it's going to be at intervals of 10ms more or less and it's only going to be 1 pixel at a time so the updates to the tables are not that critical when drawing and could be done simply by sending pd a message through osc, netsend, or even midi for that matter. I would still like to know of some interprocess communication techniques between pd and a non pd app.
give me a hook and I will sharpen it.
it would be nice to be able to say hey pd give me a pointer to your table named array1.
On Tue, 29 Mar 2011, Billy Stiltner wrote:
opengl seems to be the most common thing between mac, linux and ms so that is probably the best route for graphics. I had no idea that there were keyboard routines in glut. Something prevented me from using glut in the past I do not remember what it was.
GLUT absolutely wants to run an infinite loop, otherwise it will not give you any events. Therefore you can't run it in the same thread as pd's event loop.
I tried breaking out of the event loop using setjmp/longjmp, just to make sure all implementations would support that hack, because I didn't want to use threads. The hack only worked on Linux, so I decided not to work with GLUT.
I do not know about GEM and another opengl app coexisting though.
Some months ago, I was told on pd-list that [gemwin] and [pdp_glx] can't coexist.
It is awesome to have GEM right there in PD but I'm having difficulty translating multiple objects like a 3d pixel space of say 300 x 300 x 300 cubes
If you have any pixel structures that don't fit in GEM, there is GridFlow. Supports up to 15 dimensions (though there's hardly ever a need for more than 5).
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Sorry for the triplicata, this was a glitch probably due to having to reboot my server while the mail was being sent.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Something prevented me from using glut in the past I do not remember what it was.
GLUT absolutely wants to run an infinite loop, otherwise it will not give you any events. Therefore you can't run it in the same thread as pd's event loop.
That must have been what kept me from using it as well.
I tried breaking out of the event loop using setjmp/longjmp, just to make sure all implementations would support that hack, because I didn't want to use threads. The hack only worked on Linux, so I decided not to work with GLUT.
I have dug through my archives and found some programs that might be of interest to you as a reference for ms style handling of memory and registers with cpp and asm.
http://www.geocities.ws/billy_stiltner/code/ASM.zip That should get your mindframe going in the right direction haha! It's all 16 bit code though so of no use now besides a reference but the function pointers and interrupt pointers should still be the same I'll have to do some studying now.
Allthough with windows XP this worked http://www.geocities.ws/billy_stiltner/code/DLLTEST.zip
Here's you something to make the dos shell look more like an old linux terminal haha! http://www.geocities.ws/billy_stiltner/code/FONT.zip
And here is my 3d fractal. It is not correct it is using this for the orbits which is pretty and more like what I would imagine a 3d fractal looking like instead of a hypercomplex, quaternion, mandelcube or bulb..
newx = ((x * x) - (y * y) - (z *z)) +k; newy = ((y *x) + (x *y)) +l; newz = ((z * x) + (x * z)) +m;
This is what I need to know how to do for the fractal for correct math but noone seems o know how to do complex numbers in 3d. Maybe someone on the list can shed me some light on the subject.
/* a: [x1,y1,z1] b: [x2,y2,z2]
a*b=(y1 * z2 - z1 * y2)i + (x1 * z2 - z1 * x2)j + (x1 * y2 - y1 * x2)k
*/ here's the link to the code. the exe runs on vista and xp. http://www.geocities.ws/billy_stiltner/code/fractal.zip http://www.geocities.ws/billy_stiltner/code/website.zip
website.zip contains documentation sucha as keycommands. It is awesome to view a transparent 3d fractal rotating and colorcycling. I would love to do this with GEM. Any tips on achieving that would be wonderful.
I do not know about GEM and another opengl app coexisting though.
Some months ago, I was told on pd-list that [gemwin] and [pdp_glx] can't coexist.
That is no good I will have to do what I need in an external for PD but am still looking into netsend and netreceive. I did find a library http://stephengware.com/proj/javasocketbridge/ that works to connect but am studying cross browser DOM to get my code to send messages. It's not the same as it used to be.Hopefully I can write my own socket thing in JAVA to have a browser interface to pd. This is still not good for files and saving presets so a JAVA file server will have to be written as well. I was able from a cmd prompt and an MSYS shell to both pdsend and pdreceive. pretty cool another option for external application interface.
If you have any pixel structures that don't fit in GEM, there is GridFlow. Supports up to 15 dimensions (though there's hardly ever a need for more than 5).
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
I will look into it. see above link for opengl program fractal.zip I'm trying to implement.
A comedy cartoon I done that has a mention of 5 dimensions. http://www.youtube.com/watch?v=xZUTn-rie8w
Come on E16 haha!
Thanks for the response it it has triggered some sparks. Now I must get to studying and patching. I wonder if my drum machine will ever be finished now.
On Wed, 30 Mar 2011, Billy Stiltner wrote:
I have dug through my archives and found some programs that might be of interest to you as a reference for ms style handling of memory and registers with cpp and asm. http://www.geocities.ws/billy_stiltner/code/ASM.zip
I have no use for that. The code I write nowadays does not work on anything else than the GNU compilers. I also had good knowledge of 16-bit DOS stuff back then, but chose to try to forget it.
The only thing I want to do relative to MS compilers, is know how to call GEM functions from GridFlow, where GEM is compiled by VC++, and GridFlow is compiled by MinGW. This is (probably) required to get [#from_pix], [#to_pix] and [gemdead] to work again on Windows.
But those are not the only ways to make GF and GEM work together : there's also [gf/gl].
Here's you something to make the dos shell look more like an old linux terminal haha! http://www.geocities.ws/billy_stiltner/code/FONT.zip
I am unsufficiently sophisticated for that kind of technology. Instead, I settled for using Linux.
And here is my 3d fractal. It is not correct it is using this for the orbits which is pretty and more like what I would imagine a 3d fractal looking like instead of a hypercomplex, quaternion, mandelcube or bulb..
What do you mean by « not correct » ?
newx = ((x * x) - (y * y) - (z *z)) +k;
for newx=0, x²-y²-z² = -k, hyberboloïd equation (revolution of hyperbola around x axis)
newy = ((y *x) + (x *y)) +l;
y*x = x*y, so for newy=0, 2*x*y = -l, another hyperbola formula (diagonally), but this one has translation symmetry instead, along z axis (because z is not used in this formula)
newz = ((z * x) + (x * z)) +m;
similar thing. but those * above are not products of floats, tell me right away.
This is what I need to know how to do for the fractal for correct math but noone seems o know how to do complex numbers in 3d.
Complex numbers have 2 dimensions. The logic that originally led to finding them doesn't work for more dimensions. Looking at complex numbers in different ways (as modified vectors or as modified polynomials) leads to other structures that are interesting, in 2 or 4 or more dimensions, but fail to be as nice as complex numbers are. Complex numbers are very, very similar to real numbers.
I don't know of any 3-dimensional number system that is sufficiently similar to complex numbers to be comparable.
a: [x1,y1,z1] b: [x2,y2,z2] a*b=(y1 * z2 - z1 * y2)i + (x1 * z2 - z1 * x2)j + (x1 * y2 - y1 * x2)k
this is almost like cross-product, but the j part has the wrong sign. anyway. cross product is weird because a*a = 0, and this is also the case for your cross-product-like operator.
A comedy cartoon I done that has a mention of 5 dimensions. http://www.youtube.com/watch?v=xZUTn-rie8w
I get the following error message :
:-\ Cette vidéo est privée. Opération impossible
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 03/31/2011 02:00 AM, Billy Stiltner wrote:
GLUT absolutely wants to run an infinite loop, otherwise it will not give you any events. Therefore you can't run it in the same thread as pd's event loop.
That must have been what kept me from using it as well.
though it's not true. you can run the glut loop yourself (e.g. Gem/src/Output/gemglutwindow.cpp)
fgmsadr IOhannes
On Thu, 31 Mar 2011, IOhannes m zmölnig wrote:
On 03/31/2011 02:00 AM, Billy Stiltner wrote:
GLUT absolutely wants to run an infinite loop, otherwise it will not give you any events. Therefore you can't run it in the same thread as pd's event loop.
That must have been what kept me from using it as well.
though it's not true. you can run the glut loop yourself (e.g. Gem/src/Output/gemglutwindow.cpp)
glutMainLoopEvent is Linux-only.
glutCheckLoop is OSX-only.
thus neither exists on Win32.
the GLUT 3 standard does not have anything for that.
much of the point of GLUT is so that GL-application writers have a portable layer.
there has to be reasons why Gem/src/Output also contains gemcocoawindow.mm, gemglxwindow.cpp, gemmacwindow.cpp and gemw32window.cpp.
thus it's quite simplistic to say "it's not true".
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
On 3/31/11, Mathieu Bouchard matju@artengine.ca wrote:
On Thu, 31 Mar 2011, IOhannes m zmölnig wrote:
On 03/31/2011 02:00 AM, Billy Stiltner wrote:
GLUT absolutely wants to run an infinite loop, otherwise it will not give you any events. Therefore you can't run it in the same thread as pd's event loop.
That must have been what kept me from using it as well.
though it's not true. you can run the glut loop yourself (e.g. Gem/src/Output/gemglutwindow.cpp)
glutMainLoopEvent is Linux-only.
glutCheckLoop is OSX-only.
thus neither exists on Win32.
the GLUT 3 standard does not have anything for that.
much of the point of GLUT is so that GL-application writers have a portable layer.
there has to be reasons why Gem/src/Output also contains gemcocoawindow.mm, gemglxwindow.cpp, gemmacwindow.cpp and gemw32window.cpp.
thus it's quite simplistic to say "it's not true".
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Mathieu you might want to check this out http://www.transmissionzero.co.uk/software/freeglut-devel/ says he has dlls compiled that are compatible with both mingw and vc++.
There is no mention in the freeglut api reference about eventloop being linux and mac only.
IOhannes, thanks for pointing that out. I guess what I should do is just look at how glut manages the keyboard and mouse on all 3 platforms.
The GEM sourcecode I have is from L2ork I'm not sure if it has been modified or not. I'll have to download the actual GEM source. Is there a difference between GEM that comes with pd extended and GEM from the main source?
I have had success with the javasocketbridge establishing a connection to pd and sending messages through tcp from firefox. the problem is that the page reloads if I hit a form button to send a second message and erases all the information in the form. The original html did not have the form buttons wrapped in a <form></form> object so i will try removing the <form></form> Maybe with html5 a canvas would be preferred over form elements anyways. I do get a dialog that looks like it is respawning the javasocketbridge class when the button is hit. which did not happen before I added the form wrapper. The button i not a submit button either. But it is good news that this works. I am uncertain though how to get netsend to send data to the javasocketbridge once it is connected to the netreceive object in pd. javasocketbridge only allows one connection at a time.