Pd-extended 0.41.4 released!
Its done and available for download. This release is focused on lots of usability enhancements and bug
fixes. There are some new features as well in the many included
libraries.
http://puredata.org/downloads/
Here's the rough changelog:
-
fixed strict-aliasing build problems with cyclone, iemlib, bsaylor, and sigpack
-
added/fixed "Next Window" menu item and key binding (Cmd-` on Mac OS X)
-
lots of usability fixes and improvements
-
removed all external binaries from package, you can get them here:
http://puredata.info/docs/faq/how-do-i-download-the-flext-binaries-that-used-to-be-included-in-pd-extended -
changed to GPL v3
-
fixed paths that used the same image for Gem examples
-
fixed paths to example images in Gem help
-
libdirs now load properly when using [import]/[declare] to load a
libdir outside of the sys_libdir (i.e. extra) into the canvas-local
namespace -
single [output~] that works everywhere
-
improved Max Text file (.pat) importing and exporting and added
the ability to handle .mxt files, and binary .mxb and .help files -
added cyclone "maxmode" libraries to cyclone. To use them,
load the cyclone, library, then create [maxmode/cyclone] or
[maxmode/maxmode]. -
updated VBAP from 0.9.9 to 1.0.3
-
fixed bug in VBAP that cause CPU spike
-
bug fixes and clean up of [hid]? externals
-
(GNU/Linux) Free Desktop file associations and mime types for
Pd and Max/MSP files -
(GNU/Linux) fixed font size issue when using Tcl/Tk 8.5
-
(GNU/Linux) fixed Help Browser when using Tcl/Tk 8.5
-
(GNU/Linux) built against libv4l on Debian/testing,
Ubuntu/intrepid, Ubuntu/jaunty, and Fedora 9 -
(Debian/Ubuntu) fixed /etc/init.d/pd script to be standards-compliant
-
(Ubuntu) lpia builds for Ubuntu Netbook Remix
-
(Mac OS X) reduced default audio buffers to 20ms
-
(Mac OS X) fixed exit logic
-
(Mac OS X) fixed issue with app builder. You can now create apps without replacing an existing one.
-
(Mac OS X) upgraded to libquicktime 1.1.1 and ffmpeg 0.4.20071217
-
(Windows) moocow/pdstring externals now included
-
(Windows) increased default audio buffer for Window to 100ms since there are some really flaky audio cards in Windows land
KNOWN BUGS
Check http://puredata.info/dev/bugtracker before reporting bugs,
and if you find an existing bug report on the same issue, please
add your information there.
-
Tcl/Tk 8.5 support is a bit rough, and IEM GUI fonts aren't quite right under 8.5
-
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
-
(Mac OS X) Using Jack can cause extra CPU usage at idle
-
(Windows) installer won't replace existing installs
LEDs on, and video too
I'm pretty sure this is a really basic question.
I've attached my patch.
At the very bottom of the patch you'll see four splits.
For the left-most split, I want nine LEDs to turn on in between those ranges.
For the next one along, I want six LEDs to turn on in between those ranges.
And for the next, I want three LEDs to turn on in between those ranges.
And the last one, I don't want any of the nine LEDs to light up.
Any ideas how I can do this?
I'm also struggling with the video. The patch will be hooked up to a pressure pad. When the user sits on the pressure pad, the video is to start playing. When the user stands up, I want the video to go back to the beginning - but I don't want it to play. I just want it to sit on the first frame. Additionally, if the user sits to the end of the video, I want it to just stay on the last frame until they stand up - at which point it will do the same as I just mentioned - return to frame one and wait to be played again.
Anything you can help me with would be massively appreciated!
Random numbers, timers, projections
Hey everyone.
You'll have to excuse me 'cause I don't have a clue about PD, but need to use it for one of my current projects.
Basically, I want to project some text from my computer onto a blank canvas. I want to use a pressure sensor to detect when a user is sitting down. Once it knows someone is sitting down, I want the text to change.
From here on, I want the text to change after a given amount of time... say... 30 seconds for now?
When it gets to the last slide of text, I want it to do nothing other than display this line of text, until the user places their hand over an LDR. When the user's hand is placed over the LDR, the light will be reduced to a certain level. Once this level is reached, I want PD to time for 15 seconds, and at the end of the 15 seconds, illuminate any random combination of light bulbs and set off a rumble pack beneath where they have put their hand. If the user removes their hand before the 15 seconds is up, I do not want any of the light bulbs to illuminate, and I do not want the rumble pack to go off.
[When certain bulbs are illuminated, I want certain lines of text to be projected.
Say bulbs 1 and 2 are illuminated, but 3, 4 and 5 are not. I would like text to be projected that says "Bulbs 1 and 2 are illuminated. Bulbs 3, 4 and 5 are not". Or say Bulbs 1, 3 and 5 are illuminated, I want text to be projected that says "Bulbs 1, 3 and 5 are illuminated. Bulbs 2 and 4 are not."]
If the user stands up at any point in time, removing pressure from the pressure sensor, I want the initial line of text to be displayed on screen again, and everything to start over.
Sorry if this sounds very complex, please let me know if you can help out at all.
Edit ::
If it makes it any easier, you could ignore the bit that I've put in the square brackets. Instead of this, I would just like one more screen of text to be projected when any combination of the bulbs are illuminated.
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
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
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.
How do you bring in a wav file?
hello liz
first of all you have to create a table (an array)
table sound-file-array 256 for example
next you have to load a file in that table . to do that you have to use the soundfiler object.
you could do that to choose the file you want to load.:
bang (message type)
'
openpanel (object type)
'
-read -resize $1 sound-file-array (message type)
'
soundfiler
that's all. soundfiler 's outlet outputs the filesize.
if you want to use stereo samples , you have to create two arrays and change the message sent to the soundfiler in that way:
-read -resize $1 sound-file-array.L sound-file-array.R (message type)
(it could also be -read -resize $1 table1 table2 )
at least using that way you 'll be limited to 4mb files . if you want to load huge samples , you should rather send this:
-read -maxsize 1e07 $1 sound-file-array (message type)
that 's the way to do that.
but if you want to apply some fx in realtime you could stream a file directly from the harddisk , using sfplay from zexylib.
to output the file you'll have to use sfrecord , i don't recommend tabwrite for such a function . in my opinion it's easier to bounce the file directly to the hdd. else you have to take care of the filesize and to do a mechanism to record sound in a table and after to export it to the hdd.
let me know if it does the job the way you want.
see ya