Forums > MaxMSP

Where to beGen?

October 29, 2011 | 8:20 pm

Well, I certainly haven’t mastered Max in the four years I’ve been studying it, but learning lower-level coding is something that I have on my lifetime todo list. I began investigating Csound a while back. It’s a lot for someone who has never done any coding, although I was surprised by how many concepts from Max were applicable and helped my initial understanding. So I guess I’m specifically asking about GenExpr and what would be the best way to enter this world. The documentation says the syntax is similar to C and JavaScript. Should I start with JavaScript and find my way into using Codebox within Gen at a later stage?


October 29, 2011 | 8:53 pm

Best place to start is with some examples. look in examples/gen and for Jitter examples/jitter-examples/gen.

For gen~ and GenExpr, gen~.interpolation is a good example. For Jitter you can compare GLSL v. GenExpr with the pix.repos examples. The similarities to C and Javascript have to do with the use of semicolons, a procedural style syntax, use of curly braces to mark out blocks of statements.

If you’re just starting to learn text-based coding, I would try to use both the visual patcher and GenExpr in parallel. First, build something simple using object boxes, then translate the same thing into GenExpr. You can put them side-by-side in the same Gen patcher so that it’s easy to compare the results.


October 29, 2011 | 9:00 pm

Everyone learns in different ways, but I would suggest that you consider working in the graphic Gen environment and becoming fluent there, and then work your way in by going to GenExpr when you *need* it to do things that you can’t do by visual patching. As an interim step, you might explore the technique of rewriting a patch you know works already by using the expr operator in Gen to replace things that you’re comfortable with.

While it is true that there are things you can (and will be able to) do in the codebox that are not nearly as easy or as doable within the graphic programming environment, I expect you’ll find that there is a considerable amount that you *can* do without ever calling up a codebox.

Gen gives you choices, so you don’t actually *have* to go running off to write command line code right away (although if it’s something you’re very comfortable with doing, have at it!). For lots of people, Max was attractive specifically because they *didn’t* want to have to write code – to me, one of the spectacularly elegant things about Gen is that you can situate yourself where you are most comfortable and then work from there….


October 31, 2011 | 12:11 am

"Should I start with JavaScript and find my way into using Codebox within Gen at a later stage?"

codebox is just as easy as JavaScript if not more so(i say definitely more so). if you have some reason you’d like to learn JavaScript, and you want to use CodeBox, I’d just learn both at the same time. (JavaScript and CodeBox are not nearly as steep a learning curve as C or C++.)

Props to Cycling for codebox. Reminds me of the days I used to test video games and had to add mods using Lua. Very slick syntax.


October 31, 2011 | 3:40 am

Thanks for the advice gentlemen. So is there some comprehensive documentation on text-based coding in CodeBox? Like, something for complete noobs to coding?


October 31, 2011 | 5:35 am

There is documentation in the release. Look under the "Discover Gen" section in the documentation home or on the side under the "Vignettes" tab under Gen. For the codebox, you’ll want to look at the GenExpr doc.


October 31, 2011 | 1:14 pm

Ok, sorry for the dumb questions, I had already read some of that doc. I just need to slow down and go through it carefully. I do like the examples a little further into the doc that have visual code next to codebox code for the same task.


October 31, 2011 | 2:26 pm

Oh, good. Glad you found ‘em. You might even have thought for a second that someone put those there to ease you into it.

And don’t worry, we have plans for more leaning materials for "the other N%" who want to get into visually programming Gen as beginners, too. :-)


October 31, 2011 | 3:12 pm

Hehe, I kept thinking, the way I’m going in this thread Gregory Taylor is bound to come in and bonk me on the head with that "how to ask questions on the Internet" link. :-)

In the meantime I’m going to take your advice, wheel the cart back behind the horse and start on visual programming in Gen.

Thanks again guys.


October 31, 2011 | 10:30 pm

No, your questions were quite clear, and needed no extra information to answer them. If you’d gone the "My thing doesn’t work. whassup?" route or something else, it would be different.

Feel free to post any specific questions you may have – it’ll help me to get a sense of what you might generally not be intuiting [which is ALWAYS a help if you're working on tutorials].

g


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