コード例 #1
0
ファイル: delay_section.cpp プロジェクト: drstkova/helm
DelaySection::DelaySection(String name) : SynthSection(name) {
  static const int TEMPO_DRAG_SENSITIVITY = 150;
  addSlider(frequency_ = new SynthSlider("delay_frequency"));
  frequency_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  frequency_->setLookAndFeel(TextLookAndFeel::instance());

  addSlider(tempo_ = new SynthSlider("delay_tempo"));
  tempo_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  tempo_->setStringLookup(mopo::strings::synced_frequencies);
  tempo_->setLookAndFeel(TextLookAndFeel::instance());
  tempo_->setMouseDragSensitivity(TEMPO_DRAG_SENSITIVITY);

  addSlider(sync_ = new TempoSelector("delay_sync"));
  sync_->setSliderStyle(Slider::LinearBar);
  sync_->setTempoSlider(tempo_);
  sync_->setFreeSlider(frequency_);
  sync_->setStringLookup(mopo::strings::freq_sync_styles);

  addSlider(feedback_ = new SynthSlider("delay_feedback"));
  feedback_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  feedback_->setBipolar();

  addSlider(dry_wet_ = new SynthSlider("delay_dry_wet"));
  dry_wet_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);

  addButton(on_ = new ToggleButton("delay_on"));
  setActivator(on_);
}
コード例 #2
0
ファイル: stutter_section.cpp プロジェクト: and3k5/helm
StutterSection::StutterSection(String name) : SynthSection(name) {
  static const int TEMPO_DRAG_SENSITIVITY = 150;

  addSlider(stutter_frequency_ = new SynthSlider("stutter_frequency"));
  stutter_frequency_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  stutter_frequency_->setLookAndFeel(TextLookAndFeel::instance());

  addSlider(stutter_tempo_ = new SynthSlider("stutter_tempo"));
  stutter_tempo_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  stutter_tempo_->setStringLookup(mopo::strings::synced_frequencies);
  stutter_tempo_->setLookAndFeel(TextLookAndFeel::instance());
  stutter_tempo_->setMouseDragSensitivity(TEMPO_DRAG_SENSITIVITY);

  addSlider(stutter_sync_ = new TempoSelector("stutter_sync"));
  stutter_sync_->setSliderStyle(Slider::LinearBar);
  stutter_sync_->setTempoSlider(stutter_tempo_);
  stutter_sync_->setFreeSlider(stutter_frequency_);
  stutter_sync_->setStringLookup(mopo::strings::freq_sync_styles);

  addSlider(resample_frequency_ = new SynthSlider("stutter_resample_frequency"));
  resample_frequency_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  resample_frequency_->setLookAndFeel(TextLookAndFeel::instance());

  addSlider(resample_tempo_ = new SynthSlider("stutter_resample_tempo"));
  resample_tempo_->setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
  resample_tempo_->setStringLookup(mopo::strings::synced_frequencies);
  resample_tempo_->setLookAndFeel(TextLookAndFeel::instance());
  resample_tempo_->setMouseDragSensitivity(TEMPO_DRAG_SENSITIVITY);

  addSlider(resample_sync_ = new TempoSelector("stutter_resample_sync"));
  resample_sync_->setSliderStyle(Slider::LinearBar);
  resample_sync_->setTempoSlider(resample_tempo_);
  resample_sync_->setFreeSlider(resample_frequency_);
  resample_sync_->setStringLookup(mopo::strings::freq_sync_styles);

  addSlider(stutter_softness_ = new SynthSlider("stutter_softness"));
  stutter_softness_->setSliderStyle(Slider::LinearBar);

  addButton(on_ = new ToggleButton("stutter_on"));
  setActivator(on_);
}