Forums > MaxMSP

Patchcord-like UI object?


August 16, 2008 | 4:10 am

Hi,
I’m a newbie and looking to make a simple simulated analog patchbay for my students to practice signal path stuff in a lab as a supplement to the real thing. Should be a pretty simple thing for Max, but I’m wondering what to use for a patchcord object they can use to connect points, thereby putting the whole thing in motion. My idea is this would be a runtime app, so it would have to be something they can manipulate in that. Anyone point me in the right direction to start out?

Thanks,
Brian

August 16, 2008 | 6:59 am

Hi,

I made a little patch….Maybe it’s not what u were looking for..sorry then.

You can just connect the outlets of the ‘bangs’ with the inlets of other ‘bangs’ or if you connect a ‘bang’ which is already connected with the ‘1’ which is going to to ‘jt.qt.movie’ object you start a little film (of course you first have to ‘read’ a mov-file into the patch which you could find in Max5 -> patches ->media).

The possibilities are endless…….
But the patch I made is really for children and I’m not sure if it is what you were looking for.

Cheers
Peer

– Pasted Max Patch, click to expand. –
August 17, 2008 | 5:10 am

Thanks, looks like fun! However, I am looking for something which I guess is similar, but can run standalone and users can still interact with. I wasn’t able to find any obvious patchcord-like UI object, but if there was a way to make your patch usable as a standalone app, that might be way in. Ideas anyone?

Thanks,
Brian

August 17, 2008 | 7:03 am

You should take a look at the matrixctrl object,
which is about as close as a standard way to
depict patchbays as I can imagine – it’s certainly
what I use, and a loving homage to the old pinboard
on the Synthi AKS.

August 17, 2008 | 7:14 am

It’s easy:
I modified the patch and used some gates and toggles which run fine in ‘standalone’ modus.
I added a description how to make a standalone after the patch.
It’s just a copy of what u can find in the ‘Topics’ documentation starting at page 13.
Good luck and have fun

Peer

– Pasted Max Patch, click to expand. –

With your top-level patch in the foreground, choose Build Collective / Application /
Plug-in … from the File menu.
You will be presented with a script window, in which you create a list of things Max
must do to create the collective. Max has already made the first entry in its
script—open thispatcher— instructing itself to load in your top-level patch. Any external
objects required by your patch, any subpatches used as objects in your top-level patch
(or used in a bpatcher), and any nested subpatches (sub-subpatches used in subpatches
of the top-level patch) will all be included automatically in the collective. In addition,
certain objects, such as js, fpic, and hi, copy files they use into the collective for you.
For the js object, the script text file is copied, but not files the script uses.

When you click on the Build button in the "Collective Editor" dialog, you are presented
with a standard Save As dialog allowing you to name your collective and save it to disk. In
the lower part of this dialog you are presented with a Format menu. By default this menu
is set to save a Max Collective file, but if you want to save your patch as a standalone
application, all you need to do is select Application from this menu. It’s as easy as
that—Max will automatically combine your collective with the MaxMSP Runtime appli-
cation and save the result as a single file (or folder on Windows) which appears and
functions as a standalone application, requiring neither Max nor MaxMSP Runtime. If
you have multiple versions of MaxMSP Runtime in your Max folder, Max will use the
application that has the word "Runtime" in its name, and the most recent creation date.

August 17, 2008 | 7:34 am

the problem is that u don’t have really patchchords which u can connect with the patcher I sent u…well, didn’t figure out how to manage that, but I think working with toggles and gates is a fine alternative….

August 18, 2008 | 6:54 am

Brian Heller schrieb:
> Anyone point me in the right direction to start out?

You could script real patch cords also in a standalone…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
— _|_)—-|—–()————–
———-()——–www.ccmix.com

August 18, 2008 | 9:34 am

August 19, 2008 | 1:13 am

WOW, that is fascinating! I had no idea Max had scripting ability in that way, and I figured it out just by looking at your great patch and reading a few help bits. I think something like this is great groundwork. Ideally, I need make students use something as close to a virtual patchcord as I can (which is why having them interact with gates and switches is less preferable), but this example is on the way to that I think.

Thanks a lot!!!

Amazed,
Brian

August 23, 2008 | 8:46 pm

I’m working on something that sounds like what you’re describing. My solution was to use the LCD object to create the entire interface. It’s the only way I can really think of to get an intuitive click-and-drag approach to creating patch cables. In other words, what Max does naturally when in edit mode, but it works when the patch is locked and is customizable (jack size, cable thickness, colors, etc.). I guess you could do something similar with Jitter or JSUI, but I didn’t have Jitter when I began the project, and my Javascript chops aren’t all that great.

I attached a zip file if you want to take a look at it. However, although the interface works, it is not yet functional. In other words, while you can create patch cables, they don’t "mean" anything yet. Hopefully it will be functional within the next couple of weeks. Open "AAA Patch Bay" to try it out. Readme.txt has some very, very rough documentation.

