Help in altering dasfaker’s Envelope Demo please..

Home Forums General Programming Help in altering dasfaker’s Envelope Demo please..

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #738
    Synthetech
    Participant
      • Topics: 13
      • Replies: 70
      • Total: 83

      Hello,

      New here… just dove into Ctrlr a few days ago and made some great panels so far.

      But I ran into a snag trying to figure out how to modify dasfaker’s Envelope Generator.

      What I want to do is squeeze in a Break Point and Slope controls. I then have:

      Attack, Decay, BreakPoint, Slope, Sustain, Release.

      This is the EG for a Korg Poly 800. You have your normal Attack/Decay, then Breakpoint will be a position that is a Y(vertical) position. From that point that Decay line ends and a Slope line will continue..

      Slope is like another Attack control.. it will connect the breakpoint position to the Sustain position.

      Attached are a couple pics to explain how it looks/works.
      I need it so the BrealPoint position is at the intersection of a plane that moves vertically and the plane of the Decay line.

      Using that position, the Slope can be defined. The slope is a variable width that ties the BreakPoint to the Sustain Level. It has a beginning 1st Reference plane straight vertical from the breakpoint..(where the breakpoint plane intersects the Decay plane).
      From that 1st Reference, I want to go horizontally using the Slope value.. (1st Ref. + Slope Value 0-127).

      So what you have is a line going from the Breakpoint/Decay intersection to where the Sustain Value/Plane is.
      A low value Slope # would be quick to reach the Sustain Level. A large value Slope # would make it take longer to reach the Sustain Level.

      The pics should help make sense of the madness.

      [attachment=1:zsdsqfp3]ADBSSR 1.jpg[/attachment:zsdsqfp3]

      [attachment=0:zsdsqfp3]ADBSSR 2.JPG[/attachment:zsdsqfp3]

      I grabbed the code for the wireframe envelope code. I tried to clean it up to get a better look at the specifics I need to alter/add to.
      I’m having a hard time getting my head around all the code/math, etc. and was seeing if anyone could help me reach my goals???

      Thanks so much in advance for any replies/help in this.. Ctrlr is a fantastic program!

      [code:zsdsqfp3]<panel name="Envelope Demo" panelAuthorName="dasfaker" panelAuthorEmail="dasfaker@hotmail.com"
      panelAuthorUrl="" panelAuthorDesc="Demo of a envelope with draggable points.&#10;Working in rev. 1074"
      panelVersionMajor="1" panelVersionMinor="1" panelVersionName="Rollercoaster"
      panelVendor="" panelDevice="" panelMidiInputChannel="1" panelMidiOutputChannel="1"
      panelMidiInputDevice="No Device" panelMidiVstInput="0" panelMidiOutputDevice="No Device"
      panelMidiThru="1" panelMidiProgram="No Program" panelMidiBank="No Bank"
      panelMidiProgramCalloutOnprogramChange="0" panelMidiMatchCacheSize="32"
      luaPanelMidiReceived="– None" luaPanelLoaded="" luaPanelBeforeLoad=""
      panelFilePath="C:UsersIvanDesktopCtrlr 2Envelope Demo.panel"
      panelUID="eb06e700a5178e61163f7a698d13d7ce" panelModulatorListColumns=""
      panelModulatorListCsvDelimiter="," panelModulatorListXmlRoot="ctrlrModulatorList"
      panelModulatorListXmlModulator="ctrlrModulator" panelModulatorListSortOption="1"
      panelGlobalVariables="-1:-1:-1:-1:-1:-1:-1:-1:-1:-1:-1:-1:-1:-1:-1:-1"
      panelExcludeFromInputMatch="2047" panelMidiSnapshotAfterLoad="0"
      panelMidiSnapshotAfterProgramChange="0" panelMidiSnapshotDelay="10"
      panelMidiInputChannelDevice="1" panelMidiOutputChannelDevice="1"
      panelMidiInputFromHost="0" panelMidiInputChannelHost="1" panelMidiOutputToHost="0"
      panelMidiOutputChannelHost="1" panelMidiThruH2H="0" panelMidiThruH2HChannelize="0"
      panelMidiThruH2D="0" panelMidiThruH2DChannelize="0" panelMidiThruD2D="0"
      panelMidiThruD2DChannelize="0" panelMidiThruD2H="0" panelMidiThruD2HChannelize="0"
      panelMidiInputThreadPriority="7" panelMidiBankLsb="0" panelMidiBankMsb="0"
      panelMidiSendProgramChangeOnLoad="0" luaPanelSaved="" luaPanelProgramChanged=""
      luaPanelBootStrap="panelCreator" panelIndex="0" uiPanelToolbarState="TB:1 36 16 2 32 -1 17 14 -1 11 12 13 -1 3 4 -1 30 31 29 -1 27"
      uiPanelToolbarOrientation="0" panelCtrlrRevision="754">
      <ctrlrMidiProgramManager ctrlrMidiSnapshotDelay="50" luaProgramManagerGetRequest="" luaProgramManagerVerifyResponse=""
      ctrlrMidiDeviceNumPrograms="127" ctrlrMidiDeviceNumBanks="4"/>
      <luaManager>
      <luaManagerMethods>
      <luaMethod luaMethodName="paintMe" luaMethodValid="0" luaMethodCode="–&#13;&#10;– Called when a component needs repainting&#13;&#10;–&#13;&#10;&#13;&#10;paintMe = function(component,graphics)&#13;&#10;&#13;&#10;–name modulators&#13;&#10;&#13;&#10;&#9;attack = panel:getModulatorByName(&quot;Attack&quot;)&#13;&#10;&#9;decay = panel:getModulatorByName(&quot;Decay&quot;)&#13;&#10;&#9;sustain = panel:getModulatorByName(&quot;Sustain&quot;)&#13;&#10;&#9;release = panel:getModulatorByName(&quot;Release&quot;)&#13;&#10;&#9;&#13;&#10;

      — coordinates&#13;&#10;&#13;&#10;&#9;
      attack_x0 = 5&#13;&#10;&#9;
      attack_x1 = 5 + attack:getModulatorValue()/2&#13;&#10;&#9;
      attack_y0 = 132&#13;&#10;&#9;
      attack_y1 = 5&#13;&#10;&#13;&#10;&#9;
      decay_x0 = attack_x1&#13;&#10;&#9;
      decay_x1 = attack_x1 + decay:getModulatorValue()/2&#13;&#10;&#9;
      decay_y0 = 5&#13;&#10;&#9;
      decay_y1 = 132 – sustain:getModulatorValue()&#13;&#10;&#13;&#10;&#9;
      sustain_x0 = decay_x1&#13;&#10;&#9;
      sustain_x1 = decay_x1 + 100&#13;&#10;&#9;
      sustain_y0 = 132 – sustain:getModulatorValue()&#13;&#10;&#9;
      sustain_y1 = 132 – sustain:getModulatorValue()&#13;&#10;&#13;&#10;&#9;
      release_x0 = sustain_x1&#13;&#10;&#9;
      release_x1 = sustain_x1 + release:getModulatorValue()/2&#13;&#10;&#9;
      release_y0 = 132 – sustain:getModulatorValue()&#13;&#10;&#9;
      release_y1 = 132&#13;&#10;&#13;&#10;&#9;

      if mouse_drag ~= nil then&#13;&#10;&#9;&#9;
      if mouse_drag == 1 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionX &lt; attack_x0 then mousePositionX = attack_x0 end&#13;&#10;&#9;&#9;&#9;
      if mousePositionX &gt; 68.5 then mousePositionX = 68.5 end&#13;&#10;&#9;&#9;&#9;

      attack_x3 = mousePositionX – attack_x1&#13;&#10;&#9;&#9;&#9;
      attack_y3 = mousePositionY – attack_y1&#13;&#10;&#9;&#13;&#10;&#9;&#9;

      elseif mouse_drag == 2 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionX &lt; attack_x1 then mousePositionX = attack_x1 end&#13;&#10;&#9;&#9;&#9;
      if mousePositionX &gt; (attack_x1 + 64) then mousePositionX = (attack_x1 + 64) end&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &lt; 5 then mousePositionY = 5 end&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &gt; 132 then mousePositionY = 132 end&#13;&#10;&#9;&#9;&#9;

      decay_x3 = mousePositionX – decay_x1&#13;&#10;&#9;&#9;&#9;
      decay_y3 = mousePositionY – decay_y1&#13;&#10;&#9;&#9;&#9;
      sustain_x3 = mousePositionX – sustain_x1&#13;&#10;&#9;&#9;&#9;
      sustain_y3 = mousePositionY – sustain_y1&#13;&#10;&#9;&#9;&#13;&#10;&#9;&#9;

      elseif mouse_drag == 3 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &lt; 5 then mousePositionY = 5 end&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &gt; 132 then mousePositionY = 132 end&#13;&#10;&#9;&#9;&#9;

      sustain_x3 = mousePositionX – sustain_x1&#13;&#10;&#9;&#9;&#9;
      sustain_y3 = mousePositionY – sustain_y1&#13;&#10;&#13;&#10;&#9;&#9;

      elseif mouse_drag == 4 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionX &lt; sustain_x1 -10 then mousePositionX = sustain_x1 – 10 end&#13;&#10;&#9;&#9;&#9;
      if mousePositionX &gt; math.floor(release_x1 + (117-rel)) then mousePositionX = math.floor(release_x1 + (117-rel)) end&#13;&#10;&#9;&#9;&#9;

      release_x3 = mousePositionX – release_x1 + 10&#13;&#10;&#9;&#9;&#9;
      release_y3 = mousePositionY – sustain_y1&#13;&#10;&#9;&#13;&#10;&#9;&#9;

      elseif mouse_drag == 0 then&#13;&#10;&#9;&#9;&#9;

      attack_x3 = 0&#13;&#10;&#9;&#9;&#9;
      attack_y3 = 0&#13;&#10;&#9;&#9;&#9;
      decay_x3 = 0&#13;&#10;&#9;&#9;&#9;
      decay_y3 = 0&#13;&#10;&#9;&#9;&#9;
      sustain_x3 = 0&#13;&#10;&#9;&#9;&#9;
      sustain_y3 = 0&#13;&#10;&#9;&#9;&#9;
      release_x3 = 0&#13;&#10;&#9;&#9;&#9;
      release_y3 = 0&#13;&#10;&#9;&#9;end&#13;&#10;&#9;

      else&#13;&#10;&#9;&#9;
      mouse_drag = 0&#13;&#10;&#9;&#9;

      attack_x3 = 0&#13;&#10;&#9;&#9;
      attack_y3 = 0&#13;&#10;&#9;&#9;
      decay_x3 = 0&#13;&#10;&#9;&#9;
      decay_y3 = 0&#13;&#10;&#9;&#9;
      sustain_x3 = 0&#13;&#10;&#9;&#9;
      sustain_y3 = 0&#13;&#10;&#9;&#9;
      release_x3 = 0&#13;&#10;&#9;&#9;
      release_y3 = 0&#13;&#10;&#9;end&#13;&#10;&#13;&#10;

      — fill envelope&#13;&#10;&#13;&#10;&#9;
      graphics:setColour (Colour(0xff404040))&#13;&#10;&#9;

      for n = 2, 127, 1 do&#13;&#10;&#9;&#9;

      graphics:drawLine (attack_x0, attack_y0 + n, (attack_x1 + attack_x3), attack_y1 + n, 2);&#13;&#10;&#9;&#9;
      graphics:drawLine ((decay_x0 + attack_x3), decay_y0 + n, (decay_x1 + decay_x3), decay_y1 + sustain_y3 + n, 2);&#13;&#10;&#9;&#9;
      graphics:drawLine (sustain_x0, (sustain_y0 + sustain_y3) + n, sustain_x1, (sustain_y1 + sustain_y3) + n, 2);&#13;&#10;&#9;&#9;
      graphics:drawLine (release_x0, (release_y0 + sustain_y3) + n, (release_x1 + release_x3), release_y1 + n, 2);&#13;&#10;&#9;
      end&#13;&#10;&#13;&#10;

      — draw envelope&#13;&#10;&#13;&#10;&#9;
      graphics:setColour (Colour(0xffffffff))&#13;&#10;&#9;
      graphics:drawLine (attack_x0, attack_y0, (attack_x1 + attack_x3), attack_y1, 2);&#13;&#10;&#9;
      graphics:drawLine ((decay_x0 + attack_x3), decay_y0, (decay_x1 + decay_x3), decay_y1 + sustain_y3, 2);&#13;&#10;&#9;
      graphics:drawLine (sustain_x0, (sustain_y0 + sustain_y3), sustain_x1, (sustain_y1 + sustain_y3), 2);&#13;&#10;&#9;
      graphics:drawLine (release_x0, (release_y0 + sustain_y3), (release_x1 + release_x3), release_y1, 2);&#13;&#10;&#13;&#10;

      — draw boxes&#13;&#10;&#13;&#10;&#9;
      graphics:drawRect ((attack_x1 – 4) + attack_x3, attack_y1 – 4, 8, 8, 1)&#13;&#10;&#9;
      graphics:drawRect ((decay_x1 – 4) + decay_x3, (decay_y1 – 4) + sustain_y3, 8, 8, 1)&#13;&#10;&#9;
      graphics:drawRect (sustain_x1 – 4, (sustain_y1 – 4) + sustain_y3, 8, 8, 1)&#13;&#10;&#9;
      graphics:drawRect ((release_x1 – 4) + release_x3, release_y1 – 4, 8, 8, 1)&#13;&#10;&#13;&#10;

      — draw frame&#13;&#10;&#9;&#13;&#10;&#9;
      graphics:setColour (Colour(0xff1050ff))&#13;&#10;&#9;
      graphics:drawLine (0,0,component:getWidth(),0, 2);&#13;&#10;&#9;
      graphics:drawLine (0, component:getHeight()-2,component:getWidth(),component:getHeight()-2, 2);&#13;&#10;&#9;
      graphics:drawLine (0,0,0,component:getHeight(), 2);&#13;&#10;&#9;
      graphics:drawLine (component:getWidth(),0,component:getWidth(),component:getHeight(), 2);&#13;&#10;&#9;
      graphics:setColour (Colour(0xff000000))&#13;&#10;&#9;
      graphics:drawLine (0, component:getHeight(),component:getWidth(),component:getHeight(), 2);&#13;&#10;&#13;&#10;–&#9;
      c = panel:getPanelEditor():getCanvas()&#13;&#10;–&#9;
      c:repaint()&#13;&#10;end"/>

      <luaMethod luaMethodName="mouseMove" luaMethodValid="0" luaMethodCode="–&#13;&#10;– Called when the mouse moves over a component&#13;&#10;–&#13;&#10;&#13;&#10;
      mouseMove = function(component,mouseEvent)&#13;&#10;&#9;
      mousePosition = string.format (&quot;x=%d y=%d&quot;, mouseEvent.x, mouseEvent.y)&#13;&#10;&#9;
      mousePositionX = mouseEvent.x&#13;&#10;&#9;mousePositionY = mouseEvent.y&#13;&#10;end"/>

      <luaMethod luaMethodName="mouseDown" luaMethodValid="0" luaMethodCode="–&#13;&#10;– Called when a mouse DOWN (any mouse button) event happens on a component&#13;&#10;–&#13;&#10;&#13;&#10;
      mouseDown = function(component,mouseEvent)&#13;&#10;&#13;&#10;&#9;

      if mousePositionX &gt; attack_x1 – 4 then&#13;&#10;&#9;&#9;
      if mousePositionX &lt; attack_x1 + 4 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &gt; attack_y1 – 4 then&#13;&#10;&#9;&#9;&#9;&#9;
      if mousePositionY &lt; attack_y1 + 4 then&#13;&#10;&#9;&#9;&#9;&#9;&#9;

      mouse_down = 1&#13;&#10;&#9;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;end&#13;&#10;&#9;end&#13;&#10;&#13;&#10;&#9;

      if mousePositionX &gt; decay_x1 – 4 then&#13;&#10;&#9;&#9;
      if mousePositionX &lt; decay_x1 + 4 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &gt; decay_y1 – 4 then&#13;&#10;&#9;&#9;&#9;&#9;
      if mousePositionY &lt; decay_y1 + 4 then&#13;&#10;&#9;&#9;&#9;&#9;&#9;

      mouse_down = 2&#13;&#10;&#9;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;end&#13;&#10;&#9;end&#13;&#10;&#13;&#10;&#9;
      if mousePositionX &gt; sustain_x1 – 4 then&#13;&#10;&#9;&#9;
      if mousePositionX &lt; sustain_x1 + 4 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &gt; sustain_y1 – 4 then&#13;&#10;&#9;&#9;&#9;&#9;
      if mousePositionY &lt; sustain_y1 + 4 then&#13;&#10;&#9;&#9;&#9;&#9;&#9;

      mouse_down = 3&#13;&#10;&#9;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;end&#13;&#10;&#9;end&#13;&#10;&#13;&#10;&#9;
      if mousePositionX &gt; release_x1 – 4 then&#13;&#10;&#9;&#9;
      if mousePositionX &lt; release_x1 + 4 then&#13;&#10;&#9;&#9;&#9;
      if mousePositionY &gt; release_y1 – 4 then&#13;&#10;&#9;&#9;&#9;&#9;
      if mousePositionY &lt; release_y1 + 4 then&#13;&#10;&#9;&#9;&#9;&#9;&#9;

      mouse_down = 4&#13;&#10;&#9;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;&#9;end&#13;&#10;&#9;&#9;end&#13;&#10;&#9;end&#13;&#10;end"/>

      <luaMethod luaMethodName="mouseUp" luaMethodValid="0" luaMethodCode="–&#13;&#10;– Called when a mouse DOWN (any mouse button) event happens on a component&#13;&#10;–&#13;&#10;&#13;&#10;mouseUp = function(component,mouseEvent)&#13;&#10;mouse_down = 0&#13;&#10;mouse_drag = 0&#13;&#10;end"/>
      <luaMethod luaMethodName="mouseDrag" luaMethodValid="0" luaMethodCode="–&#13;&#10;– Called when a mouse DOWN (any mouse button) event happens on a component&#13;&#10;–&#13;&#10;&#13;&#10;
      mouseDrag = function(component,mouseEvent)&#13;&#10;&#9;

      if mouse_down == 1 then&#13;&#10;&#9;&#9;

      mouse_drag = 1&#13;&#10;&#9;&#9;
      mousePositionX = mouseEvent.x&#13;&#10;&#9;&#9;
      mousePositionY = mouseEvent.y&#13;&#10;&#9;&#9;
      att = (attack_x1 + attack_x3)*2-10&#13;&#10;&#9;&#9;
      attack:setModulatorValue(att,false,false,true)&#13;&#10;&#9;&#13;&#10;&#9;
      elseif mouse_down == 2 then&#13;&#10;&#9;&#9;
      att = (attack_x1 + attack_x3)*2-10&#13;&#10;&#9;&#9;

      mouse_drag = 2&#13;&#10;&#9;&#9;
      mousePositionX = mouseEvent.x&#13;&#10;&#9;&#9;
      mousePositionY = mouseEvent.y&#13;&#10;&#9;&#9;
      dec = ((decay_x1 + decay_x3)*2-5) – att – 5&#13;&#10;&#9;&#9;
      decay:setModulatorValue(dec,false,false,true)&#13;&#10;&#9;&#9;
      sus = ((sustain_y1 + sustain_y3)-5)&#13;&#10;&#9;&#9;
      sustain:setModulatorValue(127 – sus,false,false,true)&#13;&#10;&#9;&#13;&#10;&#9;
      elseif mouse_down == 3 then&#13;&#10;&#9;&#9;

      mouse_drag = 3&#13;&#10;&#9;&#9;
      mousePositionX = mouseEvent.x&#13;&#10;&#9;&#9;
      mousePositionY = mouseEvent.y&#13;&#10;&#9;&#9;
      sus = ((sustain_y1 + sustain_y3)-5)&#13;&#10;&#9;&#9;
      sustain:setModulatorValue(127 – sus,false,false,true)&#13;&#10;&#13;&#10;&#9;
      elseif mouse_down == 4 then&#13;&#10;&#9;&#9;

      mouse_drag = 4&#13;&#10;&#9;&#9;
      mousePositionX = mouseEvent.x&#13;&#10;&#9;&#9;
      mousePositionY = mouseEvent.y&#13;&#10;&#9;&#9;
      rel = math.abs(sustain_x1 – (release_x1 + release_x3))*2&#13;&#10;&#9;&#9;
      release:setModulatorValue(rel, false,false,true)&#13;&#10;&#9;
      elseif mouse_down == 0 then&#13;&#10;&#9;&#9;
      att = 0&#13;&#10;&#9;&#9;
      sus = 0&#13;&#10;&#9;&#9;
      sus = 0&#13;&#10;&#9;&#9;
      rel = 0&#13;&#10;&#9;end&#13;&#10;&#9;Repaint()&#13;&#10;end"/>

      <luaMethod luaMethodName="panelCreator" luaMethodValid="0" luaMethodCode="function panelCreator ()&#13;&#10;&#9;&#13;&#10;&#9;att = 0&#13;&#10;&#9;dec = 0&#13;&#10;&#9;sus = 0&#13;&#10;&#9;rel = 0&#13;&#10;end"/>
      <luaMethod luaMethodName="Repaint" luaMethodValid="0" luaMethodCode="–&#13;&#10;– Called when a modulator value changes&#13;&#10;– @modulator http://ctrlr.org/api/class_ctrlr_modulator.html&#13;&#10;– @newValue new numeric value of the modulator&#13;&#10;–&#13;&#10;Repaint = function(modulator, newValue)&#13;&#10;&#9;a = panel:getModulatorByName(&quot;Envelope Modulator&quot;) &#13;&#10;&#9;repaint = a:getComponent()&#13;&#10;&#9;repaint:repaint()&#13;&#10;end"/>
      </luaManagerMethods>
      </luaManager>
      <uiWindowManager>
      <uiChildWindow uiChildWindowName="LuaMethodEditor" uiChildWindowState="240 262 882 650"
      uiChildWindowVisible="0">
      <uiChildWindowContentState uiChildWindowToolbarVisible="1">
      <ctrlrLuaMethodEditorMethod ctrlrLuaMethodEditorMethodIndex="0" ctrlrLuaMethodEditorMethodProperty="uiCustomPaintCallback"
      ctrlrLuaMethodEditorMethodName="paintMe"/>
      <ctrlrLuaMethodEditorMethod ctrlrLuaMethodEditorMethodIndex="4" ctrlrLuaMethodEditorMethodProperty="uiCustomMouseDragCallback"
      ctrlrLuaMethodEditorMethodName="mouseDrag"/>
      <ctrlrLuaMethodEditorMethod ctrlrLuaMethodEditorMethodIndex="1" ctrlrLuaMethodEditorMethodProperty="uiCustomMouseMoveCallback"
      ctrlrLuaMethodEditorMethodName="mouseMove"/>
      <ctrlrLuaMethodEditorMethod ctrlrLuaMethodEditorMethodIndex="3" ctrlrLuaMethodEditorMethodProperty="uiCustomMouseUpCallback"
      ctrlrLuaMethodEditorMethodName="mouseUp"/>
      <ctrlrLuaMethodEditorMethod ctrlrLuaMethodEditorMethodIndex="2" ctrlrLuaMethodEditorMethodProperty="uiCustomMouseDownCallback"
      ctrlrLuaMethodEditorMethodName="mouseDown"/>
      <ctrlrLuaMethodEditorMethod ctrlrLuaMethodEditorMethodIndex="6" ctrlrLuaMethodEditorMethodProperty="luaModulatorValueChange"
      ctrlrLuaMethodEditorMethodName="Repaint"/>
      </uiChildWindowContentState>
      </uiChildWindow>
      <uiChildWindow uiChildWindowName="LuaConsole" uiChildWindowState="240 262 800 500"
      uiChildWindowVisible="0">
      <uiChildWindowContentState uiChildWindowToolbarVisible="1"/>
      </uiChildWindow>
      </uiWindowManager>
      <uiPanelEditor uiPanelCanvasRectangle="0 0 381 382" uiPanelSnapSize="4" uiPanelBackgroundColour="ff000000"
      uiPanelImageResource="" uiPanelEditMode="1" uiPanelViewPortSize="723"
      uiPanelPropertiesSize="523" uiPanelLock="0" uiPanelWidth="400"
      uiPanelHeight="400" name="Envelope Demo" uiPanelImageAlpha="255"
      uiPanelImageLayout="64" uiPanelSnapActive="1" uiPanelToolbarPosition="10 512 800 64"
      uiPanelRotation="0" uiPanelPropertiesOnRight="0" luaPanelPaintBackground="– None"
      uiPanelInvisibleComponentAlpha="0.5" uiPanelToolbarVisible="1"
      uiPanelDisabledOnEdit="0" luaPanelResized="" uiPanelZoom="1"
      lastBrowsedComponentDir="C:UsersatomDesktop">
      <uiPanelCanvasLayer uiPanelCanvasLayerName="New layer" uiPanelCanvasLayerUid="10f44f5af60c0000acf4130050f71300"
      uiPanelCanvasLayerColour="0x000000" uiPanelCanvasLayerVisibility="1"
      uiPanelCanvasLayerIndex="0"/>
      </uiPanelEditor>
      <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="– None" modulatorMax="65536"
      modulatorValue="-1" vstIndex="295" name="Envelope Modulator">
      <midi midiMessageType="9" midiMessageChannelOverride="0" midiMessageChannel="1"
      midiMessageCtrlrNumber="1" midiMessageCtrlrValue="0" midiMessageMultiList=""
      midiMessageSysExFormula="F0 00 F7"/>
      <component componentLabelPosition="top" componentLabelHeight="14" componentLabelWidth="0"
      componentLabelVisible="0" componentLabelAlwaysOnTop="1" componentSentBack="0"
      componentLabelColour="0xff000000" componentLabelFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      componentVisibleName="ENVELOPE" componentMouseCursor="1" componentGroupName=""
      componentSnapSizeAllow="0" componentSnapSize="8" componentIsLocked="0"
      componentRadioGroupId="0" componentRadioGroupNotifyMidi="0" componentVisibility="1"
      componentEffect="0" componentEffectRadius="0" componentEffectColour="0xff000000"
      componentEffectOffsetX="0" componentEffectOffsetY="0" componentEffectAlpha="0"
      uiCustomResizedCallback="" uiCustomPaintCallback="paintMe" uiCustomPaintOverChildrenCallback="– None"
      componentRectangle="28 84 296 136" uiCustomMouseDownCallback="mouseDown"
      uiCustomMouseUpCallback="mouseUp" uiCustomMouseEnterCallback=""
      uiCustomMouseExitCallback="" uiCustomMouseMoveCallback="mouseMove"
      uiCustomMouseDragCallback="mouseDrag" uiCustomKeyDownCallback=""
      uiCustomMouseDoubleClickCallback="" uiCustomMouseWheelMoveCallback=""
      componentLabelJustification="centred" uiType="uiCustomComponent"
      componentLayerUid="10f44f5af60c0000acf4130050f71300"/>
      </modulator>
      <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="Repaint" modulatorMax="127"
      modulatorValue="121" vstIndex="296" name="Attack" modulatorMin="0">
      <midi midiMessageType="9" midiMessageChannelOverride="0" midiMessageChannel="1"
      midiMessageCtrlrNumber="1" midiMessageCtrlrValue="0" midiMessageMultiList=""
      midiMessageSysExFormula="F0 00 F7"/>
      <component componentLabelPosition="top" componentLabelHeight="14" componentLabelWidth="0"
      componentLabelVisible="1" componentLabelAlwaysOnTop="1" componentSentBack="0"
      componentLabelColour="ffffffff" componentLabelFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      componentVisibleName="Attack" componentMouseCursor="1" componentGroupName=""
      componentSnapSizeAllow="0" componentSnapSize="8" componentIsLocked="0"
      componentRadioGroupId="0" componentRadioGroupNotifyMidi="1" componentVisibility="1"
      componentEffect="0" componentEffectRadius="0" componentEffectColour="0xff000000"
      componentEffectOffsetX="0" componentEffectOffsetY="0" componentEffectAlpha="0"
      uiSliderStyle="Rotary" componentRectangle="28 224 64 64" uiSliderMin="0"
      uiSliderMax="127" uiSliderInterval="1" uiSliderValuePosition="4"
      uiSliderValueHeight="12" uiSliderValueWidth="64" uiSliderValueTextColour="0xff000000"
      uiSliderValueBgColour="0xffffffff" uiSliderRotaryOutlineColour="0xff0000ff"
      uiSliderRotaryFillColour="0xff0000ff" uiSliderThumbColour="0xffff0000"
      uiSliderValueHighlightColour="0xff0000ff" uiSliderValueOutlineColour="0xffffffff"
      uiSliderTrackColour="0xff0f0f0f" uiSliderIncDecButtonColour="0xff0000ff"
      uiSliderIncDecTextColour="0xffffffff" uiSliderValueFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      uiSliderValueTextJustification="centred" uiSliderVelocitySensitivity="1"
      uiSliderVelocityThreshold="1" uiSliderVelocityOffset="0" uiSliderVelocityMode="0"
      uiSliderVelocityModeKeyTrigger="1" uiSliderSpringMode="0" uiSliderSpringValue="0"
      uiSliderMouseWheelInterval="1" uiSliderPopupBubble="0" componentLabelJustification="centred"
      uiSliderTrackCornerSize="5" uiSliderThumbCornerSize="3" uiSliderThumbWidth="0"
      uiSliderThumbHeight="0" uiSliderThumbFlatOnLeft="0" uiSliderThumbFlatOnRight="0"
      uiSliderThumbFlatOnTop="0" uiSliderThumbFlatOnBottom="0" uiType="uiSlider"
      componentLayerUid="10f44f5af60c0000acf4130050f71300"/>
      </modulator>
      <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="Repaint" modulatorMax="127"
      modulatorValue="95" vstIndex="297" name="Decay" modulatorMin="0">
      <midi midiMessageType="9" midiMessageChannelOverride="0" midiMessageChannel="1"
      midiMessageCtrlrNumber="1" midiMessageCtrlrValue="0" midiMessageMultiList=""
      midiMessageSysExFormula="F0 00 F7"/>
      <component componentLabelPosition="top" componentLabelHeight="14" componentLabelWidth="0"
      componentLabelVisible="1" componentLabelAlwaysOnTop="1" componentSentBack="0"
      componentLabelColour="ffffffff" componentLabelFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      componentVisibleName="Decay" componentMouseCursor="1" componentGroupName=""
      componentSnapSizeAllow="0" componentSnapSize="8" componentIsLocked="0"
      componentRadioGroupId="0" componentRadioGroupNotifyMidi="1" componentVisibility="1"
      componentEffect="0" componentEffectRadius="0" componentEffectColour="0xff000000"
      componentEffectOffsetX="0" componentEffectOffsetY="0" componentEffectAlpha="0"
      uiSliderStyle="Rotary" componentRectangle="108 224 64 64" uiSliderMin="0"
      uiSliderMax="127" uiSliderInterval="1" uiSliderValuePosition="4"
      uiSliderValueHeight="12" uiSliderValueWidth="64" uiSliderValueTextColour="0xff000000"
      uiSliderValueBgColour="0xffffffff" uiSliderRotaryOutlineColour="0xff0000ff"
      uiSliderRotaryFillColour="0xff0000ff" uiSliderThumbColour="0xffff0000"
      uiSliderValueHighlightColour="0xff0000ff" uiSliderValueOutlineColour="0xffffffff"
      uiSliderTrackColour="0xff0f0f0f" uiSliderIncDecButtonColour="0xff0000ff"
      uiSliderIncDecTextColour="0xffffffff" uiSliderValueFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      uiSliderValueTextJustification="centred" uiSliderVelocitySensitivity="1"
      uiSliderVelocityThreshold="1" uiSliderVelocityOffset="0" uiSliderVelocityMode="0"
      uiSliderVelocityModeKeyTrigger="1" uiSliderSpringMode="0" uiSliderSpringValue="0"
      uiSliderMouseWheelInterval="1" uiSliderPopupBubble="0" componentLabelJustification="centred"
      uiSliderTrackCornerSize="5" uiSliderThumbCornerSize="3" uiSliderThumbWidth="0"
      uiSliderThumbHeight="0" uiSliderThumbFlatOnLeft="0" uiSliderThumbFlatOnRight="0"
      uiSliderThumbFlatOnTop="0" uiSliderThumbFlatOnBottom="0" uiType="uiSlider"
      componentLayerUid="10f44f5af60c0000acf4130050f71300"/>
      </modulator>
      <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="Repaint" modulatorMax="127"
      modulatorValue="69" vstIndex="298" name="Sustain" modulatorMin="0">
      <midi midiMessageType="9" midiMessageChannelOverride="0" midiMessageChannel="1"
      midiMessageCtrlrNumber="1" midiMessageCtrlrValue="0" midiMessageMultiList=""
      midiMessageSysExFormula="F0 00 F7"/>
      <component componentLabelPosition="top" componentLabelHeight="14" componentLabelWidth="0"
      componentLabelVisible="1" componentLabelAlwaysOnTop="1" componentSentBack="0"
      componentLabelColour="ffffffff" componentLabelFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      componentVisibleName="Sustain" componentMouseCursor="1" componentGroupName=""
      componentSnapSizeAllow="0" componentSnapSize="8" componentIsLocked="0"
      componentRadioGroupId="0" componentRadioGroupNotifyMidi="1" componentVisibility="1"
      componentEffect="0" componentEffectRadius="0" componentEffectColour="0xff000000"
      componentEffectOffsetX="0" componentEffectOffsetY="0" componentEffectAlpha="0"
      uiSliderStyle="Rotary" componentRectangle="188 224 64 64" uiSliderMin="0"
      uiSliderMax="127" uiSliderInterval="1" uiSliderValuePosition="4"
      uiSliderValueHeight="12" uiSliderValueWidth="64" uiSliderValueTextColour="0xff000000"
      uiSliderValueBgColour="0xffffffff" uiSliderRotaryOutlineColour="0xff0000ff"
      uiSliderRotaryFillColour="0xff0000ff" uiSliderThumbColour="0xffff0000"
      uiSliderValueHighlightColour="0xff0000ff" uiSliderValueOutlineColour="0xffffffff"
      uiSliderTrackColour="0xff0f0f0f" uiSliderIncDecButtonColour="0xff0000ff"
      uiSliderIncDecTextColour="0xffffffff" uiSliderValueFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      uiSliderValueTextJustification="centred" uiSliderVelocitySensitivity="1"
      uiSliderVelocityThreshold="1" uiSliderVelocityOffset="0" uiSliderVelocityMode="0"
      uiSliderVelocityModeKeyTrigger="1" uiSliderSpringMode="0" uiSliderSpringValue="0"
      uiSliderMouseWheelInterval="1" uiSliderPopupBubble="0" componentLabelJustification="centred"
      uiSliderTrackCornerSize="5" uiSliderThumbCornerSize="3" uiSliderThumbWidth="0"
      uiSliderThumbHeight="0" uiSliderThumbFlatOnLeft="0" uiSliderThumbFlatOnRight="0"
      uiSliderThumbFlatOnTop="0" uiSliderThumbFlatOnBottom="0" uiType="uiSlider"
      componentLayerUid="10f44f5af60c0000acf4130050f71300"/>
      </modulator>
      <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="Repaint" modulatorMax="127"
      modulatorValue="127" vstIndex="299" name="Release" modulatorMin="0">
      <midi midiMessageType="9" midiMessageChannelOverride="0" midiMessageChannel="1"
      midiMessageCtrlrNumber="1" midiMessageCtrlrValue="0" midiMessageMultiList=""
      midiMessageSysExFormula="F0 00 F7"/>
      <component componentLabelPosition="top" componentLabelHeight="14" componentLabelWidth="0"
      componentLabelVisible="1" componentLabelAlwaysOnTop="1" componentSentBack="0"
      componentLabelColour="ffffffff" componentLabelFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      componentVisibleName="Release" componentMouseCursor="1" componentGroupName=""
      componentSnapSizeAllow="0" componentSnapSize="8" componentIsLocked="0"
      componentRadioGroupId="0" componentRadioGroupNotifyMidi="1" componentVisibility="1"
      componentEffect="0" componentEffectRadius="0" componentEffectColour="0xff000000"
      componentEffectOffsetX="0" componentEffectOffsetY="0" componentEffectAlpha="0"
      uiSliderStyle="Rotary" componentRectangle="260 224 64 64" uiSliderMin="0"
      uiSliderMax="127" uiSliderInterval="1" uiSliderValuePosition="4"
      uiSliderValueHeight="12" uiSliderValueWidth="64" uiSliderValueTextColour="0xff000000"
      uiSliderValueBgColour="0xffffffff" uiSliderRotaryOutlineColour="0xff0000ff"
      uiSliderRotaryFillColour="0xff0000ff" uiSliderThumbColour="0xffff0000"
      uiSliderValueHighlightColour="0xff0000ff" uiSliderValueOutlineColour="0xffffffff"
      uiSliderTrackColour="0xff0f0f0f" uiSliderIncDecButtonColour="0xff0000ff"
      uiSliderIncDecTextColour="0xffffffff" uiSliderValueFont="&lt;Sans-Serif&gt;;12;0;0;0;0;1"
      uiSliderValueTextJustification="centred" uiSliderVelocitySensitivity="1"
      uiSliderVelocityThreshold="1" uiSliderVelocityOffset="0" uiSliderVelocityMode="0"
      uiSliderVelocityModeKeyTrigger="1" uiSliderSpringMode="0" uiSliderSpringValue="0"
      uiSliderMouseWheelInterval="1" uiSliderPopupBubble="0" componentLabelJustification="centred"
      uiSliderTrackCornerSize="5" uiSliderThumbCornerSize="3" uiSliderThumbWidth="0"
      uiSliderThumbHeight="0" uiSliderThumbFlatOnLeft="0" uiSliderThumbFlatOnRight="0"
      uiSliderThumbFlatOnTop="0" uiSliderThumbFlatOnBottom="0" uiType="uiSlider"
      componentLayerUid="10f44f5af60c0000acf4130050f71300"/>
      </modulator>
      [/code:zsdsqfp3]

      #4860
      dasfaker
      Keymaster
        • Topics: 80
        • Replies: 793
        • Total: 873
        • ★★★

        I’ve been looking at the Poly 800 manual and this is the envelope I understand from the manual. Give it a try.

        #4861
        Synthetech
        Participant
          • Topics: 13
          • Replies: 70
          • Total: 83

          Wow! Thank you!! <img decoding=” title=”Very Happy” />

          That should be as accurate as can be. I see you even fixed the problem with the graphics being able to change the knobs.. the ADSR version I downloaded wouldnt do that.. you could alter the graphics, but the knobs didnt move.. move a knob, and the graphics did move tho.

          A few questions…

          1. When I mouse over either the graphics or one of the knobs, I get an hourglass mouse. Is this an error caused by an older version vs. a newer version of Ctrlr?? I have 5.0.2 version 934 branch.. the default download.
          I’ve seen this happen before in a few other panels I’ve downloaded.. even when I copied a component and pasted it into my panel, it would hourglass only over that component upon mouseover.
          I know.. I should update before I get too far into my panel design. That’s probably the problem. Just thought I’d ask what version you built this ADBSSR with.

          2. Is there a way to change the knobs? I’d like to use a uiImageSlider.
          I’ve attach two different knobs below that I’d like to use.

          [attachment=0:3cizxetf]114.png[/attachment:3cizxetf] [attachment=1:3cizxetf]76-2.png[/attachment:3cizxetf]

          3. Do you think it is possible to create a graphical state of inversion? The poly 800 can invert the filter envelope (EG3). Basically it turns the envelope upside down.. so instead of starting at low value and climbing to a peak value, it starts at the peak value and decreases.

          Thanks again.. this will make my panel uber cool! I’ve always wanted a graphical representation of the more complex ADSR the Poly 800 has.

          -Blaine

          #4862
          dasfaker
          Keymaster
            • Topics: 80
            • Replies: 793
            • Total: 873
            • ★★★

            1. Download the latest nightly version. I used rev. 1137

            2. You have to replace uiSliders with uiImageSliders.

            3. Here it is.

            #4863
            Synthetech
            Participant
              • Topics: 13
              • Replies: 70
              • Total: 83

              That invert switch is cool! Thank you again!

              Yea, I updated to 1137 and gained more headaches in the process.. I had to go back and re-edit every component due to incompatibilities. ugh!

              I hate sounding like an idiot, but I tried to change the sliders to uiImageSlider and it doesnt seem to want to change the edit panel so I can choose a resource. I must be missing something..
              Do I have to somehow create a new component/slider and copy over all the scripting, etc. over to that new slider? Again, sorry for my ignorance… I’m still all new to this.

              Did you ever find out why a midi msg isnt sent when the graphics are moved? The slider can be seen to move, but a msg wont be sent unless you move the sliders.

              Thanks again for all your help.
              -Blaine

              #4864
              dasfaker
              Keymaster
                • Topics: 80
                • Replies: 793
                • Total: 873
                • ★★★

                Yo have to delete the existing uiSliders and create new uiImageSliders. If you give them the name of the old ones it will work, as in the panel’s code the modulators are referenced by its name.

                The modulators don’t have midi message assigned right now, you must select the one you need for each modulator.

                #4865
                Synthetech
                Participant
                  • Topics: 13
                  • Replies: 70
                  • Total: 83
                  "dasfaker":15dexwfr wrote:
                  Yo have to delete the existing uiSliders and create new uiImageSliders. If you give them the name of the old ones it will work, as in the panel’s code the modulators are referenced by its name.[/quote:15dexwfr]

                  Yea.. tried that. It worked for Attack and Decay. I would create a new imageslider, name it Attack, select the Repaint script for it and it all seemed to work right.. did the same for Decay and it worked right..
                  Went to do it to BreakPoint and the graphics disappeared without anyway of bringing it back.

                  "dasfaker":15dexwfr wrote:
                  The modulators don’t have midi message assigned right now, you must select the one you need for each modulator.[/quote:15dexwfr]

                  I did assign midi msg values.. I was saying that when I adjust the knobs, it sends a message. When I adjust the graphics, the knob moves, but no message is sent.

                  Almost got this working right.. just a few things going on when I’ve messed with it more..

                  1. When inverted, if you move the Breakpoint or Sustain graphics, strange behaviors happen. They unlink or change unexpectedly.

                  2. When I try to copy/paste the graphic box to my panel, it wont do it. I tried to export it as a component, but couldnt figure out how to choose it as a component in my panel. I did get it included.. just cant seem to figure out how to choose that included component.

                  I was planning on using three of these. Two for DCO1 & DCO2 and a third for the filter. I was hoping I could compact it into three tabs so that I could keep the screen area they use up at a minimum. Think that is possible?

                  Thanks again for all your help.
                  -Blaine

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

                    I’d wait for the new Ctrlr, there will be stuff like Paths and Lines and much improved graphics/drawing capabilities.
                    Have a look at the uiEnvelope component maybe you can make something with that.

                    #4867
                    dasfaker
                    Keymaster
                      • Topics: 80
                      • Replies: 793
                      • Total: 873
                      • ★★★
                      "Synthetech":32vki2ad wrote:
                      Went to do it to BreakPoint and the graphics disappeared without anyway of bringing it back.[/quote:32vki2ad]

                      Did you assigned this modulator the "repaint" method in "Called when the modulator value changes"?

                      "Synthetech":32vki2ad wrote:
                      1. When inverted, if you move the Breakpoint or Sustain graphics, strange behaviors happen. They unlink or change unexpectedly.[/quote:32vki2ad]

                      Fixed.

                      #4868
                      Synthetech
                      Participant
                        • Topics: 13
                        • Replies: 70
                        • Total: 83

                        Thanks again for all your help das.

                        I’m not sure what is going on.. I have other issues too like comboboxes and other settings not working/saving correctly.

                        Maybe I best slow down on my panel build until I get some of the other things sorted out first… then come back to this.

                        But I must say, so far I really like this EG.

                        -Blaine

                        #4869
                        Synthetech
                        Participant
                          • Topics: 13
                          • Replies: 70
                          • Total: 83

                          well I managed to come back around to this.

                          I managed to recreate the uiCustomComponent in my panel by starting with a blank one.
                          I copied your code over to the proper areas.. changed it as needed for modulator names, etc.

                          I have issues still.. if I freshly open the panel and start with moving the graphics only, and never move the knobs, all seems to work fine.

                          .. if I freshly open the panel and start with moving the knobs only, and never move the graphics, all seems to work fine.

                          … if I try to move both, eventually the graphics act up. Going out of bounds, wont react to changes, etc.

                          I would be happy if the graphics were not changable by directly moving it.. just moving the knobs changes the image/graphics, if you try to move the graphics.. nothing happens.
                          I noticed that when it would act right, if I tried to move the Slope and Sustain points together, my synth only recieved a Sustain CC command. I could never get a Slope CC command received on my synth.
                          Knobs all work as they should though.

                          I’m attaching 3 versions of the panel I’m building. All are built under v1137

                          [attachment=2:1ztwfb0d]EnvelopeTrial1A.bpanelz[/attachment:1ztwfb0d]
                          [attachment=1:1ztwfb0d]EnvelopeTrial1B.bpanelz[/attachment:1ztwfb0d]

                          [attachment=0:1ztwfb0d]EnvelopeTrial1C.bpanelz[/attachment:1ztwfb0d]

                          1A is the EG outside the tabs area and the knobs wont change the graphics.
                          1B is the EG outside the tabs area and the knobs WILL change the graphics.

                          1C is the EG set inside the tabs area and the knobs will change the graphics.. I included this one so you can see where I’m headed with the use of this EG.. I plan on making two more. I provided 1A and !B because it’s hard, if not impossible, to select the EG component to edit once it’s been plopped inside the tab(a bug?)

                          I sure appreciate all the help. I’m almost there and thought I had it figured out. I’m trying to get this scripting down, but it’s taking me some time.
                          I tried to get it so the knobs are the only thing that changes the graphics, but I’m at a loss on what I’m suppose to do/alter.

                          Eventually I do want to get all three in the DCO1 DCO2 and VCF EG3 tabs with the VCF EG3 tab having the Polarity switch in it somewhere.. the DCO EG’s dont need to have the Polarity Inversion.

                          Thanks again for all your help.. I’M ALMOST THERE that I can taste it! <img decoding=” title=”Smile” />

                          #4870
                          Synthetech
                          Participant
                            • Topics: 13
                            • Replies: 70
                            • Total: 83

                            Pssst!! Dasfaker, Help!!! <img decoding=” title=”Wink” />

                            OK, here’s the panel attached below..
                            It’s not as pretty as the nice panels you and Msepsis create.. but I try. At least it’s almost fully functional and come a long way since I started it about a month ago.

                            v1137 panel

                            [attachment=0:1ok0ri6f]PolyGon V9-6.bpanelz[/attachment:1ok0ri6f]

                            What I’m trying to do is make two more EG waveforms like the one I have in the DCO1 tab.. I want them to be in DCO2 and VCF EG tabs.

                            I had problems if I tried to retain the mouse drag feature.. so somehow (I forget what I did…) I disabled the ability to click drag the waveform direct. You can only change the waveform by adjusting the knobs.
                            I want to keep it that way.. it’s simple and effective.. I’m happy with it.

                            I also removed the click/drag boxes and the exterior frame, as you’ll see in the PaintMe script.. I just simply deleted that code to remove them.
                            I kept the mousemove scripts in place, for fear that if I removed them I’d muck it all up.. I never bothered to try and remove them to see what would happen.. so I just kept them in this version when I posted it here and that they’d be in place if you needed reference to look at.

                            You’ll see my attempts to make a 2nd EG waveform in Repaint2, Paintme2.
                            I did have a uiCustomComponent setup with the name Envelope2.. but I removed it so I didnt have any defective trash sitting on the panel.

                            I know.. I probably made a mess of things.. I thought once I got the first waveform in the first tab that I could simply create more. But somewhere in the process I lost touch of what was required to complete the task.

                            Additionally, I had problems with the "Invert" feature.
                            I want it so that the "EG3 Polarity" modulator/switch/button would "flip" the waveform in the VCF EG3 tab as well as send the multi CC msg… I ran into problems with getting the Invert button to work when I tried to port it over from your example into my panel.

                            I dont know if it’s just easier for you to "fix it" or just explain to me what needs to change/add/alter.. but this part of my panel has been on hold ever since my patch dump crisis that Msepsis helped me figure out.
                            Any help you can offer sure is appreciated.. alot of people out there with custom firmwared Poly800’s like mine are gonna be really happy to have this panel once it’s completed.

                            Thanks for any help you can provide..

                            -Blaine

                            PS- You might check the EG tab tit colors..(just for a laugh if it F’s up. Not asking you to fix it, just trying to show you the chaos).
                            Here’s what seems to happen:
                            If I try to change DCO2’s tab tit, DCO1’s tit changes instead..
                            Try to change VCF EG3’s tit.. DCO2’s tit changes instead.
                            Changing DCO1’s tit will change DCO1’s tit though… so DCO1’s tit color changes if you adjust either DCO2 or DCO1 tab background color.
                            I managed to make some kinda sense out of it all and got the tits to match the bodies (now if that dont sound weird.. lol.. "hey Mack, let’s put this purple tit on this teal body…").

                            #4871
                            dasfaker
                            Keymaster
                              • Topics: 80
                              • Replies: 793
                              • Total: 873
                              • ★★★
                              "Synthetech":13sb01ye wrote:
                              You’ll see my attempts to make a 2nd EG waveform in Repaint2, Paintme2.
                              I did have a uiCustomComponent setup with the name Envelope2.. but I removed it so I didnt have any defective trash sitting on the panel.[/quote:13sb01ye]

                              Thats the problem. Each envelope has to be painted in a different CustomComponent with it’s own scripts. You only have 1.

                              [quote:13sb01ye]Additionally, I had problems with the "Invert" feature.
                              I want it so that the "EG3 Polarity" modulator/switch/button would "flip" the waveform in the VCF EG3 tab as well as send the multi CC msg… I ran into problems with getting the Invert button to work when I tried to port it over from your example into my panel.[/quote:13sb01ye]

                              You forgot to create the script "Polarity" and assign it to the button.

                              [quote:13sb01ye]PS- You might check the EG tab tit colors..(just for a laugh if it F’s up. Not asking you to fix it, just trying to show you the chaos).
                              Here’s what seems to happen:
                              If I try to change DCO2’s tab tit, DCO1’s tit changes instead..
                              Try to change VCF EG3’s tit.. DCO2’s tit changes instead.
                              Changing DCO1’s tit will change DCO1’s tit though… so DCO1’s tit color changes if you adjust either DCO2 or DCO1 tab background color.
                              I managed to make some kinda sense out of it all and got the tits to match the bodies (now if that dont sound weird.. lol.. "hey Mack, let’s put this purple tit on this teal body…").[/quote:13sb01ye]

                              This is because the index of both tabs are 0. Change the second tab to index 1, save and reopen.

                              #4872
                              Synthetech
                              Participant
                                • Topics: 13
                                • Replies: 70
                                • Total: 83

                                I had a 2nd uiCustomComponent with it’s own scripts.. but it wouldnt work right.
                                I’ll go in and rebuild it all again and when it fails again like last time, I’ll come back and post that panel up for review.

                                I also had a Polarity script in there before, but it wasnt working..

                                sigh.. I think I got off the wrong foot in all this. Like I said, I’ll give it a go once more and if I have problems, come seek help again with a panel version ready for scrutiny.

                                Thank god there might be a solution for the tabs.. thanks.

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