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

Mar 21, 2013 at 1:30am

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

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. –
#67225
Mar 21, 2013 at 2:26am

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. –
#241920
Mar 21, 2013 at 7:42am

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.

#241921
Mar 21, 2013 at 4:00pm

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.

#241922
Mar 21, 2013 at 5:15pm

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
#241923
Mar 21, 2013 at 7:16pm

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” ?

#241924
Mar 21, 2013 at 8:43pm

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

#241925
Mar 21, 2013 at 9:25pm

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.

#241926
Mar 21, 2013 at 9:57pm

Ah, maintenant je comprends mieux, merci Gregory.

Aber was Joshua geschrieben hat is auch sehr interessant.

Thank you, guys !

#241927
Mar 21, 2013 at 10:05pm

Graag gedaan, m’neer.

#241928

You must be logged in to reply to this topic.