August 24, 2008 | 3:52 am

Yes, this looks like exactly the kind of thing, both potentially in appearance and operation. Could you/someone give me a quick suggestion for an entry-point to the patch? I’m new, but do a have a good grasp of the basics. I’d like to be able to see how it works for the sake of learning. Did you have to create everything in the subpatchers and abstractions? I looked through it some and it seems quite complex.

If I can get a grasp, I’m happy to help…maybe I can make some of the audio "guts", etc.

Thanks again for sharing your work,
Brian

August 24, 2008 | 7:24 pm

Yes, I created all of the abstractions, and I only used objects that are included with Max so that it would be self-contained. It might be very difficult for you to decipher the whole thing, since everybody’s Max style is different, but I can give you a few hints:

1. The data is stored in colls, and all of the colls are in the main patch on the left-hand side (coll variables – coll cables). For more info, check out the readme file.

2. The seven abstractions on the left-hand side (drawcable – highlight cables, and global) contain all of the abstractions that make everything work.

3. "managevars" (inside "global") sends out all of the values in "coll variables" to the appropriate receive objects when the patch is loaded. For example, the value "white" is sent to all "receive bgcolor" objects. I use this to initialize values and edit them on the fly.

4. "EGG" is basically just a small graphics library that I am working on to make certain tasks easier with the LCD object (such as drawing a thick line with rounded ends).

September 15, 2008 | 11:46 am

Another substantial resurrection, but just in case anyone is still interested I’ve created an abstraction that loads into a [bpatcher] that allows you to create patchcords when max is not in edit mode. It uses scripting messages sent to [thispatcher]. The arguments in the [bpatcher] inspector specify the number of inlets and outlets up to a maximum of sixteen. The connections work with Max, MSP and Jitter data.

To make connections click on the desired inlet, drag to an outlet and release the mouse button. After doing this once you can make multiple connections from the same inlet by clicking on outlets without dragging. To disconnect a patchcord drag from outlet to inlet. Sending the message "clear" to the first inlet will remove all current patchcords. Connections in and from the [bpatcher] will only resemble Max/MSP/Jitter patchcords if the relevant connection is made to the inlet beforehand.

If used outside of [bpatcher] this abstraction functions much like [router] and [matrix~]. The first inlet accepts a list formatted like the output from [matrixctrl] prepended with the word "patch".

lh

– Pasted Max Patch, click to expand. –
September 15, 2008 | 11:47 am

Another substantial resurrection, but just in case anyone is still interested I’ve created an abstraction that loads into a [bpatcher] that allows you to create patchcords when max is not in edit mode. It uses scripting messages sent to [thispatcher]. The arguments in the [bpatcher] inspector specify the number of inlets and outlets up to a maximum of sixteen. The connections work with Max, MSP and Jitter data.

To make connections click on the desired inlet, drag to an outlet and release the mouse button. After doing this once you can make multiple connections from the same inlet by clicking on outlets without dragging. To disconnect a patchcord drag from outlet to inlet. Sending the message "clear" to the first inlet will remove all current patchcords. Connections in and from the [bpatcher] will only resemble Max/MSP/Jitter patchcords if the relevant connection is made to the inlet beforehand.

If used outside of [bpatcher] this abstraction functions much like [router] and [matrix~]. The first inlet accepts a list formatted like the output from [matrixctrl] prepended with the word "patch".

lh

– Pasted Max Patch, click to expand. –
September 16, 2008 | 2:15 pm

Luke schrieb:
> I’ve created an abstraction that loads into a [bpatcher] that allows
> you to create patchcords when max is not in edit mode.

Nice…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
— _|_)—-|—–()————–
———-()——–www.ccmix.com

September 16, 2008 | 3:57 pm

thats cool. you have to manually restart the dsp if you are doing it with audio though. nice nonetheless.

thanks,

oli

September 17, 2008 | 8:45 am

Oliver Larkin schrieb:
> thats cool. you have to manually restart the dsp if you are doing it
> with audio though. nice nonetheless.

could be achieved with a [0, 1] message to a dummy dac~. If you need to
be smart, check beforehand if audio is on or not:

– Pasted Max Patch, click to expand. –


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
— _|_)—-|—–()————–
———-()——–www.ccmix.com

September 25, 2008 | 5:01 am

Thanks, I am certainly still following and it in my longer-term plan to make this happen– It will just take me longer since I’m a relative newbie and there does seem to be quite a lot to it. But I appreciate whatever you skilled folks can add. I am currently trying to get some time made for doing this at work.

Thanks,
Brian

September 30, 2008 | 3:42 pm

If you’re trying to create a patchbay like one found on a mixing desk you can route your individual channels to the inputs of my abstraction above, connect the outputs to any effects or processors you want and then connect again to another instance of the abstraction and then on to your master channels/[dac~] or wherever you want. Then if you want to route one of your channels through an effect you can do all the routing you want!

lh

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

Forums > MaxMSP