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
Using arrays and signals in a same external
@obiwannabe said:
Laurent, if C++ is your preferred language and you want a flex_ible t_emplate for externals that incorporates a bit of cross platform forethought then hava a look at Flext.
Hi Obiwannabe,
In fact I do not have really a preference between both langages, as I used both in my current projects, even if I have seen and made more C code, for the moment.
I am most "fluent" to develop with either matlab or scilab, either max/msp or pure data, but, now, to go from prototypes to powerfull and easier to distribute and use applications, I have been considering working with either C (DSP processing) or C++ (rather easier to build a GUI, according to my capabilities and available time) as I want to deliver cross platform applications: Objective-C is smart with Apple Developpers Tools but I am not sure it is really easy to perform cross platform applications with it.
As I mainly develop prototypes and physical models, play with ugly sets of equations, I do not have a great experience with these three languages. It may change in the following months.
And, as I need to succeed in finishing an external by sunday evening for a potential real time demonstration on monday 05/19 mrining, I have taken the first way to develop externals I found and thought I may be able to manage within less 2 weeks, a week ago!
Yet, I am going to have a quick look at Flext, today if possible, in order to determine if it is easier for me to perform the job by sunday using it rather than using C-coded externals.
My constraints are to be able to:
-receive two arrays, one sample, one circular buffer index as inputs;
- perform a simple addition between both arrays, one being multiplied by the input sample value, using a cricular buffer for the second one array;
- send the current sample output, the updated circula buffer array and an updated version of its index as output;
- make the whole external work for samples given by a 44.1 kHz and 16-bit wavefile, in real time!
I also need to be able to develop, at least another external, to change one of the arrays, in perceptive real time, to use it as input ( the first array, not the circular buffer) of the first external. And, being able to plot the modified array to show what it looks like could a nice improvement.
This array would be a caricatural time-varying impulse response, maybe, with changes related to the positions of the source and the receiver (within a time-varying ?) shoe-box room, taking into account several orders of reflexion.
I may know how to make the inner C code for DSP processing, I "just" need to encapsulate them in a pd external, enough efficient to present a temporal convolution algorithm without FFT, working yet in real time without (perceptible) latency with as long as possible "impulse reponses" (around 350 ms I guess or hope for the first version).
So, here are the rules, I "just" have to use the right external coding tool as I must have finished by the end of this week...
And, I will distribute the externals and their related code as soon as I will have time to write a good documentation, above all for the English version, which is not my native tongue, as you may have noticed 8;O).
Sincerly yours,
Laurent Millot
Distortion/compression thing I'm trying to do.
Hi. I'm still kind of a novice at pd, so what I'm trying to might not be a good idea. It doesn't seem to be working any how.
Anyways, I was trying to make a distortion type deal where you select a window in the signal, say .5 to .75 of the absolute value of the signal, or whatever you like, and have it so the signal below that window (say 0 to .5) isn't reduced in amplitude, the signal above that window (.75 to 1) is reduced by a factor of your choice, I'll call it a, a value between 1 and 0, and the signal within the window ramps steadily from no reduction to reduction by a factor of a, so it's smooth.
What I've been doing for this is multiplying the whole signal by a clipped version of the absolute value of the signal that's multiplied and added to such that instead of going from .5 to .75 it goes from 1 to a. So, anything below .5 is multiplied by 1, anything above .75 is multiplied by a, and everything in between is multiplied by something between 1 and a. I thought this would produce a smooth sort of distortion, depending on how much the amplitude is reduced by and the width of the window, but no matter what I do I get a harsher distortion, and there are little rectangular cuts in the peaks that shouldn't be there, unless my logic about all of this is wrong.
This is roughly what's going on.
Signal
|
abs~
|
clip~ .5 .75
|
-~ .5 ( 0 to .25)
|
/~ .25 (0 to 1)
|
*~ -(1 - a) (given a reduction factor of .6 this would be 0 to -.4)
|
+~ 1
And that would result in a range of 1 to .6. And I multiply that by the original signal. I'm just kinda messing around with pd trying to make stuff, so maybe this is just a bad way to do this. Is it just too many operations on the clip to multiply it at the right time?
I can put a patch on this later if you need.
Problem compiling external on Windows
Alberto,
Awesome contribution to the forum! Thanks to your post, I've gotten things to work with MinGW. In fact, the helloworld.dll file produced with the MinGW method was only 6.19 KB, tiny compared to MSVC's 52 Kb file. Not exactly sure why this is, perhaps MSVC uses a bunch of unnecessary default settings that eat up space?
Anyway, I'd like to add a note of caution to readers about to download and install MinGW and MSYS: read this. Main points:
1. install MinGW first, then MSYS.
2. before installing MSYS, make sure you know where MinGW is (eg.
C://Program Files/MinGW).
3. when MSYS asks you where MinGW is, use only lowercase letters,
and convert directory-names with spaces to shorter forms (eg. type
c:/progra~1/mingw instead of C://Program Files/MinGW).
4. if the "normalizing" step fails for any reason, uninstall MSYS, and
reinstall it "with greater care"...
Also, I tried using your makefile as you said, but got the response:
make: Nothing to be done for `current'.
I'm not so smart about makefiles (yet), and I'm confused by your suggestion to "Modify it according to your path in". I changed 2 lines:
DEST = "c:/Progra~1/pd/extra"
PDPATH = "c:/Progra~1/pd"
and the got the response above.
Two more things: about the difference between MSVC and MSVC Express, I have no idea. And finally, where is MSYS-1.0.11.exe, mentioned here?
Thanks again,
Middlepedal
Problem compiling external on Windows
Great tutorial, very detailed!
Thanks for this addition..
Sorry for coming later on this subject but I'll try to add few lines about
compiling externals in Win without going through MSVC Express
edition (by the way: what are the limitations of the express edition
w.r.t. the full package?).
Even if MSVC offers an integrated environment for developing there
can be some good reasons for giving a try to the old-man "unix" way of
compiling, which in windows is best represented by MINGW32 and
cygwin. Both offers linux-like environments (i.e. command line tools)
for compiling and other shell tasks which, sometimes, in windows are
a pain in the ass.
There are at least three good reasons for giving a look at mingw:
- gives strong linux compatibility on external compilation
(almost same command lines arguments etc.) - there is the possibility to use makefiles in an almost straightforward way
(with minor modifications to linux makefiles). - no dependency on expensive MS programs (except for the
small, bug-free Operating System
I did this exercise by porting the E. Lyon "LyonPoutpourry" externals for win
(http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/Pd/). Give a look at
the win source package: inside there is a makefile for darwin (MAC)
linux and win. I added the latter, and as you can see the modifications
are minor.
----------- 1. Prelude: compilation environment ------------------
First of all we have to set once for all the compilation environment.
Let's forget for the moment cygwin and concentrate on mingw32 (http://www.mingw.org/). The following is taken from (H.C. Steiner's wiki http://www.puredata.org/docs/developer/mingw)
Download the MinGW package installer and run it:
(http://prdownloads.sourceforge.net/mingw/MinGW-5.1.1.exe)
Choose the Candidate distribution. Install the defaults and add the g++ compiler, g77 compiler, and MinGW make or you can just download my MinGW install, MinGW-Pd.tar.bz2, and uncompress it so that its installed into C:\MinGW.
Then we need MSYS which is a shell (an interpreter of the commands, like a
colorful dos prompt
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe
Now you will be using the MSYS shell that was installed from the MSYS installer. You can launch it from the Desktop shortcut or Start -> Programs -> MinGW -> MSYS -> msys
----------- 2. Allegro: compilation trial ------------------
a. open MSYS
b. at the prompt type:
cd c:
(or the drive you whish to go for the pd external compilation)
c. go to the external directory (note the backslashes instead of slashes !),
mine is external-compiling. Inside I have helloworld.c
cd alberto/backup/PureData_Archive/patches/AlbertoZ/external-compiling/
d. copy m_pd.h (from the PD distribution directory) into external-compiling
(or whatever is its name)
e. type:
gcc -c helloworld.c -o helloworld.o
f. type:
ld -export_dynamic -shared -o helloworld.dll helloworld.o c:/Programmi/pd039e
xt4/bin/pd.dll
(this is the linker step. note that I linked to a particular version of pd.dll - 0.39 extended test 4, so probably (I'm not sure about this) the external will
run on 0.39 only. Can someone confrm this?)
g. If everything was ok then you should have a helloworld.dll in your
directory. Move it on the extra folder of your pd distribution
(I assume that extra folder is in the pd predefined path) and make a
new patch with the helloworld object. Again, if everything is correct,
you should have a "Hello world!!" printed on the console.
----------- 3. Adagio: makefile ------------------
A makefile can be used for compilation. Even if a simple helloworld
application does not need it, complex programs may do.
The makefile.win is attached with this post. Modify it according to your
path in
Make sure you have
helloworld.c
m_pd.h
makefile.win
in your directory. Now type at MSYS prompt:
make -f makefile.win
This will automatically produce:
the object, the linker step (the dll) and will copy the helloworld.dll
in the extra folder of you pd distribution (overwriting the existing one .
----------- 4. Allegro con brio: conclusions ------------------
Why not give a try to the old-man compilation on Win?
----------- 5. Minuetto: greetings ------------------
I apologize if I said some crap somewhere, just let me know if it
doesn't work. Have fun!
Best regards,
Alberto
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
Compiling new external
i have similar problem, like your suggest i try to compile and the message that return to me is this: (i have ubuntu 7.04)
viniciolindo@ASUSPRO70V:~/pd-wii$ sudo gcc -c wiimote.c -o wiimote.o
wiimote.c:24:19: error: stdio.h: Nessun file o directory
wiimote.c:25:20: error: unistd.h: Nessun file o directory
wiimote.c:26:24: error: sys/select.h: Nessun file o directory
wiimote.c:27:33: error: bluetooth/bluetooth.h: Nessun file o directory
wiimote.c:29:18: error: math.h: Nessun file o directory
wiimote.c:31:21: error: wiimote.h: Nessun file o directory
wiimote.c:47: error: expected specifier-qualifier-list before 'wiimote_t'
wiimote.c: In function 'wiimote_debug':
wiimote.c:89: error: 't_wiimote' has no member named 'connected'
wiimote.c:89: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:90: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:91: error: 't_wiimote' has no member named 'toggle_acc'
wiimote.c:93: error: 't_wiimote' has no member named 'toggle_ir'
wiimote.c:95: error: 't_wiimote' has no member named 'toggle_nc'
wiimote.c:98: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:98: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:98: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:98: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:98: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:98: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:99: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:99: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:99: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:99: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:99: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:99: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c: At top level:
wiimote.c:107: warning: 'struct wiimote_btn_mesg' declared inside parameter list
wiimote.c:107: warning: its scope is only this definition or declaration, which is probably not what you want
wiimote.c: In function 'wiimote_btn':
wiimote.c:110: error: 't_wiimote' has no member named 'btn_atoms'
wiimote.c:110: error: 't_wiimote' has no member named 'btn_atoms'
wiimote.c:110: error: dereferencing pointer to incomplete type
wiimote.c:111: error: 't_wiimote' has no member named 'btn_atoms'
wiimote.c:111: error: 't_wiimote' has no member named 'btn_atoms'
wiimote.c:111: error: dereferencing pointer to incomplete type
wiimote.c:112: error: 't_wiimote' has no member named 'outlet_btn'
wiimote.c:112: error: 't_wiimote' has no member named 'btn_atoms'
wiimote.c: At top level:
wiimote.c:128: warning: 'struct wiimote_acc_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_acc':
wiimote.c:130: error: 't_wiimote' has no member named 'toggle_acc'
wiimote.c:134: error: dereferencing pointer to incomplete type
wiimote.c:134: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:134: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:134: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:135: error: dereferencing pointer to incomplete type
wiimote.c:135: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:135: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:135: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:136: error: dereferencing pointer to incomplete type
wiimote.c:136: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:136: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:136: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:147: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c:147: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c:148: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c:148: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c:149: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c:149: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c:150: error: 't_wiimote' has no member named 'outlet_acc'
wiimote.c:150: error: 't_wiimote' has no member named 'acc_atoms'
wiimote.c: At top level:
wiimote.c:155: warning: 'struct wiimote_ir_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_ir':
wiimote.c:159: error: 't_wiimote' has no member named 'toggle_ir'
wiimote.c:162: error: 'WIIMOTE_IR_SRC_COUNT' undeclared (first use in this function)
wiimote.c:162: error: (Each undeclared identifier is reported only once
wiimote.c:162: error: for each function it appears in.)
wiimote.c:164: error: dereferencing pointer to incomplete type
wiimote.c:166: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:166: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:167: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:167: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:167: error: dereferencing pointer to incomplete type
wiimote.c:168: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:168: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:168: error: dereferencing pointer to incomplete type
wiimote.c:169: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:169: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c:169: error: dereferencing pointer to incomplete type
wiimote.c:170: error: 't_wiimote' has no member named 'outlet_ir'
wiimote.c:170: error: 't_wiimote' has no member named 'ir_atoms'
wiimote.c: At top level:
wiimote.c:177: warning: 'struct wiimote_nunchuk_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_nunchuk':
wiimote.c:181: error: dereferencing pointer to incomplete type
wiimote.c:181: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:181: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:181: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:182: error: dereferencing pointer to incomplete type
wiimote.c:182: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:182: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:182: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:183: error: dereferencing pointer to incomplete type
wiimote.c:183: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:183: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:183: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:194: error: dereferencing pointer to incomplete type
wiimote.c:194: error: 'WIIMOTE_NUNCHUK_BTN_C' undeclared (first use in this function)
wiimote.c:195: error: dereferencing pointer to incomplete type
wiimote.c:195: error: 'WIIMOTE_NUNCHUK_BTN_Z' undeclared (first use in this function)
wiimote.c:196: error: 't_wiimote' has no member named 'outlet_nc_btn'
wiimote.c:196: error: dereferencing pointer to incomplete type
wiimote.c:198: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:198: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:199: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:199: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:200: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:200: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:201: error: 't_wiimote' has no member named 'outlet_nc_acc'
wiimote.c:201: error: 't_wiimote' has no member named 'nc_acc_atoms'
wiimote.c:203: error: 't_wiimote' has no member named 'nc_stick_atoms'
wiimote.c:203: error: 't_wiimote' has no member named 'nc_stick_atoms'
wiimote.c:203: error: dereferencing pointer to incomplete type
wiimote.c:204: error: 't_wiimote' has no member named 'nc_stick_atoms'
wiimote.c:204: error: 't_wiimote' has no member named 'nc_stick_atoms'
wiimote.c:204: error: dereferencing pointer to incomplete type
wiimote.c:205: error: 't_wiimote' has no member named 'outlet_nc_stick'
wiimote.c:205: error: 't_wiimote' has no member named 'nc_stick_atoms'
wiimote.c: At top level:
wiimote.c:219: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback':
wiimote.c:223: error: dereferencing pointer to incomplete type
wiimote.c:224: error: 'WIIMOTE_MESG_STATUS' undeclared (first use in this function)
wiimote.c:225: error: dereferencing pointer to incomplete type
wiimote.c:225: error: 'WIIMOTE_BATTERY_MAX' undeclared (first use in this function)
wiimote.c:226: error: dereferencing pointer to incomplete type
wiimote.c:227: error: 'WIIMOTE_EXT_NONE' undeclared (first use in this function)
wiimote.c:230: error: 'WIIMOTE_EXT_NUNCHUK' undeclared (first use in this function)
wiimote.c:232: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:232: error: 'WIIMOTE_RW_REG' undeclared (first use in this function)
wiimote.c:232: error: 'WIIMOTE_RW_DECODE' undeclared (first use in this function)
wiimote.c:236: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:237: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:238: error: 't_wiimote' has no member named 'nc_acc_zero'
wiimote.c:239: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:240: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:241: error: 't_wiimote' has no member named 'nc_acc_one'
wiimote.c:244: error: 'WIIMOTE_EXT_CLASSIC' undeclared (first use in this function)
wiimote.c:247: error: 'WIIMOTE_EXT_UNKNOWN' undeclared (first use in this function)
wiimote.c:252: error: 'WIIMOTE_MESG_BTN' undeclared (first use in this function)
wiimote.c:253: error: dereferencing pointer to incomplete type
wiimote.c:255: error: 'WIIMOTE_MESG_ACC' undeclared (first use in this function)
wiimote.c:256: error: dereferencing pointer to incomplete type
wiimote.c:258: error: 'WIIMOTE_MESG_IR' undeclared (first use in this function)
wiimote.c:259: error: dereferencing pointer to incomplete type
wiimote.c:261: error: 'WIIMOTE_MESG_NUNCHUK' undeclared (first use in this function)
wiimote.c:262: error: dereferencing pointer to incomplete type
wiimote.c:264: error: 'WIIMOTE_MESG_CLASSIC' undeclared (first use in this function)
wiimote.c: At top level:
wiimote.c:272: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_0':
wiimote.c:272: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:273: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_1':
wiimote.c:273: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:274: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_2':
wiimote.c:274: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:275: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_3':
wiimote.c:275: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:276: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_4':
wiimote.c:276: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:277: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_5':
wiimote.c:277: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:278: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_6':
wiimote.c:278: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: At top level:
wiimote.c:279: warning: 'union wiimote_mesg' declared inside parameter list
wiimote.c: In function 'wiimote_callback_7':
wiimote.c:279: warning: passing argument 2 of 'wiimote_callback' from incompatible pointer type
wiimote.c: In function 'wiimote_setReportMode':
wiimote.c:292: error: 'WIIMOTE_RPT_STATUS' undeclared (first use in this function)
wiimote.c:292: error: 'WIIMOTE_RPT_BTN' undeclared (first use in this function)
wiimote.c:293: error: 't_wiimote' has no member named 'toggle_ir'
wiimote.c:293: error: 'WIIMOTE_RPT_IR' undeclared (first use in this function)
wiimote.c:294: error: 't_wiimote' has no member named 'toggle_acc'
wiimote.c:294: error: 'WIIMOTE_RPT_ACC' undeclared (first use in this function)
wiimote.c:295: error: 't_wiimote' has no member named 'toggle_nc'
wiimote.c:295: error: 'WIIMOTE_RPT_EXT' undeclared (first use in this function)
wiimote.c:298: error: 't_wiimote' has no member named 'connected'
wiimote.c:300: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:300: error: 'WIIMOTE_CMD_RPT_MODE' undeclared (first use in this function)
wiimote.c: In function 'wiimote_reportAcceleration':
wiimote.c:308: error: 't_wiimote' has no member named 'toggle_acc'
wiimote.c: In function 'wiimote_reportIR':
wiimote.c:314: error: 't_wiimote' has no member named 'toggle_ir'
wiimote.c: In function 'wiimote_reportNunchuck':
wiimote.c:320: error: 't_wiimote' has no member named 'toggle_nc'
wiimote.c: In function 'wiimote_setRumble':
wiimote.c:326: error: 't_wiimote' has no member named 'connected'
wiimote.c:328: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:328: error: 'WIIMOTE_CMD_RUMBLE' undeclared (first use in this function)
wiimote.c: In function 'wiimote_setLED':
wiimote.c:339: error: 't_wiimote' has no member named 'connected'
wiimote.c:341: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:341: error: 'WIIMOTE_CMD_LED' undeclared (first use in this function)
wiimote.c: In function 'wiimote_doConnect':
wiimote.c:361: error: 'bdaddr_t' undeclared (first use in this function)
wiimote.c:361: error: expected ';' before 'bdaddr'
wiimote.c:364: error: 'bdaddr' undeclared (first use in this function)
wiimote.c:364: error: 'BDADDR_ANY' undeclared (first use in this function)
wiimote.c:369: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:370: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:374: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:375: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:379: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:380: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:384: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:385: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:389: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:390: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:394: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:395: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:399: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:400: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:404: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:405: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:413: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:417: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:417: error: 'WIIMOTE_RW_EEPROM' undeclared (first use in this function)
wiimote.c:420: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:421: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:422: error: 't_wiimote' has no member named 'acc_zero'
wiimote.c:423: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:424: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:425: error: 't_wiimote' has no member named 'acc_one'
wiimote.c:428: error: 't_wiimote' has no member named 'connected'
wiimote.c: In function 'wiimote_discover':
wiimote.c:441: error: 't_wiimote' has no member named 'connected'
wiimote.c: In function 'wiimote_doDisconnect':
wiimote.c:449: error: 't_wiimote' has no member named 'connected'
wiimote.c:451: error: 't_wiimote' has no member named 'wiimote'
wiimote.c:454: error: 't_wiimote' has no member named 'wiimoteID'
wiimote.c:455: error: 't_wiimote' has no member named 'connected'
wiimote.c: In function 'wiimote_new':
wiimote.c:466: error: 'bdaddr_t' undeclared (first use in this function)
wiimote.c:466: error: expected ';' before 'bdaddr'
wiimote.c:471: error: 't_wiimote' has no member named 'outlet_btn'
wiimote.c:472: error: 't_wiimote' has no member named 'outlet_acc'
wiimote.c:473: error: 't_wiimote' has no member named 'outlet_ir'
wiimote.c:474: error: 't_wiimote' has no member named 'outlet_nc_btn'
wiimote.c:475: error: 't_wiimote' has no member named 'outlet_nc_acc'
wiimote.c:476: error: 't_wiimote' has no member named 'outlet_nc_stick'
wiimote.c:479: error: 't_wiimote' has no member named 'toggle_acc'
wiimote.c:480: error: 't_wiimote' has no member named 'toggle_ir'
wiimote.c:481: error: 't_wiimote' has no member named 'toggle_nc'
wiimote.c:483: error: 't_wiimote' has no member named 'connected'
wiimote.c:484: error: 't_wiimote' has no member named 'wiimoteID'
can you help me? sorry for my english
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,
Just tried pd but....
> yes, probably. but now I'll try to run it on my Atari ST
Seriously try it if you get time one day. Oddly the Atari ST is still *THE* choice for some serious techno musicians. Why? The simplicity of how the UART is addressed and clocked gives it rock solid midi timing. It's something that seems to elude complex architectures even with the best preemptive scheduling, buffering etc. I've watched top producers take a midi file on floppy disk from their $5000 super Mac/PC systems to have it play back on an Atari for final mixdown. It's one of those analog vs digital type debacles where real experience of good ears trumps what "technically shouldn't be so". The ST lacks enough grunt for useful audio DSP, but as a midi processing hub or sequencer it could be an astonishingly powerful tool with pd if you can compile it.
>mhh... this is just a anthropomorphic vision of reality...
You got me.
>what I need to ask now is where I can find reference for all objects:
>I know that there's no menu of them and i have to type their name in those little boxes, but
>I need to know, at least, what objects I can create, typing their names, is it true?
Yeah that bothers me too. Even after using for it some time I forget the name of an atom and have to go looking for it. I often do something like "ls /usr/lib/pd/externs/ | grep pd_linux$ | less" to see if I actually have something. For windows likewise search the externals directory for .dll files
>so, I would like to have a list with the object identifier (for oscs, filters etc.), their
>details (kind of filters, slopes, ripples etc. for filters, as example ), their parameters (cutoff, Q, etc.)
>is there a documentation like this?
The help files are detailed, well written and easy to use. Once you know that such an object exists. Just right click any atom and select "help". Usually there's an example case.
Check these to find common atoms
http://puredata.hurleur.com/sujet-248-suggestions-noobs
http://ccrma.stanford.edu/courses/154/pd-reference.html
http://pure-data.sourceforge.net/documentation.php
>I know... but I still feel more confortable with a traditional language (C++, pascal), also
>for writing my personal VSTs (you know, for those weirdest things...) I think it's still easier to write "algorithms" with a textual language,
>without a graphical metaphore.
Raw code is not an expedient or practical way to make music. Having used Music(N), Csound, Nyquist (LISP/SCHEME), and all that stuff I can say this from the bottom of my heart after 15 years experience. Pd gives you two really important things from a software engineering point of view. It's modularity and clarity of interface in abstracting things just beats any C++ classes hands down for it's intended purpose - digital signal dataflows. Consequently you get better decoupling and better reuse. One of the few pitfalls for a trad programmer imho is that pd is very dirty on types, in a way it's one of the most badly typed languages I've ever experienced. Ironic for a tool called "pure data", but you get used to it's lovable idiosynchrocies vis lists, messages, numbers, arrays, symbols and generic "anys". Also it's scoping rules leave a lot to be desired, everythings global within one instance of the server unless you say $0- at the head of a name.
>But now I need to teach a course on "languages for electronic music" in classical, academic shool.
>they don't know DSP matchematics or something like,
>so I need to urgently search for use a more "abstract" instrument for doing the lessons...
You couldn't wish for a more appropriate tool. For non maths/physics students you can use the power of abstraction to build "black boxes" like synths, analysis tools and sequencers and then open them up later in the course. As Claude says, it takes about 9 months or more before you really take to PureData. Electronic music is BIG, really big, not as big as space but it's a discipline that just explodes in scope once you get into it. You can waste weeks writing externals in C, or designing a synth, or creating a composition method...you can get really lost on a random walk in d>2. The best way forward is to have a context and a goal. Teaching this course sounds like an excellent vehicle to focus your scope.
>Tried also Jmax but on Windows (required OS, because > 95% students use billgatesware ) is quite unstable
I would make it "unrequired". Put your foot down as course leader/tutor that Windows is unsuitable. In order of preference I would go with Mac, then Linux, then Win. If the students only have Windows then try Dyne:bolic ( http://dynebolic.org/ ), a minimal GNU/Linux distro that runs from a CD in RAM and comes preconfigured with PureData and a smorgasboard of other digital media tools. That said, I've seen it work really well on Windows. Once. I've no hard evidence to back this up, but I feel a disturbance in the force when Pd runs on Windows, as if a million threads cried out at once and were suddenly silenced. I don't think it likes heavily loaded machines and I guess 99% certain the reason it's unstable on Win is down to *other* things running. Hint: a music machine shouldn't double as an email server and GCHQ spyware centre. Start with a clean install and nothing else running and you may have better luck, but that will probably remain stable about as long as a schizophrenic Z-boson particle if you network it.