Forums > Gen

[sharing sortie 4] gen~ seamless looper – comments welcome

March 21, 2013 | 1:30 am

Hello,

This is my first gen~ patcher. It is meant to loop a complete buffer with an ajustable crossfade time. Comments about coding would be highly appreciated.

Possible improvements : start and stop functions, varispeed, reverse playback.

– Pasted Max Patch, click to expand. –

March 21, 2013 | 2:26 am

Not sure I entirely understand all of the insides, but let’s try this: I don’t think that those codeboxes are required for what you’re doing – it’s your choice to use them, but they don’t look like they’re going to buy you anything. There is one thing about the left codebox, though: you’re making some kind of calculation for a variable called phaseoffset that you’re calculating but not outputting, and it’s not required in what’s in the codebox [I could be wrong, of course. Did I miss something?]

– Pasted Max Patch, click to expand. –

March 21, 2013 | 7:42 am

Hi Gregory,

Thank you for the comments.

Yes I introduced the phaseoffset before figuring out that the offset between the two players had to be 0.5 but I forgot to remove it.

Sure it is not necessary to use codeboxes but do you think is it computionnaly less efficient ? Because on the other hand I think it is much easier to read with the codeboxes.

Whatsoever I like the idea of the possibility to use both single operators and codeboxes to build similar circuits. I think it will help a lot people to make the jump from regular visual max programming to text programming.


March 21, 2013 | 4:00 pm

Ah that explains the stub in the codebox, then.

I am delighted and entertained by your presumption that visual programming is somehow the "regular" alternative. :-)

AFAICT, the computational efficiency is a wash.

I wanted to remind people that the codebox isn’t necessariy save for a few very specific cases. Good luck with the rest of your patch – it’s looking good.


March 21, 2013 | 5:15 pm

Interesting. Just got an offline email from someone who thought that codeboxing was the ONLY way to do if/then/else stuff. I hope you'll forgive the slight divergence to your excellent share, Roald.

You can patch if/then/else stuff easily without going anywhere near a codebox. Here's a silly example of what something like

"If your input is less than 1.0, multiply it by .01. If it's greater than 1. square it. Otherwise, pass it through without doing anything…."

looks like.

[attachment=218542,5248]

Attachments:
  1. IfThenElse.jpg

March 21, 2013 | 7:16 pm

The if / then / else was indeed one of the reasons to go codebox. Nice to see there’s an alternative.

Gregory, my understanding of (american ?) english has its limits : what do you mean with "the computational efficiency is a wash" ?


March 21, 2013 | 8:43 pm

"Patch of codebox? Er is bijna geen verschil, volgens mij."


March 21, 2013 | 9:25 pm

FWIW, there is a limitation where dynamic execution of code in if/then/else is codebox only. In the above and other scenarios when visual patching all of the code is executed. So if you have really expensive calculations in your different cases, you may wish to use codebox for that scenario.


March 21, 2013 | 9:57 pm

Ah, maintenant je comprends mieux, merci Gregory.

Aber was Joshua geschrieben hat is auch sehr interessant.

Thank you, guys !


March 21, 2013 | 10:05 pm

Graag gedaan, m’neer.


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