Forums > MaxMSP

scripting specific objects

July 1, 2008 | 2:58 pm

hi list !

with max 4, it was possible to use an abstraction by typing the whole path
as a symbol in the box.

this seems not to be possible anymore with max 5…

this was useful to be sure to use the right object (and the users profiles
system of my application works on this possibility)

is there a chance to see this feature again in max 5 ?

cheers

g


July 1, 2008 | 10:30 pm

On 1 juil. 08, at 16:58, G. wrote:

> hi list !
>
> with max 4, it was possible to use an abstraction by typing the
> whole path as a symbol in the box.
>
> this seems not to be possible anymore with max 5…
>
> this was useful to be sure to use the right object (and the users
> profiles system of my application works on this possibility)
>
> is there a chance to see this feature again in max 5 ?

It works fine here. Assuming that you’re on mac, and that your hard
disk is named "Macintosh HD":

script newobject newobj @text ""Macintosh HD:/Applications/Max5/
examples/max-tricks/random_with_no_repeat/urn-jb.maxpat""

Note the extras " because of the space in the HD name. If it doesn’t
work, please provide an example.

Best,
ej


July 2, 2008 | 8:04 am

hi emmanuel,

thanks for reply, my hardrive is named "Data", the whole path is
Data:/MAXLIBS/2PIM/DefaultProfile/Audio/2PIM-adv.audioout.maxpat
there’s no spaces so no "" trick…
the hard drive name MUST be "Macintosh HD" ?

g

2008/7/2 Emmanuel Jourdan :

>
> It works fine here. Assuming that you’re on mac, and that your hard disk is
> named "Macintosh HD":
>
> script newobject newobj @text ""Macintosh
> HD:/Applications/Max5/examples/max-tricks/random_with_no_repeat/urn-jb.maxpat""
>
> Note the extras " because of the space in the HD name. If it doesn’t work,
> please provide an example.
>
> Best,
> ej
>
>


July 2, 2008 | 9:34 am

On 2 juil. 08, at 10:04, G. wrote:

> hi emmanuel,
>
> thanks for reply, my hardrive is named "Data", the whole path is
> Data:/MAXLIBS/2PIM/DefaultProfile/Audio/2PIM-adv.audioout.maxpat
> there’s no spaces so no "" trick…
> the hard drive name MUST be "Macintosh HD" ?

No it’s even easier:

– Pasted Max Patch, click to expand. –

ej


July 2, 2008 | 9:47 am

hi emmanuel,

i’m on it right now, doing exactly what you sent.

thanks for your help !

2008/7/2 Emmanuel Jourdan :

> On 2 juil. 08, at 10:04, G. wrote:
>
> hi emmanuel,
>>
>> thanks for reply, my hardrive is named "Data", the whole path is
>> Data:/MAXLIBS/2PIM/DefaultProfile/Audio/2PIM-adv.audioout.maxpat
>> there’s no spaces so no "" trick…
>> the hard drive name MUST be "Macintosh HD" ?
>>
>
>
> No it’s even easier:
>
>

– Pasted Max Patch, click to expand. –

>
>
> ej
>
>


July 2, 2008 | 10:49 am

re-hello !

ok i have now a new problem
creating specific objects is ok, but the connection script acts weird.

it works fine when the patcher is in edit mode (and #0 stays #0 in the
objects names)
but when i use my object as an abstraction, the connection doesn’t work
anymore (jpatchline_new: can’t find box)

the only difference is that #0 becomes a number…

does that speaks to you?

2008/7/2 G. :

> hi emmanuel,
>
> i’m on it right now, doing exactly what you sent.
>
> thanks for your help !
>
>
> 2008/7/2 Emmanuel Jourdan :
>
>> On 2 juil. 08, at 10:04, G. wrote:
>>
>>
>> hi emmanuel,
>>>
>>> thanks for reply, my hardrive is named "Data", the whole path is
>>> Data:/MAXLIBS/2PIM/DefaultProfile/Audio/2PIM-adv.audioout.maxpat
>>> there’s no spaces so no "" trick…
>>> the hard drive name MUST be "Macintosh HD" ?
>>>
>>
>>
>> No it’s even easier:
>>
>>

– Pasted Max Patch, click to expand. –

>>
>>
>> ej
>>
>>
>
>


July 2, 2008 | 12:32 pm

