/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  30 Sep 2012 11:31:53am

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.12

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

//[Headers] You can add your own extra header files here...
//[/Headers]

#include "VelKey_PopUp.h"


//[MiscUserDefs] You can add your own user definitions and misc code here...
//[/MiscUserDefs]

//==============================================================================
VelKey_PopUp::VelKey_PopUp (JaySynthMidiCC *pMidiCC, int paramID, synth_float_t currParamValue, JaySynth::midi_note_info_t *pCurrentMidiNoteInfo, String name, VelKey_PopUp_Listener *listener)
    : Component (L"VelKey_PopUp"),
      label_parameter_name (0),
      groupComponent3 (0),
      groupComponent (0),
      groupComponent2 (0),
      m_graph_vel (0),
      slider_vel_kexp (0),
      slider_vel_scenter (0),
      label_vel_kexp (0),
      label_vel_scenter (0),
      label_vel_min (0),
      slider_vel_min (0),
      textButton_OK (0),
      button_vel_assign_enable (0),
      label_vel_ymin (0),
      label_vel_ymax (0),
      label_vel_x100 (0),
      label_vel_x0 (0),
      m_graph_key (0),
      slider_key_kexp (0),
      slider_key_scenter (0),
      label_key_kexp (0),
      label_vel_scenter2 (0),
      label_key_min (0),
      slider_key_min (0),
      button_key_assign_enable (0),
      label_key_ymin (0),
      label_key_ymax (0),
      label_key_x100 (0),
      label_key_x0 (0),
      comboBoxOPSel (0),
      label_key (0),
      label_vel (0),
      slider_vel_max (0),
      label_vel_max (0),
      label_key_max (0),
      slider_key_max (0),
      label_vel_shape (0),
      label_vel_skew (0),
      label_key_shape (0),
      label_key_skew (0),
      label_vel_skew_text (0),
      label_key_skew_text (0),
      label_vel_shape_text (0),
      label_key_shape_text (0),
      label_vel_max_text (0),
      label_vel_min_text (0),
      label_key_min_text (0),
      label_key_max_text (0),
      label_vel_y (0),
      label_key_y (0),
      label_vel_x (0),
      label_key_x (0),
      m_btn_flip_vel (0),
      m_btn_flip_key (0)
{
    addAndMakeVisible (label_parameter_name = new Label (L"Parameter Name",
                                                         L"Parameter Name"));
    label_parameter_name->setTooltip (L"This is the parameter to modulate");
    label_parameter_name->setFont (Font (20.0000f, Font::plain));
    label_parameter_name->setJustificationType (Justification::centredLeft);
    label_parameter_name->setEditable (false, false, false);
    label_parameter_name->setColour (Label::textColourId, Colours::white);
    label_parameter_name->setColour (TextEditor::textColourId, Colours::black);
    label_parameter_name->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (groupComponent3 = new GroupComponent (L"new group",
                                                             L"Combine Curves"));
    groupComponent3->setColour (GroupComponent::outlineColourId, Colour (0x7fffffff));
    groupComponent3->setColour (GroupComponent::textColourId, Colour (0xc0ffffff));

    addAndMakeVisible (groupComponent = new GroupComponent (L"new group",
                                                            L"Velocity Sensitivity Curve"));
    groupComponent->setColour (GroupComponent::outlineColourId, Colour (0x7fffffff));
    groupComponent->setColour (GroupComponent::textColourId, Colour (0xc0ffffff));

    addAndMakeVisible (groupComponent2 = new GroupComponent (L"new group",
                                                             L"Key Sensitivity Curve"));
    groupComponent2->setColour (GroupComponent::outlineColourId, Colour (0x7fffffff));
    groupComponent2->setColour (GroupComponent::textColourId, Colour (0xc0ffffff));

    addAndMakeVisible (m_graph_vel = new GraphWindow());
    addAndMakeVisible (slider_vel_kexp = new Slider (L"slider_vel_kexp"));
    slider_vel_kexp->setTooltip (L"Velocity Curve Shape");
    slider_vel_kexp->setRange (0, 1, 0);
    slider_vel_kexp->setSliderStyle (Slider::LinearHorizontal);
    slider_vel_kexp->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_vel_kexp->addListener (this);

    addAndMakeVisible (slider_vel_scenter = new Slider (L"slider_vel_scenter"));
    slider_vel_scenter->setTooltip (L"Velocity Curve Skew");
    slider_vel_scenter->setRange (0, 1, 0);
    slider_vel_scenter->setSliderStyle (Slider::LinearHorizontal);
    slider_vel_scenter->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_vel_scenter->addListener (this);

    addAndMakeVisible (label_vel_kexp = new Label (L"label_vel_kexp",
                                                   L"Shape"));
    label_vel_kexp->setTooltip (L"Velocity Curve Shape");
    label_vel_kexp->setFont (Font (15.0000f, Font::plain));
    label_vel_kexp->setJustificationType (Justification::centredRight);
    label_vel_kexp->setEditable (false, false, false);
    label_vel_kexp->setColour (Label::textColourId, Colours::white);
    label_vel_kexp->setColour (TextEditor::textColourId, Colours::white);
    label_vel_kexp->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_scenter = new Label (L"label_vel_scenter",
                                                      L"Skew"));
    label_vel_scenter->setTooltip (L"Velocity Curve Skew");
    label_vel_scenter->setFont (Font (15.0000f, Font::plain));
    label_vel_scenter->setJustificationType (Justification::centredRight);
    label_vel_scenter->setEditable (false, false, false);
    label_vel_scenter->setColour (Label::textColourId, Colours::white);
    label_vel_scenter->setColour (TextEditor::textColourId, Colours::white);
    label_vel_scenter->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_min = new Label (L"label_vel_min",
                                                  L"Low"));
    label_vel_min->setTooltip (L"Parameter modulation at lowest velocity");
    label_vel_min->setFont (Font (15.0000f, Font::plain));
    label_vel_min->setJustificationType (Justification::centredRight);
    label_vel_min->setEditable (false, false, false);
    label_vel_min->setColour (Label::textColourId, Colours::white);
    label_vel_min->setColour (TextEditor::textColourId, Colours::white);
    label_vel_min->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (slider_vel_min = new Slider (L"slider_vel_min"));
    slider_vel_min->setTooltip (L"Parameter modulation at lowest velocity");
    slider_vel_min->setRange (0, 1, 0);
    slider_vel_min->setSliderStyle (Slider::LinearHorizontal);
    slider_vel_min->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_vel_min->addListener (this);

    addAndMakeVisible (textButton_OK = new TextButton (L"OK"));
    textButton_OK->setTooltip (L"Close this window");
    textButton_OK->addListener (this);

    addAndMakeVisible (button_vel_assign_enable = new ToggleButton (L"Assign Vel Enable"));
    button_vel_assign_enable->setTooltip (L"Set this to make Velocity Sensitivity active");
    button_vel_assign_enable->setButtonText (L"Active");
    button_vel_assign_enable->addListener (this);
    button_vel_assign_enable->setColour (ToggleButton::textColourId, Colours::white);

    addAndMakeVisible (label_vel_ymin = new Label (L"label_vel_ymin",
                                                   L"0"));
    label_vel_ymin->setFont (Font (12.0000f, Font::plain));
    label_vel_ymin->setJustificationType (Justification::centredRight);
    label_vel_ymin->setEditable (true, true, false);
    label_vel_ymin->setColour (Label::textColourId, Colours::white);
    label_vel_ymin->setColour (TextEditor::textColourId, Colours::white);
    label_vel_ymin->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_vel_ymin->addListener (this);

    addAndMakeVisible (label_vel_ymax = new Label (L"label_vel_ymax",
                                                   L"100"));
    label_vel_ymax->setFont (Font (12.0000f, Font::plain));
    label_vel_ymax->setJustificationType (Justification::centredRight);
    label_vel_ymax->setEditable (true, true, false);
    label_vel_ymax->setColour (Label::textColourId, Colours::white);
    label_vel_ymax->setColour (TextEditor::textColourId, Colours::white);
    label_vel_ymax->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_vel_ymax->addListener (this);

    addAndMakeVisible (label_vel_x100 = new Label (L"label_vel_x100",
                                                   L"100%"));
    label_vel_x100->setFont (Font (12.0000f, Font::plain));
    label_vel_x100->setJustificationType (Justification::centred);
    label_vel_x100->setEditable (false, false, false);
    label_vel_x100->setColour (Label::textColourId, Colours::white);
    label_vel_x100->setColour (TextEditor::textColourId, Colours::white);
    label_vel_x100->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_x0 = new Label (L"label_vel_x0",
                                                 L"0%"));
    label_vel_x0->setFont (Font (12.0000f, Font::plain));
    label_vel_x0->setJustificationType (Justification::centred);
    label_vel_x0->setEditable (false, false, false);
    label_vel_x0->setColour (Label::textColourId, Colours::white);
    label_vel_x0->setColour (TextEditor::textColourId, Colours::white);
    label_vel_x0->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (m_graph_key = new GraphWindow());
    addAndMakeVisible (slider_key_kexp = new Slider (L"slider_key_kexp"));
    slider_key_kexp->setTooltip (L"Key Curve Shape");
    slider_key_kexp->setRange (0, 1, 0);
    slider_key_kexp->setSliderStyle (Slider::LinearHorizontal);
    slider_key_kexp->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_key_kexp->addListener (this);

    addAndMakeVisible (slider_key_scenter = new Slider (L"slider_key_scenter"));
    slider_key_scenter->setTooltip (L"Key Curve Skew");
    slider_key_scenter->setRange (0, 1, 0);
    slider_key_scenter->setSliderStyle (Slider::LinearHorizontal);
    slider_key_scenter->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_key_scenter->addListener (this);

    addAndMakeVisible (label_key_kexp = new Label (L"label_key_kexp",
                                                   L"Shape"));
    label_key_kexp->setTooltip (L"Key Curve Shape");
    label_key_kexp->setFont (Font (15.0000f, Font::plain));
    label_key_kexp->setJustificationType (Justification::centredRight);
    label_key_kexp->setEditable (false, false, false);
    label_key_kexp->setColour (Label::textColourId, Colours::white);
    label_key_kexp->setColour (TextEditor::textColourId, Colours::white);
    label_key_kexp->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_scenter2 = new Label (L"label_vel_scenter",
                                                       L"Skew"));
    label_vel_scenter2->setTooltip (L"Key Curve Skew");
    label_vel_scenter2->setFont (Font (15.0000f, Font::plain));
    label_vel_scenter2->setJustificationType (Justification::centredRight);
    label_vel_scenter2->setEditable (false, false, false);
    label_vel_scenter2->setColour (Label::textColourId, Colours::white);
    label_vel_scenter2->setColour (TextEditor::textColourId, Colours::white);
    label_vel_scenter2->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_min = new Label (L"label_key_min",
                                                  L"Low"));
    label_key_min->setTooltip (L"Parameter modulation at lowest key");
    label_key_min->setFont (Font (15.0000f, Font::plain));
    label_key_min->setJustificationType (Justification::centredRight);
    label_key_min->setEditable (false, false, false);
    label_key_min->setColour (Label::textColourId, Colours::white);
    label_key_min->setColour (TextEditor::textColourId, Colours::white);
    label_key_min->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (slider_key_min = new Slider (L"slider_key_min"));
    slider_key_min->setTooltip (L"Parameter modulation at lowest key");
    slider_key_min->setRange (0, 1, 0);
    slider_key_min->setSliderStyle (Slider::LinearHorizontal);
    slider_key_min->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_key_min->addListener (this);

    addAndMakeVisible (button_key_assign_enable = new ToggleButton (L"Assign Key Enable"));
    button_key_assign_enable->setTooltip (L"Set this to make Key Follow active");
    button_key_assign_enable->setButtonText (L"Active");
    button_key_assign_enable->addListener (this);
    button_key_assign_enable->setColour (ToggleButton::textColourId, Colours::white);

    addAndMakeVisible (label_key_ymin = new Label (L"label_key_ymin",
                                                   L"0"));
    label_key_ymin->setFont (Font (12.0000f, Font::plain));
    label_key_ymin->setJustificationType (Justification::centredRight);
    label_key_ymin->setEditable (true, true, false);
    label_key_ymin->setColour (Label::textColourId, Colours::white);
    label_key_ymin->setColour (TextEditor::textColourId, Colours::white);
    label_key_ymin->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_key_ymin->addListener (this);

    addAndMakeVisible (label_key_ymax = new Label (L"label_key_ymax",
                                                   L"100"));
    label_key_ymax->setFont (Font (12.0000f, Font::plain));
    label_key_ymax->setJustificationType (Justification::centredRight);
    label_key_ymax->setEditable (true, true, false);
    label_key_ymax->setColour (Label::textColourId, Colours::white);
    label_key_ymax->setColour (TextEditor::textColourId, Colours::white);
    label_key_ymax->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_key_ymax->addListener (this);

    addAndMakeVisible (label_key_x100 = new Label (L"label_key_x100",
                                                   L"100%"));
    label_key_x100->setFont (Font (12.0000f, Font::plain));
    label_key_x100->setJustificationType (Justification::centred);
    label_key_x100->setEditable (false, false, false);
    label_key_x100->setColour (Label::textColourId, Colours::white);
    label_key_x100->setColour (TextEditor::textColourId, Colours::white);
    label_key_x100->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_x0 = new Label (L"label_key_x0",
                                                 L"0%"));
    label_key_x0->setFont (Font (12.0000f, Font::plain));
    label_key_x0->setJustificationType (Justification::centred);
    label_key_x0->setEditable (false, false, false);
    label_key_x0->setColour (Label::textColourId, Colours::white);
    label_key_x0->setColour (TextEditor::textColourId, Colours::white);
    label_key_x0->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (comboBoxOPSel = new ComboBox (L"comboBoxOPSel"));
    comboBoxOPSel->setTooltip (L"Math operation to combine Velocity-Curve and Key-Curve");
    comboBoxOPSel->setEditableText (false);
    comboBoxOPSel->setJustificationType (Justification::centredLeft);
    comboBoxOPSel->setTextWhenNothingSelected (String::empty);
    comboBoxOPSel->setTextWhenNoChoicesAvailable (L"(no choices)");
    comboBoxOPSel->addItem (L"Add", 1);
    comboBoxOPSel->addItem (L"Sub", 2);
    comboBoxOPSel->addItem (L"Mul", 3);
    comboBoxOPSel->addListener (this);

    addAndMakeVisible (label_key = new Label (L"label_key",
                                              L"Key"));
    label_key->setFont (Font (15.0000f, Font::plain));
    label_key->setJustificationType (Justification::centredLeft);
    label_key->setEditable (false, false, false);
    label_key->setColour (Label::textColourId, Colours::white);
    label_key->setColour (TextEditor::textColourId, Colours::white);
    label_key->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel = new Label (L"label_vel",
                                              L"Velocity"));
    label_vel->setFont (Font (15.0000f, Font::plain));
    label_vel->setJustificationType (Justification::centredRight);
    label_vel->setEditable (false, false, false);
    label_vel->setColour (Label::textColourId, Colours::white);
    label_vel->setColour (TextEditor::textColourId, Colours::white);
    label_vel->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (slider_vel_max = new Slider (L"slider_vel_max"));
    slider_vel_max->setTooltip (L"Parameter modulation at highest velocity");
    slider_vel_max->setRange (0, 1, 0);
    slider_vel_max->setSliderStyle (Slider::LinearHorizontal);
    slider_vel_max->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_vel_max->addListener (this);

    addAndMakeVisible (label_vel_max = new Label (L"label_vel_max",
                                                  L"High"));
    label_vel_max->setTooltip (L"Parameter modulation at highest velocity");
    label_vel_max->setFont (Font (15.0000f, Font::plain));
    label_vel_max->setJustificationType (Justification::centredRight);
    label_vel_max->setEditable (false, false, false);
    label_vel_max->setColour (Label::textColourId, Colours::white);
    label_vel_max->setColour (TextEditor::textColourId, Colours::white);
    label_vel_max->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_max = new Label (L"label_key_max",
                                                  L"High"));
    label_key_max->setTooltip (L"Parameter modulation at highest key");
    label_key_max->setFont (Font (15.0000f, Font::plain));
    label_key_max->setJustificationType (Justification::centredRight);
    label_key_max->setEditable (false, false, false);
    label_key_max->setColour (Label::textColourId, Colours::white);
    label_key_max->setColour (TextEditor::textColourId, Colours::white);
    label_key_max->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (slider_key_max = new Slider (L"slider_key_max"));
    slider_key_max->setTooltip (L"Parameter modulation at highest key");
    slider_key_max->setRange (0, 1, 0);
    slider_key_max->setSliderStyle (Slider::LinearHorizontal);
    slider_key_max->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
    slider_key_max->addListener (this);

    addAndMakeVisible (label_vel_shape = new Label (L"label_vel_shape",
                                                    L"-100.00"));
    label_vel_shape->setFont (Font (12.0000f, Font::plain));
    label_vel_shape->setJustificationType (Justification::centredLeft);
    label_vel_shape->setEditable (true, true, false);
    label_vel_shape->setColour (Label::textColourId, Colours::white);
    label_vel_shape->setColour (TextEditor::textColourId, Colours::white);
    label_vel_shape->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_vel_shape->addListener (this);

    addAndMakeVisible (label_vel_skew = new Label (L"label_vel_skew",
                                                   L"100"));
    label_vel_skew->setFont (Font (12.0000f, Font::plain));
    label_vel_skew->setJustificationType (Justification::centredLeft);
    label_vel_skew->setEditable (true, true, false);
    label_vel_skew->setColour (Label::textColourId, Colours::white);
    label_vel_skew->setColour (TextEditor::textColourId, Colours::white);
    label_vel_skew->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_vel_skew->addListener (this);

    addAndMakeVisible (label_key_shape = new Label (L"label_key_shape",
                                                    L"-100.00"));
    label_key_shape->setFont (Font (12.0000f, Font::plain));
    label_key_shape->setJustificationType (Justification::centredLeft);
    label_key_shape->setEditable (true, true, false);
    label_key_shape->setColour (Label::textColourId, Colours::white);
    label_key_shape->setColour (TextEditor::textColourId, Colours::white);
    label_key_shape->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_key_shape->addListener (this);

    addAndMakeVisible (label_key_skew = new Label (L"label_key_skew",
                                                   L"100"));
    label_key_skew->setFont (Font (12.0000f, Font::plain));
    label_key_skew->setJustificationType (Justification::centredLeft);
    label_key_skew->setEditable (true, true, false);
    label_key_skew->setColour (Label::textColourId, Colours::white);
    label_key_skew->setColour (TextEditor::textColourId, Colours::white);
    label_key_skew->setColour (TextEditor::backgroundColourId, Colour (0x0));
    label_key_skew->addListener (this);

    addAndMakeVisible (label_vel_skew_text = new Label (L"label_vel_skew_text",
                                                        L"Skew:"));
    label_vel_skew_text->setFont (Font (12.0000f, Font::plain));
    label_vel_skew_text->setJustificationType (Justification::centredRight);
    label_vel_skew_text->setEditable (false, false, false);
    label_vel_skew_text->setColour (Label::textColourId, Colours::white);
    label_vel_skew_text->setColour (TextEditor::textColourId, Colours::white);
    label_vel_skew_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_skew_text = new Label (L"label_key_skew_text",
                                                        L"Skew:"));
    label_key_skew_text->setFont (Font (12.0000f, Font::plain));
    label_key_skew_text->setJustificationType (Justification::centredRight);
    label_key_skew_text->setEditable (false, false, false);
    label_key_skew_text->setColour (Label::textColourId, Colours::white);
    label_key_skew_text->setColour (TextEditor::textColourId, Colours::white);
    label_key_skew_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_shape_text = new Label (L"label_vel_shape_text",
                                                         L"Shape:"));
    label_vel_shape_text->setFont (Font (12.0000f, Font::plain));
    label_vel_shape_text->setJustificationType (Justification::centredLeft);
    label_vel_shape_text->setEditable (false, false, false);
    label_vel_shape_text->setColour (Label::textColourId, Colours::white);
    label_vel_shape_text->setColour (TextEditor::textColourId, Colours::white);
    label_vel_shape_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_shape_text = new Label (L"label_key_shape_text",
                                                         L"Shape:"));
    label_key_shape_text->setFont (Font (12.0000f, Font::plain));
    label_key_shape_text->setJustificationType (Justification::centredLeft);
    label_key_shape_text->setEditable (false, false, false);
    label_key_shape_text->setColour (Label::textColourId, Colours::white);
    label_key_shape_text->setColour (TextEditor::textColourId, Colours::white);
    label_key_shape_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_max_text = new Label (L"label_vel_max_text",
                                                       L"High"));
    label_vel_max_text->setFont (Font (12.0000f, Font::plain));
    label_vel_max_text->setJustificationType (Justification::centred);
    label_vel_max_text->setEditable (false, false, false);
    label_vel_max_text->setColour (Label::textColourId, Colours::white);
    label_vel_max_text->setColour (TextEditor::textColourId, Colours::white);
    label_vel_max_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_min_text = new Label (L"label_vel_min_text",
                                                       L"Low"));
    label_vel_min_text->setFont (Font (12.0000f, Font::plain));
    label_vel_min_text->setJustificationType (Justification::centred);
    label_vel_min_text->setEditable (false, false, false);
    label_vel_min_text->setColour (Label::textColourId, Colours::white);
    label_vel_min_text->setColour (TextEditor::textColourId, Colours::white);
    label_vel_min_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_min_text = new Label (L"label_key_min_text",
                                                       L"Low"));
    label_key_min_text->setFont (Font (12.0000f, Font::plain));
    label_key_min_text->setJustificationType (Justification::centred);
    label_key_min_text->setEditable (false, false, false);
    label_key_min_text->setColour (Label::textColourId, Colours::white);
    label_key_min_text->setColour (TextEditor::textColourId, Colours::white);
    label_key_min_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_max_text = new Label (L"label_key_max_text",
                                                       L"High"));
    label_key_max_text->setFont (Font (12.0000f, Font::plain));
    label_key_max_text->setJustificationType (Justification::centred);
    label_key_max_text->setEditable (false, false, false);
    label_key_max_text->setColour (Label::textColourId, Colours::white);
    label_key_max_text->setColour (TextEditor::textColourId, Colours::white);
    label_key_max_text->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_y = new Label (L"label_vel_y",
                                                L"0"));
    label_vel_y->setFont (Font (12.0000f, Font::plain));
    label_vel_y->setJustificationType (Justification::centredRight);
    label_vel_y->setEditable (false, false, false);
    label_vel_y->setColour (Label::textColourId, Colours::silver);
    label_vel_y->setColour (TextEditor::textColourId, Colours::white);
    label_vel_y->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_y = new Label (L"label_key_y",
                                                L"0"));
    label_key_y->setFont (Font (12.0000f, Font::plain));
    label_key_y->setJustificationType (Justification::centredRight);
    label_key_y->setEditable (false, false, false);
    label_key_y->setColour (Label::textColourId, Colours::silver);
    label_key_y->setColour (TextEditor::textColourId, Colours::white);
    label_key_y->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_vel_x = new Label (L"label_vel_x",
                                                L"0"));
    label_vel_x->setFont (Font (12.0000f, Font::plain));
    label_vel_x->setJustificationType (Justification::centred);
    label_vel_x->setEditable (false, false, false);
    label_vel_x->setColour (Label::textColourId, Colours::silver);
    label_vel_x->setColour (TextEditor::textColourId, Colours::white);
    label_vel_x->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (label_key_x = new Label (L"label_key_x",
                                                L"0"));
    label_key_x->setFont (Font (12.0000f, Font::plain));
    label_key_x->setJustificationType (Justification::centred);
    label_key_x->setEditable (false, false, false);
    label_key_x->setColour (Label::textColourId, Colours::silver);
    label_key_x->setColour (TextEditor::textColourId, Colours::white);
    label_key_x->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (m_btn_flip_vel = new TextButton (L"m_btn_flip_vel"));
    m_btn_flip_vel->setTooltip (L"Quick swap of Low and High values");
    m_btn_flip_vel->setButtonText (L"High <> Low");
    m_btn_flip_vel->addListener (this);

    addAndMakeVisible (m_btn_flip_key = new TextButton (L"m_btn_flip_key"));
    m_btn_flip_key->setTooltip (L"Quick swap of Low and High values");
    m_btn_flip_key->setButtonText (L"High <> Low");
    m_btn_flip_key->addListener (this);


    //[UserPreSize]
    //[/UserPreSize]

    setSize (520, 520);


    //[Constructor] You can add your own custom stuff here..
	createNoteNameTbl();
	m_isFlipped_vel = false;
	m_isFlipped_key = false;
	paramInfoInit(&m_shape_xform , 0, "shape_xform");
	paramInfoInit(&m_skew_xform , 0, "skew_xform");
	paramInfoSet(&m_shape_xform, 100, 1, 0.5, -100, 0, 100, 0.01);
	paramInfoSet(&m_skew_xform, 1, 1, 0.0, 0, -1, 1, 0.001);
	m_text_vel_min = label_vel_min_text->getText();
	m_text_vel_max = label_vel_max_text->getText();
	m_text_key_min = label_key_min_text->getText();
	m_text_key_max = label_key_max_text->getText();

	this->pMidiCC = pMidiCC;
	m_currParamValue = currParamValue;
	m_paramID = paramID;
	m_currentMidiNoteInfo = *pCurrentMidiNoteInfo;
	pMidiCC_container = pMidiCC->getAtParamID(m_paramID);
	paramInfoInit(&m_velKey_constraints, 0, pMidiCC->getConstraints(pMidiCC_container)->pName);
	paramInfoCopy(&m_velKey_constraints, pMidiCC->getConstraints(pMidiCC_container));
	m_velKey_constraints.pmax = jsy_max(fabs(pMidiCC->getConstraints(pMidiCC_container)->pmin), fabs(pMidiCC->getConstraints(pMidiCC_container)->pmax));
	m_velKey_constraints.pmin = -m_velKey_constraints.pmax;
	m_velKey_constraints.scenter = 0.5;
	m_velKey_constraints.pcenter = -1E18;

	label_parameter_name->setText(name, juce::NotificationType::dontSendNotification);
	comboBoxOPSel->setSelectedId(1 + pMidiCC->getVelKeyCombineOP(pMidiCC_container), juce::NotificationType::dontSendNotification);

	slider_vel_kexp->setValue(toSlider(&m_shape_xform, pMidiCC->getVelCurve(pMidiCC_container)->kexp), juce::NotificationType::dontSendNotification);
	slider_vel_scenter->setValue(toSlider(&m_skew_xform, pMidiCC->getVelCurve(pMidiCC_container)->scenter), juce::NotificationType::dontSendNotification);
	slider_vel_max->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmax*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);
	slider_vel_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);
	button_vel_assign_enable->setToggleState(pMidiCC->isAssignedVel(pMidiCC_container), juce::NotificationType::dontSendNotification);

	slider_key_kexp->setValue(toSlider(&m_shape_xform, pMidiCC->getKeyCurve(pMidiCC_container)->kexp), juce::NotificationType::dontSendNotification);
	slider_key_scenter->setValue(toSlider(&m_skew_xform, pMidiCC->getKeyCurve(pMidiCC_container)->scenter), juce::NotificationType::dontSendNotification);
	slider_key_max->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmax*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);
	slider_key_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);
	button_key_assign_enable->setToggleState(pMidiCC->isAssignedKey(pMidiCC_container), juce::NotificationType::dontSendNotification);

	addListener(listener);
    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_CREATED);

	m_label_prec = 3;
	if (pMidiCC->getConstraints(pMidiCC_container)->pinterval > 0)
		m_label_prec = jsy_max(1, (int)(-log(pMidiCC->getConstraints(pMidiCC_container)->pinterval)/log(10.0) + 0.5));

	m_label_shape_prec = 3;
	if (m_shape_xform.pinterval > 0)
		m_label_shape_prec = jsy_max(1, (int)(-log(m_shape_xform.pinterval)/log(10.0) + 0.5));

	m_label_skew_prec = 3;
	if (m_skew_xform.pinterval > 0)
		m_label_skew_prec = jsy_max(1, (int)(-log(m_skew_xform.pinterval)/log(10.0) + 0.5));

	displayUpdate();
    //[/Constructor]
}

