-
grg
For a "patched" version there is physigs
https://github.com/footils/physigs
http://lists.puredata.info/pipermail/pd-list/2010-05/078807.html -
-
grg
I'm not sure what the current status is but its being worked on quite intensivly I believe.
http://gitorious.org/pdlib
http://noisepages.com/groups/pd-everywhere/
http://nettoyeur.noisepages.com/ -
grg
@Busnoise said:
Take a 16-bit signal, divide by 512, multiply by 512 -> only 8 bits of resolution preserved, right? (analogously to shrinking and re-enlarging a pixel image)
This won't work as pd's floating point magic will leave the signal (almost) unchanged.
(also in the image analogy, shrinking would be more like downsampling, and 8bit-sound would compare to reduced color depth)
you'll need something like this to actually "clip the bits"[*~ BD]
| \
| [wrap~]
| |
[-~]
|
[/~ BD]from discussion here
http://lists.puredata.info/pipermail/pd-list/2008-12/066923.htmlsearching for bitcrusher here and on the list will give you lots of options
-
grg
assuming a square/cubic 'bounding box':
Each step of your simulation, substract x-alien from x-ball, [abs], check if smaller than (1/2 size alien + 1/2 size ball). Do the same for y (and z). All 3 true -> collision.for circles/balls you essentially do the same but use pythagoras to get the center-center distance (make a drawing on paper in 2D and it should be clear).
note that this 'step based' collision detection has drawbacks, if your balls are too fast they can fly through the aliens. It gets tricky then, check if you need it first. Then google collision detection game physics etc.
-
grg
Hi.
I recently did the same thing in Max, I don't know exactly how pd deals with special characters, but here are some pointers.-
To read in the plotfile, I used Max's filein, which gives you ascii directly. I believe mrpeach/binfile does the same for pd?
-
"," ";" etc are problematic in Max, and probably in pd too. to output "PA 120,200;" I used atoi ("asci to int in" max) only for the numbers, and inserted the , ; etc via an append / prepend chain with the corresponding ascii values, i.e. [append 59 13] to put ";" + CR at the end etc.
-
occasionally one might need to use backslash as an escape char in Max, don't know about pd
-
depending on the plotter, you might need to tell it to go into xon/xoff mode, this is some escape sequence, I "manually" translated to ascii and used it as a list in Max.
if its a hp plotter, most docs are available at hpmuseum.net (go for programming manuals), for other brands I hope it came with a printed one ...
good luck.
-
-
grg
you could simply use an extra line~, triggerd by the same bang as the tabread driving line, to quickly fade in (and quickly fade out again at the end, using del and samplelength-5ms or something). Or look into B09.sampler.loop.smooth from examples. There are also higher level abstractions for this in rj lib, or try the xsample objects.
-
grg
Hi Dan,
i think the effect you want can be acheived by using a array-based aproach rather than a delayline, by writing and reading from the array at changing speed, but I don't know how to do this in Pd. For Max there is a 3rd party object called ipoke~
http://pierrealexandretremblay.com/no-tv//MaxMSP/
that does the trick (the standard max poke~ object has no interpolation, so it can't write at speeds slower/faster than 1). I attached a screenshot from the help file. IMHO this does exactly what you describe.
There is a thread on the list a few weeks ago suggesting such an object for pd vanilla ("tabwriteat~"), but I don't know about interpolation. Also sorce was posted but no ready to use object, maybe someone else can suggest an existing object for pd that does this. -
grg
@MarioG said:
I want to know if there is a simple protocol by which the game can communicate with PD, so the music fits with the action taking place. Also, it would be great that there is a way in which PD can send information TO the game (such as BPM of the music, occurrence of a specific musical passage, etc)
Hi Mario,
read this: http://www.obiwannabe.co.uk/tutorials/gamedev/OSC/oschooks.html
and see if it fits your needs, pd can definetly run stable for hours/days etc, if you can come up with something musically satisfying in pd is up to you -
grg
If you're on OS X, you might want to try hid. At least in Max you can get keystrokes via the hi-object there - I don't know if its the same for pd, my extended doesn't have a hid helpfile for some reason.
-
grg
http://www.fredrikolofsson.com/pages/code-sc.html
only converts to max 4 format, but you can open these in pd and see what you get. -
grg
Check out rjdj, its basically pd on the iphone and it works really well.
-
grg
I think you could set this up by using a delwrite/read combo for your maximum stutter length (i.e. 4th) that has feedback but no output, and then use a second vd~ with the same name to generate your output. For a 4th this would be constant at 0, for the other divisions you'd have to setup a metro at delaytime/divisions. For example if your 4th are 200ms, to get 16th the vd~ would read the delayline at 0 for 100ms, then at 100 for 100 ms, then at 200 etc. I playing arround with something similar, but I'm still slow in pd so I haven't tested it yet but i think it should work.