[PD] GEM - The Relationship Between [translate] and [rectangle]?
Hey again, So, I have my 3 avi's with 3 seperate [gemheads] which I can now move around the [gemwin]. Cool. Could someone enlighten me towards the relationships between [translate] and [rectangle] please? I would like to keep the original aspect ratios for the 3 avi's. Avi 1 is an odd shape - w432 h768 - (it's approximately half of my laptop desktop recorded with RecordMyDesktop) and avi 23 are recorded off bog-standard camera's, so are 320x240. The larger file is on the left of my gemwindow with the 2 other avi's to the right, one above the other. I have added the widths of film 1 and film 2 with little borders which gives [dimen 762 768(. I can move the files around and get an approximate fit moving between each [translate] and [rectangle] but I get the feeling there is a more rigorous approach. Apologies in advance if I have missed something in the helpfiles or various tutorials but I can't seem to find the info I'm looking for. Best wishes, Julian ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] GEM - The Relationship Between [translate] and [rectangle]?
pix_film does output the dimensions of the movie in pixels when a movie is loaded. Assuming that the movie is in square pixels (which is the case if you are using screenshots and webcam movies) this allows you with a couple of objects to automatically scale the rectangle it is textured to to fit the right aspect ratio. m. Am 21.07.2010 um 19:25 schrieb J bz: Hey again, So, I have my 3 avi's with 3 seperate [gemheads] which I can now move around the [gemwin]. Cool. Could someone enlighten me towards the relationships between [translate] and [rectangle] please? I would like to keep the original aspect ratios for the 3 avi's. Avi 1 is an odd shape - w432 h768 - (it's approximately half of my laptop desktop recorded with RecordMyDesktop) and avi 23 are recorded off bog-standard camera's, so are 320x240. The larger file is on the left of my gemwindow with the 2 other avi's to the right, one above the other. I have added the widths of film 1 and film 2 with little borders which gives [dimen 762 768(. I can move the files around and get an approximate fit moving between each [translate] and [rectangle] but I get the feeling there is a more rigorous approach. Apologies in advance if I have missed something in the helpfiles or various tutorials but I can't seem to find the info I'm looking for. Best wishes, Julian ___ 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
Re: [PD] GEM - The Relationship Between [translate] and [rectangle]?
Hi Max, Cheers for the quick response. tbh, pix_film is the reason I know the pixel dimensions already:) Would you mind explaining in a little more detail - which objects and how? I am unclear on the relationship, say, between [rectangle 3 2] and 320x240 pixels, and again how that corresponds to [translate] and the numbers I am putting in the inlets 2 and 3 of translate. For example when I increase the 2nd inlet of translate (magnification? sorry I'm not in front of pd atm) my 2nd avi movie moves in a north easterly direction from within the gemwin and I don't understand why? Kind regards, Jb On 21 July 2010 18:37, Max abonneme...@revolwear.com wrote: pix_film does output the dimensions of the movie in pixels when a movie is loaded. Assuming that the movie is in square pixels (which is the case if you are using screenshots and webcam movies) this allows you with a couple of objects to automatically scale the rectangle it is textured to to fit the right aspect ratio. m. Am 21.07.2010 um 19:25 schrieb J bz: Hey again, So, I have my 3 avi's with 3 seperate [gemheads] which I can now move around the [gemwin]. Cool. Could someone enlighten me towards the relationships between [translate] and [rectangle] please? I would like to keep the original aspect ratios for the 3 avi's. Avi 1 is an odd shape - w432 h768 - (it's approximately half of my laptop desktop recorded with RecordMyDesktop) and avi 23 are recorded off bog-standard camera's, so are 320x240. The larger file is on the left of my gemwindow with the 2 other avi's to the right, one above the other. I have added the widths of film 1 and film 2 with little borders which gives [dimen 762 768(. I can move the files around and get an approximate fit moving between each [translate] and [rectangle] but I get the feeling there is a more rigorous approach. Apologies in advance if I have missed something in the helpfiles or various tutorials but I can't seem to find the info I'm looking for. Best wishes, Julian ___ 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
Re: [PD] GEM - The Relationship Between [translate] and [rectangle]?
dimension x divided by deimension y gives you the aspect ratio. see attached patch: autoscale_ratio_image_or_video.pd Description: Binary data m. Am 21.07.2010 um 21:51 schrieb J bz: Hi Max, Cheers for the quick response. tbh, pix_film is the reason I know the pixel dimensions already:) Would you mind explaining in a little more detail - which objects and how? I am unclear on the relationship, say, between [rectangle 3 2] and 320x240 pixels, and again how that corresponds to [translate] and the numbers I am putting in the inlets 2 and 3 of translate. For example when I increase the 2nd inlet of translate (magnification? sorry I'm not in front of pd atm) my 2nd avi movie moves in a north easterly direction from within the gemwin and I don't understand why? Kind regards, Jb On 21 July 2010 18:37, Max abonneme...@revolwear.com wrote: pix_film does output the dimensions of the movie in pixels when a movie is loaded. Assuming that the movie is in square pixels (which is the case if you are using screenshots and webcam movies) this allows you with a couple of objects to automatically scale the rectangle it is textured to to fit the right aspect ratio. m. Am 21.07.2010 um 19:25 schrieb J bz: Hey again, So, I have my 3 avi's with 3 seperate [gemheads] which I can now move around the [gemwin]. Cool. Could someone enlighten me towards the relationships between [translate] and [rectangle] please? I would like to keep the original aspect ratios for the 3 avi's. Avi 1 is an odd shape - w432 h768 - (it's approximately half of my laptop desktop recorded with RecordMyDesktop) and avi 23 are recorded off bog-standard camera's, so are 320x240. The larger file is on the left of my gemwindow with the 2 other avi's to the right, one above the other. I have added the widths of film 1 and film 2 with little borders which gives [dimen 762 768(. I can move the files around and get an approximate fit moving between each [translate] and [rectangle] but I get the feeling there is a more rigorous approach. Apologies in advance if I have missed something in the helpfiles or various tutorials but I can't seem to find the info I'm looking for. Best wishes, Julian ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list PGP.sig Description: Signierter Teil der Nachricht ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] GEM - The Relationship Between [translate] and [rectangle]?
Hi Julian, sorry if you already did it, but you might be interested in surfing through the Help browser (ctrl+b) manuals 2.Image/ That includes all you need to know to solve these kind of problems. However [translate] moves the [rectangle] on X, Y and Z axis. Your movie is texturized onto the [rectangle]. Therefore the dimension of the rectangle represent the ratio of your movie. Divide the width (in pixel) of your movie by its height to get the exact ratio, then set properly [rectangle] dimension. Say you have a movie 800x600px. 800 / 600 = 1.333 (we assume 3 is your maximum height for [rectangle]) 3 * 1.333 = 4 your ratio = 4/3 therefore what you need is [rectangle 4 3] this is just a rough solution, but it might help you understanding the issue. best, M Date: Wed, 21 Jul 2010 18:25:49 +0100 From: J bz jbee...@googlemail.com Subject: [PD] GEM - The Relationship Between [translate] and [rectangle]? To: pd-list@iem.at Message-ID: aanlktildpzsqkxgne4ghuxdjn6m_u5kmqbypkbz-d...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hey again, So, I have my 3 avi's with 3 seperate [gemheads] which I can now move around the [gemwin]. Cool. Could someone enlighten me towards the relationships between [translate] and [rectangle] please? I would like to keep the original aspect ratios for the 3 avi's. Avi 1 is an odd shape - w432 h768 - (it's approximately half of my laptop desktop recorded with RecordMyDesktop) and avi 23 are recorded off bog-standard camera's, so are 320x240. The larger file is on the left of my gemwindow with the 2 other avi's to the right, one above the other. I have added the widths of film 1 and film 2 with little borders which gives [dimen 762 768(. I can move the files around and get an approximate fit moving between each [translate] and [rectangle] but I get the feeling there is a more rigorous approach. Apologies in advance if I have missed something in the helpfiles or various tutorials but I can't seem to find the info I'm looking for. Best wishes, Julian -- Marco Donnarumma aka TheSAD Independent New Media Arts Professional, Performer, Teacher - Edinburgh, UK PORTFOLIO: http://marcodonnarumma.com LAB: http://www.thesaddj.com | http://cntrl.sourceforge.net | http://www.flxer.net EVENT: http://www.liveperformersmeeting.net ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list