VelKey_PopUp::~VelKey_PopUp()
{
    //[Destructor_pre]. You can add your own custom destruction code here..
    //[/Destructor_pre]

    deleteAndZero (label_parameter_name);
    deleteAndZero (groupComponent3);
    deleteAndZero (groupComponent);
    deleteAndZero (groupComponent2);
    deleteAndZero (m_graph_vel);
    deleteAndZero (slider_vel_kexp);
    deleteAndZero (slider_vel_scenter);
    deleteAndZero (label_vel_kexp);
    deleteAndZero (label_vel_scenter);
    deleteAndZero (label_vel_min);
    deleteAndZero (slider_vel_min);
    deleteAndZero (textButton_OK);
    deleteAndZero (button_vel_assign_enable);
    deleteAndZero (label_vel_ymin);
    deleteAndZero (label_vel_ymax);
    deleteAndZero (label_vel_x100);
    deleteAndZero (label_vel_x0);
    deleteAndZero (m_graph_key);
    deleteAndZero (slider_key_kexp);
    deleteAndZero (slider_key_scenter);
    deleteAndZero (label_key_kexp);
    deleteAndZero (label_vel_scenter2);
    deleteAndZero (label_key_min);
    deleteAndZero (slider_key_min);
    deleteAndZero (button_key_assign_enable);
    deleteAndZero (label_key_ymin);
    deleteAndZero (label_key_ymax);
    deleteAndZero (label_key_x100);
    deleteAndZero (label_key_x0);
    deleteAndZero (comboBoxOPSel);
    deleteAndZero (label_key);
    deleteAndZero (label_vel);
    deleteAndZero (slider_vel_max);
    deleteAndZero (label_vel_max);
    deleteAndZero (label_key_max);
    deleteAndZero (slider_key_max);
    deleteAndZero (label_vel_shape);
    deleteAndZero (label_vel_skew);
    deleteAndZero (label_key_shape);
    deleteAndZero (label_key_skew);
    deleteAndZero (label_vel_skew_text);
    deleteAndZero (label_key_skew_text);
    deleteAndZero (label_vel_shape_text);
    deleteAndZero (label_key_shape_text);
    deleteAndZero (label_vel_max_text);
    deleteAndZero (label_vel_min_text);
    deleteAndZero (label_key_min_text);
    deleteAndZero (label_key_max_text);
    deleteAndZero (label_vel_y);
    deleteAndZero (label_key_y);
    deleteAndZero (label_vel_x);
    deleteAndZero (label_key_x);
    deleteAndZero (m_btn_flip_vel);
    deleteAndZero (m_btn_flip_key);


    //[Destructor]. You can add your own custom destruction code here..
	paramInfoFree(&m_velKey_constraints);
	paramInfoFree(&m_shape_xform);
	paramInfoFree(&m_skew_xform);
    //[/Destructor]
}

