uiEnvelope Status

Home Forums General Using Ctrlr uiEnvelope Status

Viewing 20 posts - 1 through 20 (of 27 total)
  • Author
    Posts
  • #13945
    macrodx
    Participant
      • Topics: 3
      • Replies: 28
      • Total: 31

      Hello,

      first of all, I´m new to the forums and by this wanna say HI… And most importantly of all: Ctrlr is awesome!

      Now to the point: Instead of bumping up topic How to use uiEnvelope component? I thought I´d start a new one.

      I fiddled around with uiEnvelope abit, after creating one based on dasfakers uiCustomComponent env. Although it´s working I would rather have uiEnvelope on my panels to reduce Lua usage.

      To my impression uiEnvelope is almost complete. The issues I encountered are:

      • As opposed to the X coord, there are no limiting properties for a point´s Y coordinate. (“Min Y position”, “Max Y position”).
      • The Max Y value does not seem to have any effect on the position
      • The envelope modulator does not seem to have a value, so the valueChanged event never occurs (and which would also explain the previous point)
      • There seems to be a loopback between the linked modulator of a point and the point itself. Seems to me that when a linked modulator updates the point value then the point position change in turn changes the modulator again.

      I´ve got the feeling if the envelope has Y-pos restrictions and the loopback problem gets fixed then we won´t need custom components anymore…

      • This topic was modified 10 years, 6 months ago by macrodx. Reason: Link was not visible
      #13947
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        I have to admit that i left that component and never finished it. Not that i didn’t want to or didn’t have the time, but i can’t figure out a way how to make it flexible enough and yet not complicated. It would have to exist without any expressions and Lua methods, only with static properties i just couldn’t find a set of those properties that would make it a complete solution.

        If someone can propose a solution like that in some kind of description i’d love to implement it.

        #13951
        macrodx
        Participant
          • Topics: 3
          • Replies: 28
          • Total: 31

          Thanks for your quick reply atom!
          I guess by “complicated” you are referring to the user´s point of view?
          I see what I can put together as a descriptive design. I am really interested in this because envelope controls have always been what I was missing from similar applications, plus it would greatly enhance Ctrl panels and take off the need of the creators to script their own controls…

          #13952
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            what is needed here is a component that will have a set of properties for the canvas and for each point. it must accept a variable amount of points (minimum of one) i never planned for tension parameters but this could be also added. an adsr envelope should consists of four points on such a component. the problem is the set of properties for each point i guess.

            #13959
            macrodx
            Participant
              • Topics: 3
              • Replies: 28
              • Total: 31

              Let me give it a try…
              Check your PM

              #13962
              macrodx
              Participant
                • Topics: 3
                • Replies: 28
                • Total: 31

                Hello again,
                I´ve attached a text document with my design considerations.
                I hope it´s readable as I am not a native speaker…

                Attachments:
                You must be logged in to view attached files.
                #13964
                atom
                Keymaster
                  • Topics: 159
                  • Replies: 2945
                  • Total: 3104
                  • ★★★★★

                  This is why it’s so complicated. I wanted to simplify this and just add a canvas with points, the only “limits” would be an axis lock (x,y) on a point and the fact that one point can’t go beyond other points or the envelope bounds.

                  But that is not enough, and that’s how the uiEnvelope component evolved to what it is now.

                  Your document assumes a sequence of messages (a fact that one type of point can’t occur before/after a different point), i think that’s a no go. All points should be of the same type, the set of properties should define each point and make it behave in a certain way.

                  I can imagine point templates, like your types, that is all points are “default” but you can apply a set of properties from a template to make it behave like one of the types (just thinking out loud).

                  The biggest problem is how to apply bounds to where the point can movee, the X/Y axis lock is the obvious one. There is stuff like the SUSTAIN parameter, that defines the level and not the time, with that parameter the Y values of decay needs to move to represent how the envelope really looks like (sustain is more the line that connect release and decay and not a point).

                  https://www.google.co.uk/search?q=adsr+envelope&client=firefox-beta&hs=ynJ&rls=org.mozilla:en-US:official&source=lnms&tbm=isch&sa=X&ei=5yVTUrqvA8Sw4QSwg4CQCg&ved=0CAkQ_AUoAQ&biw=1920&bih=950&dpr=1

                  There are also weird multi point envelopes like the Casio CZ series has with a level,rate parameter for each point

                  It’s complicated, i’d like the thread to become more of a discussion i can use as a way to get this right. So if anyone has any ideas, or maybe can show me how it’s done somewhere else (and that is a good implementation) i could have a look. Anything that will help.

                  • This reply was modified 10 years, 6 months ago by atom.
                  #13968
                  macrodx
                  Participant
                    • Topics: 3
                    • Replies: 28
                    • Total: 31

                    Your document assumes a sequence of messages (a fact that one type of point can’t occur before/after a different point), i think that’s a no go. All points should be of the same type, the set of properties should define each point and make it behave in a certain way.

                    Yes and no… With the set of properties I defined all points would be of the same type. Only this leaves to configuration user to define the different types by setting the properties correctly. The types I defined would take that away from the user but would of courxe make code logic more complicated. That´s an option, not a must.

                    I can imagine point templates, like your types, that is all points are “default” but you can apply a set of properties from a template to make it behave like one of the types (just thinking out loud).

                    This would be the set of properties I defined. If you look at the type definitions then for the Default type all properties are enabled. So any other type is just a subset of these properties and could thus be configured setting the correct values.
                    (Don´t get me wrong, I do not consider my document to be the final solution!)

                    The biggest problem is how to apply bounds to where the point can movee, the X/Y axis lock is the obvious one.

                    I am not so sure about that. The Y axis of points can never overlap. The sole dependency lies between the X coords of the points. Each point can have a maximum bounds width of maxValueX*factorX. The bounds X origin is always previous point positionX. Still the only property to set is the maxValue and whenever these properties of a point change then the factors and poisitions have to be recalculated.

                    There is stuff like the SUSTAIN parameter, that defines the level and not the time, with that parameter the Y values of decay needs to move to represent how the envelope really looks like (sustain is more the line that connect release and decay and not a point).

                    I would say yes and no again here. The sustain is the point to the right of the line. I think it is a matter of comfort that in most implementations you can alter the sustain level with the decay point. The sustain point as well as the line that is drawn to the decay point is a visual aspect. Decay is a time parameter only. So it is actually incorrect to call the decay point decay if it can also alter a level. The decay point in envelope controls is always a control for decay and sustain at the same time. And this is the reason why I think that an envelope control must be aware of the type quality of a point. But only for the visual aspects so to say…

                    There are also weird multi point envelopes like the Casio CZ series has with a level,rate parameter for each point

                    Yes, I also pointed that out at the end and left the solution to this open..

                    It’s complicated, i’d like the thread to become more of a discussion i can use as a way to get this right. So if anyone has any ideas, or maybe can show me how it’s done somewhere else (and that is a good implementation) i could have a look. Anything that will help.

                    This sounds a bit like nothing I said made any sense..?

                    #13973
                    Hecticcc
                    Participant
                      • Topics: 25
                      • Replies: 160
                      • Total: 185
                      • ★★

                      Just my 2 cents but maybe Ctrlr could have two different kinds of envelopes?

                      -One simple one for the regular ADSR types with fixed amount of control points.
                      -One for the exotic ones, that has the option to add control points & can add the required parameter property fields for each point to itself.

                      Also, see attachment for more envelope exotism 😉

                      Attachments:
                      You must be logged in to view attached files.
                      #13980
                      atom
                      Keymaster
                        • Topics: 159
                        • Replies: 2945
                        • Total: 3104
                        • ★★★★★

                        I thought about that, ADSR is the most popular type that would cover i thing about 70% of devices. I might create that one anyway and then move to a universal component.

                        The problem i’m facing with all that in mind is how to limit a point on the canvas, it sometimes need to be dependant on other points and sometime it needs to move freely around. Also one point can alter the position of ALL points, for example in a ADSR envelope if you move the attack point all others should follow it, that is keep the same distance from the attack point, but some envelopes need for the points to stay in place.

                        #13983
                        Hecticcc
                        Participant
                          • Topics: 25
                          • Replies: 160
                          • Total: 185
                          • ★★

                          I see how that can complicate things.
                          Would it be possible to make a point have it’s x and/or y to be “locked” somehow, and make “unlocked” points’ movement scale to these positions?

                          Easier said than done though….especially if you want to minimize Lua usage to set it up..

                          #13984
                          lfo2vco
                          Participant
                            • Topics: 26
                            • Replies: 162
                            • Total: 188
                            • ★★

                            From a user interface point of view, maybe it would be easier to view each component part of the envelope as a box.

                            So the attack component would be encompassed by a box, drag the left side out and it will lengthen the attack time, drag the right side to the right and it will lengthen the attack but substract from the decay and release times. Sustain would only have a vertical drag element.

                            Just a thought.

                            Here is some noise I organised into an acceptable format:
                            https://soundcloud.com/lfo2vco/a-dark-crystal

                            #13986
                            macrodx
                            Participant
                              • Topics: 3
                              • Replies: 28
                              • Total: 31

                              Also one point can alter the position of ALL points, for example in a ADSR envelope if you move the attack point all others should follow it, that is keep the same distance from the attack point, but some envelopes need for the points to stay in place.

                              Can you give an example? I can think of envelopes that control equalizers, like in the cubase mixer. But that would be a different type of envelope I think, because the x-axis is a value line (frequency), not a timeline, and so all points would be valid on the entire range (axis that is..).

                              #13990
                              msepsis
                              Participant
                                • Topics: 219
                                • Replies: 732
                                • Total: 951
                                • ★★★
                                Also one point can alter the position of ALL points, for example in a ADSR envelope if you move the attack point all others should follow it…

                                Can you give an example?

                                He did. An ADSR envelope. When you move the attack time all proceeding values should slide relative to where the attack stage starts.

                                I have used custom components to get this type and the other types of interactive envelopes my panels require. Besides the typical ASDR env I’ve needed to make an 8 stage (and more simple 4 stage) time/level envelope (waldorf microwave XT) and for the blofeld – ADS1DS2R Envelopes. From the blofeld manual:
                                ADS1DS2R Envelope – A difficult name for an envelope that is quite easy to understand. Besides the parameters an ADSR envelope features, it offers an adjustable attack level and a second Decay and Sustain pair. With these additional parameters, you can create much more complex envelopes.

                                Attached are screen grabs of these two types of envelopes, the 8 stage time/level envelope and ADS1DS2R. These are further examples where if you adjust one time value the preceding time values should slide accordingly.

                                aybe it would be easier to view each component part of the envelope as a box.

                                This is precisely the concept I had in mind when using the customComponent.. not necessarily a box but a rectangular region. T1 = x, T2 = T1+y, T3 = T2+z etc where x = the value of time1, y = the value of time 2, z = value of time 3.

                                Attachments:
                                You must be logged in to view attached files.

                                Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

                                #13996
                                macrodx
                                Participant
                                  • Topics: 3
                                  • Replies: 28
                                  • Total: 31

                                  He did. An ADSR envelope.

                                  Sorry, I quoted wrong so didn´t make my point clear… I was rather refering to

                                  The problem i’m facing with all that in mind is how to limit a point on the canvas, it sometimes need to be dependant on other points and sometime it needs to move freely around.

                                  . And that also in connection with his statement that a sequence of typed points would be a no-go… The EQ envelopes are the only ones I could imagine where each point can really move freely without any sequential dependency.

                                  You are right about the rectangular regions. They are therem, whether you paint them or not. They define the bounds a point can move within. And even if you leave points aside and think resizeable rectangles, the changellenge is the same.

                                  #14048
                                  msepsis
                                  Participant
                                    • Topics: 219
                                    • Replies: 732
                                    • Total: 951
                                    • ★★★

                                    Ah. I gotcha.

                                    I know also this isn’t what you were asking.. but I am more than happy to post an example of my 8 stage wave level/time envelope built as a custom component just like dasFaker did with his envelope example from about a year ago.. I know I’ve got at least one bug in there somewhere maybe some of you will be able to help me identify where it is 🙂

                                    It will take some time as I have a few other things to do yet but I’ll post an example of the custom component envelopes I built based off of dasfaker’s original example (in the old panel db) as soon as I have some time. I’ll add as many comments in the scripts as possible to describe what each method does, what each variable represents, etc.

                                    It would have taken me a LOT longer to build what I made w/o his example, so hopefully my example can help some of you as well and might take some pressure off atom to provide a universal env solution which is quite a tall order.

                                    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

                                    #14061
                                    Hecticcc
                                    Participant
                                      • Topics: 25
                                      • Replies: 160
                                      • Total: 185
                                      • ★★

                                      Please do Msepsis,

                                      Iirc your implementation has click/drag functionality on the nodes & that is something i would love to study. Mine is only a graphical representation atm, which is also nice but adding click/drag would be awesome.

                                      #14064
                                      atom
                                      Keymaster
                                        • Topics: 159
                                        • Replies: 2945
                                        • Total: 3104
                                        • ★★★★★

                                        Sorry i was beeing quiwt for a moment, had some worse days.

                                        Anyway i started a just ADSR component that i will include in the next build. It will be strictly ADSR, but if it works and is usable basing on that i will try to make a generic Envelope based on what marcodx wrote and your other comments.

                                        #14074
                                        macrodx
                                        Participant
                                          • Topics: 3
                                          • Replies: 28
                                          • Total: 31

                                          Sounds great!
                                          Maybe you want to take this into account (I am currently working on a Lua based example for this…):

                                          A point is specified by
                                          – min, max and default value for each axis
                                          – linked point for each axis
                                          The rules are implemented on the level of the envelope control, a point itself contains no control logic. An ADSR envelope would be of type time/level and treats it´s points as a left-to-right sequence. Rules for handling are as follows:
                                          If a point has a range on an axis (given bei min/max value), it is moveable on the axis. If a point has a linked point, the envelope updates the point position when it updates the linked point. The ranges set the dimensions of the bounding rectangle for each point.
                                          Take the decay/sustain points as an example:
                                          Decay gets min/max values that make it moveable on both axis. Decay is linked to Sustain:Y. Sustain gets min/max:X = MAX, thus is not moveable on the x-axis. Sustain is linked to Decay:Y. Now if you move Decay on the y-axis, sustain will follow. If you move sustain on the y-axis, Decay will follow.

                                          As I said, I´m working on an example for that. The goal is to implement one ruleset on the envelope control level, and then set it´s character (ADSR, DADBSSR…) by adding points configured by min/max and linked points. Let´s see how this works out 🙂

                                          #14617
                                          macrodx
                                          Participant
                                            • Topics: 3
                                            • Replies: 28
                                            • Total: 31

                                            Hello again all,

                                            finally I´ve got a demo panel to present. Actually it´s more than a demo. I wanted to have envelope control for my panels so this turned into a fully useable control and therefore took a while longer…
                                            Maybe you want to give it a shot.
                                            About the demo panel:
                                            i´ve included a button that lets you switch between two envelope templates. One is a Roland D20 pitch envelope, which also connects to the slider modulators.
                                            The other one is a Korg DW style envelope with ADBSSR.
                                            Take a look at the template code files (via the lua editor, in group Envelope Templates). The envelope is based on a basic set of properties for each point.
                                            The entire framework is such that you can put as many envelopes on your panel as you like. They all use the same set of codefiles. If anyone finds it useful I can write some documentation on how to integrate it into panels and set up envelope points.

                                            Edit: The first file version had a bug. Forgot the isRestoring check on the template switch button…

                                            • This reply was modified 10 years, 6 months ago by macrodx.
                                            • This reply was modified 10 years, 6 months ago by macrodx. Reason: Wrong file uploaded
                                            Attachments:
                                            You must be logged in to view attached files.
                                          Viewing 20 posts - 1 through 20 (of 27 total)
                                          • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                                          There is currently 0 users and 97 guests online
                                          No users are currently active
                                          Forum Statistics
                                          Threads: 2,495, Posts: 17,374, Members: 77,605
                                          Most users ever online was 12 on January 22, 2019 3:47 pm
                                          Ctrlr