-
Ice-Ice
@seb-harmonik.ar
Wow, thanks a lot! A very interesting patch, going through this one step by step has taught me a lot.
And very true what you said about the purpose and use of [expr]. I see now that I used to look at the object as something completely different than it's actual purpose. -
Ice-Ice
I am sitting with a little patch here... I want to calculate the digit sum of an integer.
What I have so far works with any integer up to and including 99. But the trouble starts at n >= 100.
See the patch attached: DigitSum.pdI got this working in Python, for any integers:
def digSum(n): out = 0 while (n != 0): out = out + int(n % 10) n = int(n/10) return out for x in range(1,200): n = x print(n, ":", digSum(n))
But [expr] seems to not do while-loops, unless I am mistaken?
I have tried sloppy workarounds, chaining up multiple [expr} objects, but it's error-prone, ugly, and convoluted.
The end goal is to be able store the digit sums of a given range of integers in an array; Like you can see in the right-hand section of the DigitSum.pd patch.Anything I am missing here?
-
Ice-Ice
Hi there!
Great vid, and nice sound, too! Kinda bagpipey, I really like it!
I am sitting with a very similar project at the moment: Interpolating between arrays, writing the results of the interpolation to another array, which serves as a wavetable. I have tried different approaches, using [expr] turned out to be the most malleable one. What object are you using for your calculation there? -
Ice-Ice
Hi @timothyschoen! I was on 0.7.1, didn't know 0.8 was out. Just downloaded it and now it all works. Thanks a lot!
However, there are 2 things:
I had to add all downloaded externals to Paths again. That is, they were still in the original folders, but I had to add them manually in the Paths menu. Is there a way for future installers so they retain the data for Paths from an earlier installation when updating? Or how can I preserve this manually when the next update comes?I can't create objects from the Objects Browser. The objects are highlighted when hovering the mouse over them, but they don't react to mouse clicks or pressing Return. No biggie as I usually just use shortcuts.
I love this project by the way! It brought me back to pd after a year in Max.
-
Ice-Ice
Assuming this thread is a good place for general discussion of PlugData:
I am on Windows 10. I can't set all array properties through messages.
From the ones I tested, [style $1( and [edit $1( work. [color $1( and [width $1( do not.
Is there anything I am missing here?