//==============================================================================
void VelKey_PopUp::paint (Graphics& g)
{
    //[UserPrePaint] Add your own custom painting code here..
    //[/UserPrePaint]

    g.setColour (Colour (0xff2a64a5));
    g.fillRoundedRectangle (4.0f, 4.0f, 515.0f, 515.0f, 10.0000f);

    g.setColour (Colours::white);
    g.drawRoundedRectangle (3.0f, 3.0f, 515.0f, 515.0f, 10.0000f, 4.0000f);

    //[UserPaint] Add your own custom painting code here..
    //[/UserPaint]
}

void VelKey_PopUp::resized()
{
    label_parameter_name->setBounds (16, 24, 280, 24);
    groupComponent3->setBounds (16, 424, 228, 68);
    groupComponent->setBounds (16, 64, 228, 164);
    groupComponent2->setBounds (16, 244, 228, 164);
    m_graph_vel->setBounds (296, 88, 171, 121);
    slider_vel_kexp->setBounds (100, 88, 130, 24);
    slider_vel_scenter->setBounds (100, 112, 130, 24);
    label_vel_kexp->setBounds (24, 88, 70, 24);
    label_vel_scenter->setBounds (24, 112, 70, 24);
    label_vel_min->setBounds (24, 160, 70, 24);
    slider_vel_min->setBounds (100, 160, 130, 24);
    textButton_OK->setBounds (304, 452, 150, 24);
    button_vel_assign_enable->setBounds (28, 192, 56, 24);
    label_vel_ymin->setBounds (244, 188, 50, 20);
    label_vel_ymax->setBounds (244, 84, 50, 20);
    label_vel_x100->setBounds (444, 212, 48, 12);
    label_vel_x0->setBounds (284, 212, 50, 12);
    m_graph_key->setBounds (296, 268, 171, 121);
    slider_key_kexp->setBounds (100, 268, 130, 24);
    slider_key_scenter->setBounds (100, 292, 130, 24);
    label_key_kexp->setBounds (24, 268, 70, 24);
    label_vel_scenter2->setBounds (24, 292, 70, 24);
    label_key_min->setBounds (24, 340, 70, 24);
    slider_key_min->setBounds (100, 340, 130, 24);
    button_key_assign_enable->setBounds (28, 372, 56, 24);
    label_key_ymin->setBounds (244, 368, 50, 20);
    label_key_ymax->setBounds (245, 264, 50, 20);
    label_key_x100->setBounds (444, 392, 48, 12);
    label_key_x0->setBounds (284, 392, 50, 12);
    comboBoxOPSel->setBounds (88, 452, 64, 20);
    label_key->setBounds (160, 452, 70, 20);
    label_vel->setBounds (12, 452, 70, 20);
    slider_vel_max->setBounds (100, 136, 130, 24);
    label_vel_max->setBounds (24, 136, 70, 24);
    label_key_max->setBounds (24, 316, 70, 24);
    slider_key_max->setBounds (100, 316, 130, 24);
    label_vel_shape->setBounds (336, 68, 56, 20);
    label_vel_skew->setBounds (436, 68, 40, 20);
    label_key_shape->setBounds (336, 248, 56, 20);
    label_key_skew->setBounds (436, 248, 40, 20);
    label_vel_skew_text->setBounds (396, 68, 44, 20);
    label_key_skew_text->setBounds (396, 248, 44, 20);
    label_vel_shape_text->setBounds (296, 68, 48, 20);
    label_key_shape_text->setBounds (296, 248, 48, 20);
    label_vel_max_text->setBounds (260, 100, 40, 20);
    label_vel_min_text->setBounds (260, 172, 40, 20);
    label_key_min_text->setBounds (260, 352, 40, 20);
    label_key_max_text->setBounds (260, 280, 40, 20);
    label_vel_y->setBounds (244, 136, 50, 20);
    label_key_y->setBounds (244, 316, 50, 20);
    label_vel_x->setBounds (356, 208, 50, 20);
    label_key_x->setBounds (356, 388, 50, 20);
    m_btn_flip_vel->setBounds (100, 194, 84, 20);
    m_btn_flip_key->setBounds (100, 374, 84, 20);
    //[UserResized] Add your own custom resize handling here..
    //[/UserResized]
}

