Mar 6, 2008 at 7:35am
I was trying to design a toolkit for a hardware by building max externals. The original library was in C++. I’m more familiar with C++ programming. I’ve pretty much transfered the library into externals.
However, I find it cumbersome sometimes to use max to design game logic for example. It is quite troublesome to do simple things like for loops and some if statements etc. Is there any external around that perhaps allow some script-like C++ commands to be written in a graphical object in the editing screen for max?
Also, how can i create graphical externals with a “drag and drop” interface? For example, I want to make a 9*5 board which i can drag and drop various items like vst instruments or effects so that when that board is click it next time that synth is triggered. My idea is that this will facilitate making simple applications for new programmers on my hardware.
Mar 6, 2008 at 1:39pm
There’s actually a lot of options like this at present for max/msp.
time = 0
and it will output lists of [(integer 1 to 7), (random float between
On Mar 6, 2008, at 2:35 AM, Wei Min wrote:
Mar 7, 2008 at 3:33am
I was looking up script at maxobject.com and your external didn’t turn up. Was looking for something that resembles C language more. Thanks.
Any idea how to make graphical “drag and drop” externals?
Mar 10, 2008 at 3:29pm
Quote: Bradford Garton wrote on Thu, 06 March 2008 14:39
What’s wrong with
#P inlet 61 16 15 0;
(The Litter Power objects are in the Starter Pack, URL below)
There is no problem with designing loops and conditionals in Max, you just need to get used to the idiom. If you’re programming in C++ you get used to the object idiom; if you’re working with Perl you get used to the regexp idiom; if you program in LISP you get used to the list idiom.
Yes, of course each idiom takes getting used to. But I do wonder what response someone would get on a Perl list on writing “gee, I just can’t get used to this
Mar 10, 2008 at 3:34pm
Quote: tiutababo wrote on Fri, 07 March 2008 04:33
Externals *are* written in C.
Abstractions are what we call patches written in the Max graphical programming environment, saved for re-use in other projects.
If you want to write in C (not C++), look at the Max/MSP SDK available on this HTTP Server. However, I would *strongly* recommend developing fluency with the Max `patching’ environment first. If you don’t grok the graphical programming environment, it is almost impossible to develop external objects that will work well in that same environment.
Mar 10, 2008 at 3:41pm
Dang. Bug in the sample patch (that’s what I get for not testing). Change [pack 0 0 0] to [pack 0 0. 0].
BTW, this thread is likely to get yanked over to the main Max list. As it stands, that’s more where it belongs.
Mar 10, 2008 at 3:46pm
On Mar 10, 2008, at 11:29 AM, Peter Castine wrote:
> Yes, of course each idiom takes getting used to. But I do wonder
True, but the point is that with all the snazzy stuff available
Mar 10, 2008 at 5:57pm
Peter Castine wrote:
Mar 12, 2008 at 11:28am
Quote: sadam wrote on Mon, 10 March 2008 18:57
I would counter (ahem;-) that uzi and counter are quintessentially native constructs for controlling loops in Max.
What was not ‘native’ about the patch I posted earlier in this thread?
I suppose this is a point of view thing: if you’re determined that the way to perform a loop is to have a [for] object with the arguments
But maybe I’m just weird.
Mar 12, 2008 at 11:38am
Quote: Bradford Garton wrote on Mon, 10 March 2008 16:46
Fair enough. And having lots of options is great. I just think the strength of rtcmix~ is more that you can do real-time CMIX things in it. The fact that you can use C-style for(init; cond; incr) constructs runs a far second place.
And I would argue that learning to use Max effectively also includes learning to implement iteration constructs natively in the language. It does take some getting used to, but once you’re used to it, you’re set to groove.
On the transparent idiom front, I would just add that in natural languages there are a *lot* more idiom idiosyncrasy issues, and that’s also something that people learn to deal with. But that’s a whole ‘nother thread for a different forum.
Mar 12, 2008 at 2:44pm
On Mar 12, 2008, at 7:28 AM, Peter Castine wrote:
> But when I read ‘for(i = 0; i < 7; i++)' I immediately see [Uzi 7]
what if you wanted time to pass within your loop?
…just to reinforce brad’s point about languages shaping the way we
it’s all good!
[yes yes, i know you can do it with pause and continue and delay, but
Mar 12, 2008 at 4:05pm
On 12 Mar 2008, at 14:44, dan trueman wrote:
>> But when I read ‘for(i = 0; i < 7; i++)' I immediately see [Uzi 7]
(I have one somewhere – I wrote it back around 1992…)
Nick Rothwell / Cassiel.com Limited
Mar 12, 2008 at 11:22pm
Quote: dan trueman wrote on Wed, 12 March 2008 15:44
Dan: did you even *look* at the example patch I posted at the beginning of this thread?
Before I return to your question in Max, how do you deal with time in a C/C++ for() loop? Because C/C++ was what the original question was about.
Simula has a concept of time. Smalltalk has a concept of time. C doesn’t really have any notion of time at all (embedding a wait() call inside a for() loop doesn’t really cut it, and threading is a layer on top of the core C language).
Back to your question: if you want time in the loop, you use metro and counter. As I did in the example patch I posted.
– Who is as aware of the extent to which language colors thought processes as anyone. I’m dealing with at least three natural languages every day as well as a fistful of programming languages.
You must be logged in to reply to this topic.