Exemple #1
0
void PhaserDialog::OnPhaseSlider(wxCommandEvent & WXUNUSED(event))
{
   wxString str;
   long phase = GetPhaseSlider()->GetValue();
   phase = ((phase + 5) / 10) * 10;     // round to nearest multiple of 10
   str.Printf(wxT("%ld"), phase);
   GetPhaseText()->SetValue(str);
}
Exemple #2
0
void WahwahDialog::OnPhaseSlider(wxCommandEvent & event)
{
   wxString str;
   long phase = GetPhaseSlider()->GetValue();
   phase = ((phase + 5) / 10) * 10;     // round to nearest multiple of 10
   str.Printf("%ld", phase);
   GetPhaseText()->SetValue(str);
}
Exemple #3
0
bool PhaserDialog::TransferDataToWindow()
{
   wxSlider *slider;

   slider = GetFreqSlider();
   if (slider)
      slider->SetValue(freq * 10);

   slider = GetPhaseSlider();
   if (slider)
      slider->SetValue(startphase);

   slider = GetDepthSlider();
   if (slider)
      slider->SetValue(depth);

   slider = GetFeedbackSlider();
   if (slider)
      slider->SetValue(fb);

   slider = GetDryWet();
   if (slider)
      slider->SetValue(drywet);

   wxSpinCtrl *spin = GetStages();
   if (spin)
      spin->SetValue(stages);

   wxTextCtrl *text = GetFreqText();
   if (text) {
      wxString str;
      str.Printf("%.1f", freq);
      text->SetValue(str);
   }

   text = GetPhaseText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) startphase);
      text->SetValue(str);
   }

   text = GetDepthText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) depth);
      text->SetValue(str);
   }

   text = GetFeedbackText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) fb);
      text->SetValue(str);
   }

   return TRUE;
}
Exemple #4
0
void PhaserDialog::OnPhaseText(wxCommandEvent & WXUNUSED(event))
{
   wxTextCtrl *c = GetPhaseText();
   if (c) {
      long phase;

      c->GetValue().ToLong(&phase);
      phase = TrapLong(phase, PHASE_MIN, PHASE_MAX);

      wxSlider *slider = GetPhaseSlider();
      if (slider)
         slider->SetValue(phase);
   }
}
Exemple #5
0
bool PhaserDialog::TransferDataToWindow()
{
   wxSlider *slider;

   slider = GetFreqSlider();
   if (slider)
      slider->SetValue((int)(freq * 10));

   slider = GetPhaseSlider();
   if (slider)
      slider->SetValue((int)startphase);

   slider = GetDepthSlider();
   if (slider)
      slider->SetValue((int)depth);

   slider = GetFeedbackSlider();
   if (slider)
      slider->SetValue((int)fb);

   slider = GetDryWetSlider();
   if (slider)
      slider->SetValue((int)drywet);

   slider = GetStagesSlider();
   if (slider)
      slider->SetValue((int)stages);

   wxTextCtrl *text;

   text = GetStagesText();
   if (text) {
      wxString str;
      str.Printf(wxT("%d"), stages);
      text->SetValue(str);
   }

   text = GetDryWetText();
   if (text) {
      wxString str;
      str.Printf(wxT("%d"), drywet);
      text->SetValue(str);
   }

   text = GetFreqText();
   if (text) {
      wxString str;
      str.Printf(wxT("%.1f"), freq);
      text->SetValue(str);
   }

   text = GetPhaseText();
   if (text) {
      wxString str;
      str.Printf(wxT("%d"), (int) startphase);
      text->SetValue(str);
   }

   text = GetDepthText();
   if (text) {
      wxString str;
      str.Printf(wxT("%d"), (int) depth);
      text->SetValue(str);
   }

   text = GetFeedbackText();
   if (text) {
      wxString str;
      str.Printf(wxT("%d"), (int) fb);
      text->SetValue(str);
   }

   return TRUE;
}
Exemple #6
0
bool WahwahDialog::TransferDataToWindow()
{
   wxSlider *slider;

   slider = GetFreqSlider();
   if (slider)
      slider->SetValue((int)(freq * 10));

   slider = GetFreqOffSlider();
   if (slider)
      slider->SetValue((int)freqoff);

   slider = GetDepthSlider();
   if (slider)
      slider->SetValue((int)depth);

   slider = GetPhaseSlider();
   if (slider)
      slider->SetValue((int)startphase);

   slider = GetResonanceSlider();
   if (slider)
      slider->SetValue((int)(res * 10));

   wxTextCtrl *text = GetFreqText();
   if (text) {
      wxString str;
      str.Printf("%.1f", freq);
      text->SetValue(str);
   }

   text = GetFreqOffText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) freqoff);
      text->SetValue(str);
   }

   text = GetPhaseText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) startphase);
      text->SetValue(str);
   }

   text = GetDepthText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) depth);
      text->SetValue(str);
   }

   text = GetResonanceText();
   if (text) {
      wxString str;
      str.Printf("%.1f", res);
      text->SetValue(str);
   }

   return TRUE;
}