goodweather

Forum Replies Created

Viewing 20 posts - 301 through 320 (of 550 total)
  • Author
    Posts
  • in reply to: disabling a method? #72445
    goodweather
    Participant
      • Topics: 45
      • Replies: 550
      • Total: 595
      • ★★★

      ‘bootstrap’? programState: don’t remember them precisely but they are somewhat explained in the forum. The only one speaking a bit more is “bootstrap” that I simply translated by “during boot”.
      SaveState and RestoreState: I’m using those and have methods related to them.
      I must have already written something about them in the forum or in the step by step guide 2.0.
      Basicaly:
      – when you quit Ctrlr (not when you close a panel) it saves all the values of the modulators in the open panels. this is saved in the ctrlr.settings file in Appdata (PC)
      – you can add to that a save of some variables. To achieve this you use a SaveState method
      – when you open Ctrlr, it shows all open panels and their modulators
      – in the same way, at that time you can also force reloading some saved variables and you do that with a RestoreState method

      Look on the forum, there are some topics on this.

      Forgot to say: you can thus keep a test method without any problem. Just secure that it is not used by any modulator and that it has the magic piece of code preventing it to run during panel opening.

      in reply to: disabling a method? #72443
      goodweather
      Participant
        • Topics: 45
        • Replies: 550
        • Total: 595
        • ★★★

        human fly, you are again seeing things much too complicated…
        – Ctrlr methods contains functions
        – one Ctrlr method can contain several functions returning or not data
        – when a method is linked to a modulator “OnValueChange” it will be executed when you load the panel during the initialization of the panel
        – therefore, all “OnValueChange” methods should have the piece of code preventing them to run at that moment (unless you want the opposite of course)

        
        -- No action if the panel is in bootstrap or program states
        if not isPanelReady() then
        	return
        end

        isPanelReady() is a function that I have in a method that I call Miscellaneous and that contains several usefull functions. bPanelLoaded is a variable that I set to true at the end of panel load (doen by a timer displaying first a welcome message).

        --
        -- Check if the panel is not busy to load or receiving a program
        --
        isPanelReady = function()
        
        	if panel:getBootstrapState() == false and panel:getProgramState() == false and bPanelLoaded == true then
        		return (true)
        	else
        		return (false)
        	end
        
        end
        in reply to: building text strings #72220
        goodweather
        Participant
          • Topics: 45
          • Replies: 550
          • Total: 595
          • ★★★

          Well, somewhere it is the same… provided that you declare all your mods (I mean assign to variables) in some method launched at the beginning (this is advised by atom).
          Look at my method AssignModulators.
          I’m using getModulatorByName but I could also used getModulatorByIndex and used for example the NRPN number as index. But which number then for non synth related mods?
          I think it is easier to use getModulatorByName and corresponding variable names.

          in reply to: building text strings #72218
          goodweather
          Participant
            • Topics: 45
            • Replies: 550
            • Total: 595
            • ★★★

            amazing… you are doing the questions and the answers… however still looking to things in a too complex way 😉

            The console is used to display some info while programming or while using a panel but for verifications. I would not use it as an external output window but maybe some Ctrlr developers would do it.

            The console is available at 2 places: separate window or as the 4th tab within the Lua editor. I’m using that one most of the time.

            You type a statement in the bottom part and get the result in the upper part.
            A statement can be anything: one line of code, a check for a variable…

            When you type a line of code it is executed. This can be usefull at dev time when you forgot to do something. In that case, the statement is just repeated in the upper part. Example: myVar=10 typed in the lower part gives >>> myVar=10 in the upper part.

            To check the value of a variable, you use the console(string) function. The argument must be a string. If not then you get an error message. SO, safest is to always use tostring() to convert.
            Try with
            console(tostring(myVar))
            You will get
            >>> console(tostring(myVar))
            10
            in the upper part.

            Now, you can include this console() statement in your Lua code and when the method will run it will write its info in the console window (separate or at the bottom of the Lua editor. The console must be opened prior.

            You had also a question about my Miscellaneous method containing a lot of functions.
            You name your methods as you want. I discovered that a Ctrlr method is a recipient for any function so I started grouping different functions under one method.
            Like Miscellaneous, SpecificDisplays, SupportMethods…

            Hope that this time you understood the console() principle.
            ANd now I have my text for the console explantion in the step by step guide 🙂

            in reply to: building text strings #72205
            goodweather
            Participant
              • Topics: 45
              • Replies: 550
              • Total: 595
              • ★★★

              you canb puit all your home made functions in one method that you call “Miscellaneous”
              They are available at all time and this has nothing to do with “at panel load”.
              At panel load is only used to assign variables that are used later (for example, I assign all my modulators because those variables are used in all my OnClick / OnChange methods.

              in reply to: building text strings #72201
              goodweather
              Participant
                • Topics: 45
                • Replies: 550
                • Total: 595
                • ★★★

                Don’t understand what you are looking for…

                Concatenation of strings is straightforward in Lua (just use ..).
                Plenty of strings manipulation function on typical Lua training sites.

                In my Pro2 panel, i used trim(), rtrim(), ltrim(), split()…
                Look in method Miscellaneous under Panel methods

                in reply to: Mouse click on CustomComponent to call a tab #72197
                goodweather
                Participant
                  • Topics: 45
                  • Replies: 550
                  • Total: 595
                  • ★★★

                  Have a look at my Pro2 panel and its methods.
                  I have several _OnClick methods + Tab_OnChange.
                  ALso look at http://ctrlr.org/forums/topic/how-to-get-the-mouse-event-object-in-any-method/. I explained some stuff…

                  in reply to: How to get the mouse event object in any method? #72196
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • ★★★

                    Don’t know…sorry…

                    in reply to: howto get feedback from panel:sendMidiMessageNow() #72186
                    goodweather
                    Participant
                      • Topics: 45
                      • Replies: 550
                      • Total: 595
                      • ★★★

                      You can also look at my Pro2 panel.
                      Look at Timers method (timers 3 and 4) and corresponding bank receive / bank send in the BankProceed_OnChange method under Programs library methods.
                      Ctrlr was indeed sending too fast for the Pro2 to load. Therefore I introduced a 150ms timer.

                      timer:setCallback (3, timerCallback)
                      timer:startTimer(3, 150)

                      This means that the code in timer 3 is executed every 150ms.
                      In timer 3 you need to foresee a way to stop the timer at a certain moment.

                      Good luck!

                      in reply to: bipolar envelope ? #72185
                      goodweather
                      Participant
                        • Topics: 45
                        • Replies: 550
                        • Total: 595
                        • ★★★

                        I don’t know which panel you used as reference…
                        In my Pro2 panel, I revised dasfaker’s code to make it automatically adjusting to the size and with indication of number of segments.
                        There is an example of an inverted env graph in some panel.
                        I will also built it in my Pro2 and P12 panels.
                        If you can program, this is rather easy…

                        in reply to: Ctrlr – Step by step guide (in DEV version) #72165
                        goodweather
                        Participant
                          • Topics: 45
                          • Replies: 550
                          • Total: 595
                          • ★★★

                          Yes. I had already foreseen the paragraph.
                          Thx for mentioning!

                          in reply to: Ctrlr – Step by step guide (in DEV version) #72140
                          goodweather
                          Participant
                            • Topics: 45
                            • Replies: 550
                            • Total: 595
                            • ★★★

                            Thx. Actualy you should not look to this post but to the http://ctrlr.org/forums/topic/ctrlr-step-by-step-guide/ one.

                            Yes, I’m working on it but in parallel (besides my business work) I’m also modifying the Pro2 panel and making a P12 panel and learning my synths and…
                            But no worry, it will come out. I guess somewhere in August.
                            I have rewritten the existing part by adding more details and info. I’m using my Pro2 as example as I came to a dead end with the Sub37.
                            I have also added a lot of pages on Lua programming and methods (all tips and tricks I’m using in the Pro2 panel).
                            There is really a lot to explain…

                            So, thx for your support and just be patient 😉

                            in reply to: Bad Link on Website #72138
                            goodweather
                            Participant
                              • Topics: 45
                              • Replies: 550
                              • Total: 595
                              • ★★★

                              I think the layout is clear download->ctrlr/panel and a big Download-Ctrlr link

                              the load time should now be normal i removed some old/bad javascript for the embedded chat service that died at some point

                              I tested everything and it is perfect and fast on all pages!
                              Big thank you Mr atom !

                              in reply to: Bad Link on Website #72086
                              goodweather
                              Participant
                                • Topics: 45
                                • Replies: 550
                                • Total: 595
                                • ★★★

                                Thx Roman. It is indeed better as the icons are now at least appearing and are visible.
                                However we have to wait a bit to have them displayed which was not the case before.

                                In fact there is waiting time on most key pages:
                                – main Ctrlr page: good page with big Download button displays directly but get spinning icon in tab (I’m on Chrome, don’t know if this is linked) to have the Facebook number of visits displayed (takes about 10s)
                                – Forum main page: quick display of almost everything but get spinning icon in tab to have the Google custom search displayed (takes about 20s)
                                – Forum topic: quick display of everything but get spinning icon in tab to have the formatting icons displayed (takes about 20s)

                                New version of WordPress or…?

                                in reply to: Bad Link on Website #72070
                                goodweather
                                Participant
                                  • Topics: 45
                                  • Replies: 550
                                  • Total: 595
                                  • ★★★

                                  Thx Roman!
                                  Now, it would be also great if you could look what’s happening with the formatting icons in the Reply section of the forum 🙂

                                  in reply to: Bad Link on Website #72013
                                  goodweather
                                  Participant
                                    • Topics: 45
                                    • Replies: 550
                                    • Total: 595
                                    • ★★★

                                    Actually, there are different related issues to this phenomenon:
                                    – it takes long time (30s – 1min) to get the submenus under Downloads and under Development (at least in Chrome). If you click too early, you are getting the list of the .exe files instead of for example being able to download panels
                                    – Download – Ctrlr is not showing anymore the directory content but only a list of .exe files

                                    I have seen that on the main Ctrlr page, it takes very long to display the FB likes and this could be the reason (FB likes being display before the submenus are built) but I don’t know…

                                    Other issue on the forum: Formatting icons are not displayed anymore in the Reply to area (in Chrome)…

                                    Thx to look at this in priority as this is the first contact people have with Ctrlr 🙂

                                    in reply to: Called when the panel has finished loading #71955
                                    goodweather
                                    Participant
                                      • Topics: 45
                                      • Replies: 550
                                      • Total: 595
                                      • ★★★

                                      About the Save, it is very simple and efficient. I copy here what I put in my updated Step by Step guide 2.0.
                                      Under File, select Save or Save As to save your panel. A file with .panel as extension will be created.
                                      When you use Save, you are saving your work in the current panel file. When you use Save versioned, you are storing the whole panel in a new file as DSI Pro2_1_0_2017-03-20_16-02.panel while staying in the current panel file. The filename of the “Saved versioned” file is automatically created and includes the current version and date/time. The Version MINOR panel attribute is incremented automatically at each save versioned.

                                      About SetVisible, I don’t remember but I think I just avoided touching that at panel load…

                                      in reply to: Lua Basics for Ctrlr – Beginners #71914
                                      goodweather
                                      Participant
                                        • Topics: 45
                                        • Replies: 550
                                        • Total: 595
                                        • ★★★

                                        Totaly agree with you Proton!
                                        If I would put in the forum all my issues / thoughts / prototypes / failures with Ctrlr I would be busy typing in the forum instead of thinking about solutions 😉

                                        human fly, now don’t take it too strong but indeed you should limit your posts and post/ask somehting only after having done a thorough search / try of different ways of working. In programming there are always different ways to reach the same goal and when one is not working the fun is just to avoid the obstacel and to search for a workaround. Programming would not be so thrilling if it would be too easy…

                                        Here for Ctrlr, you have plenty of panels and also forum topics to look at and use in your own panel before having the need to request things.

                                        And for all, now that I released my Pro2 panel, I’m adapting it to Prophet 12 with some other users and I’m also rewriting/completing the step by step guide.

                                        in reply to: Lua Basics for Ctrlr – Beginners #71911
                                        goodweather
                                        Participant
                                          • Topics: 45
                                          • Replies: 550
                                          • Total: 595
                                          • ★★★

                                          It’s amazing how you are reasoning/working… You try understanding complex stuff, you search in complex stuff but without mastering easy stuff first…
                                          I would advise you to limit yourself to easy stuff, get a simple thing working then if needed, extend further from there…

                                          About console, just apply what I said above, it does what I described…
                                          – let’s say that in your code you have iBank = 12
                                          – if you add a line console(tostring(iBank)) in the code you will see 12 in the console window
                                          – if your panel is open and that you ran different things then you can open the console window and type a console statement in the bottom part to check the value of any global variable used in the code

                                          in reply to: Lua Basics for Ctrlr – Beginners #71905
                                          goodweather
                                          Participant
                                            • Topics: 45
                                            • Replies: 550
                                            • Total: 595
                                            • ★★★

                                            Anywhere in a method you can add:
                                            console(tostring(any_variable))

                                            Use tostring() to be sure to convert the variable value to a string because console() accepts only strings.

                                            You can also open the Lua console under Panel. In the bottom part you can type any console() statement to check any variable. The result will be displayed in the upper part.

                                          Viewing 20 posts - 301 through 320 (of 550 total)
                                          Ctrlr