Forums > MaxMSP

Dynamic assigning of adc~ input


ctb
March 11, 2008 | 11:02 pm

Hi, first post here, hi to everyone.

I’m trying to build basic mixing patch where channel strips can be added dynamically, i’ve got the basics going by using bpatcher, i’m planning on sorting the scripting part soon.

However i’m needing to be able to create an adc~ object then using a numbox or something, assign which input channel to use. In addition i’m using ‘adstatus input’ on another part of the patch and need to be able to dynamically list how many inputs are available (changing the object from being ‘adstatus input 1′ to adstatus input 5′ etc). i’ve tried both adc~ $1 and adstatus input $1 and passing an int to them but neither work.

What options do i have?

Thanks for any help

Lou


March 11, 2008 | 11:40 pm

I’m not exactly sure I get what you’re after so maybe I’m off-base,
but is there a reason you can’t instantiate your [adc~] with all the
output channels you’ll need in the beginning, then through some
combination of scripting, [send~]/[receive~] pairs, and/or [matrix~]
route your signals on the fly later?

On Mar 11, 2008, at 11:02 PM, Lou Greenwood wrote:

>
> Hi, first post here, hi to everyone.
>
> I’m trying to build basic mixing patch where channel strips can be
> added dynamically, i’ve got the basics going by using bpatcher, i’m
> planning on sorting the scripting part soon.
>
> However i’m needing to be able to create an adc~ object then using
> a numbox or something, assign which input channel to use. In
> addition i’m using ‘adstatus input’ on another part of the patch
> and need to be able to dynamically list how many inputs are
> available (changing the object from being ‘adstatus input 1′ to
> adstatus input 5′ etc). i’ve tried both adc~ $1 and adstatus input
> $1 and passing an int to them but neither work.

—-
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>
CMP <
http://www.csf.edu/academics/contemporary_music/>


March 11, 2008 | 11:49 pm

I’m trying to create a channel strip object in one patch, i’m trying to make it as reusabe as possible (via embedding in another patch as a bpatcher), no hardcoded details such as a limit on the number of input channels, i want the software to detect how many inputs the machine can support and then allow the user to select which adc input to use.

I did think about doing it the way you mentioned but that would add complexity and doesn’t seem like an elegant way of solving the problem. What i’m essentially trying to do is create an object, ‘adc~ $1′ to which i can send an int and the adc would use the user defined input replacing the the $1 with the int, as any other object would handle a variable.

I’m trying to avoid any kind of code which hardcodes choices, i wan the software to be able to handle as many situations as possible, to be as flexible as possible.

Hope i’ve explained it a bit better there, thanks for the reply too.

Lou



ctb
March 12, 2008 | 12:57 pm

any ideas on this one?

Got my scripting done last night, so i can now add bpatchers containing my channel strip and name each bpatcher, first time playing with scripts, some cool stuff.

My only idea is putting the adc~ and a select in a subpatch with 64 selectable inputs and just route that way (as smill suggested), would really prefer to just define the input by passing an int to adc~ tho.

Lou


March 12, 2008 | 4:16 pm

Hi,

Is this what you need?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 102 114 40 196617 adc~ 1;
#P message 102 81 39 196617 set $1;
#P number 102 55 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P window clipboard copycount 3;

Carey

On Wed, Mar 12, 2008 at 12:57 PM, Lou Greenwood wrote:
>
> any ideas on this one?
>
> Got my scripting done last night, so i can now add bpatchers containing my channel strip and name each bpatcher, first time playing with scripts, some cool stuff.
>
> My only idea is putting the adc~ and a select in a subpatch with 64 selectable inputs and just route that way (as smill suggested), would really prefer to just define the input by passing an int to adc~ tho.
>
>
>
> Lou
>



ctb
March 15, 2008 | 1:05 pm

Hi, sorry for the belted reply. That worked perfect, just what i was looking for, thanks for the help.

Lou


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