Changing Images – what could be wrong in that LUA code

Home Forums General Programming Changing Images – what could be wrong in that LUA code

Viewing 14 posts - 21 through 34 (of 34 total)
  • Author
    Posts
  • #4457
    Cramp
    Participant
      • Topics: 11
      • Replies: 66
      • Total: 77
      "atom":2iyvlhcw wrote:
      I looked at your panel but i’m afraid i don’t understand what you are trying to achieve and what’s nor working. I can work with simple examples if can provide them. If my example panel is working then the midi-cc and resource changing properties are working and so your code should work also.[/quote:2iyvlhcw]

      I’m trying to get visualizations working according to what is the filter type is choosen. Filter type changes CC of the modulator. The thing is that modulator component type is uiFixedImageSlider. if i try to recreate that modulator deleting the old one first then I cannot add it onto panel – I cannot see it. I can see the other types of Slider components. But uiFixedImageSlider cannot be added.
      Also if you look at picture below and you may see that rows with names as marked red are appeared when one of the modulators value change but picture (and modulator Image does exist) doesn’t change mate!!!

      [img:2iyvlhcw]http://dl.dropbox.com/u/4202790/slider.png[/img:2iyvlhcw]

      The image name when modulator should be shown as OFF is "nord_let_pot_full_off". When it should be ON the Image resource needs to be changed to "nord_led_pot_full". In previous CtrlR build 1047 the image was changing by script. But after I have installed the 1056 build the image resource of the uiFixedImageSlider component selected on picture above is not changing. I can select manually picture in Image Resource properties – nothing happends. If I close CTrlR and re-open it then changes applies.
      I’m using Windows 7 32 bit.

      Also I tried to uninstall CtrlR. And then do a clean install – didn’t help

      The I uninstall build 1056 and installed build 1047. Then Image changes work fine.

      P.S. MIDI CC control value change is working on 1056 CtrlR build.

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

        Can you see there are two "r" in the property name, also there is no such property as uiFixedImageSliderResource it’s always "uiImageSliderResource"

        #4459
        Cramp
        Participant
          • Topics: 11
          • Replies: 66
          • Total: 77
          "atom":1sfscrfc wrote:
          Can you see there are two "r" in the property name, also there is no such property as uiFixedImageSliderResource it’s always "uiImageSliderResource"[/quote:1sfscrfc]
          Yes I noticed that. I used uiImageSliderResource property. But that didn’t help me

          See the code –
          1st button activates the single filter
          [code:1sfscrfc]FilterSwitch = function(modulator, newValue)

          — Images ON Status

          MultiFilterTypeOn = "sixfold_selection_filter"
          FilterDistSliderOn = "nord_led_pot_full"
          SingleFilterTypeOn = "sixfold_selection_filter"
          FilterSlopeTypeOn = "led_three_upward2"

          — Images OFF Status

          MultiFilterTypeOff = "sixfold_selection_filteroff"
          FilterDistSliderOff = "nord_led_pot_full_off"
          SingleFilterTypeOff = "sixfold_selection_filteroff"
          FilterSlopeTypeOff = "led_three_upward_off"

          — When click this know Filter mode changes to Multi

          FilterMode = 0
          if FilterMode == 0 then

          — filterslope modulator
          filter_slope_mod = panel:getModulatorByName("FilterSlope")

          — Single Filter Type modulator
          single_filter_mod = panel:getModulatorByName("FilterType")

          — Multi Filter Type and Led Modulators
          multi_filter_mod = panel:getModulatorByName("FilterEnvCtrl")

          — Frequency2/Dist Slider modulator
          freq_dist_mod = panel:getModulatorByName("FilterFreq2")

          — This knob on click disables Multi Filter type that is why Filter Slope and Single Filter Type knobs
          — need to be enabled. And MultiFilter knob plus Filter2 need to be disabled. Filter2 runs with CC 114

          — ENABLING SINGLE FILTER
          comp = filter_slope_mod:getComponent()
          comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)

          comp = single_filter_mod:getComponent()
          comp:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)

          — DISABLING MULTI FILTER
          comp = multi_filter_mod:getComponent()
          comp:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)

          comp = freq_dist_mod:getComponent()
          comp:setPropertyString ("uiImageSliderResource" , FilterDistSliderOff)


          — Enabling Dist Slider if DIST LP (58) value is Selected on Filter Type and
          — set MIDI CC 114 to Frequency2/Dist Slider modulator

          if freq_dist_mod ~= nil then
          comp = freq_dist_mod:getComponent()
          if newValue == 5 then

          comp:setPropertyString ("uiImageSliderResource" , FilterDistSliderOn)
          filter_slope_mod:setModulatorValue(1, false, true, true)
          else

          comp:setPropertyString ("uiImageSliderResource" , FilterDistSliderOff)
          filter_slope_mod:setModulatorValue(2, false, true, true)

          end
          end


          — Disabling Filter Slope if BR (35) is Selected on Filter Type

          if newValue == 3 then
          z = filter_slope_mod:getComponent()
          z:setPropertyString ("uiImageButtonResource" , "led_three_upward_off")
          else
          z = filter_slope_mod:getComponent()
          z:setPropertyString ("uiImageButtonResource" , "led_three_upward2")

          end


          end

          mod = panel:getModulatorByName("FilterFreq2")
          if mod ~= nil then
          midi = mod:getMidiMessage()
          if midi ~= nil then
          if newValue == 1 then
          midi:setPropertyInt ("midiMessageCtrlrNumber", 59)
          else
          midi:setPropertyInt ("midiMessageCtrlrNumber", 114)
          end
          end
          end
          end[/code:1sfscrfc]
          This button activates Multi Filter and disable visualuzation of Single filter
          [code:1sfscrfc]FilterSwitch2 = function(modulator, newValue)

          — Images ON Status

          MultiFilterTypeOn = "sixfold_selection_filter"
          FilterDistSliderOn = "nord_led_pot_full"
          SingleFilterTypeOn = "sixfold_selection_filter"
          FilterSlopeTypeOn = "led_three_upward2"

          — Images OFF Status

          MultiFilterTypeOff = "sixfold_selection_filteroff"
          FilterDistSliderOff = "nord_led_pot_full_off"
          SingleFilterTypeOff = "sixfold_selection_filteroff"
          FilterSlopeTypeOff = "led_three_upward_off"

          — When click this know Filter mode changes to Multi

          FilterMode = 1

          if FilterMode == 1 then

          — filterslope modulator
          filter_slope_mod = panel:getModulatorByName("FilterSlope")

          — Single Filter Type modulator
          single_filter_mod = panel:getModulatorByName("FilterType")

          — Multi Filter Type and Led Modulators
          multi_filter_mod = panel:getModulatorByName("FilterEnvCtrl")

          — Frequency2/Dist Slider modulator
          freq_dist_mod = panel:getModulatorByName("FilterFreq2")

          — This knob on click enables Multi Filter type that is why Filter Slope and Single Filter Type knobs
          — need to be disabled. And MultiFilter knob plus Filter2 need to be enabled. Filter2 runs with CC 59

          — DISABLING SINGLE FILTER
          comp = filter_slope_mod:getComponent()
          comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOff)

          comp = single_filter_mod:getComponent()
          comp:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOff)

          — ENABLING MULTI FILTER
          comp = multi_filter_mod:getComponent()
          comp:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOn)

          comp = freq_dist_mod:getComponent()
          comp:setPropertyString ("uiImageSliderResource" , FilterDistSliderOn)

          end

          mod = panel:getModulatorByName("FilterFreq2")
          if mod ~= nil then
          midi = mod:getMidiMessage()
          if midi ~= nil then
          if newValue == 1 then
          midi:setPropertyInt ("midiMessageCtrlrNumber", 114)
          else
          midi:setPropertyInt ("midiMessageCtrlrNumber", 59)
          end
          end
          end

          end[/code:1sfscrfc]

          I can’t get – this ImageResource of the "FilterFreq2" modulator is not changing when I requested via Script.

          You see Image is not changing if I select the Image from the list
          [img:1sfscrfc]http://dl.dropbox.com/u/4202790/slideroff.png[/img:1sfscrfc] should be OFF
          [img:1sfscrfc]http://dl.dropbox.com/u/4202790/slideroon.png[/img:1sfscrfc] should be ON

          The images located in C:Users$MYUSERNAMEAppDataRoamingCtrlrresources and both OFF and ON Images are ok

          The XML file of Modulator (taken from Utility)
          [code:1sfscrfc]<?xml version="1.0" encoding="UTF-8"?>

          <modulator modulatorValueExpression="modulatorValue" modulatorValueExpressionReverse="midiValue"
          modulatorIsStatic="0" modulatorGlobalVariable="-1" modulatorMuteOnStart="0"
          modulatorExcludeFromSnapshot="0" modulatorLinkedToPanelProperty="– None"
          modulatorLinkedToModulatorProperty="– None" modulatorLinkedToModulator="– None"
          modulatorLinkedToModulatorSource="1" modulatorLinkedToComponent="0"
          modulatorBaseValue="0" modulatorCustomIndex="0" modulatorCustomIndexGroup="0"
          modulatorVstExported="1" luaModulatorValueChange="" modulatorMax="127"
          modulatorValue="85" vstIndex="13" name="FilterFreq2" modulatorMin="0">
          <midi midiMessageType="0" midiMessageChannelOverride="0" midiMessageChannel="1"
          midiMessageCtrlrNumber="114" midiMessageCtrlrValue="127" midiMessageMultiList=""
          midiMessageSysExFormula="F0 00 F7"/>
          <component componentLabelPosition="top" componentLabelJustification="centred"
          componentLabelHeight="14" componentLabelWidth="0" componentLabelVisible="0"
          componentLabelAlwaysOnTop="0" componentSentBack="0" componentLabelColour="0xff000000"
          componentLabelFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1" componentVisibleName="FilterFreq1"
          componentMouseCursor="1" componentGroupName="" componentSnapSize="8"
          componentIsLocked="0" componentRadioGroupId="0" componentRadioGroupNotifyMidi="1"
          componentVisibility="1" componentEffect="0" componentEffectRadius="0"
          componentEffectColour="0xff000000" componentEffectOffsetX="0"
          componentEffectOffsetY="0" componentEffectAlpha="0" uiImageSliderResource="nord_led_pot_full_off"
          resourceImageWidth="80" resourceImageHeight="80" resourceImagePaintMode="8"
          resourceImageOrientation="0" uiSliderStyle="RotaryVerticalDrag"
          uiSliderMin="0" uiSliderMax="1" uiSliderInterval="1" uiSliderValueHeight="12"
          uiSliderValuePosition="0" uiSliderValueWidth="64" uiSliderValueTextColour="ffffffff"
          uiSliderValueBgColour="ffffff" uiSliderRotaryOutlineColour="0xff0000ff"
          uiSliderRotaryFillColour="0xff0000ff" uiSliderThumbColour="0xffff0000"
          uiSliderValueHighlightColour="0xff0000ff" uiSliderValueOutlineColour="0"
          uiSliderTrackColour="0xff0f0f0f" uiFixedSliderContent="12Hz=0&#10;14Hz=1&#10;15Hz=2&#10;16Hz=3&#10;17Hz=4&#10;18Hz=5&#10;19Hz=6&#10;20Hz=7&#10;21Hz=8&#10;22Hz=9&#10;24Hz=10&#10;25Hz=11&#10;26Hz=12&#10;28Hz=13&#10;30Hz=14&#10;31Hz=15&#10;33Hz=16&#10;35Hz=17&#10;37Hz=18&#10;40Hz=19&#10;42Hz=20&#10;45Hz=21&#10;47Hz=22&#10;50Hz=23&#10;53Hz=24&#10;56Hz=25&#10;60Hz=26&#10;63Hz=27&#10;67Hz=28&#10;71Hz=29&#10;75Hz=30&#10;80Hz=31&#10;85Hz=32&#10;90Hz=33&#10;95Hz=34&#10;101Hz=35&#10;107Hz=36&#10;113Hz=37&#10;120Hz=38&#10;127Hz=39&#10;135Hz=40&#10;143Hz=41&#10;151Hz=42&#10;160Hz=43&#10;170Hz=44&#10;180Hz=45&#10;191Hz=46&#10;202Hz=47&#10;214Hz=48&#10;227Hz=49&#10;241Hz=50&#10;255Hz=51&#10;270Hz=52&#10;286Hz=53&#10;303Hz=54&#10;322Hz=55&#10;341Hz=56&#10;361Hz=57&#10;383Hz=58&#10;406Hz=59&#10;430Hz=60&#10;456Hz=61&#10;483Hz=62&#10;512Hz=63&#10;543Hz=64&#10;575Hz=65&#10;609Hz=66&#10;646Hz=67&#10;684Hz=68&#10;725Hz=69&#10;769Hz=70&#10;815Hz=71&#10;863Hz=72&#10;915Hz=73&#10;970Hz=74&#10;1028Hz=75&#10;1089Hz=76&#10;1155Hz=77&#10;1224Hz=78&#10;1297Hz=79&#10;1374Hz=80&#10;1457Hz=81&#10;1544Hz=82&#10;1636Hz=83&#10;1734Hz=84&#10;1838Hz=85&#10;1948Hz=86&#10;2064Hz=87&#10;2188Hz=88&#10;2319Hz=89&#10;2457Hz=90&#10;2604Hz=91&#10;2760Hz=92&#10;2925Hz=93&#10;3100Hz=94&#10;3286Hz=95&#10;3482Hz=96&#10;3690Hz=97&#10;3911Hz=98&#10;4145Hz=99&#10;4393Hz=100&#10;4656Hz=101&#10;4934Hz=102&#10;5230Hz=103&#10;5542Hz=104&#10;5874Hz=105&#10;6225Hz=106&#10;6598Hz=107&#10;6992Hz=108&#10;7411Hz=109&#10;7854Hz=110&#10;8324Hz=111&#10;8822Hz=112&#10;9350Hz=113&#10;9909Hz=114&#10;10502Hz=115&#10;11130Hz=116&#10;11796Hz=117&#10;12501Hz=118&#10;13249Hz=119&#10;14042Hz=120&#10;14882Hz=121&#10;15772Hz=122&#10;16715Hz=123&#10;17715Hz=124&#10;18775Hz=125&#10;19898Hz=126&#10;21000Hz=127"
          uiSliderValueFont="&lt;Sans-Serif&gt;;12;1;0;0;0;1" uiSliderIncDecButtonColour="0xff0000ff"
          uiSliderIncDecTextColour="0xffffffff" uiSliderValueTextJustification="centred"
          uiSliderVelocitySensitivity="1" uiSliderVelocityThreshold="1"
          uiSliderVelocityOffset="0" uiSliderVelocityMode="0" uiSliderVelocityModeKeyTrigger="1"
          uiSliderSpringMode="0" uiSliderSpringValue="0" uiSliderMouseWheelInterval="1"
          uiSliderPopupBubble="0" componentRectangle="822 311 56 56" componentSnapSizeAllow="0"
          uiType="uiFixedImageSlider" componentLayerUid="f7e09d550e00000080d7220000000000"/>
          </modulator>[/code:1sfscrfc]

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

            I really can’t debug this cause only you know how you imagined this to work. I can tell you:
            doing this is a bad idea
            [code:2k5c4ia1]
            comp = filter_slope_mod:getComponent()
            comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
            [/code:2k5c4ia1]

            always check if the object is valid, otherwise the method might be disabled on load
            [code:2k5c4ia1]
            comp = filter_slope_mod:getComponent()
            if comp ~= nil then
            comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
            end
            [/code:2k5c4ia1]

            Check your spelling of properties.

            #4461
            Cramp
            Participant
              • Topics: 11
              • Replies: 66
              • Total: 77
              "atom":2ytp1jfd wrote:
              I really can’t debug this cause only you know how you imagined this to work. I can tell you:
              doing this is a bad idea
              [code:2ytp1jfd]
              comp = filter_slope_mod:getComponent()
              comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
              [/code:2ytp1jfd]

              always check if the object is valid, otherwise the method might be disabled on load
              [code:2ytp1jfd]
              comp = filter_slope_mod:getComponent()
              if comp ~= nil then
              comp:setPropertyString ("uiImageButtonResource" , FilterSlopeTypeOn)
              end
              [/code:2ytp1jfd][/quote:2ytp1jfd]

              ok, I have added this into the code. Thank you mate <img decoding=” title=”Smile” />
              Have you seen XML data and extra pictures? The strange behavior of the CtrlR
              Check your spelling of properties.

              #4462
              Cramp
              Participant
                • Topics: 11
                • Replies: 66
                • Total: 77
                "atom":f95es58f wrote:
                I really can’t debug this cause only you know how you imagined this to work. I can tell you:
                [/quote:f95es58f]
                Well, at least I cannot change the image of the Modulator. The thing is why I’m asking is that in build 1047 I could change Image of the modulator. In build 1056 – I can’t do it.
                #4463
                atom
                Keymaster
                  • Topics: 159
                  • Replies: 2945
                  • Total: 3104
                  • ★★★★★

                  All i can say is that i checked it with the latest nightly build and it work for me, so there must be some bug in your code.

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

                    Here is a modified example built with the latest nightly.

                    #4465
                    Cramp
                    Participant
                      • Topics: 11
                      • Replies: 66
                      • Total: 77
                      "atom":rjlw36oz wrote:
                      Here is a modified example built with the latest nightly.[/quote:rjlw36oz]
                      thanks mate. I will check that panel as well. Yes of course there might be a problem within code. But I cannot understand how the same code works different in different builds. That’s the thing I was concerning.
                      #4466
                      Cramp
                      Participant
                        • Topics: 11
                        • Replies: 66
                        • Total: 77
                        "atom":snd3lps3 wrote:
                        All i can say is that i checked it with the latest nightly build and it work for me, so there must be some bug in your code.[/quote:snd3lps3]

                        I checked a code again. it works fine. I can see the made changes for that uiFixedImageSlider component on it Properties. But it is not changing on Panel visualy.

                        ok, lets do a experiment
                        I wanna check with you one thing if you will open my panel that I sent your before (the latest one) and then
                        [img:snd3lps3]http://dl.dropbox.com/u/4202790/experiment.png[/img:snd3lps3]
                        if you can see on picture 2 buttons – marked as RED is Single Filter and marked as BLUE is MultiFilter
                        and one slider (uiFixedImageSlider) marked as YELLOW
                        1. select RED button and set the value as shown on picture (DistLP). in theory the YELLOW slider should be shown as on picture – with turned on light. BLUE should be off
                        2. now if you selected the RED with different value YELLOW slider should turn its lights off

                        I need this because in Ctrlr Revision 1047 (not build) visuals worked fine, and in the latest build (revision 1056) visuals doesn’t work exatly with this type of Slider (uiFixedImageSlider). Visual works with uiImageButtons

                        Could you please check it for me? Many thanks

                        p.s. I also change my code according to your example.
                        [code:snd3lps3]FilterSwitch = function(modulator, newValue)

                        — Images ON Status

                        MultiFilterTypeOn = "sixfold_selection_filter"
                        SingleFilterTypeOn = "sixfold_selection_filter"
                        FilterSlopeTypeOn = "led_three_upward2"

                        — Images OFF Status

                        MultiFilterTypeOff = "sixfold_selection_filteroff"

                        SingleFilterTypeOff = "sixfold_selection_filteroff"
                        FilterSlopeTypeOff = "led_three_upward_off"

                        — When click this know Filter mode changes to Multi

                        — filterslope modulator
                        filter_slope_mod = panel:getModulatorByName("FilterSlope")

                        — Single Filter Type modulator
                        single_filter_mod = panel:getModulatorByName("FilterType")

                        — Multi Filter Type and Led Modulators
                        multi_filter_mod = panel:getModulatorByName("FilterEnvCtrl")

                        — Frequency2/Dist Slider modulator
                        freq_dist_mod = panel:getModulatorByName("FilterFreq2")

                        — This knob on click disables Multi Filter type that is why Filter Slope and Single Filter Type knobs
                        — need to be enabled. And MultiFilter knob plus Filter2 need to be disabled. Filter2 runs with CC 114


                        — Enabling Dist Slider if DIST LP (58) value is Selected on Filter Type and
                        — set MIDI CC 114 to Frequency2/Dist Slider modulator
                        — Disable Slope if Single Filter equal BR type

                        mod = panel:getModulatorByName("FilterFreq2")
                        if mod ~= nil then
                        midi = mod:getMidiMessage()
                        if midi ~= nil then
                        if newValue >58 then
                        midi:setPropertyInt ("midiMessageCtrlrNumber", 59)
                        else
                        midi:setPropertyInt ("midiMessageCtrlrNumber", 114)
                        end
                        end
                        end

                        if freq_dist_mod ~= nil and filter_slope_mod ~= nil and single_filter_mod ~= nil and multi_filter_mod ~= nil then

                        if newValue == 0 then
                        comp_freq = freq_dist_mod:getComponent()
                        comp_slope = filter_slope_mod:getComponent()
                        comp_multi = multi_filter_mod:getComponent()
                        comp_single = single_filter_mod:getComponent()
                        if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
                        comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
                        filter_slope_mod:setModulatorValue (2, false, true, true)
                        comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
                        comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
                        comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
                        end
                        elseif newValue == 1 then
                        comp_freq = freq_dist_mod:getComponent()
                        comp_slope = filter_slope_mod:getComponent()
                        comp_multi = multi_filter_mod:getComponent()
                        comp_single = single_filter_mod:getComponent()
                        if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
                        comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
                        filter_slope_mod:setModulatorValue (2, false, true, true)
                        comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
                        comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
                        comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
                        end
                        elseif newValue == 2 then
                        comp_freq = freq_dist_mod:getComponent()
                        comp_slope = filter_slope_mod:getComponent()
                        comp_multi = multi_filter_mod:getComponent()
                        comp_single = single_filter_mod:getComponent()
                        if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
                        comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
                        filter_slope_mod:setModulatorValue (2, false, true, true)
                        comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
                        comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
                        comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
                        end
                        elseif newValue == 3 then
                        comp_freq = freq_dist_mod:getComponent()
                        comp_slope = filter_slope_mod:getComponent()
                        comp_multi = multi_filter_mod:getComponent()
                        comp_single = single_filter_mod:getComponent()
                        if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
                        comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOff)
                        — filter_slope_mode:setModulatorValue (0, false, true, true)
                        comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
                        comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
                        comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
                        end

                        elseif newValue == 4 then
                        comp_freq = freq_dist_mod:getComponent()
                        comp_slope = filter_slope_mod:getComponent()
                        comp_multi = multi_filter_mod:getComponent()
                        comp_single = single_filter_mod:getComponent()
                        if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
                        comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
                        filter_slope_mod:setModulatorValue (2, false, true, true)
                        comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
                        comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
                        comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
                        end
                        elseif newValue == 5 then
                        comp_freq = freq_dist_mod:getComponent()
                        comp_slope = filter_slope_mod:getComponent()
                        comp_multi = multi_filter_mod:getComponent()
                        comp_single = single_filter_mod:getComponent()
                        if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
                        comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
                        filter_slope_mod:setModulatorValue (1, false, true, true)
                        comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
                        comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
                        comp_freq:setPropertyString ("uiImageSliderResource", "filter-on")
                        end
                        end

                        end

                        end[/code:snd3lps3]

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

                          I made small fix, i forgot to add a line in the fixedImageSlider. I’m building a new nightly so check that out, it should work.

                          #4468
                          Cramp
                          Participant
                            • Topics: 11
                            • Replies: 66
                            • Total: 77
                            "atom":1jlusiqj wrote:
                            I made small fix, i forgot to add a line in the fixedImageSlider. I’m building a new nightly so check that out, it should work.[/quote:1jlusiqj]
                            mate, I have checked panel with the latest nightly and it didn’t work me as I expected… the led of the modulator (YELLOW) appears visually only when I move mouse over that modulator. Code works fine.
                            So in fact it works but only when you move mouse over the affected component =)
                            Mouse cursor Properties set to Normal
                            #4469
                            atom
                            Keymaster
                              • Topics: 159
                              • Replies: 2945
                              • Total: 3104
                              • ★★★★★

                              That actually is ok, you need to repaint the component after changing it, if you want it gets repainted when the mouse is over it (performance issues)

                              [code:4fdqd9qd]
                              comp:repaint()
                              [/code:4fdqd9qd]

                              #4470
                              Cramp
                              Participant
                                • Topics: 11
                                • Replies: 66
                                • Total: 77
                                "atom":52rprhua wrote:
                                That actually is ok, you need to repaint the component after changing it, if you want it gets repainted when the mouse is over it (performance issues)

                                [code:52rprhua]
                                comp:repaint()
                                [/code:52rprhua][/quote:52rprhua]
                                thanks mate
                                thats work for me now!

                              Viewing 14 posts - 21 through 34 (of 34 total)
                              • The forum ‘Programming’ is closed to new topics and replies.
                              There is currently 0 users and 82 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