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 |
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); |
39 |
bool VelocityCurve::on_expose_event(GdkEventExpose* e) { |
bool VelocityCurve::on_expose_event(GdkEventExpose* e) { |
40 |
const Cairo::RefPtr<Cairo::Context>& cr = |
const Cairo::RefPtr<Cairo::Context>& cr = |
41 |
get_window()->create_cairo_context(); |
get_window()->create_cairo_context(); |
|
#if 0 |
|
|
} |
|
|
#endif |
|
42 |
#else |
#else |
43 |
bool VelocityCurve::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) { |
bool VelocityCurve::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) { |
44 |
#endif |
#endif |
74 |
|
|
75 |
|
|
76 |
CrossfadeCurve::CrossfadeCurve() : dimreg(0) { |
CrossfadeCurve::CrossfadeCurve() : dimreg(0) { |
77 |
set_size_request(280, 80); |
set_size_request(500, 100); |
78 |
} |
} |
79 |
|
|
80 |
#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 |
#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 |
81 |
bool CrossfadeCurve::on_expose_event(GdkEventExpose* e) { |
bool CrossfadeCurve::on_expose_event(GdkEventExpose* e) { |
82 |
const Cairo::RefPtr<Cairo::Context>& cr = |
const Cairo::RefPtr<Cairo::Context>& cr = |
83 |
get_window()->create_cairo_context(); |
get_window()->create_cairo_context(); |
|
#if 0 |
|
|
} |
|
|
#endif |
|
84 |
#else |
#else |
85 |
bool CrossfadeCurve::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) { |
bool CrossfadeCurve::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) { |
86 |
#endif |
#endif |
149 |
} |
} |
150 |
|
|
151 |
|
|
152 |
|
LFOGraph::LFOGraph() : dimreg(0) { |
153 |
|
set_size_request(500, 100); |
154 |
|
} |
155 |
|
|
156 |
|
#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 |
157 |
|
bool LFOGraph::on_expose_event(GdkEventExpose* e) { |
158 |
|
const Cairo::RefPtr<Cairo::Context>& cr = |
159 |
|
get_window()->create_cairo_context(); |
160 |
|
#else |
161 |
|
bool LFOGraph::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) { |
162 |
|
#endif |
163 |
|
if (dimreg) { |
164 |
|
const int w = get_width(); |
165 |
|
const int h = get_height(); |
166 |
|
const bool sensitive = is_sensitive(); |
167 |
|
const bool signedRange = this->signedRange(); |
168 |
|
const float visiblePeriods = 5.f; // such that minimum LFO frequency 0.1 Hz draws exactly a half period |
169 |
|
|
170 |
|
// short-hand functions for setting colors |
171 |
|
auto setGrayColor = [&] { |
172 |
|
cr->set_source_rgba(0.88, 0.88, 0.88, sensitive ? 1.0 : 0.3); |
173 |
|
}; |
174 |
|
auto setBlackColor = [&] { |
175 |
|
cr->set_source_rgba(0, 0, 0, sensitive ? 1.0 : 0.3); |
176 |
|
}; |
177 |
|
auto setGreenColor = [&] { |
178 |
|
cr->set_source_rgba(94/255.f, 219/255.f, 80/255.f, sensitive ? 1.0 : 0.3); |
179 |
|
}; |
180 |
|
auto setRedColor = [&] { |
181 |
|
cr->set_source_rgba(255.f, 44/255.f, 44/255.f, sensitive ? 1.0 : 0.3); |
182 |
|
}; |
183 |
|
/*auto setBlueColor = [&] { |
184 |
|
cr->set_source_rgba(53/255.f, 167/255.f, 255.f, sensitive ? 1.0 : 0.3); |
185 |
|
};*/ |
186 |
|
auto setOrangeColor = [&] { |
187 |
|
cr->set_source_rgba(255.f, 177/255.f, 82/255.f, sensitive ? 1.0 : 0.3); |
188 |
|
}; |
189 |
|
auto setWhiteColor = [&] { |
190 |
|
cr->set_source_rgba(255.f, 255.f, 255.f, sensitive ? 1.0 : 0.3); |
191 |
|
}; |
192 |
|
|
193 |
|
// fill background white |
194 |
|
cr->rectangle(0, 0, w, h); |
195 |
|
setWhiteColor(); |
196 |
|
cr->fill(); |
197 |
|
|
198 |
|
// draw horizontal center line (dashed gray) if LFO range is signed |
199 |
|
if (signedRange) { |
200 |
|
cr->move_to(0, h/2); |
201 |
|
cr->line_to(w, h/2); |
202 |
|
cr->set_line_width(2); |
203 |
|
setGrayColor(); |
204 |
|
cr->set_dash(std::vector<double>{ 7, 5 }, 0 /*offset*/); |
205 |
|
cr->stroke(); |
206 |
|
} |
207 |
|
|
208 |
|
// draw a vertical line for each second |
209 |
|
for (int period = 1; period < visiblePeriods; ++period) { |
210 |
|
int x = float(w) / float(visiblePeriods) * period; |
211 |
|
cr->move_to(x, 0); |
212 |
|
cr->line_to(x, h); |
213 |
|
cr->set_line_width(2); |
214 |
|
setGrayColor(); |
215 |
|
cr->set_dash(std::vector<double>{ 5, 3 }, 0 /*offset*/); |
216 |
|
cr->stroke(); |
217 |
|
} |
218 |
|
|
219 |
|
// how many curves shall we draw, two or one? |
220 |
|
const int runs = (hasControllerAssigned()) ? 2 : 1; |
221 |
|
// only draw the two curves in dashed style if they're very close to each other |
222 |
|
const bool dashedCurves = (runs == 2 && controllerDepth() < 63); |
223 |
|
// draw the required amount of curves |
224 |
|
for (int run = 0; run < runs; ++run) { |
225 |
|
// setup the LFO generator with the relevant parameters |
226 |
|
lfo.setup({ |
227 |
|
.waveType = waveType(), |
228 |
|
.rangeType = (signedRange) ? LinuxSampler::LFO::range_signed : LinuxSampler::LFO::range_unsigned, |
229 |
|
.frequency = frequency(), |
230 |
|
.phase = phase(), |
231 |
|
.startLevel = startLevel(), |
232 |
|
.internalDepth = internalDepth(), |
233 |
|
.midiControllerDepth = controllerDepth(), |
234 |
|
.flipPolarity = flipPolarity(), |
235 |
|
.samplerate = w / visiblePeriods, |
236 |
|
.maxValue = (signedRange) ? h/2 : h, |
237 |
|
}); |
238 |
|
// 1st curve reflects min. CC value, 2nd curve max. CC value |
239 |
|
lfo.setMIDICtrlValue( (run == 0) ? 0 : 127 ); |
240 |
|
|
241 |
|
// the actual render/draw loop |
242 |
|
for (int x = 0; x < w ; ++x) { |
243 |
|
const float y = |
244 |
|
(signedRange) ? |
245 |
|
h/2 - lfo.render() : |
246 |
|
h - lfo.render(); |
247 |
|
if (x == 0) |
248 |
|
cr->move_to(x, y); |
249 |
|
else |
250 |
|
cr->line_to(x, y); |
251 |
|
} |
252 |
|
cr->set_line_width( (frequency() <= 4.f) ? 2 : 1 ); |
253 |
|
if (runs == 1) |
254 |
|
setOrangeColor(); |
255 |
|
else if (run == 0) |
256 |
|
setGreenColor(); |
257 |
|
else |
258 |
|
setRedColor(); |
259 |
|
if (dashedCurves) |
260 |
|
cr->set_dash(std::vector<double>{ 3, 3 }, (run == 0) ? 0 : 3 /*offset*/); |
261 |
|
else |
262 |
|
cr->set_dash(std::vector<double>(), 0 /*offset*/); |
263 |
|
cr->stroke(); |
264 |
|
} |
265 |
|
|
266 |
|
// draw text legend |
267 |
|
if (runs == 2) { |
268 |
|
setRedColor(); |
269 |
|
cr->move_to(2, 10); |
270 |
|
cr->show_text("CC Max."); |
271 |
|
|
272 |
|
setGreenColor(); |
273 |
|
cr->move_to(2, 23); |
274 |
|
cr->show_text("CC Min."); |
275 |
|
} else { // no controller assigned, internal depth only ... |
276 |
|
setOrangeColor(); |
277 |
|
cr->move_to(2, 10); |
278 |
|
cr->show_text("Const. Depth"); |
279 |
|
} |
280 |
|
// draw text legend for each second ("1s", "2s", ...) |
281 |
|
for (int period = 1; period < visiblePeriods; ++period) { |
282 |
|
int x = float(w) / float(visiblePeriods) * period; |
283 |
|
setBlackColor(); |
284 |
|
cr->move_to(x - 13, h - 3); |
285 |
|
cr->show_text(ToString(period) + "s"); |
286 |
|
} |
287 |
|
} |
288 |
|
return true; |
289 |
|
} |
290 |
|
|
291 |
|
|
292 |
EGStateOptions::EGStateOptions() : HBox(), |
EGStateOptions::EGStateOptions() : HBox(), |
293 |
label(_("May be cancelled: ")), |
label(_("May be cancelled: ")), |
294 |
checkBoxAttack(_("Attack")), |
checkBoxAttack(_("Attack")), |
323 |
)); |
)); |
324 |
} |
} |
325 |
|
|
326 |
|
void EGStateOptions::on_show_tooltips_changed() { |
327 |
|
const bool b = Settings::singleton()->showTooltips; |
328 |
|
|
329 |
|
checkBoxAttack.set_has_tooltip(b); |
330 |
|
checkBoxAttackHold.set_has_tooltip(b); |
331 |
|
checkBoxDecay1.set_has_tooltip(b); |
332 |
|
checkBoxDecay2.set_has_tooltip(b); |
333 |
|
checkBoxRelease.set_has_tooltip(b); |
334 |
|
} |
335 |
|
|
336 |
|
|
337 |
DimRegionEdit::DimRegionEdit() : |
DimRegionEdit::DimRegionEdit() : |
338 |
velocity_curve(&gig::DimensionRegion::GetVelocityAttenuation), |
velocity_curve(&gig::DimensionRegion::GetVelocityAttenuation), |
351 |
eEG1ControllerAttackInfluence(_("Controller attack influence"), 0, 3), |
eEG1ControllerAttackInfluence(_("Controller attack influence"), 0, 3), |
352 |
eEG1ControllerDecayInfluence(_("Controller decay influence"), 0, 3), |
eEG1ControllerDecayInfluence(_("Controller decay influence"), 0, 3), |
353 |
eEG1ControllerReleaseInfluence(_("Controller release influence"), 0, 3), |
eEG1ControllerReleaseInfluence(_("Controller release influence"), 0, 3), |
354 |
|
eLFO1Wave(_("Wave Form")), |
355 |
eLFO1Frequency(_("Frequency"), 0.1, 10, 2), |
eLFO1Frequency(_("Frequency"), 0.1, 10, 2), |
356 |
|
eLFO1Phase(_("Phase"), 0.0, 360.0, 2), |
357 |
eLFO1InternalDepth(_("Internal depth"), 0, 1200), |
eLFO1InternalDepth(_("Internal depth"), 0, 1200), |
358 |
eLFO1ControlDepth(_("Control depth"), 0, 1200), |
eLFO1ControlDepth(_("Control depth"), 0, 1200), |
359 |
eLFO1Controller(_("Controller")), |
eLFO1Controller(_("Controller")), |
371 |
eEG2ControllerAttackInfluence(_("Controller attack influence"), 0, 3), |
eEG2ControllerAttackInfluence(_("Controller attack influence"), 0, 3), |
372 |
eEG2ControllerDecayInfluence(_("Controller decay influence"), 0, 3), |
eEG2ControllerDecayInfluence(_("Controller decay influence"), 0, 3), |
373 |
eEG2ControllerReleaseInfluence(_("Controller release influence"), 0, 3), |
eEG2ControllerReleaseInfluence(_("Controller release influence"), 0, 3), |
374 |
|
eLFO2Wave(_("Wave Form")), |
375 |
eLFO2Frequency(_("Frequency"), 0.1, 10, 2), |
eLFO2Frequency(_("Frequency"), 0.1, 10, 2), |
376 |
|
eLFO2Phase(_("Phase"), 0.0, 360.0, 2), |
377 |
eLFO2InternalDepth(_("Internal depth"), 0, 1200), |
eLFO2InternalDepth(_("Internal depth"), 0, 1200), |
378 |
eLFO2ControlDepth(_("Control depth"), 0, 1200), |
eLFO2ControlDepth(_("Control depth"), 0, 1200), |
379 |
eLFO2Controller(_("Controller")), |
eLFO2Controller(_("Controller")), |
381 |
eLFO2Sync(_("Sync")), |
eLFO2Sync(_("Sync")), |
382 |
eEG3Attack(_("Attack"), 0, 10, 3), |
eEG3Attack(_("Attack"), 0, 10, 3), |
383 |
eEG3Depth(_("Depth"), -1200, 1200), |
eEG3Depth(_("Depth"), -1200, 1200), |
384 |
|
eLFO3Wave(_("Wave Form")), |
385 |
eLFO3Frequency(_("Frequency"), 0.1, 10, 2), |
eLFO3Frequency(_("Frequency"), 0.1, 10, 2), |
386 |
|
eLFO3Phase(_("Phase"), 0.0, 360.0, 2), |
387 |
eLFO3InternalDepth(_("Internal depth"), 0, 1200), |
eLFO3InternalDepth(_("Internal depth"), 0, 1200), |
388 |
eLFO3ControlDepth(_("Control depth"), 0, 1200), |
eLFO3ControlDepth(_("Control depth"), 0, 1200), |
389 |
eLFO3Controller(_("Controller")), |
eLFO3Controller(_("Controller")), |
390 |
|
eLFO3FlipPhase(_("Flip phase")), |
391 |
eLFO3Sync(_("Sync")), |
eLFO3Sync(_("Sync")), |
392 |
eVCFEnabled(_("Enabled")), |
eVCFEnabled(_("Enabled")), |
393 |
eVCFType(_("Type")), |
eVCFType(_("Type")), |
413 |
eCrossfade_out_start(_("Crossfade-out start")), |
eCrossfade_out_start(_("Crossfade-out start")), |
414 |
eCrossfade_out_end(_("Crossfade-out end")), |
eCrossfade_out_end(_("Crossfade-out end")), |
415 |
ePitchTrack(_("Pitch track")), |
ePitchTrack(_("Pitch track")), |
416 |
|
eSustainReleaseTrigger(_("Sustain Release Trigger")), |
417 |
|
eNoNoteOffReleaseTrigger(_("No note-off release trigger")), |
418 |
eDimensionBypass(_("Dimension bypass")), |
eDimensionBypass(_("Dimension bypass")), |
419 |
ePan(_("Pan"), -64, 63), |
ePan(_("Pan"), -64, 63), |
420 |
eSelfMask(_("Kill lower velocity voices (a.k.a \"Self mask\")")), |
eSelfMask(_("Kill lower velocity voices (a.k.a \"Self mask\")")), |
462 |
&gig::DimensionRegion::EG1ControllerDecayInfluence); |
&gig::DimensionRegion::EG1ControllerDecayInfluence); |
463 |
connect(eEG1ControllerReleaseInfluence, |
connect(eEG1ControllerReleaseInfluence, |
464 |
&gig::DimensionRegion::EG1ControllerReleaseInfluence); |
&gig::DimensionRegion::EG1ControllerReleaseInfluence); |
465 |
{ |
connect(eEG1StateOptions.checkBoxAttack, &gig::DimensionRegion::EG1Options, |
466 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.AttackCancel)); |
&gig::eg_opt_t::AttackCancel); |
467 |
connect(eEG1StateOptions.checkBoxAttack, mp.pmember); |
connect(eEG1StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG1Options, |
468 |
} |
&gig::eg_opt_t::AttackHoldCancel); |
469 |
{ |
connect(eEG1StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG1Options, |
470 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.AttackHoldCancel)); |
&gig::eg_opt_t::Decay1Cancel); |
471 |
connect(eEG1StateOptions.checkBoxAttackHold, mp.pmember); |
connect(eEG1StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG1Options, |
472 |
} |
&gig::eg_opt_t::Decay2Cancel); |
473 |
{ |
connect(eEG1StateOptions.checkBoxRelease, &gig::DimensionRegion::EG1Options, |
474 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.Decay1Cancel)); |
&gig::eg_opt_t::ReleaseCancel); |
475 |
connect(eEG1StateOptions.checkBoxDecay1, mp.pmember); |
connect(eLFO1Wave, &gig::DimensionRegion::LFO1WaveForm); |
|
} |
|
|
{ |
|
|
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.Decay2Cancel)); |
|
|
connect(eEG1StateOptions.checkBoxDecay2, mp.pmember); |
|
|
} |
|
|
{ |
|
|
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.ReleaseCancel)); |
|
|
connect(eEG1StateOptions.checkBoxRelease, mp.pmember); |
|
|
} |
|
476 |
connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); |
connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); |
477 |
|
connect(eLFO1Phase, &gig::DimensionRegion::LFO1Phase); |
478 |
connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); |
connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); |
479 |
connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); |
connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); |
480 |
connect(eLFO1Controller, &gig::DimensionRegion::LFO1Controller); |
connect(eLFO1Controller, &gig::DimensionRegion::LFO1Controller); |
495 |
&gig::DimensionRegion::EG2ControllerDecayInfluence); |
&gig::DimensionRegion::EG2ControllerDecayInfluence); |
496 |
connect(eEG2ControllerReleaseInfluence, |
connect(eEG2ControllerReleaseInfluence, |
497 |
&gig::DimensionRegion::EG2ControllerReleaseInfluence); |
&gig::DimensionRegion::EG2ControllerReleaseInfluence); |
498 |
{ |
connect(eEG2StateOptions.checkBoxAttack, &gig::DimensionRegion::EG2Options, |
499 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.AttackCancel)); |
&gig::eg_opt_t::AttackCancel); |
500 |
connect(eEG2StateOptions.checkBoxAttack, mp.pmember); |
connect(eEG2StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG2Options, |
501 |
} |
&gig::eg_opt_t::AttackHoldCancel); |
502 |
{ |
connect(eEG2StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG2Options, |
503 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.AttackHoldCancel)); |
&gig::eg_opt_t::Decay1Cancel); |
504 |
connect(eEG2StateOptions.checkBoxAttackHold, mp.pmember); |
connect(eEG2StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG2Options, |
505 |
} |
&gig::eg_opt_t::Decay2Cancel); |
506 |
{ |
connect(eEG2StateOptions.checkBoxRelease, &gig::DimensionRegion::EG2Options, |
507 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.Decay1Cancel)); |
&gig::eg_opt_t::ReleaseCancel); |
508 |
connect(eEG2StateOptions.checkBoxDecay1, mp.pmember); |
connect(eLFO2Wave, &gig::DimensionRegion::LFO2WaveForm); |
|
} |
|
|
{ |
|
|
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.Decay2Cancel)); |
|
|
connect(eEG2StateOptions.checkBoxDecay2, mp.pmember); |
|
|
} |
|
|
{ |
|
|
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.ReleaseCancel)); |
|
|
connect(eEG2StateOptions.checkBoxRelease, mp.pmember); |
|
|
} |
|
509 |
connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); |
connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); |
510 |
|
connect(eLFO2Phase, &gig::DimensionRegion::LFO2Phase); |
511 |
connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); |
connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); |
512 |
connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth); |
connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth); |
513 |
connect(eLFO2Controller, &gig::DimensionRegion::LFO2Controller); |
connect(eLFO2Controller, &gig::DimensionRegion::LFO2Controller); |
515 |
connect(eLFO2Sync, &gig::DimensionRegion::LFO2Sync); |
connect(eLFO2Sync, &gig::DimensionRegion::LFO2Sync); |
516 |
connect(eEG3Attack, &gig::DimensionRegion::EG3Attack); |
connect(eEG3Attack, &gig::DimensionRegion::EG3Attack); |
517 |
connect(eEG3Depth, &gig::DimensionRegion::EG3Depth); |
connect(eEG3Depth, &gig::DimensionRegion::EG3Depth); |
518 |
|
connect(eLFO3Wave, &gig::DimensionRegion::LFO3WaveForm); |
519 |
connect(eLFO3Frequency, &gig::DimensionRegion::LFO3Frequency); |
connect(eLFO3Frequency, &gig::DimensionRegion::LFO3Frequency); |
520 |
|
connect(eLFO3Phase, &gig::DimensionRegion::LFO3Phase); |
521 |
connect(eLFO3InternalDepth, &gig::DimensionRegion::LFO3InternalDepth); |
connect(eLFO3InternalDepth, &gig::DimensionRegion::LFO3InternalDepth); |
522 |
connect(eLFO3ControlDepth, &gig::DimensionRegion::LFO3ControlDepth); |
connect(eLFO3ControlDepth, &gig::DimensionRegion::LFO3ControlDepth); |
523 |
connect(eLFO3Controller, &gig::DimensionRegion::LFO3Controller); |
connect(eLFO3Controller, &gig::DimensionRegion::LFO3Controller); |
524 |
|
connect(eLFO3FlipPhase, &gig::DimensionRegion::LFO3FlipPhase); |
525 |
connect(eLFO3Sync, &gig::DimensionRegion::LFO3Sync); |
connect(eLFO3Sync, &gig::DimensionRegion::LFO3Sync); |
526 |
connect(eVCFEnabled, &gig::DimensionRegion::VCFEnabled); |
connect(eVCFEnabled, &gig::DimensionRegion::VCFEnabled); |
527 |
connect(eVCFType, &gig::DimensionRegion::VCFType); |
connect(eVCFType, &gig::DimensionRegion::VCFType); |
557 |
connect(eCrossfade_out_start, &DimRegionEdit::set_Crossfade_out_start); |
connect(eCrossfade_out_start, &DimRegionEdit::set_Crossfade_out_start); |
558 |
connect(eCrossfade_out_end, &DimRegionEdit::set_Crossfade_out_end); |
connect(eCrossfade_out_end, &DimRegionEdit::set_Crossfade_out_end); |
559 |
connect(ePitchTrack, &gig::DimensionRegion::PitchTrack); |
connect(ePitchTrack, &gig::DimensionRegion::PitchTrack); |
560 |
|
connect(eSustainReleaseTrigger, &gig::DimensionRegion::SustainReleaseTrigger); |
561 |
|
connect(eNoNoteOffReleaseTrigger, &gig::DimensionRegion::NoNoteOffReleaseTrigger); |
562 |
connect(eDimensionBypass, &gig::DimensionRegion::DimensionBypass); |
connect(eDimensionBypass, &gig::DimensionRegion::DimensionBypass); |
563 |
connect(ePan, &gig::DimensionRegion::Pan); |
connect(ePan, &gig::DimensionRegion::Pan); |
564 |
connect(eSelfMask, &gig::DimensionRegion::SelfMask); |
connect(eSelfMask, &gig::DimensionRegion::SelfMask); |
586 |
sigc::mem_fun(*this, &DimRegionEdit::onButtonSelectSamplePressed) |
sigc::mem_fun(*this, &DimRegionEdit::onButtonSelectSamplePressed) |
587 |
); |
); |
588 |
|
|
589 |
for (int i = 0 ; i < 7 ; i++) { |
for (int i = 0 ; i < 9 ; i++) { |
590 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
591 |
table[i] = new Gtk::Grid; |
table[i] = new Gtk::Grid; |
592 |
table[i]->set_column_spacing(7); |
table[i]->set_column_spacing(7); |
691 |
eLFO2FlipPhase.set_tip( |
eLFO2FlipPhase.set_tip( |
692 |
"Inverts the LFO's generated wave vertically." |
"Inverts the LFO's generated wave vertically." |
693 |
); |
); |
694 |
|
eLFO3FlipPhase.set_tip( |
695 |
|
"Inverts the LFO's generated wave vertically." |
696 |
|
); |
697 |
|
|
698 |
pageno = 0; |
pageno = 0; |
699 |
rowno = 0; |
rowno = 0; |
763 |
nextPage(); |
nextPage(); |
764 |
|
|
765 |
addHeader(_("Amplitude Oscillator (LFO1)")); |
addHeader(_("Amplitude Oscillator (LFO1)")); |
766 |
|
addProp(eLFO1Wave); |
767 |
addProp(eLFO1Frequency); |
addProp(eLFO1Frequency); |
768 |
|
addProp(eLFO1Phase); |
769 |
addProp(eLFO1InternalDepth); |
addProp(eLFO1InternalDepth); |
770 |
addProp(eLFO1ControlDepth); |
addProp(eLFO1ControlDepth); |
771 |
{ |
{ |
783 |
addProp(eLFO1Controller); |
addProp(eLFO1Controller); |
784 |
addProp(eLFO1FlipPhase); |
addProp(eLFO1FlipPhase); |
785 |
addProp(eLFO1Sync); |
addProp(eLFO1Sync); |
786 |
|
{ |
787 |
|
Gtk::Frame* frame = new Gtk::Frame; |
788 |
|
frame->add(lfo1Graph); |
789 |
|
// on Gtk 3 there is no margin at all by default |
790 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
791 |
|
frame->set_margin_top(12); |
792 |
|
frame->set_margin_bottom(12); |
793 |
|
#endif |
794 |
|
#if USE_GTKMM_GRID |
795 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
796 |
|
#else |
797 |
|
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
798 |
|
Gtk::SHRINK, Gtk::SHRINK); |
799 |
|
#endif |
800 |
|
rowno++; |
801 |
|
} |
802 |
|
eLFO1Wave.signal_value_changed().connect( |
803 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
804 |
|
); |
805 |
|
eLFO1Frequency.signal_value_changed().connect( |
806 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
807 |
|
); |
808 |
|
eLFO1Phase.signal_value_changed().connect( |
809 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
810 |
|
); |
811 |
|
eLFO1InternalDepth.signal_value_changed().connect( |
812 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
813 |
|
); |
814 |
|
eLFO1ControlDepth.signal_value_changed().connect( |
815 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
816 |
|
); |
817 |
|
eLFO1Controller.signal_value_changed().connect( |
818 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
819 |
|
); |
820 |
|
eLFO1FlipPhase.signal_value_changed().connect( |
821 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
822 |
|
); |
823 |
|
eLFO1Sync.signal_value_changed().connect( |
824 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
825 |
|
); |
826 |
|
|
827 |
|
nextPage(); |
828 |
|
|
829 |
addHeader(_("Crossfade")); |
addHeader(_("Crossfade")); |
830 |
addProp(eAttenuationController); |
addProp(eAttenuationController); |
831 |
addProp(eInvertAttenuationController); |
addProp(eInvertAttenuationController); |
968 |
addProp(eEG2ControllerDecayInfluence); |
addProp(eEG2ControllerDecayInfluence); |
969 |
addProp(eEG2ControllerReleaseInfluence); |
addProp(eEG2ControllerReleaseInfluence); |
970 |
addLine(eEG2StateOptions); |
addLine(eEG2StateOptions); |
971 |
|
|
972 |
|
nextPage(); |
973 |
|
|
974 |
lLFO2 = addHeader(_("Filter Cutoff Oscillator (LFO2)")); |
lLFO2 = addHeader(_("Filter Cutoff Oscillator (LFO2)")); |
975 |
|
addProp(eLFO2Wave); |
976 |
addProp(eLFO2Frequency); |
addProp(eLFO2Frequency); |
977 |
|
addProp(eLFO2Phase); |
978 |
addProp(eLFO2InternalDepth); |
addProp(eLFO2InternalDepth); |
979 |
addProp(eLFO2ControlDepth); |
addProp(eLFO2ControlDepth); |
980 |
{ |
{ |
992 |
addProp(eLFO2Controller); |
addProp(eLFO2Controller); |
993 |
addProp(eLFO2FlipPhase); |
addProp(eLFO2FlipPhase); |
994 |
addProp(eLFO2Sync); |
addProp(eLFO2Sync); |
995 |
|
{ |
996 |
|
Gtk::Frame* frame = new Gtk::Frame; |
997 |
|
frame->add(lfo2Graph); |
998 |
|
// on Gtk 3 there is no margin at all by default |
999 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1000 |
|
frame->set_margin_top(12); |
1001 |
|
frame->set_margin_bottom(12); |
1002 |
|
#endif |
1003 |
|
#if USE_GTKMM_GRID |
1004 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
1005 |
|
#else |
1006 |
|
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
1007 |
|
Gtk::SHRINK, Gtk::SHRINK); |
1008 |
|
#endif |
1009 |
|
rowno++; |
1010 |
|
} |
1011 |
|
eLFO2Wave.signal_value_changed().connect( |
1012 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1013 |
|
); |
1014 |
|
eLFO2Frequency.signal_value_changed().connect( |
1015 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1016 |
|
); |
1017 |
|
eLFO2Phase.signal_value_changed().connect( |
1018 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1019 |
|
); |
1020 |
|
eLFO2InternalDepth.signal_value_changed().connect( |
1021 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1022 |
|
); |
1023 |
|
eLFO2ControlDepth.signal_value_changed().connect( |
1024 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1025 |
|
); |
1026 |
|
eLFO2Controller.signal_value_changed().connect( |
1027 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1028 |
|
); |
1029 |
|
eLFO2FlipPhase.signal_value_changed().connect( |
1030 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1031 |
|
); |
1032 |
|
eLFO2Sync.signal_value_changed().connect( |
1033 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1034 |
|
); |
1035 |
|
|
1036 |
nextPage(); |
nextPage(); |
1037 |
|
|
1042 |
addProp(eEG3Attack); |
addProp(eEG3Attack); |
1043 |
addProp(eEG3Depth); |
addProp(eEG3Depth); |
1044 |
addHeader(_("Pitch Oscillator (LFO3)")); |
addHeader(_("Pitch Oscillator (LFO3)")); |
1045 |
|
addProp(eLFO3Wave); |
1046 |
addProp(eLFO3Frequency); |
addProp(eLFO3Frequency); |
1047 |
|
addProp(eLFO3Phase); |
1048 |
addProp(eLFO3InternalDepth); |
addProp(eLFO3InternalDepth); |
1049 |
addProp(eLFO3ControlDepth); |
addProp(eLFO3ControlDepth); |
1050 |
{ |
{ |
1060 |
eLFO3Controller.set_choices(choices, values); |
eLFO3Controller.set_choices(choices, values); |
1061 |
} |
} |
1062 |
addProp(eLFO3Controller); |
addProp(eLFO3Controller); |
1063 |
|
addProp(eLFO3FlipPhase); |
1064 |
addProp(eLFO3Sync); |
addProp(eLFO3Sync); |
1065 |
|
{ |
1066 |
|
Gtk::Frame* frame = new Gtk::Frame; |
1067 |
|
frame->add(lfo3Graph); |
1068 |
|
// on Gtk 3 there is no margin at all by default |
1069 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1070 |
|
frame->set_margin_top(12); |
1071 |
|
frame->set_margin_bottom(12); |
1072 |
|
#endif |
1073 |
|
#if USE_GTKMM_GRID |
1074 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
1075 |
|
#else |
1076 |
|
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
1077 |
|
Gtk::SHRINK, Gtk::SHRINK); |
1078 |
|
#endif |
1079 |
|
rowno++; |
1080 |
|
} |
1081 |
|
eLFO3Wave.signal_value_changed().connect( |
1082 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1083 |
|
); |
1084 |
|
eLFO3Frequency.signal_value_changed().connect( |
1085 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1086 |
|
); |
1087 |
|
eLFO3Phase.signal_value_changed().connect( |
1088 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1089 |
|
); |
1090 |
|
eLFO3InternalDepth.signal_value_changed().connect( |
1091 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1092 |
|
); |
1093 |
|
eLFO3ControlDepth.signal_value_changed().connect( |
1094 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1095 |
|
); |
1096 |
|
eLFO3Controller.signal_value_changed().connect( |
1097 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1098 |
|
); |
1099 |
|
eLFO3FlipPhase.signal_value_changed().connect( |
1100 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1101 |
|
); |
1102 |
|
eLFO3Sync.signal_value_changed().connect( |
1103 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1104 |
|
); |
1105 |
|
|
1106 |
nextPage(); |
nextPage(); |
1107 |
|
|
1160 |
|
|
1161 |
addProp(eReleaseTriggerDecay); |
addProp(eReleaseTriggerDecay); |
1162 |
{ |
{ |
1163 |
|
const char* choices[] = { _("off"), _("on (max. velocity)"), _("on (key velocity)"), 0 }; |
1164 |
|
static const gig::sust_rel_trg_t values[] = { |
1165 |
|
gig::sust_rel_trg_none, |
1166 |
|
gig::sust_rel_trg_maxvelocity, |
1167 |
|
gig::sust_rel_trg_keyvelocity |
1168 |
|
}; |
1169 |
|
eSustainReleaseTrigger.set_choices(choices, values); |
1170 |
|
} |
1171 |
|
eSustainReleaseTrigger.set_tip(_( |
1172 |
|
"By default release trigger samples are played on note-off events only. " |
1173 |
|
"This option allows to play release trigger sample on sustain pedal up " |
1174 |
|
"events as well. NOTE: This is a format extension!" |
1175 |
|
)); |
1176 |
|
addProp(eSustainReleaseTrigger); |
1177 |
|
{ |
1178 |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
1179 |
static const gig::dim_bypass_ctrl_t values[] = { |
static const gig::dim_bypass_ctrl_t values[] = { |
1180 |
gig::dim_bypass_ctrl_none, |
gig::dim_bypass_ctrl_none, |
1183 |
}; |
}; |
1184 |
eDimensionBypass.set_choices(choices, values); |
eDimensionBypass.set_choices(choices, values); |
1185 |
} |
} |
1186 |
|
eNoNoteOffReleaseTrigger.set_tip(_( |
1187 |
|
"By default release trigger samples are played on note-off events only. " |
1188 |
|
"If this option is checked, then no release trigger sample is played " |
1189 |
|
"when releasing a note. NOTE: This is a format extension!" |
1190 |
|
)); |
1191 |
|
addProp(eNoNoteOffReleaseTrigger); |
1192 |
addProp(eDimensionBypass); |
addProp(eDimensionBypass); |
1193 |
eSelfMask.widget.set_tooltip_text(_( |
eSelfMask.widget.set_tooltip_text(_( |
1194 |
"If enabled: new notes with higher velocity value will stop older " |
"If enabled: new notes with higher velocity value will stop older " |
1255 |
sigc::mem_fun(*this, &DimRegionEdit::loop_infinite_toggled)); |
sigc::mem_fun(*this, &DimRegionEdit::loop_infinite_toggled)); |
1256 |
|
|
1257 |
append_page(*table[0], _("Sample")); |
append_page(*table[0], _("Sample")); |
1258 |
append_page(*table[1], _("Amplitude (1)")); |
append_page(*table[1], _("Amp (1)")); |
1259 |
append_page(*table[2], _("Amplitude (2)")); |
append_page(*table[2], _("Amp (2)")); |
1260 |
append_page(*table[3], _("Filter (1)")); |
append_page(*table[3], _("Amp (3)")); |
1261 |
append_page(*table[4], _("Filter (2)")); |
append_page(*table[4], _("Filter (1)")); |
1262 |
append_page(*table[5], _("Pitch")); |
append_page(*table[5], _("Filter (2)")); |
1263 |
append_page(*table[6], _("Misc")); |
append_page(*table[6], _("Filter (3)")); |
1264 |
|
append_page(*table[7], _("Pitch")); |
1265 |
|
append_page(*table[8], _("Misc")); |
1266 |
|
|
1267 |
|
Settings::singleton()->showTooltips.get_proxy().signal_changed().connect( |
1268 |
|
sigc::mem_fun(*this, &DimRegionEdit::on_show_tooltips_changed) |
1269 |
|
); |
1270 |
|
|
1271 |
|
on_show_tooltips_changed(); |
1272 |
} |
} |
1273 |
|
|
1274 |
DimRegionEdit::~DimRegionEdit() |
DimRegionEdit::~DimRegionEdit() |
1376 |
return label; |
return label; |
1377 |
} |
} |
1378 |
|
|
1379 |
|
void DimRegionEdit::on_show_tooltips_changed() { |
1380 |
|
const bool b = Settings::singleton()->showTooltips; |
1381 |
|
|
1382 |
|
buttonSelectSample.set_has_tooltip(b); |
1383 |
|
buttonNullSampleReference->set_has_tooltip(b); |
1384 |
|
wSample->set_has_tooltip(b); |
1385 |
|
|
1386 |
|
eEG1StateOptions.on_show_tooltips_changed(); |
1387 |
|
eEG2StateOptions.on_show_tooltips_changed(); |
1388 |
|
|
1389 |
|
set_has_tooltip(b); |
1390 |
|
} |
1391 |
|
|
1392 |
void DimRegionEdit::nextPage() |
void DimRegionEdit::nextPage() |
1393 |
{ |
{ |
1394 |
if (firstRowInBlock < rowno - 1) |
if (firstRowInBlock < rowno - 1) |
1471 |
release_curve.set_dim_region(d); |
release_curve.set_dim_region(d); |
1472 |
cutoff_curve.set_dim_region(d); |
cutoff_curve.set_dim_region(d); |
1473 |
crossfade_curve.set_dim_region(d); |
crossfade_curve.set_dim_region(d); |
1474 |
|
lfo1Graph.set_dim_region(d); |
1475 |
|
lfo2Graph.set_dim_region(d); |
1476 |
|
lfo3Graph.set_dim_region(d); |
1477 |
|
|
1478 |
set_sensitive(d); |
set_sensitive(d); |
1479 |
if (!d) return; |
if (!d) return; |
1497 |
eEG1StateOptions.checkBoxDecay1.set_value(d->EG1Options.Decay1Cancel); |
eEG1StateOptions.checkBoxDecay1.set_value(d->EG1Options.Decay1Cancel); |
1498 |
eEG1StateOptions.checkBoxDecay2.set_value(d->EG1Options.Decay2Cancel); |
eEG1StateOptions.checkBoxDecay2.set_value(d->EG1Options.Decay2Cancel); |
1499 |
eEG1StateOptions.checkBoxRelease.set_value(d->EG1Options.ReleaseCancel); |
eEG1StateOptions.checkBoxRelease.set_value(d->EG1Options.ReleaseCancel); |
1500 |
|
eLFO1Wave.set_value(d->LFO1WaveForm); |
1501 |
eLFO1Frequency.set_value(d->LFO1Frequency); |
eLFO1Frequency.set_value(d->LFO1Frequency); |
1502 |
|
eLFO1Phase.set_value(d->LFO1Phase); |
1503 |
eLFO1InternalDepth.set_value(d->LFO1InternalDepth); |
eLFO1InternalDepth.set_value(d->LFO1InternalDepth); |
1504 |
eLFO1ControlDepth.set_value(d->LFO1ControlDepth); |
eLFO1ControlDepth.set_value(d->LFO1ControlDepth); |
1505 |
eLFO1Controller.set_value(d->LFO1Controller); |
eLFO1Controller.set_value(d->LFO1Controller); |
1522 |
eEG2StateOptions.checkBoxDecay1.set_value(d->EG2Options.Decay1Cancel); |
eEG2StateOptions.checkBoxDecay1.set_value(d->EG2Options.Decay1Cancel); |
1523 |
eEG2StateOptions.checkBoxDecay2.set_value(d->EG2Options.Decay2Cancel); |
eEG2StateOptions.checkBoxDecay2.set_value(d->EG2Options.Decay2Cancel); |
1524 |
eEG2StateOptions.checkBoxRelease.set_value(d->EG2Options.ReleaseCancel); |
eEG2StateOptions.checkBoxRelease.set_value(d->EG2Options.ReleaseCancel); |
1525 |
|
eLFO2Wave.set_value(d->LFO2WaveForm); |
1526 |
eLFO2Frequency.set_value(d->LFO2Frequency); |
eLFO2Frequency.set_value(d->LFO2Frequency); |
1527 |
|
eLFO2Phase.set_value(d->LFO2Phase); |
1528 |
eLFO2InternalDepth.set_value(d->LFO2InternalDepth); |
eLFO2InternalDepth.set_value(d->LFO2InternalDepth); |
1529 |
eLFO2ControlDepth.set_value(d->LFO2ControlDepth); |
eLFO2ControlDepth.set_value(d->LFO2ControlDepth); |
1530 |
eLFO2Controller.set_value(d->LFO2Controller); |
eLFO2Controller.set_value(d->LFO2Controller); |
1532 |
eLFO2Sync.set_value(d->LFO2Sync); |
eLFO2Sync.set_value(d->LFO2Sync); |
1533 |
eEG3Attack.set_value(d->EG3Attack); |
eEG3Attack.set_value(d->EG3Attack); |
1534 |
eEG3Depth.set_value(d->EG3Depth); |
eEG3Depth.set_value(d->EG3Depth); |
1535 |
|
eLFO3Wave.set_value(d->LFO3WaveForm); |
1536 |
eLFO3Frequency.set_value(d->LFO3Frequency); |
eLFO3Frequency.set_value(d->LFO3Frequency); |
1537 |
|
eLFO3Phase.set_value(d->LFO3Phase); |
1538 |
eLFO3InternalDepth.set_value(d->LFO3InternalDepth); |
eLFO3InternalDepth.set_value(d->LFO3InternalDepth); |
1539 |
eLFO3ControlDepth.set_value(d->LFO3ControlDepth); |
eLFO3ControlDepth.set_value(d->LFO3ControlDepth); |
1540 |
eLFO3Controller.set_value(d->LFO3Controller); |
eLFO3Controller.set_value(d->LFO3Controller); |
1541 |
|
eLFO3FlipPhase.set_value(d->LFO3FlipPhase); |
1542 |
eLFO3Sync.set_value(d->LFO3Sync); |
eLFO3Sync.set_value(d->LFO3Sync); |
1543 |
eVCFEnabled.set_value(d->VCFEnabled); |
eVCFEnabled.set_value(d->VCFEnabled); |
1544 |
eVCFType.set_value(d->VCFType); |
eVCFType.set_value(d->VCFType); |
1564 |
eCrossfade_out_start.set_value(d->Crossfade.out_start); |
eCrossfade_out_start.set_value(d->Crossfade.out_start); |
1565 |
eCrossfade_out_end.set_value(d->Crossfade.out_end); |
eCrossfade_out_end.set_value(d->Crossfade.out_end); |
1566 |
ePitchTrack.set_value(d->PitchTrack); |
ePitchTrack.set_value(d->PitchTrack); |
1567 |
|
eSustainReleaseTrigger.set_value(d->SustainReleaseTrigger); |
1568 |
|
eNoNoteOffReleaseTrigger.set_value(d->NoNoteOffReleaseTrigger); |
1569 |
eDimensionBypass.set_value(d->DimensionBypass); |
eDimensionBypass.set_value(d->DimensionBypass); |
1570 |
ePan.set_value(d->Pan); |
ePan.set_value(d->Pan); |
1571 |
eSelfMask.set_value(d->SelfMask); |
eSelfMask.set_value(d->SelfMask); |
1676 |
eEG2ControllerReleaseInfluence.set_sensitive(sensitive); |
eEG2ControllerReleaseInfluence.set_sensitive(sensitive); |
1677 |
eEG2StateOptions.set_sensitive(sensitive); |
eEG2StateOptions.set_sensitive(sensitive); |
1678 |
lLFO2->set_sensitive(sensitive); |
lLFO2->set_sensitive(sensitive); |
1679 |
|
eLFO2Wave.set_sensitive(sensitive); |
1680 |
eLFO2Frequency.set_sensitive(sensitive); |
eLFO2Frequency.set_sensitive(sensitive); |
1681 |
|
eLFO2Phase.set_sensitive(sensitive); |
1682 |
eLFO2InternalDepth.set_sensitive(sensitive); |
eLFO2InternalDepth.set_sensitive(sensitive); |
1683 |
eLFO2ControlDepth.set_sensitive(sensitive); |
eLFO2ControlDepth.set_sensitive(sensitive); |
1684 |
eLFO2Controller.set_sensitive(sensitive); |
eLFO2Controller.set_sensitive(sensitive); |
1685 |
eLFO2FlipPhase.set_sensitive(sensitive); |
eLFO2FlipPhase.set_sensitive(sensitive); |
1686 |
eLFO2Sync.set_sensitive(sensitive); |
eLFO2Sync.set_sensitive(sensitive); |
1687 |
|
lfo2Graph.set_sensitive(sensitive); |
1688 |
if (sensitive) { |
if (sensitive) { |
1689 |
VCFCutoffController_changed(); |
VCFCutoffController_changed(); |
1690 |
VCFResonanceController_changed(); |
VCFResonanceController_changed(); |
1974 |
} |
} |
1975 |
|
|
1976 |
|
|
1977 |
void DimRegionEdit::set_UnityNote(gig::DimensionRegion* d, uint8_t value) |
void DimRegionEdit::set_UnityNote(gig::DimensionRegion& d, uint8_t value) |
1978 |
{ |
{ |
1979 |
d->UnityNote = value; |
d.UnityNote = value; |
1980 |
} |
} |
1981 |
|
|
1982 |
void DimRegionEdit::set_FineTune(gig::DimensionRegion* d, int16_t value) |
void DimRegionEdit::set_FineTune(gig::DimensionRegion& d, int16_t value) |
1983 |
{ |
{ |
1984 |
d->FineTune = value; |
d.FineTune = value; |
1985 |
} |
} |
1986 |
|
|
1987 |
void DimRegionEdit::set_Crossfade_in_start(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_in_start(gig::DimensionRegion& d, |
1988 |
uint8_t value) |
uint8_t value) |
1989 |
{ |
{ |
1990 |
d->Crossfade.in_start = value; |
d.Crossfade.in_start = value; |
1991 |
if (d->Crossfade.in_end < value) set_Crossfade_in_end(d, value); |
if (d.Crossfade.in_end < value) set_Crossfade_in_end(d, value); |
1992 |
} |
} |
1993 |
|
|
1994 |
void DimRegionEdit::set_Crossfade_in_end(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_in_end(gig::DimensionRegion& d, |
1995 |
uint8_t value) |
uint8_t value) |
1996 |
{ |
{ |
1997 |
d->Crossfade.in_end = value; |
d.Crossfade.in_end = value; |
1998 |
if (value < d->Crossfade.in_start) set_Crossfade_in_start(d, value); |
if (value < d.Crossfade.in_start) set_Crossfade_in_start(d, value); |
1999 |
if (value > d->Crossfade.out_start) set_Crossfade_out_start(d, value); |
if (value > d.Crossfade.out_start) set_Crossfade_out_start(d, value); |
2000 |
} |
} |
2001 |
|
|
2002 |
void DimRegionEdit::set_Crossfade_out_start(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_out_start(gig::DimensionRegion& d, |
2003 |
uint8_t value) |
uint8_t value) |
2004 |
{ |
{ |
2005 |
d->Crossfade.out_start = value; |
d.Crossfade.out_start = value; |
2006 |
if (value < d->Crossfade.in_end) set_Crossfade_in_end(d, value); |
if (value < d.Crossfade.in_end) set_Crossfade_in_end(d, value); |
2007 |
if (value > d->Crossfade.out_end) set_Crossfade_out_end(d, value); |
if (value > d.Crossfade.out_end) set_Crossfade_out_end(d, value); |
2008 |
} |
} |
2009 |
|
|
2010 |
void DimRegionEdit::set_Crossfade_out_end(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_out_end(gig::DimensionRegion& d, |
2011 |
uint8_t value) |
uint8_t value) |
2012 |
{ |
{ |
2013 |
d->Crossfade.out_end = value; |
d.Crossfade.out_end = value; |
2014 |
if (value < d->Crossfade.out_start) set_Crossfade_out_start(d, value); |
if (value < d.Crossfade.out_start) set_Crossfade_out_start(d, value); |
2015 |
} |
} |
2016 |
|
|
2017 |
void DimRegionEdit::set_Gain(gig::DimensionRegion* d, int32_t value) |
void DimRegionEdit::set_Gain(gig::DimensionRegion& d, int32_t value) |
2018 |
{ |
{ |
2019 |
d->SetGain(value); |
d.SetGain(value); |
2020 |
} |
} |
2021 |
|
|
2022 |
void DimRegionEdit::set_LoopEnabled(gig::DimensionRegion* d, bool value) |
void DimRegionEdit::set_LoopEnabled(gig::DimensionRegion& d, bool value) |
2023 |
{ |
{ |
2024 |
if (value) { |
if (value) { |
2025 |
// create a new sample loop in case there is none yet |
// create a new sample loop in case there is none yet |
2026 |
if (!d->SampleLoops) { |
if (!d.SampleLoops) { |
2027 |
DimRegionChangeGuard(this, d); |
DimRegionChangeGuard(this, &d); |
2028 |
|
|
2029 |
DLS::sample_loop_t loop; |
DLS::sample_loop_t loop; |
2030 |
loop.LoopType = gig::loop_type_normal; |
loop.LoopType = gig::loop_type_normal; |
2031 |
// loop the whole sample by default |
// loop the whole sample by default |
2032 |
loop.LoopStart = 0; |
loop.LoopStart = 0; |
2033 |
loop.LoopLength = |
loop.LoopLength = |
2034 |
(d->pSample) ? d->pSample->SamplesTotal : 0; |
(d.pSample) ? d.pSample->SamplesTotal : 0; |
2035 |
d->AddSampleLoop(&loop); |
d.AddSampleLoop(&loop); |
2036 |
} |
} |
2037 |
} else { |
} else { |
2038 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
2039 |
DimRegionChangeGuard(this, d); |
DimRegionChangeGuard(this, &d); |
2040 |
|
|
2041 |
// delete ALL existing sample loops |
// delete ALL existing sample loops |
2042 |
while (d->SampleLoops) { |
while (d.SampleLoops) { |
2043 |
d->DeleteSampleLoop(&d->pSampleLoops[0]); |
d.DeleteSampleLoop(&d.pSampleLoops[0]); |
2044 |
} |
} |
2045 |
} |
} |
2046 |
} |
} |
2047 |
} |
} |
2048 |
|
|
2049 |
void DimRegionEdit::set_LoopType(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopType(gig::DimensionRegion& d, uint32_t value) |
2050 |
{ |
{ |
2051 |
if (d->SampleLoops) d->pSampleLoops[0].LoopType = value; |
if (d.SampleLoops) d.pSampleLoops[0].LoopType = value; |
2052 |
} |
} |
2053 |
|
|
2054 |
void DimRegionEdit::set_LoopStart(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopStart(gig::DimensionRegion& d, uint32_t value) |
2055 |
{ |
{ |
2056 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
2057 |
d->pSampleLoops[0].LoopStart = |
d.pSampleLoops[0].LoopStart = |
2058 |
d->pSample ? |
d.pSample ? |
2059 |
std::min(value, uint32_t(d->pSample->SamplesTotal - |
std::min(value, uint32_t(d.pSample->SamplesTotal - |
2060 |
d->pSampleLoops[0].LoopLength)) : |
d.pSampleLoops[0].LoopLength)) : |
2061 |
0; |
0; |
2062 |
} |
} |
2063 |
} |
} |
2064 |
|
|
2065 |
void DimRegionEdit::set_LoopLength(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopLength(gig::DimensionRegion& d, uint32_t value) |
2066 |
{ |
{ |
2067 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
2068 |
d->pSampleLoops[0].LoopLength = |
d.pSampleLoops[0].LoopLength = |
2069 |
d->pSample ? |
d.pSample ? |
2070 |
std::min(value, uint32_t(d->pSample->SamplesTotal - |
std::min(value, uint32_t(d.pSample->SamplesTotal - |
2071 |
d->pSampleLoops[0].LoopStart)) : |
d.pSampleLoops[0].LoopStart)) : |
2072 |
0; |
0; |
2073 |
} |
} |
2074 |
} |
} |
2075 |
|
|
2076 |
void DimRegionEdit::set_LoopInfinite(gig::DimensionRegion* d, bool value) |
void DimRegionEdit::set_LoopInfinite(gig::DimensionRegion& d, bool value) |
2077 |
{ |
{ |
2078 |
if (d->pSample) { |
if (d.pSample) { |
2079 |
if (value) d->pSample->LoopPlayCount = 0; |
if (value) d.pSample->LoopPlayCount = 0; |
2080 |
else if (d->pSample->LoopPlayCount == 0) d->pSample->LoopPlayCount = 1; |
else if (d.pSample->LoopPlayCount == 0) d.pSample->LoopPlayCount = 1; |
2081 |
} |
} |
2082 |
} |
} |
2083 |
|
|
2084 |
void DimRegionEdit::set_LoopPlayCount(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopPlayCount(gig::DimensionRegion& d, uint32_t value) |
2085 |
{ |
{ |
2086 |
if (d->pSample) d->pSample->LoopPlayCount = value; |
if (d.pSample) d.pSample->LoopPlayCount = value; |
2087 |
} |
} |
2088 |
|
|
2089 |
void DimRegionEdit::nullOutSampleReference() { |
void DimRegionEdit::nullOutSampleReference() { |