Re: [PD] 3D Look at

2012-06-28 Thread pvallet

I apologize, i should have replied to list...

Not very sure, but according to my fuzzy memory, one advantage of 
quaternions is that you can compose many rotations by simply multiplying 
quaternions together, which is quicker than building matrices for each 
transform, and compute a final transform matrix (which can express also 
translations and scalings) only at the end. I don't recall the details 
there so you'll have to check the exact math.

i see here (wikipedia) something like

A quaternion q(x,y,z,w) can be expressed as a 3x3 rotation matrix
 | 1-2(y*y)-2(z*z)   2xy-2zw 2xz+2yw  |
q=|  2xy+2zw   1-2(x*x)-2(z*z)   2yz-2xw   |
 |  2xz-2yw 2yz+2xw   1-2(x*x)-2(y*y) |

which you an then matrix multiply with the other transforms to get the 
final result.


So in PD you might want to use a matrix to express the whole transform 
rather than
just  [rotateXYZ].  I don't know if you find this in gem, but it should 
be there.


hope this helps,
Pierre.

Le 27/06/2012 12:10, Roch Jub a écrit :

Hey Pierre !

So I should convert to quaternion, then back to degreees ? or else how
would I make a quaternion interact with [rotateXYZ] ?

and also in the cart2sph, there is 3 outlets,

the first one is R, it's not used in demo but what is it ? second is phi
and theta that I know :)

cheers

2012/6/27 pvallet publica...@free.fr mailto:publica...@free.fr

One major problem with euler rotations is that you can't, except in
trivial cases, smoothly interpolate betwen two rotation values. So
you might want to use quaternions for solving this. Basically a
quaternion is a 4D vector, expressing a direction (x,y,z) and a
rotational or spin (w) around this direction. Not that i'm
fluent with the math involved but when you interpolate between two
quaternions, you go smoothly along a straight arc between A  and B
position.
A search for expressing rotations using quaternons should give you
the pointers to the math you'll need.

cheers
Pierre


Le 26/06/2012 15:54, Roch Jub a écrit :

Hey !


So I send a mail some time ago to the list and got no answer, so
I guess
it was not really clear.

I come now with a more simple version of my problem.

I have two cubes,

cube A
translationXYZ 0 0 0
rotationXYZ 0 0 0

and cube B
translationXYZ 12 5 6
rotationXYZ 0 0 0

now I want to calculate with only thoses informations, the
rotations in
X Y and Z for cube A to look at cube B. (numbers are irrelevent,
I want
to make the algorythme)

I have tryed many things, with trigonometry, learned about
Gimbal lock,
read everything I could about euler angles, etc ... result is
it's not
working right.

I attached an exemple patch. The math inside are based on the
help I got
on a math forum. It quite look like the thing I was trying to do
but it
doesnt work better :)

Anybody ? Any idea?

cheers

PS : I try to do that to calculate joint orientations of kinect
skeleton. and even though there might be other solutions(wich I
be glad
to know about), now it's a personal affair, I WANT TO DO IT !!!
2 WEEKS
I'VE BEEN TRYING !! AAARGH



_
Pd-list@iem.at mailto:Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -
http://lists.puredata.info/__listinfo/pd-list
http://lists.puredata.info/listinfo/pd-list






___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] MotorMix to PD

2012-04-19 Thread pvallet

Le 19/04/2012 02:52, Rishabh Natarajan a écrit :

I've realized that with any fader on the motormix, the values being
transmitted via ctlin to pd vary between 0, 64 and 96 and they mainly
keep jumping between 0 and 64, even if you are only moving upwards. It
only touches 96 once you get the fader to the very top.



This means you only catch the 2 Last bits of the slider value
(ctl number hex20 to hex27 or, as you say, 32 onwards in decimal.)
cf. https://en.wikipedia.org/wiki/Least_significant_bit

Quoting the book, the message is transmitted as: (in hexadecimal)
FADER (1 thru 8)
B0-(00thru07)-MSB-(20thru27)-LSB
MSB=0 M M M M M M M LSB=0 L L 0 0 0 0 0

So you can use (or can you?) Ctlin 0 to 7 to get a coarse (7 bits) info 
for the slider position.


or add ctl(0) value with ( ctl(32) value 5 ) to get the full 9-bit data.
5 means: shift the bits  five places to the right, then you get 4 
possible values  (Some binary calculus awareness definitely helps here)


 Also, there is an

