Loading a pure data patch ( .pd file ) within a pure data patch ( .pd file )
HI!
Quick version:
My folder structure:
/mother-patch.pd ( main pure data patch first loaded and running... )
/patches/1/main.pd
/patches/2/main.pd
/patches/3/main.pd
...
How i could open /patches/1/main.pd triggered by some action in the mother-patch.pd?
How i could close /patches/1/main.pd triggered by some action in the mother-patch.pd?
Long read
I'm attempting to clone the Critter and Guitari organelle ( link ).
This instrument is basically a computer running libpd and running very cool pure data patches
You can read more about my project here ( link )
I have a mother pure data patch that it's first loaded when the device is on, this patch is doing some [send] and [receive] operations related to the knobs/keyboard/volume/led and it should be also managing the loading ( opening and closing ) of the child pure data patches ( mentioned above ). This child patches are receiving the actions from the mother patch.
If I open the mother patch and the child patches manually, everything works fine. But now I need to OPEN this CHILD PURE DATA patches with a object within the mother patch.
I've been testing [open] , for opening the main.pd of the child patches but it does not work.
I've been testing [pd] , for opening the main.pd of the child patches but it does not work.
I wouldn't like to modify the original organelle patches.
I wouldn't like to end up loading all the patches using [pd ...] and inserting a [switch] object inside every main.pd file in the patches in order to enable only the dsp of the desired patch.
It would be perfect If i could have a folder with all the patches and load them within the mother patch with some kind of object. And I would also want to be able to CLOSE the pure data patch and open another ( changing patches... )
Every little and big help woul be MUCH APRECIATED!
THANKS!!!!!!!
Errors in building pd-extended on Odroid C2
Hello,
I get errors, likely related to alsa, when building from source pure data extended
(the last version - ) on ODROID C2, running Ubuntu 16.04.
To build I simply followed the instructions listed on the puredata.info
(cd pure-data/packages/linux_make and then make instal)
I think I
to have all the dependencies correctly installed.
Here the last lines of the build output
pd-s_audio_alsamm.o: In function `alsamm_stop':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:998: undefined reference to `snd_pcm_drop'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1012: undefined reference to `snd_pcm_drop'
pd-s_audio_alsamm.o: In function `alsamm_close_audio':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:395: undefined reference to `snd_pcm_close'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:407: undefined reference to `snd_pcm_close'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:390: undefined reference to `snd_pcm_unlink'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:395: undefined reference to `snd_pcm_close'
pd-s_audio_alsamm.o: In function `alsamm_stop':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:998: undefined reference to `snd_pcm_drop'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1012: undefined reference to `snd_pcm_drop'
pd-s_audio_alsamm.o: In function `alsamm_send_dacs':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1111: undefined reference to `snd_pcm_avail_update'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1133: undefined reference to `snd_pcm_state'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1216: undefined reference to `snd_pcm_mmap_commit'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1245: undefined reference to `snd_pcm_avail_update'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1256: undefined reference to `snd_pcm_state'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1321: undefined reference to `snd_pcm_mmap_commit'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1128: undefined reference to `snd_pcm_avail_update'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1133: undefined reference to `snd_pcm_state'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1148: undefined reference to `snd_pcm_avail_update'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1272: undefined reference to `snd_pcm_avail_update'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1253: undefined reference to `snd_pcm_avail_update'
pd-s_audio_alsamm.o: In function `alsamm_showstat':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1359: undefined reference to `snd_pcm_status_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1359: undefined reference to `snd_pcm_status_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1360: undefined reference to `snd_pcm_status'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_audio_alsamm.c:1364: undefined reference to `snd_pcm_status_dump'
pd-s_midi_alsa.o: In function `sys_alsa_do_open_midi':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:69: undefined reference to `snd_seq_open'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:83: undefined reference to `snd_seq_create_simple_port'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:67: undefined reference to `snd_seq_open'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:94: undefined reference to `snd_seq_create_simple_port'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:71: undefined reference to `snd_seq_open'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:101: undefined reference to `snd_seq_client_info_malloc'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:102: undefined reference to `snd_seq_get_client_info'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:103: undefined reference to `snd_seq_client_info_set_name'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:104: undefined reference to `snd_seq_client_info_get_client'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:105: undefined reference to `snd_seq_set_client_info'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:106: undefined reference to `snd_seq_client_info_free'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:109: undefined reference to `snd_midi_event_new'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:137: undefined reference to `snd_seq_port_subscribe_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:137: undefined reference to `snd_seq_port_subscribe_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:139: undefined reference to `snd_seq_client_info_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:139: undefined reference to `snd_seq_client_info_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:140: undefined reference to `snd_seq_port_info_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:140: undefined reference to `snd_seq_port_info_sizeof'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:141: undefined reference to `snd_seq_client_info_set_client'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:145: undefined reference to `snd_seq_client_info_get_client'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:142: undefined reference to `snd_seq_query_next_client'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:149: undefined reference to `snd_seq_port_info_set_client'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:150: undefined reference to `snd_seq_port_info_set_port'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:151: undefined reference to `snd_seq_query_next_port'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:154: undefined reference to `snd_seq_port_info_get_port'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:157: undefined reference to `snd_seq_port_subscribe_set_sender'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:158: undefined reference to `snd_seq_port_subscribe_set_dest'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:159: undefined reference to `snd_seq_subscribe_port'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:163: undefined reference to `snd_seq_port_subscribe_set_sender'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:164: undefined reference to `snd_seq_port_subscribe_set_dest'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:165: undefined reference to `snd_seq_subscribe_port'
pd-s_midi_alsa.o: In function `sys_alsa_putmidimess':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:224: undefined reference to `snd_seq_event_output_direct'
pd-s_midi_alsa.o: In function `sys_alsa_putmidibyte':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:242: undefined reference to `snd_seq_event_output_direct'
pd-s_midi_alsa.o: In function `sys_alsa_poll_midi':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:257: undefined reference to `snd_midi_event_init'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:260: undefined reference to `snd_seq_event_input_pending'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:265: undefined reference to `snd_midi_event_decode'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:262: undefined reference to `snd_seq_event_input'
pd-s_midi_alsa.o: In function `sys_alsa_close_midi':
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:278: undefined reference to `snd_seq_close'
/home/odroid/Desktop/pdextended_sources/pd-extended/pd/src/s_midi_alsa.c:281: undefined reference to `snd_midi_event_free'
collect2: error: ld returned 1 exit status
make[5]: *** [pd] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [pd] Error 2
make: *** [install] Error 2
I there anyone who managed to install pd-extended on ODROID C2 and
can suggest a way to solve this issue?
Thanks in advance!
Cubie pd pedal
Hi there,
I've been working on that for nearly two years and now it is done I find it soooo 2014 that the previous intentions to make a full wiki page seem now silly. Anyway this could give ideas to other people so here is an abstract.
This is basically a lame-electronics simple-aggregate-of-common-parts version of a guitar pedal that hosts pd extended patches as effects. It's based on a cubieboard 2, connected to an el-cheapo (this was intended as a proof of concept hardware) soundcard through usb, internally. It boots a rt-patched version of debian from microSD card (never managed to flash sdram) in ... 50seconds , with autologin so no keyboard is needed. After this time it behaves like a floor pedal, pd runs the stored patches responding to its hardware interface. Anyway a keyboard, a mouse and a display can be plugged in and it behaves like a linux desktop, it's easy to edit patches on the fly.
The interface consists of three footswitches, three leds, a button switch, a clickable rotary encoder, four clickable potentiometers and a 4x20 lcd display. The pots and the display communicate with the gpio pins (all of them digital) through i2c, the pots being read by a quadruple i2c adc.
I called it a pd pedal, but I have to confess it cannot be directly connected to a guitar amp, as the IO are two preamplified instrument inputs, two line in, two line out and a headphone stereo jack. This can be solved when you have a digital pedal in your pedalboard that have line inputs. Of course I knew it from the beginning, and could never work it around later as it would have taken more space and would have been tedious to implement for a beginner electronics fan like me .
I also wanted from the beginning to make a relatively small footprint on my pedalboard so it is rather tall (aluminium box is 160x125x76). What a challenge to stack these components in such a box it has been, especially when it came with holes positioning, elements fixture, internal aluminium rounded edges to mill and file down...
The 1 ghz dual-core with 1 gb ram allows for decent dsp patches.
The pedal automatically runs a predefined patch but interface allows for patch selection. (statically coded so far)
I initially wrote several externals that allow for interface i/o, but never got rid of audio artifacts when the interface was trigged. As a workaround I now make the readings from outside pd, with a well-choosen rt priority and send values to pd using pdsend. The workaround is only half of what it should be, as for outputting data (writing things on the display) I still rely on a homebrew pd external (too much work for me to take it out of pd). The result is uncorrupted audio only when lcd display is not used, which is unreasonable (every pot controls a patch parameter and I love to see the values updated on the lcd). But when the pedal is left untouched the audio is clean.
Here are two pics, one of the inside before the audio card is stacked and the other one showing it outside look.
Thanks,
Nau
Conditional gate
@mod said:
But time and time again we see the same sort of posts. People who just want to turn an audio signal on and off use something like [spigot~], people use [counter] instead of basic pd objects. They post these patches and run into trouble that could easily be avoided by only using vanilla objects unless necessary.
What's wrong with [counter]? Objects like those remedy the trouble of trying to figure out how to make one using only vanilla objects. Not that it's particularly difficult to do, but it may just be more intuitive or time saving to someone to use [counter].
Of course most people are using extended, but it's such a vast ocean that no-one knows how EVERY object in extended works. The object in question here, [gate], i can only hazard a guess, but i'm thinking that a maximum of 50% of users know the cyclone library and in particular the [gate] object well enough to debug a patch.
Well, that's where the basic advice that you and others have posted comes in: Right click -> Help.
Besides, I don't really think that because less people know or use an object should deter one from trying it. It may just make more sense or fit with their particular programming preferences. I know I like to build from low-level objects and work up, but not everyone is so interested. For example, I've built my own compressor abstraction. But plenty of other people would rather just load a compressor object and be done with it. Nothing wrong with either approach.
Also, I've been using Pd long enough that I feel comfortable saying I'm in "expert" territory. I don't know what every extended object does, but I don't know what EVERY vanilla object does, either.
(I'm speaking from my own bad experiences here too, because my old patches had some extended objects in them, and i answered countless emails from people having trouble with those externals not loading. I could have saved myself a lot of time by just using the correct vanilla constructs in the first place)
Now, this is a different issue, and I'm more inclined to agree here. You can definitely ensure higher compatibility by sticking to vanilla objects, as some externals don't work correctly on all OS's and vanilla users may not have some of the more popular libraries installed, but it does come with the potential costs of flexibility or computational load. And, this is only an issue if you want to share your patches or use them on other OS's.
When I'm writing a patch that's for personal use only, and I don't expect to be sharing it, I tend to use whatever I want. But if I'm making an abstraction I might share, I usually follow an order of precedence:
1. Use vanilla objects where possible/practical for best compatibility.
2. Use extended objects if needed, since it's used widely and newbie-friendly.
3. If absolutely necessary, use a popular lib not included in Pd-extended, like GridFlow or RjLib (I've never had to do this, yet).
But that's entirely for compatibility reasons only.
@Shakasin said:
But is there something in vanilla that could replace my [gate] just curious ?
. [== 1] [== 2] [== 3]
| | |
[spigot] [spigot] [spigot] etc....
Connect the gate number to the left inlet of the [== ] objects, and the value you want to pass to the left inlet of the [spigot]s.
Export to exe or dmg format
Eimer,
Pd and Pd-extended is free software and you may redistribute it, even in modified form, provided you follow the license terms (BSD and GPL).
If you are on OSX, it is very easy to create your own application with Pd-extended under the hood. Select menu-item 'file>>Make app from patch' or 'file>>Make app from folder'. What you get is a Pd-extended package with your patch as startup patch. The Pd window is minimized directly after startup, so at a first glance you don't notice it is Pd. But it is still fully functional with all Pd-extended libraries in it (120 MB!), and the possibility to edit patches and create new ones. With some extra tweaking, you can replace the Pd icon with an icon of your own make. The preferences file of this 'app' is within the app folder. If you included all necessary abstractions, and eventually your homebrew externals, you can distribute it as a stand alone app.
But probably you are not on OSX, otherwise you would have already seen this option. For Linux or Windows you could do something similar to the 'Make app' as described above, but do it by hand. You could write an executable tcl script to start Pd with your patch as startup patch, and eventually include other options in the script. (Pd uses Tk/tcl for graphics and other purposes, so it is included in every binary distribution of Pd-extended). The user can click that script to open your 'application'.
Disadvantages of distributing apps instead of patches are:
- you need to make separate distributions for every platform
- applications are large so you need ample download bandwidth on your server or host
- if Pd is obscured, you can't refer to Pd pages for support
All taken together, I see little advantage for distributing stand alone apps rather than Pd patches. If you want to make user-friendly distributions of your patches, you could organise them in a decent directory structure, where abstractions and other essential files are included in the search path by the [declare] object. For the user it is then a matter of installing a recent Pd(-extended) if they do not have it yet, and opening the main patch in your patches package. If all goes well, this is piece of cake, and on the other hand if they have troubles with soundcards etcetera, this is not something you could have prevented by supplying an app instead of a patch.
Katja
Open Kinect?
hey buscon,
here's a copy of a mail i sent a friend, and the corresponding patches.
you can see these patches being used here:
(original mail)
ok here's a simplified version of the patch i use. i've just modified the "mud" patch and haven't checked it all, so there are bugs and errors everywhere, but i guess you're just interested in the abs which receive and dispatch the data from kinect.
so the kinect is received by osceleton and what i get in pd is osc messages. basically it's x, y, and z coordinates for each point of the body. so you'll be interested in the patches "kinector" and "shooter".
KINECTOR:
- it translates the osc into data that the granular sampler "mud" can understand (0 to 1 linear).
- move the horizontal sliders to chose a user and a joint.
- toggle from "value" to "CC". in X Y and Z type a sending chanel number. in the granular patch, toggle from value to CC, so you can affect a receiving chanel number for each automatisable parameter.
- hit the "learn" buton and then cover with your body the area you wish to use. this sets minimums and maximum for each axis. if you want to calibrate the whole body at ounce first select "all_joints". hit the "learn" buton again to end calibration. body motion is now active.
- the toggle on the top right activates remote sound control for the "learn" function, for if you work alone. enable it, use the vertical slider to choose the gate for incoming volume. stand at your starting point, and clap or scream. calibrate, and clap again.
- if you toggle from "abs" to "rltv", instead of calibrating the movement of each joint in absolute space it will consider their relative distance to the torso joint. the advantage of this is one movement will have the same effect wherever you are positioned in the space.
- you save, open, and load presets as textfiles on your drive. you can save presets for the whole patch on the top right of the master patch.
SHOOTER:
- basically the same as kinector, but used for one-shots instead of continuous changes.
- chose a user, a joint, an axis, and a direction
- type a chanel cumber where it says CC
- in "time", type a time in miliseconds. everytime a joint passes a chosen point in space in a chosen direction, it will output a line from 0 to 1 in the chosen time.
- calibrate in the same way. you can use "all_joints" too bu there's a huge error somewhere so if you do first toggle to "value".
- same as kinector for the rest.
ok here you go. i don't know how much you know pd, so that's why i explained as much as i could. these patches are absolutely not clean, they're my first ideas since i got the kinect, and i'm working on more to have one tight patch in the end (including speed detection, movement prevision to compensate latency, etc ... ).
ok hope this helps.
if you have trouble using the "mud" patch let me know. if you are going to use the patch, please let me know and make sure you mention it's mine.
cheers
salut
gab
DJ/VJ scratching system
First my story: (you can skip down to END OF STORY if you want)
Ever since I saw Mike Relm go to town with a DVDJ, I've wanted a system where I could scratch and cue video. However, I haven't wanted to spend the $2500 for a DVDJ. As I was researching, I found a number of different systems. I am not a DJ by trade, so to get a system like Traktor or Serrato with their video modules plus turntables plus hardware plus a DJ mixer, soon everything gets really expensive. But in looking around, I found the Ms.Pinky system and after a little bit, I found a USB turntable on Woot for $60. So I bought it. It was marketed as a DJ turntable, but I knew that it wasn't really serious since it had a belt drive, but it came with a slip-pad and the USB connection meant that I wouldn't need a preamp. And so I spend the $100 on the Ms.Pinky vinyl plus software license (now only $80). This worked decently, but I had a lot of trouble really getting it totally on point. The relative mode worked well, but sometimes would skip if I scratched too vigorously. The absolute mode I couldn't get to work at all. After reading a little more, I came to the conclusion that my signal from vinyl to computer just wasn't strong enough, so I would need maybe a new needle or maybe a different turntable and I didn't really want to spend the money experimenting. I think that the Ms. Pinky system is probably a very good system with the right equipment, but I don't do this professionally, so I don't want to spend the loot on a system.
Earlier, before I bought Ms.Pinky (about two years ago), I had also looked around for a cheap MIDI USB DJ controller and not found one. Well, about a month ago, I saw the ION Discover DJ controller was on sale at Bed, Bath & Beyond for $50. They sold out before I could get one, but Vann's was selling it for $70, so I decided that that was good enough and bought one. I had planned to try to use it with Ms. Pinky since you can hook up MIDI controllers to it. But it turns out that you can hook up MIDI controllers to every control except the turntable, so that was a no go. If I had Max/MSP/Jitter, I could have changed that, but that's also way expensive. So, how should I scratch? My controller came with DJ'ing software and there's also some freeware, like Mixxx, but none of this has video support. So I look around and find Pure Data and GEM.
And I see lots of questions about scratching, how to do it. And there are even some tutorials and small patches out there, but as I look at them, none of them are quite what I'm looking for. The YouTube tutorial is really problematic because it's no good at all for scratching a song. It can create a scratching sound for a small sample, but it's taking the turntable's speed and using that as the position in the sample. If you did that with a longer song, it wouldn't even sound like a scratch. And then there are some which do work right, but none of them keep track of where you are in the playback. So, whenever you start scratching, you're starting from the beginning of the song or the middle.
So, I looked at all this and I said, "Hey, I can do this. I've got my spring break coming up. Looking at how easy PD looks and how much other good (if imperfect) work other people have done, I bet that I could build a good system for audio and video scratching within a week." And, I have.
END OF STORY
So that's what I'm presenting to you, my free audio and video scratching system in Pure Data (Pd-extended, really). I use the name DJ Lease Def, so it's the Lease Def DJ system. It's not quite perfect because it loads its samples into tables using soundfiler which means that it has a huge delay when you load a new file during which the whole thing goes silent. I am unhappy about this, but unsure how to fix it. Otherwise, it's pretty nifty. Anyway, rather than be one big patch, it relies on a system of patches which work with each other. Each of the different parts will come in several versions and you can choose which one you want to use and load up the different parts and they should work together correctly. Right now, for most of the parts there's only one version, but I'll be adding others later.
There's a more detailed instruction manual in the .zip file, but the summary is that you load:
the engine (only one version right now): loads the files, does the actual signal processing and playback
one control patch (three versions to choose from currently, two GUI versions and a MIDI version specific to the Ion Discover DJ): is used to do most of the controlling of the engine other than loading files such as scratching, fading, adjusting volume, etc.
zero or one cueing patch (one version, optional): manages the controls for jumping around to different points in songs
zero or one net patch (one version: video playback): does some sort of add-on. Will probably most commonly be used for video. The net patches have to run in a separate instance of Pd-extended and they listen for signals from the engine via local UDP packets. This is set-up this way because when the audio and video tried to run in the same instance, I would get periodic little pops, clicks, and other unsmoothnesses. The audio part renders 1000 times per second for maximum fidelity, but the video part only renders like 30 or 60 times per second. Pure Data is not quite smooth enough to handle this in a clever real-time multithreading manner to ensure that they both always get their time slices. But you put them in separate processes, it all works fine.
So, anyway, it's real scratching beginning exactly where you were in playing the song and when you stop scratching it picks up just where you left off, you can set and jump to cue points, and it does video which will follow right along with both the scratching and cuing. So I'm pretty proud of it. The downsides are that you have to separate the audio and video files, that the audio has to be uncompressed aiff or wav (and that loading a new file pauses everything for like 10 seconds), that for really smooth video when you're scratching or playing backwards you have to encode it with a codec with no inter-frame encoding such as MJPEG, which results in bigger video files (but the playback scratches perfectly as a result).
So anyway, check it out, let me know what you think. If you have any questions or feedback please share. If anyone wants to build control patches for other MIDI hardware, please do and share them with me. I'd be glad to include them in the download. The different patches communicate using send and receive with a standard set of symbols. I've included documentation about what the expected symbols and values are. Also, if anyone wants me to write patches for some piece of hardware that you have, if you can give me one, I'll be glad to do it.
Keith Irwin (DJ Lease Def)
PD cuts off other sound on the computer
I did.
For command jackd I get this terminal output:
matjaz@matjaz-NV59C:~$ jackd
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
usage: jackdmp [ --no-realtime OR -r ]
[ --realtime OR -R [ --realtime-priority OR -P priority ] ]
(the two previous arguments are mutually exclusive. The default is --realtime)
[ --name OR -n server-name ]
[ --timeout OR -t client-timeout-in-msecs ]
[ --loopback OR -L loopback-port-number ]
[ --port-max OR -p maximum-number-of-ports]
[ --midi OR -X midi-driver ]
[ --verbose OR -v ]
[ --clocksource OR -c [ c(ycle) | h(pet) | s(ystem) ]
[ --replace-registry ]
[ --silent OR -s ]
[ --sync OR -S ]
[ --temporary OR -T ]
[ --version OR -V ]
-d backend [ ... backend args ... ]
Available backends may include: alsa, dummy, freebob, firewire or net
jackdmp -d backend --help
to display options for each backend
and for qjackctl:
The same control GUI opened where I clicked start.
15:38:11.262 Patchbay deactivated.
15:38:11.263 Statistics reset.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:38:11.286 ALSA connection graph change.
15:38:11.482 ALSA connection change.
15:38:19.241 Startup script...
15:38:19.242 artsshell -q terminate
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
sh: artsshell: not found
15:38:19.646 Startup script terminated with exit status=32512.
15:38:19.646 JACK is starting...
15:38:19.646 /usr/bin/jackd -dalsa -d/dev/dsp -r44100 -p256 -n2 -Xseq
15:38:19.649 JACK was started with PID=2544.
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot lock down memory area (Cannot allocate memory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
audio_reservation_init
Acquire audio card Audio-1
creating alsa driver ... /dev/dsp|/dev/dsp|256|2|44100|0|0|nomon|swmeter|-|32bit
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
Cannot initialize driver
JackServer::Open() failed with -1
Failed to start server
15:38:19.743 JACK was stopped with exit status=255.
15:38:19.745 Post-shutdown script...
15:38:19.746 killall jackd
jackd: no process found
15:38:20.153 Post-shutdown script terminated with exit status=256.
15:38:21.703 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:38:31.152 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:38:42.143 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:39:02.300 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
I'm lost.
PD cuts off other sound on the computer
Hi,
Yes.
I have turned on the computer and freshly started jackd. I start it from qjackcti (http://en.wikipedia.org/wiki/Qjackctl).
Error messages:
1. first window:
Could not connect to JACK server as client.
- Overall operation failed.
- Unable to connect to server.
Please check the messages window for more info.
2. Message window:
13:55:36.236 Patchbay deactivated.
13:55:36.254 Statistics reset.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:55:36.336 ALSA connection graph change.
13:55:36.559 ALSA connection change.
13:55:36.560 ALSA connection graph change.
13:55:38.356 Startup script...
13:55:38.357 artsshell -q terminate
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
sh: artsshell: not found
13:55:38.760 Startup script terminated with exit status=32512.
13:55:38.760 JACK is starting...
13:55:38.760 /usr/bin/jackd -dalsa -d/dev/dsp -r44100 -p256 -n2 -Xseq
13:55:38.798 JACK was started with PID=2106.
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot lock down memory area (Cannot allocate memory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
audio_reservation_init
Acquire audio card Audio-1
creating alsa driver ... /dev/dsp|/dev/dsp|256|2|44100|0|0|nomon|swmeter|-|32bit
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
Cannot initialize driver
JackServer::Open() failed with -1
Failed to start server
13:55:39.278 JACK was stopped with exit status=255.
13:55:39.279 Post-shutdown script...
13:55:39.279 killall jackd
jackd: no process found
13:55:39.700 Post-shutdown script terminated with exit status=256.
13:55:40.822 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:55:54.576 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:58:38.483 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:59:09.197 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
As you can see the last paragraph (...jjack server is not running or cannot be started...) then repeats itself over and over again every 30 seconds.
Seems like Jack isn't working??
Thanks.
Interaction Design Student Patches Available
Greetings all,
I have just posted a collection of student patches for an interaction design course I was teaching at Emily Carr University of Art and Design. I hope that the patches will be useful to people playing around with Pure Data in a learning environment, installation artwork and other uses.
The link is: http://bit.ly/8OtDAq
or: http://www.sfu.ca/~leonardp/VideoGameAudio/main.htm#patches
The patches include multi-area motion detection, colour tracking, live audio looping, live video looping, collision detection, real-time video effects, real-time audio effects, 3D object manipulation and more...
Cheers,
Leonard
Pure Data Interaction Design Patches
These are projects from the Emily Carr University of Art and Design DIVA 202 Interaction Design course for Spring 2010 term. All projects use Pure Data Extended and run on Mac OS X. They could likely be modified with small changes to run on other platforms as well. The focus was on education so the patches are sometimes "works in progress" technically but should be quite useful for others learning about PD and interaction design.
NOTE: This page may move, please link from: http://www.VideoGameAudio.com for correct location.
Instructor: Leonard J. Paul
Students: Ben, Christine, Collin, Euginia, Gabriel K, Gabriel P, Gokce, Huan, Jing, Katy, Nasrin, Quinton, Tony and Sandy
GabrielK-AsteroidTracker - An entire game based on motion tracking. This is a simple arcade-style game in which the user must navigate the spaceship through a field of oncoming asteroids. The user controls the spaceship by moving a specifically coloured object in front of the camera.
Features: Motion tracking, collision detection, texture mapping, real-time music synthesis, game logic
GabrielP-DogHead - Maps your face from the webcam onto different dog's bodies in real-time with an interactive audio loop jammer. Fun!
Features: Colour tracking, audio loop jammer, real-time webcam texture mapping
Euginia-DanceMix - Live audio loop playback of four separate channels. Loop selection is random for first two channels and sequenced for last two channels. Slow volume muting of channels allows for crossfading. Tempo-based video crossfading.
Features: Four channel live loop jammer (extended from Hardoff's ma4u patch), beat-based video cross-cutting
Huan-CarDance - Rotates 3D object based on the audio output level so that it looks like it's dancing to the music.
Features: 3D object display, 3d line synthesis, live audio looper
Ben-VideoGameWiiMix - Randomly remixes classic video game footage and music together. Uses the wiimote to trigger new video by DarwiinRemote and OSC messages.
Features: Wiimote control, OSC, tempo-based video crossmixing, music loop remixing and effects
Christine-eMotionAudio - Mixes together video with recorded sounds and music depending on the amount of motion in the webcam. Intensity level of music increases and speed of video playback increases with more motion.
Features: Adaptive music branching, motion blur, blob size motion detection, video mixing
Collin-LouderCars - Videos of cars respond to audio input level.
Features: Video switching, audio input level detection.
Gokce-AVmixer - Live remixing of video and audio loops.
Features: video remixing, live audio looper
Jing-LadyGaga-ing - Remixes video from Lady Gaga's videos with video effects and music effects.
Features: Video warping, video stuttering, live audio looper, audio effects
KatyC_Bunnies - Triggers video and audio using multi-area motion detection. There are three areas on each side to control the video and audio loop selections. Video and audio loops are loaded from directories.
Features: Multi-area motion detection, audio loop directory loader, video loop directory loader
Nasrin-AnimationMixer - Hand animation videos are superimposed over the webcam image and chosen by multi-area motion sensing. Audio loop playback is randomly chosen with each new video.
Features: Multi-area motion sensing, audio loop directory loader
Quintons-AmericaRedux - Videos are remixed in response to live audio loop playback. Some audio effects are mirrored with corresponding video effects.
Features: Real-time video effects, live audio looper
Tony-MusicGame - A music game where the player needs to find how to piece together the music segments triggered by multi-area motion detection on a webcam.
Features: Multi-area motion detection, audio loop directory loader
Sandy-Exerciser - An exercise game where you move to the motions of the video above the webcam video. Stutter effects on video and live audio looper.
Features: Video stutter effect, real-time webcam video effects