Yep,
Got it.
That's how it should be done. At least that's how I do it (-:
++
Jé
Nuno Godinho a écrit :
Hi Jé,
I am sorry if I didn't explain it well enough.
I want to avoid having to send the message "open n0.avi" into the "sub" abstraction. I will be using several instances of "sub". The problem is that when I create the object like "sub n0.avi", which should be defining the $1 (the leftmost inlet, right?) parameter, nothing happens. Get it? Now I have to send the filename through an inlet. I would like to define it as an inline constant argument. I just don't understand how to do it.
Maybe it would be easier if you could send me a working example of an object sending inline arguments into an abstraction.
Thanks, Nuno
-----Original Message----- From: pd-list-bounces@iem.at [mailto:pd-list-bounces@iem.at] On Behalf Of Jerome Tuncer Sent: quinta-feira, 8 de Dezembro de 2005 20:26 To: pd-list@iem.at Subject: Re: [PD] Inlinet creation arguments into abstracts
Hhhhhmmmmmmm...
I'm not sure I'm getting it right here.
Your patch actually works but what you'd like to do is make it simpler in case you have more instances of that sub.pd??
What's the relationship between this and creation arguments of the instance of the abstract.?
Sorry for being so dumb it doesn't appear clearly to me (-:
++
Jé
Nuno Godinho a écrit :
Hi Georg,
I found it on the docs but I still can't figure out how to
use it. I
actually tried to add an argument to an abstract but nothing really happened.
I am sending you a dumb example attached so that you can,
if possible,
tell me what am I doing wrong. Inside "main" I have an instance of "sub" and now I have to send it "open n0.avi" in order to
make it load
the n0.avi file. I would like to just write "sub n0.avi".
Can you help me understand this? It seems to be quite
simple but I am
lost here.
Thanks, Nuno
-----Original Message----- From: Georg Holzmann [mailto:grhPD@gmx.at] Sent: quinta-feira, 8 de Dezembro de 2005 19:06 To: Nuno Godinho Cc: pd-list@iem.at Subject: Re: [PD] Inlinet creation arguments into abstracts
Hallo!
anyone help me or point me to documentation? Pd
documentation talks a
lot about "creation arguments" but never explains how they
actually work. I'm shure it is explained somewhere, but don't know where ... In pd you can use $1 for first creation argument, $2 for the second etc.
LG Georg
--
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
#N canvas 231 355 892 451 10; #N canvas 0 0 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 5 27 pd gemwin; #X msg 5 8 create; #X obj 107 88 sub n0.avi; #X connect 0 0 1 0; #X connect 1 0 0 0; #X coords 0 0 0.00102564 0.00161551 200 140 0;
#N canvas 1493 149 639 630 10; #X obj 24 53 gemhead; #X obj 24 119 pix_film; #X obj 24 152 outlet; #X obj 83 53 inlet; #X obj 128 -22 loadbang; #X obj 128 10 symbol $1; #X msg 128 53 open $1; #X text 201 4 The OBJECT [symbol] will be instanciated with parameter $1; #X text 201 48 The $x in MESSAGES will be replaced by the parameter that; #X text 201 16 that is given to the parent abstraction (sub).; #X text 201 61 is given to its inlet.; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 1 0;
Hi there,
Using a MIDI slider (0-127) I have to crossfade between 4 films separated by regions. When the slider is between 0-30 film A is displayed, when it moves from 30 to 31 it quickly crossfades to film B, then at 60/61 crossfades to film C and finally at 90/91 crossfades to film D.
I was building this making use of three cascading pix_mix. But then I figured if it wouldn't be simpler to, instead of cascading, play with pix_alpha on each picture independently and thus creating my own crossfade. This way I would get more control over each film and build something more modular. The idea is: when the fader moves from 30 to 31 I use pix_alpha to make film A disappear at the same time making film B appear. Do you think this is a good approach?
How is crossfade built anyway? How is pix_mix implemented? By using alpha channel, right?
Any better ideas?
Thanks in advance, Nuno
pix_mix does the most basic mixing possible: (imageA * coeffA) + (imageB * coeffB). It does not touch the alpha channel at all.
If you want to do 'alpha' blending in hardware then use the [alpha] object followed by [colorRGB 1 1 1 0.5] and feed the alpha coefficients into the right inlet. Of course the images have to overlap and be drawn in the proper order for this to work.
I made a tutorial comparing the two methods here: http://taproot.dyndns.org/~cgc/tutorial_gem/tutorial8.html
cgc
On 12/8/05, Nuno Godinho eu@nunogodinho.com wrote:
Hi there,
Using a MIDI slider (0-127) I have to crossfade between 4 films separated by regions. When the slider is between 0-30 film A is displayed, when it moves from 30 to 31 it quickly crossfades to film B, then at 60/61 crossfades to film C and finally at 90/91 crossfades to film D.
I was building this making use of three cascading pix_mix. But then I figured if it wouldn't be simpler to, instead of cascading, play with pix_alpha on each picture independently and thus creating my own crossfade. This way I would get more control over each film and build something more modular. The idea is: when the fader moves from 30 to 31 I use pix_alpha to make film A disappear at the same time making film B appear. Do you think this is a good approach?
How is crossfade built anyway? How is pix_mix implemented? By using alpha channel, right?
Any better ideas?
Thanks in advance, Nuno
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Chris,
Thank you for your thorough instructions! I still didn't finish it but it's on it way to working quite well.
In my particular case tweaking the alpha directly is much better than using pix_mix because this way the films can be dealt with independent (in paralel) instead of cascading pix_mix objects.
Bye, Nuno
-----Original Message----- From: cgclepper@gmail.com [mailto:cgclepper@gmail.com] On Behalf Of chris clepper Sent: sexta-feira, 9 de Dezembro de 2005 4:28 To: Nuno Godinho Cc: pd-list@iem.at Subject: Re: [PD] Crossfade between 4 films moving a slider
pix_mix does the most basic mixing possible: (imageA * coeffA) + (imageB * coeffB). It does not touch the alpha channel at all.
If you want to do 'alpha' blending in hardware then use the [alpha] object followed by [colorRGB 1 1 1 0.5] and feed the alpha coefficients into the right inlet. Of course the images have to overlap and be drawn in the proper order for this to work.
I made a tutorial comparing the two methods here: http://taproot.dyndns.org/~cgc/tutorial_gem/tutorial8.html
cgc
On 12/8/05, Nuno Godinho eu@nunogodinho.com wrote:
Hi there,
Using a MIDI slider (0-127) I have to crossfade between 4 films separated by regions. When the slider is between 0-30 film A is displayed, when it moves from 30 to 31 it quickly
crossfades to film
B, then at 60/61 crossfades to film C and finally at 90/91
crossfades to film D.
I was building this making use of three cascading pix_mix.
But then I
figured if it wouldn't be simpler to, instead of cascading,
play with
pix_alpha on each picture independently and thus creating
my own crossfade.
This way I would get more control over each film and build
something
more modular. The idea is: when the fader moves from 30 to 31 I use pix_alpha to make film A disappear at the same time making film B appear. Do you think this is a good approach?
How is crossfade built anyway? How is pix_mix implemented? By using alpha channel, right?
Any better ideas?
Thanks in advance, Nuno
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Nuno,
I don't have the opportunity to open the patches right now (yours and the answer).
So maybe I'm duplication Jerome's example but maybe I can help you understand how it works... You seem to be misunderstanding one thing:
With the creation arguments (e.g. [sub n0.avi]) you don't create _inlets_ but variables inside the abstraction.
If you have for example an object [symbol $1] in your sub.pd then the $1 will be replaced by the first creation argument in the actual instance of the abstraction.
For example you can put the following in sub.pd:
[loadbang} | [symbol $1] | ...
Then the replaced $1 (= n0.avi) will be sent to wherever you like it after the abstraction has been loaded.
HTH Urs
Jerome Tuncer schrieb:
Yep,
Got it.
That's how it should be done. At least that's how I do it (-:
++
Jé
Nuno Godinho a écrit :
Hi Jé,
I am sorry if I didn't explain it well enough.
I want to avoid having to send the message "open n0.avi" into the "sub" abstraction. I will be using several instances of "sub". The problem is that when I create the object like "sub n0.avi", which should be defining the $1 (the leftmost inlet, right?) parameter, nothing happens. Get it? Now I have to send the filename through an inlet. I would like to define it as an inline constant argument. I just don't understand how to do it.
Maybe it would be easier if you could send me a working example of an object sending inline arguments into an abstraction.
Thanks, Nuno
-----Original Message----- From: pd-list-bounces@iem.at [mailto:pd-list-bounces@iem.at] On Behalf Of Jerome Tuncer Sent: quinta-feira, 8 de Dezembro de 2005 20:26 To: pd-list@iem.at Subject: Re: [PD] Inlinet creation arguments into abstracts
Hhhhhmmmmmmm...
I'm not sure I'm getting it right here.
Your patch actually works but what you'd like to do is make it simpler in case you have more instances of that sub.pd??
What's the relationship between this and creation arguments of the instance of the abstract.?
Sorry for being so dumb it doesn't appear clearly to me (-:
++
Jé
Nuno Godinho a écrit :
Hi Georg,
I found it on the docs but I still can't figure out how to
use it. I
actually tried to add an argument to an abstract but nothing really happened.
I am sending you a dumb example attached so that you can,
if possible,
tell me what am I doing wrong. Inside "main" I have an instance of "sub" and now I have to send it "open n0.avi" in order to
make it load
the n0.avi file. I would like to just write "sub n0.avi".
Can you help me understand this? It seems to be quite
simple but I am
lost here.
Thanks, Nuno
-----Original Message----- From: Georg Holzmann [mailto:grhPD@gmx.at] Sent: quinta-feira, 8 de Dezembro de 2005 19:06 To: Nuno Godinho Cc: pd-list@iem.at Subject: Re: [PD] Inlinet creation arguments into abstracts
Hallo!
anyone help me or point me to documentation? Pd
documentation talks a
lot about "creation arguments" but never explains how they
actually work. I'm shure it is explained somewhere, but don't know where ... In pd you can use $1 for first creation argument, $2 for the second etc.
LG Georg
--
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
#N canvas 231 355 892 451 10; #N canvas 0 0 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 5 27 pd gemwin; #X msg 5 8 create; #X obj 107 88 sub n0.avi; #X connect 0 0 1 0; #X connect 1 0 0 0; #X coords 0 0 0.00102564 0.00161551 200 140 0;
#N canvas 1493 149 639 630 10; #X obj 24 53 gemhead; #X obj 24 119 pix_film; #X obj 24 152 outlet; #X obj 83 53 inlet; #X obj 128 -22 loadbang; #X obj 128 10 symbol $1; #X msg 128 53 open $1; #X text 201 4 The OBJECT [symbol] will be instanciated with parameter $1; #X text 201 48 The $x in MESSAGES will be replaced by the parameter that; #X text 201 16 that is given to the parent abstraction (sub).; #X text 201 61 is given to its inlet.; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 1 0;
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list