Mr.ToR

Forum Replies Created

Viewing 11 posts - 41 through 51 (of 51 total)
  • Author
    Posts
  • in reply to: How do you avoid MIDI feedback? #71935
    Mr.ToR
    Participant
      • Topics: 7
      • Replies: 51
      • Total: 58

      In my case, actually, I don’t have any problems with either
      panel:setPropertyInt(“panelMidiPauseOut”,1)
      or
      panel:setPropertyInt(“panelMidiPauseIn”,1)

      I have many comboBoxes and sliders.

      Here is how my panel looks for now.
      https://goo.gl/photos/preZiaPazi5VRocT6

      I’m thinking of using the ‘luaModulatorValueChange’ to run a method that will disable the MIDI input and enable back in 10 or 20 ms with a timer.
      The problem is, I don’t know which happens first, as in ‘luaModulatorValueChange’ or Modulator MIDI message out.
      If ‘luaModulatorValueChange’ is before Modulator MIDI message out, then this should work.
      If Modulator MIDI message out is before luaModulatorValueChange then maybe we should try ‘luaModulatorGetValueForMIDI’ since it is for manipulating the MIDI value to be sent, so it is definately before sending that MIDI 🙂 We don’t need to change anything about the MIDI value but from there we can enable panelMidiPauseIn for a duration like 10ms. or 20ms. and that should fix midi loopback.

      Also one other thing to try would be to change the MIDI Input Device to NONE instead of using panelMidiPauseIn.

      I’m working on the library data handling functions of my Panel so there will be some time before I can try these things.

      Please post here if anyone tries it 🙂

      in reply to: How to get the mouse event object in any method? #71887
      Mr.ToR
      Participant
        • Topics: 7
        • Replies: 51
        • Total: 58

        Thnx a lot for your help.
        However, I was at exactly the same pages 🙂
        see the problem is I already found the following:
        class_(“MouseEvent”)
        .def_readonly(“x”, &MouseEvent::x)
        .def_readonly(“y”, &MouseEvent::y)
        .def_readonly(“mods”, &MouseEvent::mods)
        .def_readonly(“eventTime”, &MouseEvent::eventTime)
        .def_readonly(“eventComponent”, &MouseEvent::eventComponent)
        .def_readonly(“originalComponent”, &MouseEvent::originalComponent)
        .def_readonly(“eventTime”, &MouseEvent::eventTime)

        but the only place I was able to find for ex. how mods is used, like this:
        (if MouseEvent.mods:isLeftButtonDown() then)
        was your panel code 🙂
        I can not find where that [:isLeftButtonDown()] is coming from so this applies to all other interfaces.
        Juce mods class definition says “This will let you find out which mouse buttons were down” but I couldn’t find anything more there, such as how it’s used. 🙁

        I would really appreciate if you could help with that as well.
        Thnx a lot.

        note: just before sending this message I ran MouseEvent.mods through the what function. was that where you found the isLeftButtonDown:function?
        Thnx

        in reply to: How to get the mouse event object in any method? #71882
        Mr.ToR
        Participant
          • Topics: 7
          • Replies: 51
          • Total: 58

          Hi goodweather,

          Could you please share what you’ve found about MouseEvent.
          I saw in your panel you used MouseEvent.x and MouseEvent.x
          What other possibilities are there? or where can I look to see what is provided with MouseEvent?

          Thnx a lot

          in reply to: How do you avoid MIDI feedback? #71871
          Mr.ToR
          Participant
            • Topics: 7
            • Replies: 51
            • Total: 58

            I’ve been working on a panel for a Roland MKS-80.
            MKS-80 squirts out SysEx when you change a tone parameter or a patch program.
            Panel can detect and relevant modulators are updated.
            I have a Method called SysExReceived which first disables midi output, then does its thing with the received messages and at the end enables midi back again.
            — Disable MIDI-OUT
            panel:setPropertyInt(“panelMidiPauseOut”,1)

            — code here —

            — Enable MIDI-OUT
            panel:setPropertyInt(“panelMidiPauseOut”,0)

            The SysExReceived method is called from panel’s ‘luaPanelMidiReceived’ handler.
            This works very well to stop the panel from sending the received stuff when modulators are updated. However this works when the data is initiated from the synth. This is half of the problem. I can avoid synth to get back what its sending.
            The problem is just the opposite. When a modulator value is manually changed, it sends the relevant data, synth updates it but because a tone parameter has changed on the synth, it squirts our relevant SysEx data to who might be listening, in our case back to us. 🙂

            With the SysExReceived trick, since i’m doing the receiving with code, and updating all modulators with code as well, i can controll the modulators not to send aynthing during execution of the code.

            The problem is, when a modulators value is manually changed, i’m not controlling the sending operation so i can not do a stop receiving while sending 🙁

            i would appreciate any help on this matter.

            Thnx

            • This reply was modified 7 years ago by Mr.ToR.
            in reply to: Lua Basics for Ctrlr – Beginners #71864
            Mr.ToR
            Participant
              • Topics: 7
              • Replies: 51
              • Total: 58

              in reply to: Modulator and Component questions #71863
              Mr.ToR
              Participant
                • Topics: 7
                • Replies: 51
                • Total: 58

                Hi goodweather,

                Look at my post here where I explained just that 🙂

                Lua Basics for Ctrlr – Beginners

                in reply to: Lua Basics for Ctrlr – Beginners #71861
                Mr.ToR
                Participant
                  • Topics: 7
                  • Replies: 51
                  • Total: 58

                  Human fly,

                  There is no need to be cagey about calling modulators or components objects. Juce is an object oriented framework. Ctrlr is based on Juce. Components are Juce graphical objects and Modulators are Ctrlr objects which contain graphical objects properly called components. An object is an instantiation of a class. In the case of components, when you add a graphical object in ctrlr, it’s actually an instance of the component class. That’s why they’re called objects. If you want, you can even call them an instance of a juce component class.

                  • This reply was modified 7 years ago by Mr.ToR. Reason: added the tree image
                  in reply to: Lua Basics for Ctrlr – Beginners #71845
                  Mr.ToR
                  Participant
                    • Topics: 7
                    • Replies: 51
                    • Total: 58

                    This is what I can tell so far:

                    The objects you can add to the panel are called components.
                    Right-click on the panel and you will get an ‘Add component’ dialog.
                    A component’s properties are divided into multiple sections such as ‘Modulator’, ‘MIDI’, ‘Component generic’ and ‘Component’.
                    Yes components have a property section called component. :-).
                    Now here is the weird part. All components have a modulator property but you can only view a ‘modulator list’. You might think that modulators are a property of the components but wait, when you’re at the ‘modulator list’ window, click the ‘View’ menu item and select ‘Switch to Tree’. Now in the tree view you will see the objects you’ve added to the panel, the ones we thought were components are listed as ‘modulator’ and under those modulators listed are ‘MIDI’ and ‘Component’ 😀
                    WOW What’s going on??? Nothing is what it seems… 🙂

                    I think the tree is the best place to understand what really is going on.

                    So it seems that you are actually not adding components to the panel (even though that’s what the dialog says) but you’re adding an object called a modulator, which has a group of properties called a ‘component’, ‘MIDI’ and also another group of properties called, wait for it… a ‘modulator’. 🙂

                    You can confirm this. Add an object to the panel, select it, in it’s properties dialog look at ‘Modulator’ property group, you will see a property called ‘Link to what type of MODULATOR property’ click its associated drop-down list and you will see the 3 selection options, which are ‘Modulator’, ‘Component’, ‘MIDI Message’. This also tells me that modulator is a modulator property. 🙂 ‘Component’ seems to be a graphical sub-object of a modulator object. In the tree list, it almost seems like you should be able to delete, cut, copy, add or paste a component (or midi) object to a modulator object but it doesn’t work like that. Maybe in a future version…

                    So in consideration of all these information i think, the property groups such as component and midi are actually midi object and component object added to a modulator object and all those three objects have their own properties. So in theory, since the only object added to the panel is a modulator and since there is no add modulator function and you can not add a modulator without a component, it might make sense to have a dialog that says ‘add component’ since it will actually add a modulator object but then add the selected component (together with a midi object) to that modulator object.

                    Anyways, the next thing i was able to figure out is that the Modulator property group of a modulator object is where you link a Lua code or function to that Modulator object to do different things or behave in different ways.

                    So what is an expression and a method and what is the difference?
                    As far as i can tell, methods are names of files that hold functions written in lua code. You can see/list these when you open menu item ‘Panel’->’Lua Editor’
                    It seems like the convention is to have one function per method and both having the same name. Meaning, if you make function called splitBytes you will have a method called splitBytes and in that method you will have a function called splitBytes. This again seems like having the same mentality as having a modulator parameter of a modulator object but it’s probably how ctrlr uses lua… seems a bit strange to me. I mean why not have a single file that holds all the lua functions so you won’t have to call them ‘methods’ and you wont have to keep them in separate files too???
                    Probably this will make sense to me when i learn more about lua and how its used in ctrlr. Anyways, these methods can be called from the following three properties of a modulator object:
                    1.’Called to calculate the MIDI value to send’,
                    2.’Called to calculate new modulator value from a MIDI value’,
                    3.’Called when the modulator value changes’
                    And also methods could be called from 17 properties of the panel (+5 in editor section).

                    The next thing is expressions. Here is a list of expressions:
                    http://ctrlr.org/expressions-in-ctrlr-2/ they are little functions. Ctrlr is based on Juce (www.juce.com) and these expressions are a Juce class. They are different from lua code. The juce documentation explains it in the following way:
                    [A class for dynamically evaluating simple numeric expressions.
                    This class can parse a simple C-style string expression involving floating point numbers, named symbols and functions. The basic arithmetic operations of +, -, *, / are supported, as well as parentheses, and any alphanumeric identifiers are assumed to be named symbols which will be resolved when the expression is evaluated.]

                    In ctrlr they are only entered into 3 specific properties of a modulator object:
                    1.’Expression to evaluate when calculating the midi message value from the madulator value’,
                    2.’Expression to evaluate when calculating the modulator value from the midi message value’,
                    3.” (the third parameter does not have a name and i have no idea what it is, maybe it’s similar to the third property about methods).

                    Another concept is global vaiables and local variables which i have not figured out yet. Maybe someone else can post here about those 🙂

                    hope this helps someone.

                    • This reply was modified 7 years ago by Mr.ToR.
                    • This reply was modified 7 years ago by Mr.ToR.
                    • This reply was modified 7 years ago by Mr.ToR.
                    in reply to: panel MIDI channel change #71836
                    Mr.ToR
                    Participant
                      • Topics: 7
                      • Replies: 51
                      • Total: 58

                      Human fly, you have my sympathies.
                      Ctrlr is really amazing however even though I can code C, C++, VB, many scripting languages, Max/M4L etc etc… i still don’t know where to write a line of lua code in Ctrlr. I’m thinking i’m probably missing something since there has to be like a hello world kind of sample program somewhere. I mean where do i find the information that shows how to do a very simple thing such as taking a component value, adding 2, and updating another component with the new value. I have no worries with lua since it has documentation and popularly used but i can not even see the simplest ctrlr-lua integration. The documentation section shows how to make a panel and send data with it, that’s great but nothing about a simple code of lua. I really don’t need anything about lua here, i just need to learn how ctrlr uses lua and i can not find any information about it.
                      I think the big question is, when you figure out getting a button to
                      switch on a LED, will you explain it here 🙂

                      in reply to: Lua Basics for Ctrlr – Beginners #71829
                      Mr.ToR
                      Participant
                        • Topics: 7
                        • Replies: 51
                        • Total: 58

                        I’m a beginner.
                        I’m fluent in multiple languages.
                        Now my question is, where do you write that code 🙂
                        And i guess a modulator is anything you put on the panel, right?

                        in reply to: Any MKS 80 Users out there? #71807
                        Mr.ToR
                        Participant
                          • Topics: 7
                          • Replies: 51
                          • Total: 58

                          I would like to participate.

                          • This reply was modified 7 years ago by Mr.ToR.
                        Viewing 11 posts - 41 through 51 (of 51 total)
                        Ctrlr