void VelKey_PopUp::sliderValueChanged (Slider* sliderThatWasMoved)
{
    //[UsersliderValueChanged_Pre]
	float value;
    //[/UsersliderValueChanged_Pre]

    if (sliderThatWasMoved == slider_vel_kexp)
    {
        //[UserSliderCode_slider_vel_kexp] -- add your slider handling code here..
		pMidiCC->setVelCurveShape(pMidiCC_container, toParam(&m_shape_xform, sliderThatWasMoved->getValue()));
        //[/UserSliderCode_slider_vel_kexp]
    }
    else if (sliderThatWasMoved == slider_vel_scenter)
    {
        //[UserSliderCode_slider_vel_scenter] -- add your slider handling code here..
		pMidiCC->setVelCurveSkew(pMidiCC_container, toParam(&m_skew_xform, sliderThatWasMoved->getValue()));
        //[/UserSliderCode_slider_vel_scenter]
    }
    else if (sliderThatWasMoved == slider_vel_min)
    {
        //[UserSliderCode_slider_vel_min] -- add your slider handling code here..
		value = toParam(&m_velKey_constraints, sliderThatWasMoved->getValue())/m_velKey_constraints.pmax;
		pMidiCC->setVelCurveMin(pMidiCC_container, value);
        //[/UserSliderCode_slider_vel_min]
    }
    else if (sliderThatWasMoved == slider_key_kexp)
    {
        //[UserSliderCode_slider_key_kexp] -- add your slider handling code here..
		pMidiCC->setKeyCurveShape(pMidiCC_container, toParam(&m_shape_xform, sliderThatWasMoved->getValue()));
        //[/UserSliderCode_slider_key_kexp]
    }
    else if (sliderThatWasMoved == slider_key_scenter)
    {
        //[UserSliderCode_slider_key_scenter] -- add your slider handling code here..
		pMidiCC->setKeyCurveSkew(pMidiCC_container, toParam(&m_skew_xform, sliderThatWasMoved->getValue()));
        //[/UserSliderCode_slider_key_scenter]
    }
    else if (sliderThatWasMoved == slider_key_min)
    {
        //[UserSliderCode_slider_key_min] -- add your slider handling code here..
		value = toParam(&m_velKey_constraints, sliderThatWasMoved->getValue())/m_velKey_constraints.pmax;
		pMidiCC->setKeyCurveMin(pMidiCC_container, value);
        //[/UserSliderCode_slider_key_min]
    }
    else if (sliderThatWasMoved == slider_vel_max)
    {
        //[UserSliderCode_slider_vel_max] -- add your slider handling code here..
		value = toParam(&m_velKey_constraints, sliderThatWasMoved->getValue())/m_velKey_constraints.pmax;
		pMidiCC->setVelCurveMax(pMidiCC_container, value);
        //[/UserSliderCode_slider_vel_max]
    }
    else if (sliderThatWasMoved == slider_key_max)
    {
        //[UserSliderCode_slider_key_max] -- add your slider handling code here..
		value = toParam(&m_velKey_constraints, sliderThatWasMoved->getValue())/m_velKey_constraints.pmax;
		pMidiCC->setKeyCurveMax(pMidiCC_container, value);
        //[/UserSliderCode_slider_key_max]
    }

    //[UsersliderValueChanged_Post]
	displayUpdate();
    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);

    //[/UsersliderValueChanged_Post]
}

