Psychedellic Audioguide using MobMuPlat or PdParty
@pooopsi the trick is that some of the things you ask will require some externals. For ogg and ableton_link you can find them with deken external manager in pd-vanilla, it will get you setup for prototyping. (btw link won't be in extended anyway). But when you will need to run those externals you'll need to compile those for ios or android, as you pdparty is working with libpd that only supports vanilla objects (same for mobmuplat).
When it comes to externals it depends on the project :
- pdparty supports ggee: [getdir], [stripdir] and mrpeach: [midifile] so no (ogg or link support).
- for mobmuplat I couldn't find the info.
I don't really know any of those projects (I used the pd-party for android and uncontinued rjdj) and built my own to share a midiclock over wifi : ppp.mgsx.net (android only though, but we will probably include link sooner or later).
pd-party on ios looks neat and it seems that it supports a bunch of events, like accelermeter and gps you should checkout the doc and the composer pack : http://danomatika.com/code/pdparty/guide
So to sum up : GPS : ok / OGG : no atm / LINK : no atm
You could try to contact the developpers to see if they are likely to include the externs you'll want.
If you want to synch phones in a pure-vanilla style you could try using sync-jams with any of the two :
How to install externals, libraries, gui plug-ins, etc.
Hello, having trouble installing external libraries in pd, I'm in Xubuntu, so I'm new to Pd and Linux both.
tried almost everything in posts but there's not a lot of information on the topic, thanks in advance
I have three folder containing one sample library (according to pd web site and other resources these are standard folders for external libraries)
~/Pd-externals/moonlib; /usr/local/lib/pd-externals/moonlib; and /usr/lib/pd/extra/moonlib
My path config in Pd is: ~/Pd-externals; /usr/local/lib/pd-externals; and /usr/lib/pd/extra
I've tried the next Startup configs (and every other logic folder variation):
Console print at startup:
tried /home/sosimicro/Pd-externals and failed /home/sosimicro/Pd-externals: can't open
Console prints a long list of errors when I try to create a library object like [mkob]
I'm in a dead end, I really don't want to install pd-extended, there must be a way
Compiling Pd-extended on Windows
I created a new thread as the older post [Problem compiling on windows] (http://forum.pdpatchrepo.info/topic/967/problem-compiling-external-on-windows/16) seems to have ended and my problem has a different nature.
Moreover. I have not been able to find an answer on the puredata sites (puredata.info or puredata.org).
My end goal is to play with the 'grid' external in pd-extended/externals/unauthorized/grid but since I do not get this one working and I have never compiled an external before I started with the simpler tutorials in Pd/doc/6.externs.
My steps and error are as follows:
**1. **Adap path in 'makefile' in Pd/doc/6.externs to 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC'
(this path contains a /lib folder with .lib and .obj files on my machine)
**2. **Start ( Admin) Visual C++ 2008 64-bit command prompt
**3. **Locate directory Pd/doc/6.externs
**4. ** run 'nmake pd_nt' command
**5. ** gives error in locating the libc.lib file
(LINK: fatal error LNK1181: cannot open input file 'C:...\VC\lib\libc.lib'
When I remove this instruction from the makefile, I does not find the kernel32.lib file also.
When I finally remove the former instruction, I get an error creating the library obj1,lib and object obj1,exp as I have 6 unresolved external symbols ex. obj1.ob : error LNK2019: unresolved external symbol __imp_post referenced in function obj1_float
Could someone help me solve these issues and help me succeed in making this external work?
Then, any additional explanation in getting grid to work afterwards?
Any additional info regarding Pd's treatment of externals/libraries etc is appreciated as well.. I just can't get a grip on it,
Purr Data alpha5
This is the alpha 5 release of Purr Data (the GUI port of Pd-l2ork)
- added rjlib for Windows and OSX (already available in GNU/Linux)
- more fixes for OSX (thanks to Matt Barber)
- bump fftease, pmpd, lyonpotpourri version (already available in GNU/Linux)
- added fluid~ external
- fix regression with filenames on Windows
- improved Windows installer
- added disis externals for OSX and Windows
- simplified Windows build instructions
- added rpi deb package for Raspbian
- fix regression that kept standard libs from loading on Windows
Please report lots of bugs to
Gem window crashes / Install struggles on Ubuntu
Please help! Sooooo many hours trying to figure this out, should be simple I think but I'm not a sophisticated user of Linux.
The Gem objects appear properly when I open the windows, but whenever I try to open/create a gemwindow, it immediately crashes (however, it seems to respond when I change the data - for instance, I can see color changes when i make those changes, but again, the gem window crashes immediately...)
A possible solution lies here but haven't been able to get a response when I attempt to implement this
Why does Gem crash when creating the Gem-window? !
When I try to create a Gem-window, my X-server crashes (or worse)? btw, I am using Ubuntu/hoary with fglrx drivers.
try setting the environment variable GEM_SINGLE_CONTEXT to 1
Gem establishes an (invisible) openGL-context at startup, even if no Gem-window is created yet. When you create the Gem-window, a 2nd openGL-context is used (which shares some properties with the invisible context).
For some reasons this seems to be not possible with some gfx-drivers (e.g. ATI's proprietary fglrx drivers) and some window-managers (i suspect compiz/beryll), leading to crashes of the X-server and/or system freezes.
The current workaround is to set the environment variable GEM_SINGLE_CONTEXT=1, which prevents this dual-context magic.
if you are starting Pd from the bash, you can start Pd/Gem with GEM_SINGLE_CONTEXT=1 pd -lib Gem on bash, you can also set this permanently by adding a the line export GEM_SINGLE_CONTEXT=1 to either ~/.bashrc (the bash-configuration file in your home-directory) or to /etc/bash.bashrc (to set it for all users)
- newer linux user but though I followed compiling instructions for installing Gem, it seems never to create a conf file.. when I open pd-extended in terminal, I get this message:
open: ./gem.conf: No such file or directory
any thoughts or input would be VERY APPRECIATED, thanks!
External (oggread~) compilation problem
After a few weeks of reading, researching, and attempting to find a reliable way to compile externals, I have most simple cases working such as the tutorial objects found from the IEM tutorials and Eric Lyon's book on the subject.
However, trying to compile Oggread~ from the pdogg library (https://goo.gl/WvPLnW) results in an external that fails to load in PD, throwing the error:
"oggread~.pd_darwin: dlopen(/path/to/external/oggread~.pd_darwin, 10): symbol not found: _ov_bitrate referenced from: /path/to/external/oggread~.pd_darwin
Expected in: flat namespace"
the reference to ov_bitrate is contained in vorbisfile.h, and as far as I can tell, has been linked and compiled correctly.
I hate to ask for help from a community I've just joined, but I've been struggling with this for a few weeks on my own to no avail, so absolutely any insight or help would be appreciated.
I've uploaded the files in question below. The compiled external can be found in the build folder, and all vorbis/ogg header files can be found in the libs folder.
Pure Data / Raspberry Pi / Realtime Audio / Permissions
I want my Raspberry Pi 2 to automatically start up the Jack server with realtime scheduling, and subsequently start Pure Data with realtime scheduling, load a patch &c. without any user intervention from a login shell.
As a performance artist working primarily with psychodrama (the technology is definitely NOT the important part here), fiddling around at a terminal right before or during a performance is kind of... psychically inconvenient. I need a box that I can plug in, give the audio output to the sound guy, and be ready to go.
I use Raspbian with a Linux kernel compiled with realtime goodness. I have hand-compiled Jack2 and Pure Data with realtime support in order to take advantage of this. Running a process with realtime priority requires the proper PAM directives set in /etc/security/limits.conf and related places, but that is beyond the scope of this little write-up.
Also somewhat relevant: I use a M-Audio MobilePre USB soundcard (sounds pretty awful by today's standards, but it's an extremely USEFUL box and sounds good enough for the work I do). For full-duplex sound, this requires the RasPi's USB to be set to single speed. In this configuration, I can get just under 2.9ms latency with good CPU overhead for Pure Data to run a few of my 64-voice wavetable and delay line granulators. Yeah!
Purely by happenstance, I had given the jackd command in my startup script the option “-s” which allows the server to ignore overruns and so on. So things seemed to be working as expected, but I noticed a lot more glitches than when I manually started up Jack and Pd from the terminal without the “-s” option. Upon removing it from my startup script, everything failed! WAH.
So I started piping STDERR and STDOUT to text files so I could read what either Jack or Pd were complaining about. As it turns out, Jack was unable to start with realtime priority due to a permissions problem. (I assume this is one of the things the “-s” options allows jackd to ignore, and thus start up with non-realtime priority. Problem is that Pure Data can’t connect to a non-realtime Jack server when its “-rt” option specified.)
Now, I had already been through the whole rigamarole of setting proper memory and priority limits for the “audio” group, to which the user “pi” belongs. So I thought, okay, I have to execute these commands as “pi”, and while simulating a login shell because the security limits in question are only set during login.
So I did this:
su -l pi -c "/usr/local/bin/jackd -R -dalsa -dhw:1,0 -p128 -n3 -r44100 -S >> /home/pi/jackd.log 2>&1 &"
This says “login as user ‘pi’ and then run the jackd command with these options, piping the outputs to this log file and run it in the background”. Well, I still got all the same errors about not being able to set realtime priority. WHYYYYYYYYY?
I hunted and hunted and hunted on a Very Popular Search Engine til I decided to try searching “security limits not loaded with su -l” and found this.
(Makes me think of that Talking Heads lyric, “Isn’t it weird / Looks too obscure to me”.)
So by uncommenting the line
# session required pam_limits.so in
/etc/pam.d/su everything started working as expected.
I now know a LOT MORE about PAM and how important it is to keep in mind when and in what order scripts and other little subsystems are executed; but also that sometimes the problem is EXTREMELY OBSCURE and is to be found in some seemingly far-flung config file.
I hope this helps anybody out there working with Pure Data and the RasPi. The second generation board really packs quite a punch and can run several hundred audio grains (run by vline~ and enveloped by vline~ and cos~) simultaneously without a problem. And I'm pretty sure this is just using ONE of the 4 cores!
I'm by no means an expert Linux sysadmin, so if you have any other suggestions or corrections, please let me know! I wouldn't have been able to get this far without all the generous and helpful writeups everybody else has contributed, both within the RasPi and Pure Data communities. If you have any questions about anything I glossed over here, I'll do my best to answer them.
use of threads for i²c I/O external : looking for a good strategy
I'm developing an audio device based on a cubieboard2(armf). I use potentiometers read by an adc that communicates through i²c protocol with my cubie. An i²c lcd display shows the desired parameters values.
I wrote externals in order to get data from the potentiometers (and other switches, and a rotary encoder), or send data to the display. Everything was working, but the i²c I/O functions calls were leading to clicks 'n pops in the audio, which was unacceptable. I use a rt patched debian with selected rt priorities for irqs and audio as I always did with success, and I am looking for a smart way to make my pd patches communicate with my physical interface, in a transparent way at audio level.
Then a opened this topic : http://forum.pdpatchrepo.info/topic/9489/external-i2c-data-reader-leads-to-clicks-standalone-version-works-better , and @Eeight proposed to implement threads, kindly giving a template in order to show me the way.
And now I'd need some advice. I'm not a real C programmer, just learning the empirical way, and I'm reaching my limits... I made a threaded version of the external that reads the potentiometers every x milliseconds, and it works perfectly, no audio pollution anymore. But when I made a threaded version of the external that handles the i²c display (thus receiving incoming messages such as "position x y", or "write message"), it lead to timing problems.
Some of the messages get uninterpreted because my writing function is threaded, and takes the form of an infinite while(1) loop containing a "usleep(10000)" instruction at the end of it in order to limit cpu load. The problem is that this leads to the "loss" of most of the incoming messages...
When reading potentiometers values, it's ok to get them merely one every 10ms, but when you have to send messages that can be interpreted merely one every 1oms, you have to send them to the external with delays, which works (That's my present situation), but is tiedious and inelegant.
Would someone have an idea of how this problem could be addressed in a more elegant manner ?
Here is how I implemented it :
- I create a thread for an infinite while (1) loop containing a call to a writing function whenever a flag equals 1, followed by a usleep(10000) instruction.
This "thread" is running from the beginning and awaits for a nonzero value of the flag to enter in action. It reads the string to be displayed from the object's data structure, but only when the "clocking" allows it together with the flag
- a "write" method can receive a t_symbol : the string to display. When a "write blahblah" message is received by the object, the string "blahblah" is stored in the object's data structure, as the flag which is set to 1.
- Then the next time the threaded loop evaluates the flag, it displays "blahblah", resets the flag to 0 and sleeps for 10ms.
But when you use incoming messages using 10 lines messages (allowing for cursor positioning and writing orders), they of course flow through the code in far less than 10ms, hence my problems... In other words the string to be displayed can be changed several times in the object's data structure without being actually displayed because of the relatively slow "clocking".
Please forget the incredible length of this message, together to the fact that I don't post the source yet because of a basic shame of my inelegant coding style. Maybe will I finally clean it and post it later.
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.
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
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
The new visual style is very nice indeed,
Problem to compile PD external in Linux
In case anyone still looking for this, here is a tutorial for Windows, which might have some translatable advice: