Splitting odd and even numbers.
Any suggestion about how to split odd and even numbers???
Thank's....
Michele Braga.
Naviga e telefona senza limiti con Tiscali
Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
On 10 nov. 06, at 12:43, bragami@tiscali.it wrote:
> Any suggestion about how to split odd and even numbers???
try this:
_____________________________
Patrick Delges
Centre de Recherches et de Formation Musicales de Wallonie asbl
http://users.skynet.be/crfmw/max
bragami@tiscali.it a écrit :
>Any suggestion about how to split odd and even numbers???
>Thank's....
>Michele Braga.
>
>
>Naviga e telefona senza limiti con Tiscali
>Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
>
>http://abbonati.tiscali.it/adsl/
>
>
>
>
>
--
Vincent Goudard
e-mail: programmeur {à} pucemuse.com
Studios Puce Muse
2 rue des Pyrénées - SILIC 520 Wissous
94623 Rungis cedex
tel: (+33 0) 1 45 12 04 53
fax: (+33 0) 1 45 12 04 51
www.pucemuse.com
... adding [abs] to make it work with negative numbers too.
bragami@tiscali.it a écrit :
>Any suggestion about how to split odd and even numbers???
>Thank's....
>Michele Braga.
>
>
>Naviga e telefona senza limiti con Tiscali
>Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
>
>http://abbonati.tiscali.it/adsl/
>
>
>
>
On 10 nov. 06, at 13:23, Vincent Goudard wrote:
> ... adding [abs] to make it work with negative numbers too.
using & 1 makes the trick too:
Best,
ej
Ok, thank's, but I have a problem: when I copy the text and I paste in
a text max file I can't see the graphical patch but I still see it in
text version, so I coul'd use it.
Could you help me please??
Thank's.
Michele.
Emmanuel Jourdan ha scritto:
> On 10 nov. 06, at 13:23, Vincent Goudard wrote:
>
>> ... adding [abs] to make it work with negative numbers too.
>
> using & 1 makes the trick too:
>
> #P window setfont "Sans Serif" 9.;
> #P number 500 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P number 353 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P number 353 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P newex 353 173 157 196617 if $i1 & 1 then out2 $i1 else $i1;
> #P connect 1 0 0 0;
> #P connect 0 0 2 0;
> #P connect 0 1 3 0;
> #P window clipboard copycount 4;
>
Naviga e telefona senza limiti con Tiscali
Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
On 10 nov. 06, at 16:09, bragami@tiscali.it wrote:
> Ok, thank's, but I have a problem: when I copy the text and I paste in
> a text max file I can't see the graphical patch but I still see it in
> text version, so I coul'd use it.
> Could you help me please??
You need MaxMSP 4.5.5 or greater (free update from 4.5)
And just for the subject: write "if $i1 & 1 then out2 $i1 else $i1"
without the quotes in an object box.
Best,
ej
If you are on a MAC, copy the text and then choose
clipboard> from the file menu. I don't know if it runs also in Windows
Ciao,
Riccardo
> Ok, thank's, but I have a problem: when I copy the text and I paste in
> a text max file I can't see the graphical patch but I still see it in
> text version, so I coul'd use it.
> Could you help me please??
> Thank's.
> Michele.
>
>
> Emmanuel Jourdan ha scritto:
>> On 10 nov. 06, at 13:23, Vincent Goudard wrote:
>>
>>> ... adding [abs] to make it work with negative numbers too.
>>
>> using & 1 makes the trick too:
>>
>> #P window setfont "Sans Serif" 9.;
>> #P number 500 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P number 353 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P number 353 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
>> #P window linecount 1;
>> #P newex 353 173 157 196617 if $i1 & 1 then out2 $i1 else $i1;
>> #P connect 1 0 0 0;
>> #P connect 0 0 2 0;
>> #P connect 0 1 3 0;
>> #P window clipboard copycount 4;
>>
>
>
>
>
> Naviga e telefona senza limiti con Tiscali
> Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone
> Telecom
>
> http://abbonati.tiscali.it/adsl/
>
Thank's guy but I still don't understand, I'm using osx 10.3.9 and
max/msp 4.5.1. I can't find from the file menu of
max........... Do I absolutely have to update this max version???
Thank's again.
Michele
riccardo dapelo ha scritto:
>
> If you are on a MAC, copy the text and then choose
clipboard> from the file menu. I don't know if it runs also in Windows
>
> Ciao,
> Riccardo
>
>> Ok, thank's, but I have a problem: when I copy the text and I paste
in
>> a text max file I can't see the graphical patch but I still see it
in
>> text version, so I coul'd use it.
>> Could you help me please??
>> Thank's.
>> Michele.
>>
>>
>> Emmanuel Jourdan ha scritto:
>>> On 10 nov. 06, at 13:23, Vincent Goudard wrote:
>>>
>>>> ... adding [abs] to make it work with negative numbers too.
>>>
>>> using & 1 makes the trick too:
>>>
>>> #P window setfont "Sans Serif" 9.;
>>> #P number 500 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0
0;
>>> #P number 353 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0
0;
>>> #P number 353 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0
0;
>>> #P window linecount 1;
>>> #P newex 353 173 157 196617 if $i1 & 1 then out2 $i1 else $i1;
>>> #P connect 1 0 0 0;
>>> #P connect 0 0 2 0;
>>> #P connect 0 1 3 0;
>>> #P window clipboard copycount 4;
>>>
>>
>>
>>
>>
>> Naviga e telefona senza limiti con Tiscali
>> Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone
Telecom
>>
>> http://abbonati.tiscali.it/adsl/
>>
>
>
Naviga e telefona senza limiti con Tiscali
Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
i dont have 4.5.1 on my system anymore so i cant check how it works. but the info on this link, should provide you with the wisdom necessary to accomplish your task:
https://cycling74.com/story/2005/5/3/15650/18068
(link posted previously by emmanuel)
since max 4.5.5, you can open patches which you copy as text from a forum like this one straight into max, by selecting new from clipboard in the max file menu.
if you choose to upgrade, you can make use of this useful feature!
however, if you just want to carry on patching then try copy and pasting the following code into a max text file (file > new > text). then save as a .pat file...
happy maxing, j.
Quote: bragami@tiscali.it wrote on Fri, 10 November 2006 04:43
----------------------------------------------------
> Any suggestion about how to split odd and even numbers???
> Thank's....
> Michele Braga.
[110.eoo] does this.
it is not yet as maxobjects.com so i release it right here.
:)
save as [110.eoo]
helpfile as mxb in the attachement.
-110
> Do I absolutely have to update this max version???
no you don't. just copy the patch-as-text into a textfile, save to
disk and open it from max.
if the first and last lines are missing (as they are when copied
directly from max > 4.5.1) add them manually. -> max v2; ->
>>>>
like emmanuel jourdan already wrote, using [& 1] is the most
efficient way: you only look at the first bit of a number to
determine whether it's even or odd. see both versions below
hth
/*j