void VelKey_PopUp::buttonClicked (Button* buttonThatWasClicked)
{
    //[UserbuttonClicked_Pre]
	synth_float_t curve_min, curve_max;
    //[/UserbuttonClicked_Pre]

    if (buttonThatWasClicked == textButton_OK)
    {
        //[UserButtonCode_textButton_OK] -- add your button handler code here..
	    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_OK);
        //[/UserButtonCode_textButton_OK]
    }
    else if (buttonThatWasClicked == button_vel_assign_enable)
    {
        //[UserButtonCode_button_vel_assign_enable] -- add your button handler code here..
		pMidiCC->setAssignedVel(pMidiCC_container, buttonThatWasClicked->getToggleState());
	    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);
        //[/UserButtonCode_button_vel_assign_enable]
    }
    else if (buttonThatWasClicked == button_key_assign_enable)
    {
        //[UserButtonCode_button_key_assign_enable] -- add your button handler code here..
		pMidiCC->setAssignedKey(pMidiCC_container, buttonThatWasClicked->getToggleState());
	    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);
        //[/UserButtonCode_button_key_assign_enable]
    }
    else if (buttonThatWasClicked == m_btn_flip_vel)
    {
        //[UserButtonCode_m_btn_flip_vel] -- add your button handler code here..
		curve_min = pMidiCC->getVelCurve(pMidiCC_container)->pmin;
		curve_max = pMidiCC->getVelCurve(pMidiCC_container)->pmax;
		pMidiCC->setVelCurveMin(pMidiCC_container, curve_max);
		pMidiCC->setVelCurveMax(pMidiCC_container, curve_min);
		slider_vel_max->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmax*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);
		slider_vel_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);

		displayUpdate();
	    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);
        //[/UserButtonCode_m_btn_flip_vel]
    }
    else if (buttonThatWasClicked == m_btn_flip_key)
    {
        //[UserButtonCode_m_btn_flip_key] -- add your button handler code here..
		curve_min = pMidiCC->getKeyCurve(pMidiCC_container)->pmin;
		curve_max = pMidiCC->getKeyCurve(pMidiCC_container)->pmax;
		pMidiCC->setKeyCurveMin(pMidiCC_container, curve_max);
		pMidiCC->setKeyCurveMax(pMidiCC_container, curve_min);
		slider_key_max->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmax*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);
		slider_key_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), juce::NotificationType::dontSendNotification);

		displayUpdate();
	    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);
        //[/UserButtonCode_m_btn_flip_key]
    }

    //[UserbuttonClicked_Post]
    //[/UserbuttonClicked_Post]
}