On 2 juil. 08, at 12:49, G. wrote:

> re-hello !
>
> ok i have now a new problem
> creating specific objects is ok, but the connection script acts weird.
>
> it works fine when the patcher is in edit mode (and #0 stays #0 in
> the objects names)
> but when i use my object as an abstraction, the connection doesn’t
> work anymore (jpatchline_new: can’t find box)
>
> the only difference is that #0 becomes a number…

Could you provide an example?

ej


July 2, 2008 | 1:07 pm

of course, here are the 2 patches,
the first is the one where the abstraction is created and connected,
the second is the abstraction (tobescripted.maxpat), it is a simple 16×16
thru.

please try it.

thanks

here is the first patch where the script is executed :

– Pasted Max Patch, click to expand. –

second one (tobescripted.maxpat) :

– Pasted Max Patch, click to expand. –

July 2, 2008 | 2:18 pm

On 2 juil. 08, at 15:07, G. wrote:

> of course, here are the 2 patches,
> the first is the one where the abstraction is created and connected,
> the second is the abstraction (tobescripted.maxpat), it is a simple
> 16×16 thru.

Here is something which seems to work ;-) Using the [combine] object
to generate the string. Note that you probably don’t really need the
#0 because the varname are local.

ej

– Pasted Max Patch, click to expand. –

July 2, 2008 | 2:56 pm

i get exactly the same behavior with your patch…
the combine object doesn’t seem to make it.
g

2008/7/2 Emmanuel Jourdan :

> On 2 juil. 08, at 15:07, G. wrote:
>
> of course, here are the 2 patches,
>> the first is the one where the abstraction is created and connected,
>> the second is the abstraction (tobescripted.maxpat), it is a simple 16×16
>> thru.
>>
>
> Here is something which seems to work ;-) Using the [combine] object to
> generate the string. Note that you probably don’t really need the #0 because
> the varname are local.
>
> ej
>
>

– Pasted Max Patch, click to expand. –

>
>
>


July 2, 2008 | 3:05 pm

well the combine object simplify the patch for the creation, but the
connection with matrix~ and outlets still doesn’t work if abstraction.

2008/7/2 G. :

> i get exactly the same behavior with your patch…
> the combine object doesn’t seem to make it.
> g
>
> 2008/7/2 Emmanuel Jourdan :
>
>> On 2 juil. 08, at 15:07, G. wrote:
>>
>>
>> of course, here are the 2 patches,
>>> the first is the one where the abstraction is created and connected,
>>> the second is the abstraction (tobescripted.maxpat), it is a simple 16×16
>>> thru.
>>>
>>
>> Here is something which seems to work ;-) Using the [combine] object to
>> generate the string. Note that you probably don’t really need the #0 because
>> the varname are local.
>>
>> ej
>>
>>

– Pasted Max Patch, click to expand. –

>>
>>
>>
>
>


July 2, 2008 | 3:09 pm

On 2 juil. 08, at 16:56, G. wrote:

> i get exactly the same behavior with your patch…
> the combine object doesn’t seem to make it.

Weird it works here with different cases:
- patch in the search path
- patch outside of the search path by providing an absolute path (with
or without spaces).

You’re running 5.0.3, aren’t you?
ej


July 2, 2008 | 3:13 pm

yes i’m running 5.0.3

but still no connection between the scripted abstraction and the matrix~ object when the whole patch is an abstraction…

g


July 2, 2008 | 3:25 pm

On 2 juil. 08, at 17:13, guillaume wrote:

> yes i’m running 5.0.3
>
> but still no connection between the scripted abstraction and the
> matrix~ object when the whole patch is an abstraction…

the abstraction is properly created? what happens if you connect with
the manual mechanism at the right?

ej


July 2, 2008 | 3:42 pm

well, i get this :

jpatchline_new: can’t find box

:-(

the abstraction is properly created since it’s connected to outlets…


July 2, 2008 | 3:51 pm

here is a screenshot :

http://guiev.free.fr/desesperation.tiff

g


July 2, 2008 | 4:35 pm

sorry i reply to myself

i get the same behavior on another mac intel :

no connection between the matrix~ object and the scripted abstraction, if the whole patch is an abstraction.

works fine in editing mode…

i really need help on this.

thanks

g


Viewing 17 posts - 1 through 17 (of 17 total)