-
scape
I'm having major issues trying to install this external.
I have added the path to the extern in PD>paths.
The error dump coming up is:/Users/chris/Desktop/earplug~osx/earplug~.pd_darwin: dlopen(/Users/chris/Desktop/earplug~osx/earplug~.pd_darwin, 10): no suitable image found. Did find: /Users/chris/Desktop/earplug~osx/earplug~.pd_darwin: mach-o, but wrong architecture earplug~: can't load library
On Mac OS X.
I downloaded this extern from here from the link that says osx. I assume I don't have to compile it or anything? -
scape
I have a stream of data coming in through a gate. For each gate output, I want to be able to set the value to zero when there is no data at the gate. I think a metronome will be required to periodically 'check' if there is data coming, and if there isnt set it to zero.
This 'zero' would then control a spigot to control data flow from another source.
I have tried a combination of spigots, gates, logical tests, bangs and metronomes, and I just cant get it to work.
Pseudo code:
var control (user can control)
var dataStream1 (constant data streams on all accounts)
var dataStream2 "
var dataStream3 "
var dataStream4 "
var collector (i want the data streams to end up here)if 1 >= control <= 4 then
send dataStreamcontrol to collector
endifI can get as far as a gate and the controler, however, since all data streams are dumping data, even if the date is switched to say, 2, the collector gets filled simultaneously with all the data streams.
Here is an analogy which can also describe what I want incase its unclear:
Where [gate] might be compared to filling for example four buckets full of water from a hosepipe - that is one data stream and several collectors. In this scenario, if you switch from filling bucket 1 to bucket 2, there will still be some water in bucket 1 from where you filled it earlier. Here I might have 4 buckets on the floor and I move the hosepipe.
I have four hosepipes, each with different coloured water. By selecting 1, 2, 3 or 4, I want to fill ONE bucket with that coloured water, but if I change to a different hosepipe, I want to empty the bucket first, then start filling it with the new coloured water. Here I might have 4 hosepipes suspended and I'm moving the bucket underneath them (tipping out unwanted water).
Meh!
-
scape
Is it possible to change the layer or order a canvas appears in the PD environment?
In graphic software this might be referred to as 'send to back', 'send to front' etc, or the idea of layers.I want to use different coloured canvases to section off different areas of the patch that do different things, so its easier to see.
I've written most of the patch already, but if I create a new canvas, it appears infront of objects and behind connectors, which is very strange.
I can only get objects to appear ontop of the canvas if I insert them after the canvas has been drawn. This, of course, would mean I would have to re-insert ALL the objects, and theres lots.
I have considered separating different parts of the patch into subpatches, but a) I have a large screen and like to see the big picture and I will be exhibiting the patch in operation so it would be nice for poeple to see the whole thing. Indeed, I have used subpatches for small elements of the overall patch, but not just to organise how it looks.
Apologies if this has been asked before, I searched and couldnt find anything.
-
scape
This one is a bit complicated, I can just about picture what I want in my head; I will do my best to describe it here. Please don't get scared off by the long post! I've put detail as I need this to work for a project I'm working on for my degree. All help appreciated
I have a stream of values (floats) coming from an external source (via OSC). I want to be able to tell when this stream is interrupted, eg no more floats are arriving, so that I can switch off shape rendering in Gem.
A little about the patch:
Wii Remote detecting IR LEDs.
IR data captured with OSCulator.
OSC data sent to PD over localhost.
OSC streams routed to x and y values of IR points.
x and y values draw small circles in gem, showing position of IR points in real time.Now, the problem is, if the IR beam is interrupted (no more OSC data coming in), the circle shapes stay on screen and don't move. When the beam is restored, the circles ping over to their new position. I want there to be NO circles if the beam is interrupted (no data flow).
I want to be able to say (in pseudo code)
If data stream
render circle on
send data stream to [translateXYZ]
else
send stop rendering to [circle]
end ifI have read all the PD help patches and can't find anything that would really do the trick. I have a suspicion there might be something to do with checking if a value existed over time? Or maybe 'bang' something to 'remind' it theres no more data.
Any help appreciated.
I would attach the patch, but since its so hardware dependent, there wouldn't be much point. I hope I have described it as best above. -
scape
Is it possible to rotate shapes about a point and not the centre of the shape?
Example, imagine a square in PD.
Normally [rotate] and [rotateXYZ] would rotate the shape about its centre. Is it possible to rotate about another point in space? Or maybe the corner of the square?At first one might think translate then rotate, but its not the same.
-
scape
Is it possible to route data in PD using [route] or similar object in the same way you might in a programming language? I meant conditional routing, like where you might use if-then-else statements in programming.
In the same way the following code can be used with route:
if($variable='alpha'){ print 'cheese' } else { print 'goat' }
...would be something like this in PD:
[alpha( [beta(
| /
[route alpha]
| \
[cheese( [goat(
\ /
[print]I want to be able to do this psuedo code with PD objects:
if(10<$variable<20){ print 'between 10 and 20' //do exiting stuff here } else { print 'outside range' //do something else here }
I have investigated using PDJ (Java in Pure Data) which I would like to avoid since if it is possible to do this in PD, then it makes more sense to do it there.
-
scape
I've just managed a very hacky way of achieving this on OSX, providing you don't need to see each GEM window at the same time.
Run PD under two different users and make sure fast user switching is turned on. Preferably no passwords for each user as this will slow things down.
Each PD under each user will happily generate their own independant GEM windows.
To send data between each instance of PD use [sendOSC] through localhost.
Might not be what most people want, but it works for me.
-
-
-
scape
Yeah I was aware of that after quite some extensive research!
iemgui contains an object called [cube_sphere] which is used in various sound spatialization patches which can be found on the pd tutorials/howtos front page.
These patches are due for an upgrade to support new/standard libraries, especially if you are suggesting iemgui is now not being developed.
I found the library in the end deep in the internet in someone elses zip of abstractions that required it.
-
scape
Ah cool, many thanks, I'll have a go with those suggestions.
EDIT
[mux] worked perfectly, many thanks -
scape
es, I see your using the Wii Remote to bring data into PD?
Thats interesting. I'm doing that kind of thing for my major degree projectTry using OSCroute.
It will split up your osc messages like this:
[OSCroute /wii]
|
[OSCroute /a]
|
[numbers!] -
scape
Excellent!
That is a very hacky way of doing it, is there a 'wishlist' for the next version of PD? -
scape
Yeh I was looking at [spigot] too, but it didn't quite have the effect I wanted.
I mean a copy of the patch itself into ascii, not any atoms. So like printing to a post script file, you could maybe export to ascii (for posting on forums etc).
EDIT: It must be pretty simple actually. I just opened a .pd file in text edit and I think it would be easy enough to make an ascii parser in perl or something.
-
scape
YAY!
I figured it out myself in the end after hours (I had been trying before I originally posted) of reading, experimenting and fiddling (which is after all the best way to learn - I've picked up so many other things along the way). And it was so stupidly simple.It looks like this:
[loadbang] [<one of the values from the IR>]
| /|
[metro 1] _ / /
\ __ / |
\ / /
[<= 0] |
\ /
[0 ( |
\ /
[x } ...where x is a numberPS. If someone wants to make a PD-to-ASCII generator, that would be very useful. If no-one takes the straw on that, I'll build one when I've finished my degree.