Loading Gem in pd-extended 0.40.3
Thanks nestor, that was the solution. I needed to add:
/Applications/Pd-extended.app/Contents/Resources/extra/Gem/Gem
to the startup options. Gem now loads just fine. As an aside, another way to load gem is to create the object [Gem] in a patch.
I have to say that I was puzzled that I hadn't really found this stuff documented anywhere! In the end, I found it written in Readme.1st of the Gem distribution. I guess I was a fool not to read it first. The relevant lines were:
(quote)
this Gem.d_fat is the Gem-binary for macOS-X (Universal Binary)
in order to use it, put the Gem/-directory into a place where pd can find it:
either put it in pd's extra/ directory, or add the full path of the Gem/
directory to the search-paths of Pd
then start Pd and load Gem:
- either create an object [Gem]
- or add it to the startup-libraries (via the Pd->Settings->Startup menu) and
restart
you should get a splash-screen on the Pd-console telling you that Gem has
successfully been loaded.
then try the help-patches (in the Gem/ folder)
and the example-patches (in this directory)
(end quote)
Pd-extended 0.40.3 released, dedicated to Jamie Tittle
Finally, it's done! The most polished release of Pd yet. We are further refining Pd into a truly powerful and usable programming platform.
http://puredata.org/downloads/
This release is dedicated to Jamie Tittle, aka tigital, who recently died of cancer. He was a long time and key contributor to Gem and Pd in general, even while he was in the hospital undergoing treatment. He is sorely missed in this community, and I am sure by many others.
Some highlights of this release:
* more functional namespace tools ([declare] and [import])
* new appearance designed to enhance readability
* GLSL shader support in Gem
* usability improvements
* on Mac OS X, you can now build "standalone" applications
* standard locations for user-installed externals
* many bug fixes
Here's the rough changelog:
-
next visual appearance designed for readability
-
default locations for user-installed externals, helpfiles, etc.
GNU/Linux: /usr/local/lib/pd-externals and ~/pd-externals
Mac OS X: /Library/Pd and ~/Library/Pd
Windows: %ProgramFiles%/Common Files/Pd and %UserProfile%/Application Data/Pd -
lots of standard key bindings added:
Enter/Return for OK
Escape for Cancel
Ctrl/Cmd-W closes all windows
on Mac OS X, Cmd-` cycles thru open windows
on Mac OS X, Cmd-m minimizes windows
Ctrl/Cmd-R raises/lowers Pd window
Ctrl/Cmd-Shift-R shrinks/grows Pd window
Ctrl/Cmd-Shift-L clears Pd window's text console
Ctrl/Cmd-B opens the Help Browser -
you can now use "~" in all paths to mean home folder, and on Windows you can use environment variables, lie %UserProfile% in paths
-
improved Cut/Copy/Paste support for working in object and message boxes
-
fixed Cut/Copy/Paste for the Pd window's console
-
[declare] and [import] now sorted out for loading (but much work needs to be done before there namespace support is complete)
-
"File -> Save As" defaults to the Home folder (~/) on Mac OSX
-
new patches default to the folder last saved in
-
included pgp_opengl aka 3dp on GNU/Linux and Mac OS X
-
'hardware' and 'deprecated' removed from libraries loaded by default
-
On Debian/Ubuntu, the packages now install into /usr rather than /usr/local
-
On Mac OS X, you can now build "standalone" applications from the File menu.
-
bug fixes and clean up of [hid] and mapping externals
-
included config in Info.plist for the Spotlight Importer
KNOWN BUGS
-
check http://puredata.info/dev/bugtracker before reporting bugs
-
Escape, Enter, and Ctrl/Cmd-W don't close the Path and Startup preferences
-
pdp_opengl is alpha and will definitely crash Pd
-
loading pdp_opengl will crash Pd if X11 is not open before trying to load it
-
the GUI runs slower in some situations
Get Issue for Trigger / Gate / Pass
Hello,
have a big Problem.
Situation:
ReacTIVision give following Data:
Have 3 Datasources X, Y, Angle
Have a Job ID
Have a Item ID
Item ID's are 1, 2, 3, 4
Have 4 Toggles
Have 4 GEM Quad's
Every GEM Quad get it's X,Y,Angle from the 3 Datasources
If i put One Fiducial over the Camera i get a new Job ID a fix Item ID and X,Y, Angle
If Item ID = 1 then Toggle One = True
If Item ID = 2 then Toggle Two = True
If Item ID = 3 then Toggle Three = True
If Item ID = 4 then Toggle Four = True
If a Toggle One is True, Then GEM Quad One is True, also visible
If a Toggle Two is True, Then GEM Quad Two is True, also visible
If a Toggle Three is True, Then GEM Quad Three is True, also visible
If a Toggle Four is True, Then GEM Quad Four is True, also visible
Now comes the Problem:
If i moving Item ID 1 i get its X,Y and Angle and send it to GEM Quad One
If i moving Item ID 2 i get its X,Y and Angle how can i send it to GEM Quad Two and not to GEM Quad One, Three, Four?
I need some Gate with a Trigger-Inlet and some Data Lines tha will be pass through if the Trigger-Inlet is 1/True.
Can someone Help me ?
Greetz Dirk
Problem compiling external on Windows
Hey,
thanks to everyone who responded to my posts both here and in the mailing list. Since then, I've figured out how to compile externals written in C using Microsoft Visual C++ 2005. There's more to document, however, such as how to compile externals using some of the other Windows compilers (Borland, djgpp, etc.), and also how to compile externals written in C++ in Windows. But one thing at a time.
one little thing to note... steps 4 and 7 may seem a little roundabout, but they account for the fact that MSVC sometimes has trouble with spaces in directory names (eg. C://Program Files/). If anyone knows how to override this behavior, post a reply, and I'll try to simplify the steps accordingly.
Updated June 29, 2007:
use [b]C://Progra~1/[/b] instead of [b]C://Program Files/[/b],
use [b]C://Docume~1/[/b] instead of [b]C://Documents and Settings/[/b], etc.
So, without further ado...
How to compile a pd external written in C using Microsoft Visual C++ 2005:
Compared to Windows, linux offers a much more user-friendly environment for compiling pd externals. However, with a little patience, a usable environment can be set up in Windows, and the good news is that everything you need is available for free. There are several reputable Windows-compatible C/C++ compilers out there, but here I'll discuss compiling externals with Microsoft Visual C++ 2005 (MSVC for short).
1. Download and Install Microsoft Visual C++ 2005 Express Edition.
a. Click the link above, then click Go! in the Visual C++ box.
b. Run vcsetup.exe to install the program
(the setup wizard should guide you through the process).
2. Download [url=http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB9267
]Visual C++ 2005 Express Service Pack 1.
a. Click the link above to download the Service Pack.
b. Run VS80sp1-KB926748-X86-INTL.exe to install the program.
3. Create a new project:
a. Open Visual C++.
b. Open the New Project window (Ctrl+Shift+N).
c. In the Project Types pane, select Visual C++.
d. In the Templates pane, select emptyproj.
e. Enter object name (helloworld).
f. Leave Create directory for solution unchecked, and click OK.
4. Import the pd header file:
a. Get m_pd.h here, or, using pd-vanilla (not pd-extended):
1. Open Windows Explorer or My Computer.
2. Navigate to the pd/src/ directory on your system.
3. Open m_pd.h in a text editor (file type is: C/C++ header).
b. Select all (Ctrl+A).
c. Copy selection to the clipboard (Ctrl+C).
d. Back in Visual C++, open the New File window (Ctrl+N).
e. In the Categories pane, select General.
f. In the Templates pane, select Text File, and click Open.
g. Copy the contents of m_pd.h into the editor window (Ctrl+V).
h. Open the Save File As Window (Ctrl+S).
i. Save as m_pd.h.
j. From the File Menu, select Move m_pd.h into; select helloworld.
5. Write the source code for the external in C.
a. Open the New File window (Ctrl+N).
b. In the Categories pane, select General.
c. In the Templates pane, select Text File, and click Open.
d. Write your source code in the editor window.
The following example is taken from the tutorial by Johannes M. Zmoelnig.
#include "m_pd.h"
static t_class *helloworld_class;
typedef struct _helloworld {
t_object x_obj;
} t_helloworld;
void helloworld_bang(t_helloworld *x)
{
post("Hello world !!");
}
void *helloworld_new(void)
{
t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);
return (void *)x;
}
void helloworld_setup(void) {
helloworld_class = class_new(gensym("helloworld"),
(t_newmethod)helloworld_new,
0, sizeof(t_helloworld),
CLASS_DEFAULT, 0);
class_addbang(helloworld_class, helloworld_bang);
}
6. Save and import the source code into the project:
a. Open the Save File As Window (Ctrl+S).
b. Save as helloworld.c.
c. From the File Menu, select Move helloworld.c into; select helloworld.
7. Access the pd library file:
a. Open Windows Explorer or My Computer.
b. Navigate to the pd/bin/ directory on your system.
c. Right-click on pd.lib (file type is: Object File Library) and select Copy.
d. Navigate to the C://TEMP/ directory on your system.
e. Paste the copy of pd.lib in the C://TEMP/ directory (right-click or Ctrl-V).
8. Set configuration properties:
a. Set configuration type to .dll:
1. Back in Visual C++, open the helloworld Property Pages window (Alt+F7).
2. In the left pane, select Configuration Properties >> General.
3. In the right pane, under Project Defaults, click on
Configuration Type, and select Dynamic Library (.dll)
(using the arrow on the right).
b. Add MSW to preprocessor definitions:
1. In the left pane, select
Configuration Properties >> C/C++ >> Preprocessor.
2. In the right pane, type MSW in the Preprocessor Definitions field.
c. Tell compiler which language to use:
1. In the left pane, select
Configuration Properties >> C/C++ >> Advanced.
2. In the right pane, select Compile As.
3. Select Compile as C Code (/TC) by clicking the arrow on the right.
d. Tell linker where to find pd.lib:
1. In the left pane, select Configuration Properties >> Linker >> Input.
2. In the right pane, select Additional Dependencies and enter
C://TEMP/pd.lib.
e. Tell linker to export the setup function:
1. In the left pane, select
Configuration Properties >> Linker >> Command Line.
2. In the right pane, type
/export:helloworld_setup in the Additional options field.
3. Click OK.
9. Compile and link:
a. Use the Build Solution command (F7).
10. Copy the new helloworld.dll file into pd.
a. Open Windows Explorer or My Computer.
b. Navigate to the
My Documents/Visual Studio 2005/Projects/helloworld/Debug/
directory on your system.
c. Right-click on helloworld.dll (file type is: Application Extension)
and select Copy.
d. Navigate to the pd/extra directory on your system.
e. Paste the copy of helloworld.dll in the pd/extra directory
(right-click or Ctrl-V).
11. Test the external in pd.
a. the external should now be a useable object in pd.
b. open a new pd patch and try to create a helloworld object.
c. add a bang to the left inlet and test it out.
d. if the main pd console window displays "Hello world !!",
the external has succeeded.
Hope this helps!
-- middlepedal
GEM: trying to install it in G4 with Mac OS 10.3.9\. Im desperate...
Hello,
Firs of all: is there anyone who got install GEM (not extended releseses of pd) in G4 with Mac OS 10.3. How do you made it? Please, explain me.
Now, i will explain my steps (maybe someone can find some error in my installation):
in order to install Gem at a G4 1,5 GHz with 10.3.9, im following the
instructions that come in GEM.README.
- Following the part wich say "do it by hand" i have the next structure:
Applications\pd\extra\Gem.pd_darwin
Applications\pd\extra\help-Gem
Applications\pd\Pd-0.39
- I have found "Gem.pd_darwin" in "gem-0.90.0-OSX-G4-bin.tar.gz"
- "help-Gem" is a copy of "help" folder that comes inside of
"gem-0.90.0-OSX-G4-bin-doc.tar"
Then, I launch Pd from the Terminal with this command:
open Pd-0.39 -lib Gem
which opens pd, but without any message about Gem.
I have tried with -verbose but nothing happens
GEM differences on mac and windows
Hi pure people,
I am new to pure but an experienced software developer.
I use PD for an interactive audio installation and especially GEM for the actual video processing and movement detection. Allthough it works fine on my development plattform, an old ibook G4, a few differences of the behaviour betweeb Mac and Windows of some GEM objects make me worry.
My development machine (on the go... is an old ibook with tiger (and an ati 9200) and a new pc with xp sp2 and a geforce 7600. The target plattform will likely be a pc also with xp sp2.
The software I use is the pd-extended 0.38-4 release.
My development works as this: I use a movie that is prerecorded and shows movement of a single object (like an elevator moving up and down with stops in between).
My patch is partially build like the GEM documentation example Gem - 04.video - 0.3.movement_detection.pd. Additionally to this I have subpatches that do movement analysis patches for speed and accelleration of a single moving object.
On the mac (with an ATI 9200) the initial view of the prerecorded movie is quite dark and the basic movement detection is very sensible and works quite well (and also the analysis).
On windows (with a geforce 7600) it is different. The movie looks quite normal, with the normal brightness (the mac was very dark), and the movement detection is very insensitive and does not really work.
Things that I recognized and resulting questions:
1. Is there a difference in initial values the GEM objects have if there is no explicit initialisation?
2. The colormodel seems to be different. A color of 1 1 1 is black on the ibook (with the ATI card) and white at the PC (with the geforce)
3. What reason can it have, that the displayed video on the mac (with the given example) is initially way darker than expected.
4. On the mac, the prerecorded movie cycles infinitely with the auto option of pix_film whereas pure on windows stops after one cycle. Is there a reason for this behaviour?
5. Is there actually a difference between the way GEM objects are initialized between Windows and Mac and also between different opengl vendors (like the color model between ati and nvidia).
Hope someone can share some experiences with GEM and how to work around the difficulties of GEM on different plattforms.
Regards,
Michael.
Gem and split object wont work after version change!!!
Dear Pd fellows and hardworkers
I have been using Pd 0.39 extended test 4 in windows. were I am using Gem and Comport to get information form a web cam and translate that into the microcontroller. Everything looks fine, until it crashes (after 10 minutes).
well that happens because is a test version!!!
Now I tried to install Pd 0.39 (the latest stable version and not extended) with Gem. but with my surprise. Gem doesnt work when i installed ( after following this tutorial: http://gem.iem.at/download/GEM.README) and my patch contains split objects, which are not recognize, so they wont work either.
Could you tell me what is going on??
Why the split object wont work, does it need a special librery such as iemlib????
thank you guys
Need help with PD externals
SUBJECT: Need help with PD externals
Hi,
-
I have written some code in C/C++. I would now like to create a pd external and be able to run my C/C++ code in pd (windows environment). I would like my PD object to have say 3-4 inlets and 2-3 outlets.
Furthermore at least one of the inlets would contain compound data, something like an array of 10-15 floats.
Thus my external would be a bit more complex than the 'very basic one', which has a single float as inlet, & a single float as outlet. -
I work in the windows environment (currently my operating environment has pentium machines with windows operating systems installed on them (windows XP, or windows 2000 Professional).
I am using a the free DevCPP or DevC++ compiler (version 4.9.9.2) the IDE, (which uses the gnu C compiler MinGW at its base). Furthermore, I am using: Pd version 0.38.4-extended-RC8 (windows platform). I wonder if someone has already developed externals in a same (or similar, i.e. Windows) environment.
- If someone has, can you please mail me a simple compilable code that you might have had prepared, and guide me through the exact steps which one must follow to make a pd external.
- I wish to know, if in the Windows/DevCPP compiler environment, whether it is possbile to create a PD external without creating a dll in windows, or is it always necessary to first create a dll, even in the simplest case?
- Last, but not the least, I must mention here that I don't have "a lot" of experience in pd, so I will appreciate if someone could explain things in an easy to understand style.
But in any case, I will ask again, in case I don't understand something.
I hope that should work.
Thanks and regards,
ps:
The following should actually have been posted as a separate thread, but since its related to the topic above, i continue to write it here:
In addition to what I have asked for above, I would also like some feedback on the following...
SUBJECT2: Creating/Compiling PD externals
My previous unsucessful attempts at creating/understanding the PD external:
I had tried to read through, and tried to implement the sample code in the tutorial, named:
"How to write an External for puredata" available at the iem site...
But I am facing a few problems, and here are some specific queries related to that:
A.) While in the windows environment, must one always need to create a dll first, or is it possible to create a PD external in any other way as well?
B.) If one must do it by first creating a dll, then the code as mentioned in the tutorial would need to be modified and can't just be copy+pasted & compiled directly. I.e.
One needs to paste the data declaration part in the header;
ii) Also one must declare all the subroutine (i.e. procedures/methods) names in the header file as well, while their definition or implementation goes in another main file, which must include our earlier created header file; and finally
iii) One must insert a special prefix before all the methods when are required for the dll...
Am I right about the 3 above mentioned points?
Thanks yet again,
Starting out with PD and Gem
Hello,
I'm really interested in the potential of PD and would love to get my head round it.
I have a basic knowledge of programming (from a college course a few years ago), but am keen to learn more to explore the possibilities of the program.
I have downloaded the pd extended file, and instealled the packages within. I have opened up the tutorial/demo files, and everything seems to be working fine...
however, there are a few basics that im struggling to get my head round. Firstly, i would like to use Gem (which i have downloaded and installed) but am unsure how to 'call' it into PD as a library.
Running OS 10.2.8, PD runs through Terminal. I am new to Terminal, and dont know how to load commands with it. If i type 'pd - lib Gem' into the existing terminal window that loads PD, and hit enter, nothing happens. If i go to FILE/NEW COMMAND and type the message, a new window loads with some information, which ends with 'logout [Process completed]' which i presume means it hasnt loaded Gem into PD, as opening Gem tutorial files gives no results.
To cut a long story short (!) I would basically like to know how to load Gem into Puredata! I think my problem lies with using Terminal on mac osX, so if there is anyone who can lend a hand and give me some guidance, I would be most grateful.
I am excited about what these programs can bring to my work, and cant wait to get stuck in!
Many thanks
I am using an ibook running OS 10.2.8
i downloaded pd-0.36-extended2-MacOSX.dmg (from which i installed all of the packages)
and
gem-0.90.0-OSX-G3-bin.tar.gz (i placed the two files - the library and the readme, into: mycomputer/library/Pd/Externals