- port to minGw

git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@235 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2015-02-21 17:09:43 +00:00
parent 843c6e300c
commit cfc9645b0b
1093 changed files with 426078 additions and 143 deletions
+55 -55
View File
@@ -560,20 +560,20 @@ VelKey_PopUp::VelKey_PopUp (JaySynthMidiCC *pMidiCC, int paramID, synth_float_t
m_velKey_constraints.scenter = 0.5;
m_velKey_constraints.pcenter = -1E18;
label_parameter_name->setText(name, false);
comboBoxOPSel->setSelectedId(1 + pMidiCC->getVelKeyCombineOP(pMidiCC_container), true);
label_parameter_name->setText(name, juce::NotificationType::dontSendNotification);
comboBoxOPSel->setSelectedId(1 + pMidiCC->getVelKeyCombineOP(pMidiCC_container), juce::NotificationType::sendNotification);
slider_vel_kexp->setValue(toSlider(&m_shape_xform, pMidiCC->getVelCurve(pMidiCC_container)->kexp), false);
slider_vel_scenter->setValue(toSlider(&m_skew_xform, pMidiCC->getVelCurve(pMidiCC_container)->scenter), false);
slider_vel_max->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmax*m_velKey_constraints.pmax), false);
slider_vel_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), false);
button_vel_assign_enable->setToggleState(pMidiCC->isAssignedVel(pMidiCC_container), false);
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), false);
slider_key_scenter->setValue(toSlider(&m_skew_xform, pMidiCC->getKeyCurve(pMidiCC_container)->scenter), false);
slider_key_max->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmax*m_velKey_constraints.pmax), false);
slider_key_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), false);
button_key_assign_enable->setToggleState(pMidiCC->isAssignedKey(pMidiCC_container), false);
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);
@@ -837,8 +837,8 @@ void VelKey_PopUp::buttonClicked (Button* buttonThatWasClicked)
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), false);
slider_vel_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getVelCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), false);
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);
@@ -851,8 +851,8 @@ void VelKey_PopUp::buttonClicked (Button* buttonThatWasClicked)
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), false);
slider_key_min->setValue(toSlider(&m_velKey_constraints, pMidiCC->getKeyCurve(pMidiCC_container)->pmin*m_velKey_constraints.pmax), false);
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);
@@ -872,27 +872,27 @@ void VelKey_PopUp::labelTextChanged (Label* labelThatHasChanged)
{
//[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()), true);
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()), true);
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()), true);
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()), true);
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()), true);
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()), true);
slider_key_max->setValue(toSlider(&m_velKey_constraints, String(labelThatHasChanged->getText()).getFloatValue()), juce::NotificationType::sendNotification);
//[/UserLabelCode_label_key_ymin]
}
@@ -900,33 +900,33 @@ void VelKey_PopUp::labelTextChanged (Label* labelThatHasChanged)
{
//[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()), true);
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()), true);
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()), true);
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), true);
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()), true);
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), true);
slider_key_scenter->setValue(toSlider(&m_skew_xform, String(labelThatHasChanged->getText()).getFloatValue()/100), juce::NotificationType::sendNotification);
//[/UserLabelCode_label_key_skew]
}
@@ -973,24 +973,24 @@ void VelKey_PopUp::displayUpdate(void)
if (y1 < y2)
{
label_vel_ymin->setText(String(y1, m_label_prec), false);
label_vel_ymax->setText(String(y2, m_label_prec), false);
label_vel_max_text->setText(m_text_vel_max, false);
label_vel_min_text->setText(m_text_vel_min, false);
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), false);
label_vel_ymax->setText(String(y1, m_label_prec), false);
label_vel_max_text->setText(m_text_vel_min, false);
label_vel_min_text->setText(m_text_vel_max, false);
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), false);
label_vel_skew->setText(String(100*pMidiCC->getVelCurve(pMidiCC_container)->scenter, 1), false);
label_vel_x->setText(String(100*m_currentMidiNoteInfo.velocity, 1), false);
label_vel_y->setText(String(pMidiCC->getConstraints(pMidiCC_container)->pmax*toParam(pMidiCC->getVelCurve(pMidiCC_container), m_currentMidiNoteInfo.velocity), m_label_prec), false);
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));
@@ -1000,27 +1000,27 @@ void VelKey_PopUp::displayUpdate(void)
if (y1 < y2)
{
label_key_ymin->setText(String(y1, m_label_prec), false);
label_key_ymax->setText(String(y2, m_label_prec), false);
label_key_max_text->setText(m_text_key_max, false);
label_key_min_text->setText(m_text_key_min, false);
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), false);
label_key_ymax->setText(String(y1, m_label_prec), false);
label_key_max_text->setText(m_text_key_min, false);
label_key_min_text->setText(m_text_key_max, false);
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), false);
label_key_skew->setText(String(100*pMidiCC->getKeyCurve(pMidiCC_container)->scenter, 1), false);
// label_key_x->setText(String(100*(float)m_currentMidiNoteInfo.note/127, 1), false);
label_key_x0->setText(getNoteName(0), false);
label_key_x100->setText(getNoteName(127), false);
label_key_x->setText(getNoteName(m_currentMidiNoteInfo.note), false);
label_key_y->setText(String(pMidiCC->getConstraints(pMidiCC_container)->pmax*toParam(pMidiCC->getKeyCurve(pMidiCC_container), (float)m_currentMidiNoteInfo.note/127), m_label_prec), false);
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));