void VelKey_PopUp::labelTextChanged (Label* labelThatHasChanged)
{
    //[UserlabelTextChanged_Pre]
    //[/UserlabelTextChanged_Pre]

    if (labelThatHasChanged == label_vel_ymin)
    {
        //[UserLabelCode_label_vel_ymin] -- add your label text handling code here..
 		if (!m_isFlipped_vel)
			slider_vel_min->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
		else
			slider_vel_max->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_vel_ymin]
    }
    else if (labelThatHasChanged == label_vel_ymax)
    {
        //[UserLabelCode_label_vel_ymax] -- add your label text handling code here..
		if (!m_isFlipped_vel)
			slider_vel_max->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
		else
			slider_vel_min->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_vel_ymax]
    }
    else if (labelThatHasChanged == label_key_ymin)
    {
        //[UserLabelCode_label_key_ymin] -- add your label text handling code here..
		if (!m_isFlipped_key)
	  		slider_key_min->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
		else
	  		slider_key_max->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);

        //[/UserLabelCode_label_key_ymin]
    }
    else if (labelThatHasChanged == label_key_ymax)
    {
        //[UserLabelCode_label_key_ymax] -- add your label text handling code here..
		if (!m_isFlipped_key)
			slider_key_max->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
		else
			slider_key_min->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_key_ymax]
    }
    else if (labelThatHasChanged == label_vel_shape)
    {
        //[UserLabelCode_label_vel_shape] -- add your label text handling code here..
		slider_vel_kexp->setValue(toSlider(&m_shape_xform, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_vel_shape]
    }
    else if (labelThatHasChanged == label_vel_skew)
    {
        //[UserLabelCode_label_vel_skew] -- add your label text handling code here..
 		slider_vel_scenter->setValue(toSlider(&m_skew_xform, String(labelThatHasChanged->getText()).getFloatValue()/100), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_vel_skew]
    }
    else if (labelThatHasChanged == label_key_shape)
    {
        //[UserLabelCode_label_key_shape] -- add your label text handling code here..
		slider_key_kexp->setValue(toSlider(&m_shape_xform, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_key_shape]
    }
    else if (labelThatHasChanged == label_key_skew)
    {
        //[UserLabelCode_label_key_skew] -- add your label text handling code here..
 		slider_key_scenter->setValue(toSlider(&m_skew_xform, String(labelThatHasChanged->getText()).getFloatValue()/100), juce::NotificationType::sendNotification);
        //[/UserLabelCode_label_key_skew]
    }

    //[UserlabelTextChanged_Post]
	displayUpdate();
    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);
    //[/UserlabelTextChanged_Post]
}

void VelKey_PopUp::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
{
    //[UsercomboBoxChanged_Pre]
    //[/UsercomboBoxChanged_Pre]

    if (comboBoxThatHasChanged == comboBoxOPSel)
    {
        //[UserComboBoxCode_comboBoxOPSel] -- add your combo box handling code here..
		pMidiCC->setVelKeyCombineOP(pMidiCC_container, comboBoxThatHasChanged->getSelectedId()-1);
        //[/UserComboBoxCode_comboBoxOPSel]
    }

    //[UsercomboBoxChanged_Post]
	displayUpdate();
    listeners.call (&VelKey_PopUp_Listener::VelKey_PopUp_event, POPUP_PARAM_CHANGED);
    //[/UsercomboBoxChanged_Post]
}



//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void VelKey_PopUp::setKeyVel(int note, float velocity)
{
	m_currentMidiNoteInfo.note = note;
	m_currentMidiNoteInfo.velocity = velocity;
	displayUpdate();
}

void VelKey_PopUp::displayUpdate(void)
{
	float y1, y2;

	y1 = m_velKey_constraints.pmax*pMidiCC->getVelCurve(pMidiCC_container)->pmin;
	y2 = m_velKey_constraints.pmax*pMidiCC->getVelCurve(pMidiCC_container)->pmax;

	if (y1 < y2)
	{
		label_vel_ymin->setText(String(y1, m_label_prec), juce::NotificationType::dontSendNotification);
		label_vel_ymax->setText(String(y2, m_label_prec), juce::NotificationType::dontSendNotification);
		label_vel_max_text->setText(m_text_vel_max, juce::NotificationType::dontSendNotification);
		label_vel_min_text->setText(m_text_vel_min, juce::NotificationType::dontSendNotification);
		m_isFlipped_vel = false;
	}
	else
	{
		label_vel_ymin->setText(String(y2, m_label_prec), juce::NotificationType::dontSendNotification);
		label_vel_ymax->setText(String(y1, m_label_prec), juce::NotificationType::dontSendNotification);
		label_vel_max_text->setText(m_text_vel_min, juce::NotificationType::dontSendNotification);
		label_vel_min_text->setText(m_text_vel_max, juce::NotificationType::dontSendNotification);
		m_isFlipped_vel = true;
	}
	label_vel_shape->setText(String(pMidiCC->getVelCurve(pMidiCC_container)->kexp, m_label_shape_prec), juce::NotificationType::dontSendNotification);
	label_vel_skew->setText(String(100*pMidiCC->getVelCurve(pMidiCC_container)->scenter, 1), juce::NotificationType::dontSendNotification);
	label_vel_x->setText(String(100*m_currentMidiNoteInfo.velocity, 1), juce::NotificationType::dontSendNotification);
	label_vel_y->setText(String(pMidiCC->getConstraints(pMidiCC_container)->pmax*toParam(pMidiCC->getVelCurve(pMidiCC_container), m_currentMidiNoteInfo.velocity), m_label_prec), juce::NotificationType::dontSendNotification);

	m_graph_vel->SetMarkerX(m_currentMidiNoteInfo.velocity);
	m_graph_vel->Draw(pMidiCC->getVelCurve(pMidiCC_container)->pmin, pMidiCC->getVelCurve(pMidiCC_container)->pmax, pMidiCC->getVelCurve(pMidiCC_container));

	y1 = m_velKey_constraints.pmax*pMidiCC->getKeyCurve(pMidiCC_container)->pmin;
	y2 = m_velKey_constraints.pmax*pMidiCC->getKeyCurve(pMidiCC_container)->pmax;

	if (y1 < y2)
	{
		label_key_ymin->setText(String(y1, m_label_prec), juce::NotificationType::dontSendNotification);
		label_key_ymax->setText(String(y2, m_label_prec), juce::NotificationType::dontSendNotification);
		label_key_max_text->setText(m_text_key_max, juce::NotificationType::dontSendNotification);
		label_key_min_text->setText(m_text_key_min, juce::NotificationType::dontSendNotification);
		m_isFlipped_key = false;
	}
	else
	{
		label_key_ymin->setText(String(y2, m_label_prec), juce::NotificationType::dontSendNotification);
		label_key_ymax->setText(String(y1, m_label_prec), juce::NotificationType::dontSendNotification);
		label_key_max_text->setText(m_text_key_min, juce::NotificationType::dontSendNotification);
		label_key_min_text->setText(m_text_key_max, juce::NotificationType::dontSendNotification);
		m_isFlipped_key = true;
	}
	label_key_shape->setText(String(pMidiCC->getKeyCurve(pMidiCC_container)->kexp, m_label_shape_prec), juce::NotificationType::dontSendNotification);
	label_key_skew->setText(String(100*pMidiCC->getKeyCurve(pMidiCC_container)->scenter, 1), juce::NotificationType::dontSendNotification);
//	label_key_x->setText(String(100*(float)m_currentMidiNoteInfo.note/127, 1), juce::NotificationType::dontSendNotification);
	label_key_x0->setText(getNoteName(0), juce::NotificationType::dontSendNotification);
	label_key_x100->setText(getNoteName(127), juce::NotificationType::dontSendNotification);
	label_key_x->setText(getNoteName(m_currentMidiNoteInfo.note), juce::NotificationType::dontSendNotification);
	label_key_y->setText(String(pMidiCC->getConstraints(pMidiCC_container)->pmax*toParam(pMidiCC->getKeyCurve(pMidiCC_container), (float)m_currentMidiNoteInfo.note/127), m_label_prec), juce::NotificationType::dontSendNotification);

	m_graph_key->SetMarkerX((float)m_currentMidiNoteInfo.note/127);
	m_graph_key->Draw(pMidiCC->getKeyCurve(pMidiCC_container)->pmin, pMidiCC->getKeyCurve(pMidiCC_container)->pmax, pMidiCC->getKeyCurve(pMidiCC_container));
}

