Forums > Dev

create implicit msp object inside another?

December 7, 2006 | 6:24 am

Is it possible for a msp object I write to create another (existing)
msp object inside it, and use it in the perform call? I don’t mean
to create one in a patcher, but to create one directly in C code only
for use in the C code.

That would be, to call object_new on the object, e.g. plus_new() for
a plus~ object, and call the appropriate plus2_perform() method in my
object’s perform method?

Would I need to create my own t_dspchain, register it etc, and call
it with dspchain_tick or whatever?

Or is this delving too deeply into MSP’s innards?


December 7, 2006 | 6:49 am

This is not currently supported by the API.

I’ve hacked some objects together which do this sort of thing, but it
was only possible because I had the source to those objects and could
write specific code for the specific interfaces of the internal
objects. It’s a very ugly hack.

This has been a point of discussion for the future. For now, it’s
pretty much impossible.

jb

Am 07.12.2006 um 07:24 schrieb Graham Wakefield:

> Is it possible for a msp object I write to create another
> (existing) msp object inside it, and use it in the perform call? I
> don’t mean to create one in a patcher, but to create one directly
> in C code only for use in the C code.
>
> That would be, to call object_new on the object, e.g. plus_new()
> for a plus~ object, and call the appropriate plus2_perform() method
> in my object’s perform method?
>
> Would I need to create my own t_dspchain, register it etc, and call
> it with dspchain_tick or whatever?
>
> Or is this delving too deeply into MSP’s innards?


December 7, 2006 | 9:23 am

Too bad! But that’s what I figured.

Yes, for a future SDK, this would be very helpful.

On Dec 6, 2006, at 10:49 PM, Jeremy Bernstein wrote:

> This is not currently supported by the API.
>
> I’ve hacked some objects together which do this sort of thing, but
> it was only possible because I had the source to those objects and
> could write specific code for the specific interfaces of the
> internal objects. It’s a very ugly hack.
>
> This has been a point of discussion for the future. For now, it’s
> pretty much impossible.
>
> jb
>
> Am 07.12.2006 um 07:24 schrieb Graham Wakefield:
>
>> Is it possible for a msp object I write to create another
>> (existing) msp object inside it, and use it in the perform call?
>> I don’t mean to create one in a patcher, but to create one
>> directly in C code only for use in the C code.
>>
>> That would be, to call object_new on the object, e.g. plus_new()
>> for a plus~ object, and call the appropriate plus2_perform()
>> method in my object’s perform method?
>>
>> Would I need to create my own t_dspchain, register it etc, and
>> call it with dspchain_tick or whatever?
>>
>> Or is this delving too deeply into MSP’s innards?


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