28 |
# include <gtkmm/table.h> |
# include <gtkmm/table.h> |
29 |
#endif |
#endif |
30 |
|
|
31 |
|
#include "Settings.h" |
32 |
|
|
33 |
VelocityCurve::VelocityCurve(double (gig::DimensionRegion::*getter)(uint8_t)) : |
VelocityCurve::VelocityCurve(double (gig::DimensionRegion::*getter)(uint8_t)) : |
34 |
getter(getter), dimreg(0) { |
getter(getter), dimreg(0) { |
35 |
set_size_request(80, 80); |
set_size_request(80, 80); |
189 |
)); |
)); |
190 |
} |
} |
191 |
|
|
192 |
|
void EGStateOptions::on_show_tooltips_changed() { |
193 |
|
const bool b = Settings::singleton()->showTooltips; |
194 |
|
|
195 |
|
checkBoxAttack.set_has_tooltip(b); |
196 |
|
checkBoxAttackHold.set_has_tooltip(b); |
197 |
|
checkBoxDecay1.set_has_tooltip(b); |
198 |
|
checkBoxDecay2.set_has_tooltip(b); |
199 |
|
checkBoxRelease.set_has_tooltip(b); |
200 |
|
} |
201 |
|
|
202 |
|
|
203 |
DimRegionEdit::DimRegionEdit() : |
DimRegionEdit::DimRegionEdit() : |
204 |
velocity_curve(&gig::DimensionRegion::GetVelocityAttenuation), |
velocity_curve(&gig::DimensionRegion::GetVelocityAttenuation), |
272 |
eCrossfade_out_start(_("Crossfade-out start")), |
eCrossfade_out_start(_("Crossfade-out start")), |
273 |
eCrossfade_out_end(_("Crossfade-out end")), |
eCrossfade_out_end(_("Crossfade-out end")), |
274 |
ePitchTrack(_("Pitch track")), |
ePitchTrack(_("Pitch track")), |
275 |
|
eSustainReleaseTrigger(_("Sustain Release Trigger")), |
276 |
|
eNoNoteOffReleaseTrigger(_("No note-off release trigger")), |
277 |
eDimensionBypass(_("Dimension bypass")), |
eDimensionBypass(_("Dimension bypass")), |
278 |
ePan(_("Pan"), -64, 63), |
ePan(_("Pan"), -64, 63), |
279 |
eSelfMask(_("Kill lower velocity voices (a.k.a \"Self mask\")")), |
eSelfMask(_("Kill lower velocity voices (a.k.a \"Self mask\")")), |
293 |
eGain(_("Gain"), -96, 0, 2, -655360), |
eGain(_("Gain"), -96, 0, 2, -655360), |
294 |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
295 |
eSampleLoopEnabled(_("Enabled")), |
eSampleLoopEnabled(_("Enabled")), |
296 |
eSampleLoopStart(_("Loop start positon")), |
eSampleLoopStart(_("Loop start position")), |
297 |
eSampleLoopLength(_("Loop size")), |
eSampleLoopLength(_("Loop size")), |
298 |
eSampleLoopType(_("Loop type")), |
eSampleLoopType(_("Loop type")), |
299 |
eSampleLoopInfinite(_("Infinite loop")), |
eSampleLoopInfinite(_("Infinite loop")), |
429 |
connect(eCrossfade_out_start, &DimRegionEdit::set_Crossfade_out_start); |
connect(eCrossfade_out_start, &DimRegionEdit::set_Crossfade_out_start); |
430 |
connect(eCrossfade_out_end, &DimRegionEdit::set_Crossfade_out_end); |
connect(eCrossfade_out_end, &DimRegionEdit::set_Crossfade_out_end); |
431 |
connect(ePitchTrack, &gig::DimensionRegion::PitchTrack); |
connect(ePitchTrack, &gig::DimensionRegion::PitchTrack); |
432 |
|
connect(eSustainReleaseTrigger, &gig::DimensionRegion::SustainReleaseTrigger); |
433 |
|
connect(eNoNoteOffReleaseTrigger, &gig::DimensionRegion::NoNoteOffReleaseTrigger); |
434 |
connect(eDimensionBypass, &gig::DimensionRegion::DimensionBypass); |
connect(eDimensionBypass, &gig::DimensionRegion::DimensionBypass); |
435 |
connect(ePan, &gig::DimensionRegion::Pan); |
connect(ePan, &gig::DimensionRegion::Pan); |
436 |
connect(eSelfMask, &gig::DimensionRegion::SelfMask); |
connect(eSelfMask, &gig::DimensionRegion::SelfMask); |
467 |
table[i]->set_col_spacings(7); |
table[i]->set_col_spacings(7); |
468 |
#endif |
#endif |
469 |
|
|
470 |
|
// on Gtk 3 there is absolutely no margin by default |
471 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
472 |
|
# if GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION < 12 |
473 |
|
table[i]->set_margin_left(12); |
474 |
|
table[i]->set_margin_right(12); |
475 |
|
# else |
476 |
|
table[i]->set_margin_start(12); |
477 |
|
table[i]->set_margin_end(12); |
478 |
|
# endif |
479 |
|
#endif |
480 |
} |
} |
481 |
|
|
482 |
// set tooltips |
// set tooltips |
661 |
|
|
662 |
Gtk::Frame* frame = new Gtk::Frame; |
Gtk::Frame* frame = new Gtk::Frame; |
663 |
frame->add(crossfade_curve); |
frame->add(crossfade_curve); |
664 |
|
// on Gtk 3 there is no margin at all by default |
665 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
666 |
|
frame->set_margin_top(12); |
667 |
|
frame->set_margin_bottom(12); |
668 |
|
#endif |
669 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
670 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
671 |
#else |
#else |
745 |
|
|
746 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
747 |
frame->add(cutoff_curve); |
frame->add(cutoff_curve); |
748 |
|
// on Gtk 3 there is no margin at all by default |
749 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
750 |
|
frame->set_margin_top(12); |
751 |
|
frame->set_margin_bottom(12); |
752 |
|
#endif |
753 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
754 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
755 |
#else |
#else |
856 |
|
|
857 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
858 |
frame->add(velocity_curve); |
frame->add(velocity_curve); |
859 |
|
// on Gtk 3 there is no margin at all by default |
860 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
861 |
|
frame->set_margin_top(12); |
862 |
|
frame->set_margin_bottom(12); |
863 |
|
#endif |
864 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
865 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
866 |
#else |
#else |
881 |
sigc::mem_fun(release_curve, &VelocityCurve::queue_draw)); |
sigc::mem_fun(release_curve, &VelocityCurve::queue_draw)); |
882 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
883 |
frame->add(release_curve); |
frame->add(release_curve); |
884 |
|
// on Gtk 3 there is no margin at all by default |
885 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
886 |
|
frame->set_margin_top(12); |
887 |
|
frame->set_margin_bottom(12); |
888 |
|
#endif |
889 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
890 |
table[pageno]->attach(*frame, 1, rowno, 2); |
table[pageno]->attach(*frame, 1, rowno, 2); |
891 |
#else |
#else |
896 |
|
|
897 |
addProp(eReleaseTriggerDecay); |
addProp(eReleaseTriggerDecay); |
898 |
{ |
{ |
899 |
|
const char* choices[] = { _("off"), _("on (max. velocity)"), _("on (key velocity)"), 0 }; |
900 |
|
static const gig::sust_rel_trg_t values[] = { |
901 |
|
gig::sust_rel_trg_none, |
902 |
|
gig::sust_rel_trg_maxvelocity, |
903 |
|
gig::sust_rel_trg_keyvelocity |
904 |
|
}; |
905 |
|
eSustainReleaseTrigger.set_choices(choices, values); |
906 |
|
} |
907 |
|
eSustainReleaseTrigger.set_tip(_( |
908 |
|
"By default release trigger samples are played on note-off events only. " |
909 |
|
"This option allows to play release trigger sample on sustain pedal up " |
910 |
|
"events as well. NOTE: This is a format extension!" |
911 |
|
)); |
912 |
|
addProp(eSustainReleaseTrigger); |
913 |
|
{ |
914 |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
915 |
static const gig::dim_bypass_ctrl_t values[] = { |
static const gig::dim_bypass_ctrl_t values[] = { |
916 |
gig::dim_bypass_ctrl_none, |
gig::dim_bypass_ctrl_none, |
919 |
}; |
}; |
920 |
eDimensionBypass.set_choices(choices, values); |
eDimensionBypass.set_choices(choices, values); |
921 |
} |
} |
922 |
|
eNoNoteOffReleaseTrigger.set_tip(_( |
923 |
|
"By default release trigger samples are played on note-off events only. " |
924 |
|
"If this option is checked, then no release trigger sample is played " |
925 |
|
"when releasing a note. NOTE: This is a format extension!" |
926 |
|
)); |
927 |
|
addProp(eNoNoteOffReleaseTrigger); |
928 |
addProp(eDimensionBypass); |
addProp(eDimensionBypass); |
929 |
eSelfMask.widget.set_tooltip_text(_( |
eSelfMask.widget.set_tooltip_text(_( |
930 |
"If enabled: new notes with higher velocity value will stop older " |
"If enabled: new notes with higher velocity value will stop older " |
997 |
append_page(*table[4], _("Filter (2)")); |
append_page(*table[4], _("Filter (2)")); |
998 |
append_page(*table[5], _("Pitch")); |
append_page(*table[5], _("Pitch")); |
999 |
append_page(*table[6], _("Misc")); |
append_page(*table[6], _("Misc")); |
1000 |
|
|
1001 |
|
Settings::singleton()->showTooltips.get_proxy().signal_changed().connect( |
1002 |
|
sigc::mem_fun(*this, &DimRegionEdit::on_show_tooltips_changed) |
1003 |
|
); |
1004 |
|
|
1005 |
|
on_show_tooltips_changed(); |
1006 |
} |
} |
1007 |
|
|
1008 |
DimRegionEdit::~DimRegionEdit() |
DimRegionEdit::~DimRegionEdit() |
1094 |
#else |
#else |
1095 |
label->set_halign(Gtk::Align::START); |
label->set_halign(Gtk::Align::START); |
1096 |
#endif |
#endif |
1097 |
|
// on GTKMM 3 there is absolutely no margin by default |
1098 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1099 |
|
label->set_margin_top(18); |
1100 |
|
label->set_margin_bottom(13); |
1101 |
|
#endif |
1102 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
1103 |
table[pageno]->attach(*label, 0, rowno, 3); |
table[pageno]->attach(*label, 0, rowno, 3); |
1104 |
#else |
#else |
1110 |
return label; |
return label; |
1111 |
} |
} |
1112 |
|
|
1113 |
|
void DimRegionEdit::on_show_tooltips_changed() { |
1114 |
|
const bool b = Settings::singleton()->showTooltips; |
1115 |
|
|
1116 |
|
buttonSelectSample.set_has_tooltip(b); |
1117 |
|
buttonNullSampleReference->set_has_tooltip(b); |
1118 |
|
wSample->set_has_tooltip(b); |
1119 |
|
|
1120 |
|
eEG1StateOptions.on_show_tooltips_changed(); |
1121 |
|
eEG2StateOptions.on_show_tooltips_changed(); |
1122 |
|
|
1123 |
|
set_has_tooltip(b); |
1124 |
|
} |
1125 |
|
|
1126 |
void DimRegionEdit::nextPage() |
void DimRegionEdit::nextPage() |
1127 |
{ |
{ |
1128 |
if (firstRowInBlock < rowno - 1) |
if (firstRowInBlock < rowno - 1) |
1288 |
eCrossfade_out_start.set_value(d->Crossfade.out_start); |
eCrossfade_out_start.set_value(d->Crossfade.out_start); |
1289 |
eCrossfade_out_end.set_value(d->Crossfade.out_end); |
eCrossfade_out_end.set_value(d->Crossfade.out_end); |
1290 |
ePitchTrack.set_value(d->PitchTrack); |
ePitchTrack.set_value(d->PitchTrack); |
1291 |
|
eSustainReleaseTrigger.set_value(d->SustainReleaseTrigger); |
1292 |
|
eNoNoteOffReleaseTrigger.set_value(d->NoNoteOffReleaseTrigger); |
1293 |
eDimensionBypass.set_value(d->DimensionBypass); |
eDimensionBypass.set_value(d->DimensionBypass); |
1294 |
ePan.set_value(d->Pan); |
ePan.set_value(d->Pan); |
1295 |
eSelfMask.set_value(d->SelfMask); |
eSelfMask.set_value(d->SelfMask); |