object written for Max to again deal specifically with the Motormix.
Is there any way to get this object to work with pd? (Perhaps along
the line of the cyclone library which holds most of Max's objects)


herm, not really as this seems a compiled external for max so you'd have 
to reimplement it




@Cyrille:I will try the print object to see all the other values
coming out from moving the Motormix fader. I found that the faders
started from number 32 onwards, but I'm not sure which of the
ctlin's outlets to connect to the vslider in the patch. I created an
object ctlin with argument 32 and then connected the leftmost outlet
to the first vslider. With every movement of the Motormix fader, the
vslider kept jumping positions but either went back to it's lowest
value or just stuck to some other value. It never moved along with
the motormix fader.


cf. supra for the explanation

As for getting the motor to move the faders

using ctlout, I've not got to that stage yet but hopefully with your
advice, I will be able to achieve the movement.


Yes, on the paper it should work.

47 is 2F in hexadecimal, you could use the tech. manual to find where it 
happens. (in many places really).


I'm afraid that you won't escape the task of interpreting and 
reconstructing composite midi messages in some places, like Cyrille 
showed for midiout messages. Could someone point to useful objects that 
can be used for accumulating / packing / parsing variable-length MIDI 
messages? as my pd knowledge of objects out there is a bit limited i 
have to say.


Warm regards,
Pierre.


On Wed, Apr 18, 2012 at 4:38 AM, Cyrille Henry c...@chnry.net
mailto:c...@chnry.net wrote:

hello,

message 47 i probably a fader release information.
using print better than number you'll see that it's not the only
message you are receiving.

fitering all information to have only fader movement is easy :
a ctlin 0 object should output value of the 1st linear fader.
ctlin 1 the 2nd etc

ctlin 64 ... ctlin 71 output rotation speed of the rotative
fader (they did not output an absolute value)

for the toggle, it's a bit more tricky: you have to use 2 ctlin
objects :
i used :
ctlin 47ctlin 15
pack f f
route 66
sel 0 1 2 3 4 5 6 7

in order to select press information from 1 raw of toggle.
the other raw should be almost similar.

To move the fader thanks to the motor, you have to send 2 ctlout
information.
using midiout, you can send a message like : 176 0 $1 176 32 0
i.e. sending value to ctlout 0, then sending 0 to ctlout 32.


toggle did not light on, because they can light in different
colour, you have to light them up manually.
to light up a specific toggle i used
176 12 0 176 44 $1 where $1 value is 2 or 66, for 1st column
fader,
using 176 12 1 for 2nd column etc.
i think 44 can be changed to address other raw, ans the $1 value
for the color.

i don't have any motor mix since many many years, so can't help
more, but all can be made using simple ctlout. exapt display
text on the screen that need sysex messages.

cheers
cyrille






 --( re-quoting my previous answer: )


Hi,


Not sure if i understand you fully (don't own a motormix) and if you're an 
expert with PD (which i'm definitely not) but

From a quick glance at the MIDI implementation from the MotorMix v 1.2 
Developer pkg3.pdf on CMLabs web site I see this:

FADER (1 thru 8)
B0-(00thru07)-MSB-(20thru27)-LSB
MSB=0 M M M M M M M LSB=0 L L 0 0 0 0 0

meaning that the faders values are transmitted in two parts to get 9-bit 
precision.(512 values).
To reconstruct the nine bits you'll need to write a specific catcher 
with 

Re: [PD] analysis before synthesis: How?

2010-03-10 Thread pvallet

Hi,

You might also want to chek the pd doc about fft operations examples in 
pd\doc\audio.examples\
namely I04.noisegate.pd for filtering the noise and I03.resynthesis.pd 
to reconstruct your signal. (but all the I section is loosely relevant)

You'll then be able to experiment and build from these.

hth,
greetings,
p.

meino.cra...@gmx.de a écrit :

Hi,

this is more a general question:
I have a piece of sound (sorry, English is not my mothers tonque...)
which conatins beside background noise a scifi-sound, which I want to
synthezise (synthesise?) with puredata as close to the original as
possible -- without the background.

Now I am looking for recipe to do such a thing -- without the need of 
a supercomputer and without the deep deep knowledge of really deep

math.

Is there a way to supress the backgroudn as much as possible?
Would it be make sense to make a fourier analysis with a tool (what
tool -- I am using puredata on Gentoo-Linux)? Are there others
tool, which would help me to solve this task?

Any idea and help are very appreciated -- thanks a lot in advance!

best regards and have a nice sunday!
mcc



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] gridflow on windows

2010-03-08 Thread pvallet

Pddp is the PureData Documentation Project
i'm not using it so i don't know much about it, but you can probably 
download a package from the net


Greetings,
p.

Matteo Sisti Sette a écrit :

Oh sh##,
I see it needs Pd Extented. I was trying it with Pd Vanilla.

Maybe it would be a good idea to mention it in the installation readme 
and/or home page, or is it obvious?


It seems it works for the moment. However, in the tutorial intro 
(gf_tutorial_intro.pd) there are a lot of [pddp_open] objects that 
cannot create.


What is pddp_open? Where can I get it?

thanks
m.

Matteo Sisti Sette escribió:

Hi,

I have just downloaded gridflow 0.0.7(final) for Windows from 
http://gridflow.ca/ and followed the installation instructions (copy 7 
dll files to windows/system32, the gridflow folder into extra, and 
added gridflow to startup), but I get the following error (in a popup 
window, not the pd console):


No se encuentra el punto de entrada del procedimiento canvas_setgraph 
en la biblioteca de vínculos dinámicos pd.dll


which roughly means

cannot find the entry point of procedure canvas_setgraph in the 
dynamic link library pd.dll


Once I hit OK, the console says:
D:\\programmi\\pd\\extra\\gridflow\\gridflow.dll: couldn't load
gridflow: can't load library

Do I need something more to have it running on Windows?
Or should I try with some older version of Pd? (I'm using 0.42.4)

thanks
m.






___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list