void VelKey_PopUp::setCurrParam(int paramID, float param)
{
	if (paramID != m_paramID)
		return;

	m_currParamValue = param;
	displayUpdate();
}

void VelKey_PopUp::createNoteNameTbl(void)
{
	int i, ni, nn;
	String notes[12] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" };

	for (i=0; i < 128; i++)
	{
		ni = i%12;
		nn = (i/12)-2;
		notename_tbl[i] = notes[ni] + String(nn);
	}
}

const String VelKey_PopUp::getNoteName(int midinotnumber)
{
	return notename_tbl[midinotnumber];
}

//[/MiscUserCode]


//==============================================================================
#if 0
/*  -- Jucer information section --

    This is where the Jucer puts all of its metadata, so don't change anything in here!

BEGIN_JUCER_METADATA

<JUCER_COMPONENT documentType="Component" className="VelKey_PopUp" componentName="VelKey_PopUp"
                 parentClasses="public Component" constructorParams="JaySynthMidiCC *pMidiCC, int paramID, synth_float_t currParamValue, JaySynth::midi_note_info_t *pCurrentMidiNoteInfo, String name, VelKey_PopUp_Listener *listener"
                 variableInitialisers="" snapPixels="4" snapActive="1" snapShown="1"
                 overlayOpacity="0.330000013" fixedSize="1" initialWidth="520"
                 initialHeight="520">
  <BACKGROUND backgroundColour="ffffff">
    <ROUNDRECT pos="4 4 515 515" cornerSize="10" fill="solid: ff2a64a5" hasStroke="0"/>
    <ROUNDRECT pos="3 3 515 515" cornerSize="10" fill="solid: ffffff" hasStroke="1"
               stroke="4, mitered, butt" strokeColour="solid: ffffffff"/>
  </BACKGROUND>
  <LABEL name="Parameter Name" id="a81278acc6af508f" memberName="label_parameter_name"
         virtualName="" explicitFocusOrder="0" pos="16 24 280 24" tooltip="This is the parameter to modulate"
         textCol="ffffffff" edTextCol="ff000000" edBkgCol="0" labelText="Parameter Name"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="20" bold="0" italic="0" justification="33"/>
  <GROUPCOMPONENT name="new group" id="62a95dcb8b1323a2" memberName="groupComponent3"
                  virtualName="" explicitFocusOrder="0" pos="16 424 228 68" outlinecol="7fffffff"
                  textcol="c0ffffff" title="Combine Curves"/>
  <GROUPCOMPONENT name="new group" id="23a3048f536fa686" memberName="groupComponent"
                  virtualName="" explicitFocusOrder="0" pos="16 64 228 164" outlinecol="7fffffff"
                  textcol="c0ffffff" title="Velocity Sensitivity Curve"/>
  <GROUPCOMPONENT name="new group" id="deca9e950ff547c5" memberName="groupComponent2"
                  virtualName="" explicitFocusOrder="0" pos="16 244 228 164" outlinecol="7fffffff"
                  textcol="c0ffffff" title="Key Sensitivity Curve"/>
  <JUCERCOMP name="GraphWindowVel" id="f76c3e4bc317cd0c" memberName="m_graph_vel"
             virtualName="" explicitFocusOrder="0" pos="296 88 171 121" sourceFile="graph_window.cpp"
             constructorParams=""/>
  <SLIDER name="slider_vel_kexp" id="15a2a5313b70dcf6" memberName="slider_vel_kexp"
          virtualName="" explicitFocusOrder="0" pos="100 88 130 24" tooltip="Velocity Curve Shape"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <SLIDER name="slider_vel_scenter" id="b0b59a2b1f8e1dc6" memberName="slider_vel_scenter"
          virtualName="" explicitFocusOrder="0" pos="100 112 130 24" tooltip="Velocity Curve Skew"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <LABEL name="label_vel_kexp" id="ad2be315a9f1852d" memberName="label_vel_kexp"
         virtualName="" explicitFocusOrder="0" pos="24 88 70 24" tooltip="Velocity Curve Shape"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="Shape"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_scenter" id="813b7b5b60afaaaa" memberName="label_vel_scenter"
         virtualName="" explicitFocusOrder="0" pos="24 112 70 24" tooltip="Velocity Curve Skew"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="Skew"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_min" id="b700b347b8994f19" memberName="label_vel_min"
         virtualName="" explicitFocusOrder="0" pos="24 160 70 24" tooltip="Parameter modulation at lowest velocity"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="Low"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <SLIDER name="slider_vel_min" id="18fcf52541508ed" memberName="slider_vel_min"
          virtualName="" explicitFocusOrder="0" pos="100 160 130 24" tooltip="Parameter modulation at lowest velocity"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <TEXTBUTTON name="OK" id="738259eb71e2a656" memberName="textButton_OK" virtualName=""
              explicitFocusOrder="0" pos="304 452 150 24" tooltip="Close this window"
              buttonText="OK" connectedEdges="0" needsCallback="1" radioGroupId="0"/>
  <TOGGLEBUTTON name="Assign Vel Enable" id="e96134604af6ed01" memberName="button_vel_assign_enable"
                virtualName="" explicitFocusOrder="0" pos="28 192 56 24" tooltip="Set this to make Velocity Sensitivity active"
                txtcol="ffffffff" buttonText="Active" connectedEdges="0" needsCallback="1"
                radioGroupId="0" state="0"/>
  <LABEL name="label_vel_ymin" id="b10e512fac5d1c18" memberName="label_vel_ymin"
         virtualName="" explicitFocusOrder="0" pos="244 188 50 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="0" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_ymax" id="b3acf9fe4b3af14c" memberName="label_vel_ymax"
         virtualName="" explicitFocusOrder="0" pos="244 84 50 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="100" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_x100" id="d8aa4b4d31985016" memberName="label_vel_x100"
         virtualName="" explicitFocusOrder="0" pos="444 212 48 12" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="100%" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_vel_x0" id="5a5c4056e344e586" memberName="label_vel_x0"
         virtualName="" explicitFocusOrder="0" pos="284 212 50 12" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="0%" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <JUCERCOMP name="GraphWindowKey" id="f12912c9ab278d5b" memberName="m_graph_key"
             virtualName="" explicitFocusOrder="0" pos="296 268 171 121" sourceFile="graph_window.cpp"
             constructorParams=""/>
  <SLIDER name="slider_key_kexp" id="638070dcd73495e2" memberName="slider_key_kexp"
          virtualName="" explicitFocusOrder="0" pos="100 268 130 24" tooltip="Key Curve Shape"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <SLIDER name="slider_key_scenter" id="9a2cda5b93d7fe74" memberName="slider_key_scenter"
          virtualName="" explicitFocusOrder="0" pos="100 292 130 24" tooltip="Key Curve Skew"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <LABEL name="label_key_kexp" id="7feb6f2d62046a1b" memberName="label_key_kexp"
         virtualName="" explicitFocusOrder="0" pos="24 268 70 24" tooltip="Key Curve Shape"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="Shape"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_scenter" id="43e90ade9ac71ab0" memberName="label_vel_scenter2"
         virtualName="" explicitFocusOrder="0" pos="24 292 70 24" tooltip="Key Curve Skew"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="Skew"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <LABEL name="label_key_min" id="de9a5b0af0b5ee7b" memberName="label_key_min"
         virtualName="" explicitFocusOrder="0" pos="24 340 70 24" tooltip="Parameter modulation at lowest key"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="Low"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <SLIDER name="slider_key_min" id="d7095fcafbd0cc8e" memberName="slider_key_min"
          virtualName="" explicitFocusOrder="0" pos="100 340 130 24" tooltip="Parameter modulation at lowest key"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <TOGGLEBUTTON name="Assign Key Enable" id="b14f46e22a6eb509" memberName="button_key_assign_enable"
                virtualName="" explicitFocusOrder="0" pos="28 372 56 24" tooltip="Set this to make Key Follow active"
                txtcol="ffffffff" buttonText="Active" connectedEdges="0" needsCallback="1"
                radioGroupId="0" state="0"/>
  <LABEL name="label_key_ymin" id="9ab33c040b7d29a" memberName="label_key_ymin"
         virtualName="" explicitFocusOrder="0" pos="244 368 50 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="0" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_key_ymax" id="8e16298da161ecfa" memberName="label_key_ymax"
         virtualName="" explicitFocusOrder="0" pos="245 264 50 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="100" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_key_x100" id="fcd5f1c5f7ffe30e" memberName="label_key_x100"
         virtualName="" explicitFocusOrder="0" pos="444 392 48 12" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="100%" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_key_x0" id="2ceaa85419fdf69e" memberName="label_key_x0"
         virtualName="" explicitFocusOrder="0" pos="284 392 50 12" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="0%" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <COMBOBOX name="comboBoxOPSel" id="aef6fb7d9ba3f0b5" memberName="comboBoxOPSel"
            virtualName="" explicitFocusOrder="0" pos="88 452 64 20" tooltip="Math operation to combine Velocity-Curve and Key-Curve"
            editable="0" layout="33" items="Add&#10;Sub&#10;Mul" textWhenNonSelected=""
            textWhenNoItems="(no choices)"/>
  <LABEL name="label_key" id="2271966456a68e34" memberName="label_key"
         virtualName="" explicitFocusOrder="0" pos="160 452 70 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Key" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="15" bold="0" italic="0" justification="33"/>
  <LABEL name="label_vel" id="79cbc507b8196039" memberName="label_vel"
         virtualName="" explicitFocusOrder="0" pos="12 452 70 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Velocity" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="15" bold="0" italic="0" justification="34"/>
  <SLIDER name="slider_vel_max" id="8720a6e1c28c3dd1" memberName="slider_vel_max"
          virtualName="" explicitFocusOrder="0" pos="100 136 130 24" tooltip="Parameter modulation at highest velocity"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <LABEL name="label_vel_max" id="20aa79676e6a90a7" memberName="label_vel_max"
         virtualName="" explicitFocusOrder="0" pos="24 136 70 24" tooltip="Parameter modulation at highest velocity"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="High"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <LABEL name="label_key_max" id="ff35a1ad03ba9a5f" memberName="label_key_max"
         virtualName="" explicitFocusOrder="0" pos="24 316 70 24" tooltip="Parameter modulation at highest key"
         textCol="ffffffff" edTextCol="ffffffff" edBkgCol="0" labelText="High"
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="15" bold="0" italic="0" justification="34"/>
  <SLIDER name="slider_key_max" id="15faf547188d3d02" memberName="slider_key_max"
          virtualName="" explicitFocusOrder="0" pos="100 316 130 24" tooltip="Parameter modulation at highest key"
          min="0" max="1" int="0" style="LinearHorizontal" textBoxPos="NoTextBox"
          textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
  <LABEL name="label_vel_shape" id="9c83c3dc815e073f" memberName="label_vel_shape"
         virtualName="" explicitFocusOrder="0" pos="336 68 56 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="-100.00" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="33"/>
  <LABEL name="label_vel_skew" id="9e03f5cebeefaf45" memberName="label_vel_skew"
         virtualName="" explicitFocusOrder="0" pos="436 68 40 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="100" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="33"/>
  <LABEL name="label_key_shape" id="c4e495ca3ae20b48" memberName="label_key_shape"
         virtualName="" explicitFocusOrder="0" pos="336 248 56 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="-100.00" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="33"/>
  <LABEL name="label_key_skew" id="f9055296aeaa8eb7" memberName="label_key_skew"
         virtualName="" explicitFocusOrder="0" pos="436 248 40 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="100" editableSingleClick="1"
         editableDoubleClick="1" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="33"/>
  <LABEL name="label_vel_skew_text" id="9d049f2d56c97a5c" memberName="label_vel_skew_text"
         virtualName="" explicitFocusOrder="0" pos="396 68 44 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Skew:" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_key_skew_text" id="f05ba1f640d62b5" memberName="label_key_skew_text"
         virtualName="" explicitFocusOrder="0" pos="396 248 44 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Skew:" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_shape_text" id="c85c3eaf601443e0" memberName="label_vel_shape_text"
         virtualName="" explicitFocusOrder="0" pos="296 68 48 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Shape:" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="33"/>
  <LABEL name="label_key_shape_text" id="41ea47d917cc451a" memberName="label_key_shape_text"
         virtualName="" explicitFocusOrder="0" pos="296 248 48 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Shape:" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="33"/>
  <LABEL name="label_vel_max_text" id="909872f858b4d56" memberName="label_vel_max_text"
         virtualName="" explicitFocusOrder="0" pos="260 100 40 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="High" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_vel_min_text" id="6f8e288f884e5613" memberName="label_vel_min_text"
         virtualName="" explicitFocusOrder="0" pos="260 172 40 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Low" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_key_min_text" id="2b9e3c86b048cba2" memberName="label_key_min_text"
         virtualName="" explicitFocusOrder="0" pos="260 352 40 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="Low" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_key_max_text" id="fb822a5a8e1d2665" memberName="label_key_max_text"
         virtualName="" explicitFocusOrder="0" pos="260 280 40 20" textCol="ffffffff"
         edTextCol="ffffffff" edBkgCol="0" labelText="High" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_vel_y" id="6a68bb35379d24ef" memberName="label_vel_y"
         virtualName="" explicitFocusOrder="0" pos="244 136 50 20" textCol="ffc0c0c0"
         edTextCol="ffffffff" edBkgCol="0" labelText="0" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_key_y" id="c806db1a8d06e2d3" memberName="label_key_y"
         virtualName="" explicitFocusOrder="0" pos="244 316 50 20" textCol="ffc0c0c0"
         edTextCol="ffffffff" edBkgCol="0" labelText="0" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="34"/>
  <LABEL name="label_vel_x" id="2aa06cffbca6c2d" memberName="label_vel_x"
         virtualName="" explicitFocusOrder="0" pos="356 208 50 20" textCol="ffc0c0c0"
         edTextCol="ffffffff" edBkgCol="0" labelText="0" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <LABEL name="label_key_x" id="f607c2175af4481" memberName="label_key_x"
         virtualName="" explicitFocusOrder="0" pos="356 388 50 20" textCol="ffc0c0c0"
         edTextCol="ffffffff" edBkgCol="0" labelText="0" editableSingleClick="0"
         editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
         fontsize="12" bold="0" italic="0" justification="36"/>
  <TEXTBUTTON name="m_btn_flip_vel" id="285002ac02b293b4" memberName="m_btn_flip_vel"
              virtualName="" explicitFocusOrder="0" pos="100 194 84 20" tooltip="Quick swap of Low and High values"
              buttonText="High &lt;&gt; Low" connectedEdges="0" needsCallback="1"
              radioGroupId="0"/>
  <TEXTBUTTON name="m_btn_flip_key" id="e90c2739a155287" memberName="m_btn_flip_key"
              virtualName="" explicitFocusOrder="0" pos="100 374 84 20" tooltip="Quick swap of Low and High values"
              buttonText="High &lt;&gt; Low" connectedEdges="0" needsCallback="1"
              radioGroupId="0"/>
</JUCER_COMPONENT>

END_JUCER_METADATA
*/
#endif
