1 |
/* |
/* |
2 |
* Copyright (C) 2006-2017 Andreas Persson |
* Copyright (C) 2006-2019 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
17 |
* 02110-1301 USA. |
* 02110-1301 USA. |
18 |
*/ |
*/ |
19 |
|
|
20 |
|
#include "global.h" |
21 |
#include "dimregionedit.h" |
#include "dimregionedit.h" |
22 |
|
|
|
#include "global.h" |
|
23 |
#include "compat.h" |
#include "compat.h" |
24 |
|
|
25 |
|
#if USE_GTKMM_GRID |
26 |
|
# include <gtkmm/grid.h> |
27 |
|
#else |
28 |
|
# include <gtkmm/table.h> |
29 |
|
#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); |
155 |
} |
} |
156 |
|
|
157 |
|
|
158 |
|
EGStateOptions::EGStateOptions() : HBox(), |
159 |
|
label(_("May be cancelled: ")), |
160 |
|
checkBoxAttack(_("Attack")), |
161 |
|
checkBoxAttackHold(_("Attack Hold")), |
162 |
|
checkBoxDecay1(_("Decay 1")), |
163 |
|
checkBoxDecay2(_("Decay 2")), |
164 |
|
checkBoxRelease(_("Release")) |
165 |
|
{ |
166 |
|
set_spacing(6); |
167 |
|
|
168 |
|
pack_start(label); |
169 |
|
pack_start(checkBoxAttack, Gtk::PACK_SHRINK); |
170 |
|
pack_start(checkBoxAttackHold, Gtk::PACK_SHRINK); |
171 |
|
pack_start(checkBoxDecay1, Gtk::PACK_SHRINK); |
172 |
|
pack_start(checkBoxDecay2, Gtk::PACK_SHRINK); |
173 |
|
pack_start(checkBoxRelease, Gtk::PACK_SHRINK); |
174 |
|
|
175 |
|
checkBoxAttack.set_tooltip_text(_( |
176 |
|
"If checked: a note-off aborts the 'attack' stage." |
177 |
|
)); |
178 |
|
checkBoxAttackHold.set_tooltip_text(_( |
179 |
|
"If checked: a note-off aborts the 'attack hold' stage." |
180 |
|
)); |
181 |
|
checkBoxDecay1.set_tooltip_text(_( |
182 |
|
"If checked: a note-off aborts the 'decay 1' stage." |
183 |
|
)); |
184 |
|
checkBoxDecay2.set_tooltip_text(_( |
185 |
|
"If checked: a note-off aborts the 'decay 2' stage." |
186 |
|
)); |
187 |
|
checkBoxRelease.set_tooltip_text(_( |
188 |
|
"If checked: a note-on reverts back from the 'release' stage." |
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), |
205 |
release_curve(&gig::DimensionRegion::GetVelocityRelease), |
release_curve(&gig::DimensionRegion::GetVelocityRelease), |
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")), |
321 |
&gig::DimensionRegion::EG1ControllerDecayInfluence); |
&gig::DimensionRegion::EG1ControllerDecayInfluence); |
322 |
connect(eEG1ControllerReleaseInfluence, |
connect(eEG1ControllerReleaseInfluence, |
323 |
&gig::DimensionRegion::EG1ControllerReleaseInfluence); |
&gig::DimensionRegion::EG1ControllerReleaseInfluence); |
324 |
|
connect(eEG1StateOptions.checkBoxAttack, &gig::DimensionRegion::EG1Options, |
325 |
|
&gig::eg_opt_t::AttackCancel); |
326 |
|
connect(eEG1StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG1Options, |
327 |
|
&gig::eg_opt_t::AttackHoldCancel); |
328 |
|
connect(eEG1StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG1Options, |
329 |
|
&gig::eg_opt_t::Decay1Cancel); |
330 |
|
connect(eEG1StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG1Options, |
331 |
|
&gig::eg_opt_t::Decay2Cancel); |
332 |
|
connect(eEG1StateOptions.checkBoxRelease, &gig::DimensionRegion::EG1Options, |
333 |
|
&gig::eg_opt_t::ReleaseCancel); |
334 |
connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); |
connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); |
335 |
connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); |
connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); |
336 |
connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); |
connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); |
352 |
&gig::DimensionRegion::EG2ControllerDecayInfluence); |
&gig::DimensionRegion::EG2ControllerDecayInfluence); |
353 |
connect(eEG2ControllerReleaseInfluence, |
connect(eEG2ControllerReleaseInfluence, |
354 |
&gig::DimensionRegion::EG2ControllerReleaseInfluence); |
&gig::DimensionRegion::EG2ControllerReleaseInfluence); |
355 |
|
connect(eEG2StateOptions.checkBoxAttack, &gig::DimensionRegion::EG2Options, |
356 |
|
&gig::eg_opt_t::AttackCancel); |
357 |
|
connect(eEG2StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG2Options, |
358 |
|
&gig::eg_opt_t::AttackHoldCancel); |
359 |
|
connect(eEG2StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG2Options, |
360 |
|
&gig::eg_opt_t::Decay1Cancel); |
361 |
|
connect(eEG2StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG2Options, |
362 |
|
&gig::eg_opt_t::Decay2Cancel); |
363 |
|
connect(eEG2StateOptions.checkBoxRelease, &gig::DimensionRegion::EG2Options, |
364 |
|
&gig::eg_opt_t::ReleaseCancel); |
365 |
connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); |
connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); |
366 |
connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); |
connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); |
367 |
connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth); |
connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth); |
409 |
connect(eCrossfade_out_start, &DimRegionEdit::set_Crossfade_out_start); |
connect(eCrossfade_out_start, &DimRegionEdit::set_Crossfade_out_start); |
410 |
connect(eCrossfade_out_end, &DimRegionEdit::set_Crossfade_out_end); |
connect(eCrossfade_out_end, &DimRegionEdit::set_Crossfade_out_end); |
411 |
connect(ePitchTrack, &gig::DimensionRegion::PitchTrack); |
connect(ePitchTrack, &gig::DimensionRegion::PitchTrack); |
412 |
|
connect(eSustainReleaseTrigger, &gig::DimensionRegion::SustainReleaseTrigger); |
413 |
|
connect(eNoNoteOffReleaseTrigger, &gig::DimensionRegion::NoNoteOffReleaseTrigger); |
414 |
connect(eDimensionBypass, &gig::DimensionRegion::DimensionBypass); |
connect(eDimensionBypass, &gig::DimensionRegion::DimensionBypass); |
415 |
connect(ePan, &gig::DimensionRegion::Pan); |
connect(ePan, &gig::DimensionRegion::Pan); |
416 |
connect(eSelfMask, &gig::DimensionRegion::SelfMask); |
connect(eSelfMask, &gig::DimensionRegion::SelfMask); |
439 |
); |
); |
440 |
|
|
441 |
for (int i = 0 ; i < 7 ; i++) { |
for (int i = 0 ; i < 7 ; i++) { |
442 |
|
#if USE_GTKMM_GRID |
443 |
|
table[i] = new Gtk::Grid; |
444 |
|
table[i]->set_column_spacing(7); |
445 |
|
#else |
446 |
table[i] = new Gtk::Table(3, 1); |
table[i] = new Gtk::Table(3, 1); |
447 |
table[i]->set_col_spacings(7); |
table[i]->set_col_spacings(7); |
448 |
|
#endif |
449 |
|
|
450 |
|
// on Gtk 3 there is absolutely no margin by default |
451 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
452 |
|
# if GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION < 12 |
453 |
|
table[i]->set_margin_left(12); |
454 |
|
table[i]->set_margin_right(12); |
455 |
|
# else |
456 |
|
table[i]->set_margin_start(12); |
457 |
|
table[i]->set_margin_end(12); |
458 |
|
# endif |
459 |
|
#endif |
460 |
} |
} |
461 |
|
|
462 |
// set tooltips |
// set tooltips |
607 |
addProp(eEG1ControllerAttackInfluence); |
addProp(eEG1ControllerAttackInfluence); |
608 |
addProp(eEG1ControllerDecayInfluence); |
addProp(eEG1ControllerDecayInfluence); |
609 |
addProp(eEG1ControllerReleaseInfluence); |
addProp(eEG1ControllerReleaseInfluence); |
610 |
|
addLine(eEG1StateOptions); |
611 |
|
|
612 |
nextPage(); |
nextPage(); |
613 |
|
|
641 |
|
|
642 |
Gtk::Frame* frame = new Gtk::Frame; |
Gtk::Frame* frame = new Gtk::Frame; |
643 |
frame->add(crossfade_curve); |
frame->add(crossfade_curve); |
644 |
|
// on Gtk 3 there is no margin at all by default |
645 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
646 |
|
frame->set_margin_top(12); |
647 |
|
frame->set_margin_bottom(12); |
648 |
|
#endif |
649 |
|
#if USE_GTKMM_GRID |
650 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
651 |
|
#else |
652 |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
653 |
Gtk::SHRINK, Gtk::SHRINK); |
Gtk::SHRINK, Gtk::SHRINK); |
654 |
|
#endif |
655 |
rowno++; |
rowno++; |
656 |
|
|
657 |
eCrossfade_in_start.signal_value_changed().connect( |
eCrossfade_in_start.signal_value_changed().connect( |
725 |
|
|
726 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
727 |
frame->add(cutoff_curve); |
frame->add(cutoff_curve); |
728 |
|
// on Gtk 3 there is no margin at all by default |
729 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
730 |
|
frame->set_margin_top(12); |
731 |
|
frame->set_margin_bottom(12); |
732 |
|
#endif |
733 |
|
#if USE_GTKMM_GRID |
734 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
735 |
|
#else |
736 |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
737 |
Gtk::SHRINK, Gtk::SHRINK); |
Gtk::SHRINK, Gtk::SHRINK); |
738 |
|
#endif |
739 |
rowno++; |
rowno++; |
740 |
|
|
741 |
addProp(eVCFResonance); |
addProp(eVCFResonance); |
771 |
addProp(eEG2ControllerAttackInfluence); |
addProp(eEG2ControllerAttackInfluence); |
772 |
addProp(eEG2ControllerDecayInfluence); |
addProp(eEG2ControllerDecayInfluence); |
773 |
addProp(eEG2ControllerReleaseInfluence); |
addProp(eEG2ControllerReleaseInfluence); |
774 |
|
addLine(eEG2StateOptions); |
775 |
lLFO2 = addHeader(_("Filter Cutoff Oscillator (LFO2)")); |
lLFO2 = addHeader(_("Filter Cutoff Oscillator (LFO2)")); |
776 |
addProp(eLFO2Frequency); |
addProp(eLFO2Frequency); |
777 |
addProp(eLFO2InternalDepth); |
addProp(eLFO2InternalDepth); |
836 |
|
|
837 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
838 |
frame->add(velocity_curve); |
frame->add(velocity_curve); |
839 |
|
// on Gtk 3 there is no margin at all by default |
840 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
841 |
|
frame->set_margin_top(12); |
842 |
|
frame->set_margin_bottom(12); |
843 |
|
#endif |
844 |
|
#if USE_GTKMM_GRID |
845 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
846 |
|
#else |
847 |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
848 |
Gtk::SHRINK, Gtk::SHRINK); |
Gtk::SHRINK, Gtk::SHRINK); |
849 |
|
#endif |
850 |
rowno++; |
rowno++; |
851 |
|
|
852 |
addHeader(_("Release Velocity Response")); |
addHeader(_("Release Velocity Response")); |
861 |
sigc::mem_fun(release_curve, &VelocityCurve::queue_draw)); |
sigc::mem_fun(release_curve, &VelocityCurve::queue_draw)); |
862 |
frame = new Gtk::Frame; |
frame = new Gtk::Frame; |
863 |
frame->add(release_curve); |
frame->add(release_curve); |
864 |
|
// on Gtk 3 there is no margin at all by default |
865 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
866 |
|
frame->set_margin_top(12); |
867 |
|
frame->set_margin_bottom(12); |
868 |
|
#endif |
869 |
|
#if USE_GTKMM_GRID |
870 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
871 |
|
#else |
872 |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
873 |
Gtk::SHRINK, Gtk::SHRINK); |
Gtk::SHRINK, Gtk::SHRINK); |
874 |
|
#endif |
875 |
rowno++; |
rowno++; |
876 |
|
|
877 |
addProp(eReleaseTriggerDecay); |
addProp(eReleaseTriggerDecay); |
878 |
{ |
{ |
879 |
|
const char* choices[] = { _("off"), _("on (max. velocity)"), _("on (key velocity)"), 0 }; |
880 |
|
static const gig::sust_rel_trg_t values[] = { |
881 |
|
gig::sust_rel_trg_none, |
882 |
|
gig::sust_rel_trg_maxvelocity, |
883 |
|
gig::sust_rel_trg_keyvelocity |
884 |
|
}; |
885 |
|
eSustainReleaseTrigger.set_choices(choices, values); |
886 |
|
} |
887 |
|
eSustainReleaseTrigger.set_tip(_( |
888 |
|
"By default release trigger samples are played on note-off events only. " |
889 |
|
"This option allows to play release trigger sample on sustain pedal up " |
890 |
|
"events as well. NOTE: This is a format extension!" |
891 |
|
)); |
892 |
|
addProp(eSustainReleaseTrigger); |
893 |
|
{ |
894 |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
895 |
static const gig::dim_bypass_ctrl_t values[] = { |
static const gig::dim_bypass_ctrl_t values[] = { |
896 |
gig::dim_bypass_ctrl_none, |
gig::dim_bypass_ctrl_none, |
899 |
}; |
}; |
900 |
eDimensionBypass.set_choices(choices, values); |
eDimensionBypass.set_choices(choices, values); |
901 |
} |
} |
902 |
|
eNoNoteOffReleaseTrigger.set_tip(_( |
903 |
|
"By default release trigger samples are played on note-off events only. " |
904 |
|
"If this option is checked, then no release trigger sample is played " |
905 |
|
"when releasing a note. NOTE: This is a format extension!" |
906 |
|
)); |
907 |
|
addProp(eNoNoteOffReleaseTrigger); |
908 |
addProp(eDimensionBypass); |
addProp(eDimensionBypass); |
909 |
eSelfMask.widget.set_tooltip_text(_( |
eSelfMask.widget.set_tooltip_text(_( |
910 |
"If enabled: new notes with higher velocity value will stop older " |
"If enabled: new notes with higher velocity value will stop older " |
977 |
append_page(*table[4], _("Filter (2)")); |
append_page(*table[4], _("Filter (2)")); |
978 |
append_page(*table[5], _("Pitch")); |
append_page(*table[5], _("Pitch")); |
979 |
append_page(*table[6], _("Misc")); |
append_page(*table[6], _("Misc")); |
980 |
|
|
981 |
|
Settings::singleton()->showTooltips.get_proxy().signal_changed().connect( |
982 |
|
sigc::mem_fun(*this, &DimRegionEdit::on_show_tooltips_changed) |
983 |
|
); |
984 |
|
|
985 |
|
on_show_tooltips_changed(); |
986 |
} |
} |
987 |
|
|
988 |
DimRegionEdit::~DimRegionEdit() |
DimRegionEdit::~DimRegionEdit() |
993 |
Gtk::Entry*& widget) |
Gtk::Entry*& widget) |
994 |
{ |
{ |
995 |
label = new Gtk::Label(Glib::ustring(labelText) + ":"); |
label = new Gtk::Label(Glib::ustring(labelText) + ":"); |
996 |
|
#if HAS_GTKMM_ALIGNMENT |
997 |
label->set_alignment(Gtk::ALIGN_START); |
label->set_alignment(Gtk::ALIGN_START); |
998 |
|
#else |
999 |
|
label->set_halign(Gtk::Align::START); |
1000 |
|
#endif |
1001 |
|
|
1002 |
|
#if USE_GTKMM_GRID |
1003 |
|
table[pageno]->attach(*label, 1, rowno); |
1004 |
|
#else |
1005 |
table[pageno]->attach(*label, 1, 2, rowno, rowno + 1, |
table[pageno]->attach(*label, 1, 2, rowno, rowno + 1, |
1006 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1007 |
|
#endif |
1008 |
|
|
1009 |
widget = new Gtk::Entry(); |
widget = new Gtk::Entry(); |
1010 |
|
|
1011 |
|
#if USE_GTKMM_GRID |
1012 |
|
table[pageno]->attach(*widget, 2, rowno); |
1013 |
|
#else |
1014 |
table[pageno]->attach(*widget, 2, 3, rowno, rowno + 1, |
table[pageno]->attach(*widget, 2, 3, rowno, rowno + 1, |
1015 |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
1016 |
|
#endif |
1017 |
|
|
1018 |
rowno++; |
rowno++; |
1019 |
} |
} |
1022 |
Gtk::Entry*& widget, Gtk::Button*& button) |
Gtk::Entry*& widget, Gtk::Button*& button) |
1023 |
{ |
{ |
1024 |
label = new Gtk::Label(Glib::ustring(labelText) + ":"); |
label = new Gtk::Label(Glib::ustring(labelText) + ":"); |
1025 |
|
#if HAS_GTKMM_ALIGNMENT |
1026 |
label->set_alignment(Gtk::ALIGN_START); |
label->set_alignment(Gtk::ALIGN_START); |
1027 |
|
#else |
1028 |
|
label->set_halign(Gtk::Align::START); |
1029 |
|
#endif |
1030 |
|
|
1031 |
|
#if USE_GTKMM_GRID |
1032 |
|
table[pageno]->attach(*label, 1, rowno); |
1033 |
|
#else |
1034 |
table[pageno]->attach(*label, 1, 2, rowno, rowno + 1, |
table[pageno]->attach(*label, 1, 2, rowno, rowno + 1, |
1035 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1036 |
|
#endif |
1037 |
|
|
1038 |
widget = new Gtk::Entry(); |
widget = new Gtk::Entry(); |
1039 |
button = new Gtk::Button(); |
button = new Gtk::Button(); |
1040 |
|
|
1041 |
Gtk::HBox* hbox = new Gtk::HBox; |
HBox* hbox = new HBox; |
1042 |
hbox->pack_start(*widget); |
hbox->pack_start(*widget); |
1043 |
hbox->pack_start(*button, Gtk::PACK_SHRINK); |
hbox->pack_start(*button, Gtk::PACK_SHRINK); |
1044 |
|
|
1045 |
|
#if USE_GTKMM_GRID |
1046 |
|
table[pageno]->attach(*hbox, 2, rowno); |
1047 |
|
#else |
1048 |
table[pageno]->attach(*hbox, 2, 3, rowno, rowno + 1, |
table[pageno]->attach(*hbox, 2, 3, rowno, rowno + 1, |
1049 |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
1050 |
|
#endif |
1051 |
|
|
1052 |
rowno++; |
rowno++; |
1053 |
} |
} |
1057 |
if (firstRowInBlock < rowno - 1) |
if (firstRowInBlock < rowno - 1) |
1058 |
{ |
{ |
1059 |
Gtk::Label* filler = new Gtk::Label(" "); |
Gtk::Label* filler = new Gtk::Label(" "); |
1060 |
|
#if USE_GTKMM_GRID |
1061 |
|
table[pageno]->attach(*filler, 0, firstRowInBlock); |
1062 |
|
#else |
1063 |
table[pageno]->attach(*filler, 0, 1, firstRowInBlock, rowno, |
table[pageno]->attach(*filler, 0, 1, firstRowInBlock, rowno, |
1064 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1065 |
|
#endif |
1066 |
} |
} |
1067 |
Glib::ustring str = "<b>"; |
Glib::ustring str = "<b>"; |
1068 |
str += text; |
str += text; |
1069 |
str += "</b>"; |
str += "</b>"; |
1070 |
Gtk::Label* label = new Gtk::Label(str); |
Gtk::Label* label = new Gtk::Label(str); |
1071 |
label->set_use_markup(); |
label->set_use_markup(); |
1072 |
|
#if HAS_GTKMM_ALIGNMENT |
1073 |
label->set_alignment(Gtk::ALIGN_START); |
label->set_alignment(Gtk::ALIGN_START); |
1074 |
|
#else |
1075 |
|
label->set_halign(Gtk::Align::START); |
1076 |
|
#endif |
1077 |
|
// on GTKMM 3 there is absolutely no margin by default |
1078 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1079 |
|
label->set_margin_top(18); |
1080 |
|
label->set_margin_bottom(13); |
1081 |
|
#endif |
1082 |
|
#if USE_GTKMM_GRID |
1083 |
|
table[pageno]->attach(*label, 0, rowno, 3); |
1084 |
|
#else |
1085 |
table[pageno]->attach(*label, 0, 3, rowno, rowno + 1, |
table[pageno]->attach(*label, 0, 3, rowno, rowno + 1, |
1086 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1087 |
|
#endif |
1088 |
rowno++; |
rowno++; |
1089 |
firstRowInBlock = rowno; |
firstRowInBlock = rowno; |
1090 |
return label; |
return label; |
1091 |
} |
} |
1092 |
|
|
1093 |
|
void DimRegionEdit::on_show_tooltips_changed() { |
1094 |
|
const bool b = Settings::singleton()->showTooltips; |
1095 |
|
|
1096 |
|
buttonSelectSample.set_has_tooltip(b); |
1097 |
|
buttonNullSampleReference->set_has_tooltip(b); |
1098 |
|
wSample->set_has_tooltip(b); |
1099 |
|
|
1100 |
|
eEG1StateOptions.on_show_tooltips_changed(); |
1101 |
|
eEG2StateOptions.on_show_tooltips_changed(); |
1102 |
|
|
1103 |
|
set_has_tooltip(b); |
1104 |
|
} |
1105 |
|
|
1106 |
void DimRegionEdit::nextPage() |
void DimRegionEdit::nextPage() |
1107 |
{ |
{ |
1108 |
if (firstRowInBlock < rowno - 1) |
if (firstRowInBlock < rowno - 1) |
1109 |
{ |
{ |
1110 |
Gtk::Label* filler = new Gtk::Label(" "); |
Gtk::Label* filler = new Gtk::Label(" "); |
1111 |
|
#if USE_GTKMM_GRID |
1112 |
|
table[pageno]->attach(*filler, 0, firstRowInBlock); |
1113 |
|
#else |
1114 |
table[pageno]->attach(*filler, 0, 1, firstRowInBlock, rowno, |
table[pageno]->attach(*filler, 0, 1, firstRowInBlock, rowno, |
1115 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1116 |
|
#endif |
1117 |
} |
} |
1118 |
pageno++; |
pageno++; |
1119 |
rowno = 0; |
rowno = 0; |
1122 |
|
|
1123 |
void DimRegionEdit::addProp(BoolEntry& boolentry) |
void DimRegionEdit::addProp(BoolEntry& boolentry) |
1124 |
{ |
{ |
1125 |
|
#if USE_GTKMM_GRID |
1126 |
|
table[pageno]->attach(boolentry.widget, 1, rowno, 2); |
1127 |
|
#else |
1128 |
table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1, |
table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1, |
1129 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1130 |
|
#endif |
1131 |
rowno++; |
rowno++; |
1132 |
} |
} |
1133 |
|
|
1134 |
void DimRegionEdit::addProp(BoolEntryPlus6& boolentry) |
void DimRegionEdit::addProp(BoolEntryPlus6& boolentry) |
1135 |
{ |
{ |
1136 |
|
#if USE_GTKMM_GRID |
1137 |
|
table[pageno]->attach(boolentry.widget, 1, rowno, 2); |
1138 |
|
#else |
1139 |
table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1, |
table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1, |
1140 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1141 |
|
#endif |
1142 |
rowno++; |
rowno++; |
1143 |
} |
} |
1144 |
|
|
1145 |
void DimRegionEdit::addProp(LabelWidget& prop) |
void DimRegionEdit::addProp(LabelWidget& prop) |
1146 |
{ |
{ |
1147 |
|
#if USE_GTKMM_GRID |
1148 |
|
table[pageno]->attach(prop.label, 1, rowno); |
1149 |
|
table[pageno]->attach(prop.widget, 2, rowno); |
1150 |
|
#else |
1151 |
table[pageno]->attach(prop.label, 1, 2, rowno, rowno + 1, |
table[pageno]->attach(prop.label, 1, 2, rowno, rowno + 1, |
1152 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |
1153 |
table[pageno]->attach(prop.widget, 2, 3, rowno, rowno + 1, |
table[pageno]->attach(prop.widget, 2, 3, rowno, rowno + 1, |
1154 |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
1155 |
|
#endif |
1156 |
|
rowno++; |
1157 |
|
} |
1158 |
|
|
1159 |
|
void DimRegionEdit::addLine(HBox& line) |
1160 |
|
{ |
1161 |
|
#if USE_GTKMM_GRID |
1162 |
|
table[pageno]->attach(line, 1, rowno, 2); |
1163 |
|
#else |
1164 |
|
table[pageno]->attach(line, 1, 3, rowno, rowno + 1, |
1165 |
|
Gtk::FILL, Gtk::SHRINK); |
1166 |
|
#endif |
1167 |
rowno++; |
rowno++; |
1168 |
} |
} |
1169 |
|
|
1170 |
void DimRegionEdit::addRightHandSide(Gtk::Widget& widget) |
void DimRegionEdit::addRightHandSide(Gtk::Widget& widget) |
1171 |
{ |
{ |
1172 |
|
#if USE_GTKMM_GRID |
1173 |
|
table[pageno]->attach(widget, 2, rowno); |
1174 |
|
#else |
1175 |
table[pageno]->attach(widget, 2, 3, rowno, rowno + 1, |
table[pageno]->attach(widget, 2, 3, rowno, rowno + 1, |
1176 |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
1177 |
|
#endif |
1178 |
rowno++; |
rowno++; |
1179 |
} |
} |
1180 |
|
|
1203 |
eEG1ControllerAttackInfluence.set_value(d->EG1ControllerAttackInfluence); |
eEG1ControllerAttackInfluence.set_value(d->EG1ControllerAttackInfluence); |
1204 |
eEG1ControllerDecayInfluence.set_value(d->EG1ControllerDecayInfluence); |
eEG1ControllerDecayInfluence.set_value(d->EG1ControllerDecayInfluence); |
1205 |
eEG1ControllerReleaseInfluence.set_value(d->EG1ControllerReleaseInfluence); |
eEG1ControllerReleaseInfluence.set_value(d->EG1ControllerReleaseInfluence); |
1206 |
|
eEG1StateOptions.checkBoxAttack.set_value(d->EG1Options.AttackCancel); |
1207 |
|
eEG1StateOptions.checkBoxAttackHold.set_value(d->EG1Options.AttackHoldCancel); |
1208 |
|
eEG1StateOptions.checkBoxDecay1.set_value(d->EG1Options.Decay1Cancel); |
1209 |
|
eEG1StateOptions.checkBoxDecay2.set_value(d->EG1Options.Decay2Cancel); |
1210 |
|
eEG1StateOptions.checkBoxRelease.set_value(d->EG1Options.ReleaseCancel); |
1211 |
eLFO1Frequency.set_value(d->LFO1Frequency); |
eLFO1Frequency.set_value(d->LFO1Frequency); |
1212 |
eLFO1InternalDepth.set_value(d->LFO1InternalDepth); |
eLFO1InternalDepth.set_value(d->LFO1InternalDepth); |
1213 |
eLFO1ControlDepth.set_value(d->LFO1ControlDepth); |
eLFO1ControlDepth.set_value(d->LFO1ControlDepth); |
1226 |
eEG2ControllerAttackInfluence.set_value(d->EG2ControllerAttackInfluence); |
eEG2ControllerAttackInfluence.set_value(d->EG2ControllerAttackInfluence); |
1227 |
eEG2ControllerDecayInfluence.set_value(d->EG2ControllerDecayInfluence); |
eEG2ControllerDecayInfluence.set_value(d->EG2ControllerDecayInfluence); |
1228 |
eEG2ControllerReleaseInfluence.set_value(d->EG2ControllerReleaseInfluence); |
eEG2ControllerReleaseInfluence.set_value(d->EG2ControllerReleaseInfluence); |
1229 |
|
eEG2StateOptions.checkBoxAttack.set_value(d->EG2Options.AttackCancel); |
1230 |
|
eEG2StateOptions.checkBoxAttackHold.set_value(d->EG2Options.AttackHoldCancel); |
1231 |
|
eEG2StateOptions.checkBoxDecay1.set_value(d->EG2Options.Decay1Cancel); |
1232 |
|
eEG2StateOptions.checkBoxDecay2.set_value(d->EG2Options.Decay2Cancel); |
1233 |
|
eEG2StateOptions.checkBoxRelease.set_value(d->EG2Options.ReleaseCancel); |
1234 |
eLFO2Frequency.set_value(d->LFO2Frequency); |
eLFO2Frequency.set_value(d->LFO2Frequency); |
1235 |
eLFO2InternalDepth.set_value(d->LFO2InternalDepth); |
eLFO2InternalDepth.set_value(d->LFO2InternalDepth); |
1236 |
eLFO2ControlDepth.set_value(d->LFO2ControlDepth); |
eLFO2ControlDepth.set_value(d->LFO2ControlDepth); |
1268 |
eCrossfade_out_start.set_value(d->Crossfade.out_start); |
eCrossfade_out_start.set_value(d->Crossfade.out_start); |
1269 |
eCrossfade_out_end.set_value(d->Crossfade.out_end); |
eCrossfade_out_end.set_value(d->Crossfade.out_end); |
1270 |
ePitchTrack.set_value(d->PitchTrack); |
ePitchTrack.set_value(d->PitchTrack); |
1271 |
|
eSustainReleaseTrigger.set_value(d->SustainReleaseTrigger); |
1272 |
|
eNoNoteOffReleaseTrigger.set_value(d->NoNoteOffReleaseTrigger); |
1273 |
eDimensionBypass.set_value(d->DimensionBypass); |
eDimensionBypass.set_value(d->DimensionBypass); |
1274 |
ePan.set_value(d->Pan); |
ePan.set_value(d->Pan); |
1275 |
eSelfMask.set_value(d->SelfMask); |
eSelfMask.set_value(d->SelfMask); |
1378 |
eEG2ControllerAttackInfluence.set_sensitive(sensitive); |
eEG2ControllerAttackInfluence.set_sensitive(sensitive); |
1379 |
eEG2ControllerDecayInfluence.set_sensitive(sensitive); |
eEG2ControllerDecayInfluence.set_sensitive(sensitive); |
1380 |
eEG2ControllerReleaseInfluence.set_sensitive(sensitive); |
eEG2ControllerReleaseInfluence.set_sensitive(sensitive); |
1381 |
|
eEG2StateOptions.set_sensitive(sensitive); |
1382 |
lLFO2->set_sensitive(sensitive); |
lLFO2->set_sensitive(sensitive); |
1383 |
eLFO2Frequency.set_sensitive(sensitive); |
eLFO2Frequency.set_sensitive(sensitive); |
1384 |
eLFO2InternalDepth.set_sensitive(sensitive); |
eLFO2InternalDepth.set_sensitive(sensitive); |
1587 |
//TODO: we should better move the code from MainWindow::on_sample_label_drop_drag_data_received() here |
//TODO: we should better move the code from MainWindow::on_sample_label_drop_drag_data_received() here |
1588 |
|
|
1589 |
// currently commented because we're sending a similar signal in MainWindow::on_sample_label_drop_drag_data_received() |
// currently commented because we're sending a similar signal in MainWindow::on_sample_label_drop_drag_data_received() |
1590 |
//dimreg_to_be_changed_signal.emit(dimregion); |
//DimRegionChangeGuard(this, dimregion); |
1591 |
|
|
1592 |
// make sure stereo samples always are the same in both |
// make sure stereo samples always are the same in both |
1593 |
// dimregs in the samplechannel dimension |
// dimregs in the samplechannel dimension |
1657 |
update_model--; |
update_model--; |
1658 |
|
|
1659 |
sample_ref_changed_signal.emit(oldref, sample); |
sample_ref_changed_signal.emit(oldref, sample); |
|
// currently commented because we're sending a similar signal in MainWindow::on_sample_label_drop_drag_data_received() |
|
|
//dimreg_changed_signal.emit(dimreg); |
|
1660 |
return true; |
return true; |
1661 |
} |
} |
1662 |
return false; |
return false; |
1675 |
} |
} |
1676 |
|
|
1677 |
|
|
1678 |
void DimRegionEdit::set_UnityNote(gig::DimensionRegion* d, uint8_t value) |
void DimRegionEdit::set_UnityNote(gig::DimensionRegion& d, uint8_t value) |
1679 |
{ |
{ |
1680 |
d->UnityNote = value; |
d.UnityNote = value; |
1681 |
} |
} |
1682 |
|
|
1683 |
void DimRegionEdit::set_FineTune(gig::DimensionRegion* d, int16_t value) |
void DimRegionEdit::set_FineTune(gig::DimensionRegion& d, int16_t value) |
1684 |
{ |
{ |
1685 |
d->FineTune = value; |
d.FineTune = value; |
1686 |
} |
} |
1687 |
|
|
1688 |
void DimRegionEdit::set_Crossfade_in_start(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_in_start(gig::DimensionRegion& d, |
1689 |
uint8_t value) |
uint8_t value) |
1690 |
{ |
{ |
1691 |
d->Crossfade.in_start = value; |
d.Crossfade.in_start = value; |
1692 |
if (d->Crossfade.in_end < value) set_Crossfade_in_end(d, value); |
if (d.Crossfade.in_end < value) set_Crossfade_in_end(d, value); |
1693 |
} |
} |
1694 |
|
|
1695 |
void DimRegionEdit::set_Crossfade_in_end(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_in_end(gig::DimensionRegion& d, |
1696 |
uint8_t value) |
uint8_t value) |
1697 |
{ |
{ |
1698 |
d->Crossfade.in_end = value; |
d.Crossfade.in_end = value; |
1699 |
if (value < d->Crossfade.in_start) set_Crossfade_in_start(d, value); |
if (value < d.Crossfade.in_start) set_Crossfade_in_start(d, value); |
1700 |
if (value > d->Crossfade.out_start) set_Crossfade_out_start(d, value); |
if (value > d.Crossfade.out_start) set_Crossfade_out_start(d, value); |
1701 |
} |
} |
1702 |
|
|
1703 |
void DimRegionEdit::set_Crossfade_out_start(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_out_start(gig::DimensionRegion& d, |
1704 |
uint8_t value) |
uint8_t value) |
1705 |
{ |
{ |
1706 |
d->Crossfade.out_start = value; |
d.Crossfade.out_start = value; |
1707 |
if (value < d->Crossfade.in_end) set_Crossfade_in_end(d, value); |
if (value < d.Crossfade.in_end) set_Crossfade_in_end(d, value); |
1708 |
if (value > d->Crossfade.out_end) set_Crossfade_out_end(d, value); |
if (value > d.Crossfade.out_end) set_Crossfade_out_end(d, value); |
1709 |
} |
} |
1710 |
|
|
1711 |
void DimRegionEdit::set_Crossfade_out_end(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_out_end(gig::DimensionRegion& d, |
1712 |
uint8_t value) |
uint8_t value) |
1713 |
{ |
{ |
1714 |
d->Crossfade.out_end = value; |
d.Crossfade.out_end = value; |
1715 |
if (value < d->Crossfade.out_start) set_Crossfade_out_start(d, value); |
if (value < d.Crossfade.out_start) set_Crossfade_out_start(d, value); |
1716 |
} |
} |
1717 |
|
|
1718 |
void DimRegionEdit::set_Gain(gig::DimensionRegion* d, int32_t value) |
void DimRegionEdit::set_Gain(gig::DimensionRegion& d, int32_t value) |
1719 |
{ |
{ |
1720 |
d->SetGain(value); |
d.SetGain(value); |
1721 |
} |
} |
1722 |
|
|
1723 |
void DimRegionEdit::set_LoopEnabled(gig::DimensionRegion* d, bool value) |
void DimRegionEdit::set_LoopEnabled(gig::DimensionRegion& d, bool value) |
1724 |
{ |
{ |
1725 |
if (value) { |
if (value) { |
1726 |
// create a new sample loop in case there is none yet |
// create a new sample loop in case there is none yet |
1727 |
if (!d->SampleLoops) { |
if (!d.SampleLoops) { |
1728 |
|
DimRegionChangeGuard(this, &d); |
1729 |
|
|
1730 |
DLS::sample_loop_t loop; |
DLS::sample_loop_t loop; |
1731 |
loop.LoopType = gig::loop_type_normal; |
loop.LoopType = gig::loop_type_normal; |
1732 |
// loop the whole sample by default |
// loop the whole sample by default |
1733 |
loop.LoopStart = 0; |
loop.LoopStart = 0; |
1734 |
loop.LoopLength = |
loop.LoopLength = |
1735 |
(d->pSample) ? d->pSample->SamplesTotal : 0; |
(d.pSample) ? d.pSample->SamplesTotal : 0; |
1736 |
dimreg_to_be_changed_signal.emit(d); |
d.AddSampleLoop(&loop); |
|
d->AddSampleLoop(&loop); |
|
|
dimreg_changed_signal.emit(d); |
|
1737 |
} |
} |
1738 |
} else { |
} else { |
1739 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
1740 |
dimreg_to_be_changed_signal.emit(d); |
DimRegionChangeGuard(this, &d); |
1741 |
|
|
1742 |
// delete ALL existing sample loops |
// delete ALL existing sample loops |
1743 |
while (d->SampleLoops) { |
while (d.SampleLoops) { |
1744 |
d->DeleteSampleLoop(&d->pSampleLoops[0]); |
d.DeleteSampleLoop(&d.pSampleLoops[0]); |
1745 |
} |
} |
|
dimreg_changed_signal.emit(d); |
|
1746 |
} |
} |
1747 |
} |
} |
1748 |
} |
} |
1749 |
|
|
1750 |
void DimRegionEdit::set_LoopType(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopType(gig::DimensionRegion& d, uint32_t value) |
1751 |
{ |
{ |
1752 |
if (d->SampleLoops) d->pSampleLoops[0].LoopType = value; |
if (d.SampleLoops) d.pSampleLoops[0].LoopType = value; |
1753 |
} |
} |
1754 |
|
|
1755 |
void DimRegionEdit::set_LoopStart(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopStart(gig::DimensionRegion& d, uint32_t value) |
1756 |
{ |
{ |
1757 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
1758 |
d->pSampleLoops[0].LoopStart = |
d.pSampleLoops[0].LoopStart = |
1759 |
d->pSample ? |
d.pSample ? |
1760 |
std::min(value, uint32_t(d->pSample->SamplesTotal - |
std::min(value, uint32_t(d.pSample->SamplesTotal - |
1761 |
d->pSampleLoops[0].LoopLength)) : |
d.pSampleLoops[0].LoopLength)) : |
1762 |
0; |
0; |
1763 |
} |
} |
1764 |
} |
} |
1765 |
|
|
1766 |
void DimRegionEdit::set_LoopLength(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopLength(gig::DimensionRegion& d, uint32_t value) |
1767 |
{ |
{ |
1768 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
1769 |
d->pSampleLoops[0].LoopLength = |
d.pSampleLoops[0].LoopLength = |
1770 |
d->pSample ? |
d.pSample ? |
1771 |
std::min(value, uint32_t(d->pSample->SamplesTotal - |
std::min(value, uint32_t(d.pSample->SamplesTotal - |
1772 |
d->pSampleLoops[0].LoopStart)) : |
d.pSampleLoops[0].LoopStart)) : |
1773 |
0; |
0; |
1774 |
} |
} |
1775 |
} |
} |
1776 |
|
|
1777 |
void DimRegionEdit::set_LoopInfinite(gig::DimensionRegion* d, bool value) |
void DimRegionEdit::set_LoopInfinite(gig::DimensionRegion& d, bool value) |
1778 |
{ |
{ |
1779 |
if (d->pSample) { |
if (d.pSample) { |
1780 |
if (value) d->pSample->LoopPlayCount = 0; |
if (value) d.pSample->LoopPlayCount = 0; |
1781 |
else if (d->pSample->LoopPlayCount == 0) d->pSample->LoopPlayCount = 1; |
else if (d.pSample->LoopPlayCount == 0) d.pSample->LoopPlayCount = 1; |
1782 |
} |
} |
1783 |
} |
} |
1784 |
|
|
1785 |
void DimRegionEdit::set_LoopPlayCount(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopPlayCount(gig::DimensionRegion& d, uint32_t value) |
1786 |
{ |
{ |
1787 |
if (d->pSample) d->pSample->LoopPlayCount = value; |
if (d.pSample) d.pSample->LoopPlayCount = value; |
1788 |
} |
} |
1789 |
|
|
1790 |
void DimRegionEdit::nullOutSampleReference() { |
void DimRegionEdit::nullOutSampleReference() { |
1792 |
gig::Sample* oldref = dimregion->pSample; |
gig::Sample* oldref = dimregion->pSample; |
1793 |
if (!oldref) return; |
if (!oldref) return; |
1794 |
|
|
1795 |
dimreg_to_be_changed_signal.emit(dimregion); |
DimRegionChangeGuard(this, dimregion); |
1796 |
|
|
1797 |
// in case currently assigned sample is a stereo one, then remove both |
// in case currently assigned sample is a stereo one, then remove both |
1798 |
// references (expected to be due to a "stereo dimension") |
// references (expected to be due to a "stereo dimension") |
1830 |
set_dim_region(dimregion); |
set_dim_region(dimregion); |
1831 |
|
|
1832 |
sample_ref_changed_signal.emit(oldref, NULL); |
sample_ref_changed_signal.emit(oldref, NULL); |
|
dimreg_changed_signal.emit(dimregion); |
|
1833 |
} |
} |
1834 |
|
|
1835 |
void DimRegionEdit::onButtonSelectSamplePressed() { |
void DimRegionEdit::onButtonSelectSamplePressed() { |