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 |
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")), |
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")), |
431 |
eSampleID("Sample ID"), |
eSampleID("Sample ID"), |
432 |
eChecksum("Wave Data CRC-32"), |
eChecksum("Wave Data CRC-32"), |
433 |
eFineTune(_("Fine tune"), -49, 50), |
eFineTune(_("Fine tune"), -49, 50), |
434 |
eGain(_("Gain"), -96, 0, 2, -655360), |
eGain(_("Gain (dB)"), -96, +96, 2, -655360), |
|
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
|
435 |
eSampleLoopEnabled(_("Enabled")), |
eSampleLoopEnabled(_("Enabled")), |
436 |
eSampleLoopStart(_("Loop start position")), |
eSampleLoopStart(_("Loop start position")), |
437 |
eSampleLoopLength(_("Loop size")), |
eSampleLoopLength(_("Loop size")), |
439 |
eSampleLoopInfinite(_("Infinite loop")), |
eSampleLoopInfinite(_("Infinite loop")), |
440 |
eSampleLoopPlayCount(_("Playback count"), 1), |
eSampleLoopPlayCount(_("Playback count"), 1), |
441 |
buttonSelectSample(UNICODE_LEFT_ARROW + " " + _("Select Sample")), |
buttonSelectSample(UNICODE_LEFT_ARROW + " " + _("Select Sample")), |
442 |
|
editScriptSlotsButton(_("Edit Slots ...")), |
443 |
|
dimregion(NULL), |
444 |
update_model(0) |
update_model(0) |
445 |
{ |
{ |
446 |
// make synthesis parameter page tabs scrollable |
// make synthesis parameter page tabs scrollable |
447 |
// (workaround for GTK3: default theme uses huge tabs which breaks layout) |
// (workaround for GTK3: default theme uses huge tabs which breaks layout) |
448 |
set_scrollable(); |
set_scrollable(); |
449 |
|
|
450 |
|
// use more appropriate increment/decrement steps for these spinboxes |
451 |
|
eEG1PreAttack.set_increments(0.1, 5.0); |
452 |
|
eEG2PreAttack.set_increments(0.1, 5.0); |
453 |
|
eEG1Sustain.set_increments(0.1, 5.0); |
454 |
|
eEG2Sustain.set_increments(0.1, 5.0); |
455 |
|
eLFO1Frequency.set_increments(0.02, 0.2); |
456 |
|
eLFO2Frequency.set_increments(0.02, 0.2); |
457 |
|
eLFO3Frequency.set_increments(0.02, 0.2); |
458 |
|
eLFO1Phase.set_increments(1.0, 10.0); |
459 |
|
eLFO2Phase.set_increments(1.0, 10.0); |
460 |
|
eLFO3Phase.set_increments(1.0, 10.0); |
461 |
|
|
462 |
connect(eEG1PreAttack, &gig::DimensionRegion::EG1PreAttack); |
connect(eEG1PreAttack, &gig::DimensionRegion::EG1PreAttack); |
463 |
connect(eEG1Attack, &gig::DimensionRegion::EG1Attack); |
connect(eEG1Attack, &gig::DimensionRegion::EG1Attack); |
464 |
connect(eEG1Decay1, &gig::DimensionRegion::EG1Decay1); |
connect(eEG1Decay1, &gig::DimensionRegion::EG1Decay1); |
475 |
&gig::DimensionRegion::EG1ControllerDecayInfluence); |
&gig::DimensionRegion::EG1ControllerDecayInfluence); |
476 |
connect(eEG1ControllerReleaseInfluence, |
connect(eEG1ControllerReleaseInfluence, |
477 |
&gig::DimensionRegion::EG1ControllerReleaseInfluence); |
&gig::DimensionRegion::EG1ControllerReleaseInfluence); |
478 |
{ |
connect(eEG1StateOptions.checkBoxAttack, &gig::DimensionRegion::EG1Options, |
479 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.AttackCancel)); |
&gig::eg_opt_t::AttackCancel); |
480 |
connect(eEG1StateOptions.checkBoxAttack, mp.pmember); |
connect(eEG1StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG1Options, |
481 |
} |
&gig::eg_opt_t::AttackHoldCancel); |
482 |
{ |
connect(eEG1StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG1Options, |
483 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.AttackHoldCancel)); |
&gig::eg_opt_t::Decay1Cancel); |
484 |
connect(eEG1StateOptions.checkBoxAttackHold, mp.pmember); |
connect(eEG1StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG1Options, |
485 |
} |
&gig::eg_opt_t::Decay2Cancel); |
486 |
{ |
connect(eEG1StateOptions.checkBoxRelease, &gig::DimensionRegion::EG1Options, |
487 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG1Options.Decay1Cancel)); |
&gig::eg_opt_t::ReleaseCancel); |
488 |
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); |
|
|
} |
|
489 |
connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); |
connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); |
490 |
|
connect(eLFO1Phase, &gig::DimensionRegion::LFO1Phase); |
491 |
connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); |
connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); |
492 |
connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); |
connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); |
493 |
connect(eLFO1Controller, &gig::DimensionRegion::LFO1Controller); |
connect(eLFO1Controller, &gig::DimensionRegion::LFO1Controller); |
508 |
&gig::DimensionRegion::EG2ControllerDecayInfluence); |
&gig::DimensionRegion::EG2ControllerDecayInfluence); |
509 |
connect(eEG2ControllerReleaseInfluence, |
connect(eEG2ControllerReleaseInfluence, |
510 |
&gig::DimensionRegion::EG2ControllerReleaseInfluence); |
&gig::DimensionRegion::EG2ControllerReleaseInfluence); |
511 |
{ |
connect(eEG2StateOptions.checkBoxAttack, &gig::DimensionRegion::EG2Options, |
512 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.AttackCancel)); |
&gig::eg_opt_t::AttackCancel); |
513 |
connect(eEG2StateOptions.checkBoxAttack, mp.pmember); |
connect(eEG2StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG2Options, |
514 |
} |
&gig::eg_opt_t::AttackHoldCancel); |
515 |
{ |
connect(eEG2StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG2Options, |
516 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.AttackHoldCancel)); |
&gig::eg_opt_t::Decay1Cancel); |
517 |
connect(eEG2StateOptions.checkBoxAttackHold, mp.pmember); |
connect(eEG2StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG2Options, |
518 |
} |
&gig::eg_opt_t::Decay2Cancel); |
519 |
{ |
connect(eEG2StateOptions.checkBoxRelease, &gig::DimensionRegion::EG2Options, |
520 |
ClassMemberPtr<gig::DimensionRegion, bool> mp(offsetof(gig::DimensionRegion, EG2Options.Decay1Cancel)); |
&gig::eg_opt_t::ReleaseCancel); |
521 |
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); |
|
|
} |
|
522 |
connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); |
connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); |
523 |
|
connect(eLFO2Phase, &gig::DimensionRegion::LFO2Phase); |
524 |
connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); |
connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); |
525 |
connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth); |
connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth); |
526 |
connect(eLFO2Controller, &gig::DimensionRegion::LFO2Controller); |
connect(eLFO2Controller, &gig::DimensionRegion::LFO2Controller); |
528 |
connect(eLFO2Sync, &gig::DimensionRegion::LFO2Sync); |
connect(eLFO2Sync, &gig::DimensionRegion::LFO2Sync); |
529 |
connect(eEG3Attack, &gig::DimensionRegion::EG3Attack); |
connect(eEG3Attack, &gig::DimensionRegion::EG3Attack); |
530 |
connect(eEG3Depth, &gig::DimensionRegion::EG3Depth); |
connect(eEG3Depth, &gig::DimensionRegion::EG3Depth); |
531 |
|
connect(eLFO3Wave, &gig::DimensionRegion::LFO3WaveForm); |
532 |
connect(eLFO3Frequency, &gig::DimensionRegion::LFO3Frequency); |
connect(eLFO3Frequency, &gig::DimensionRegion::LFO3Frequency); |
533 |
|
connect(eLFO3Phase, &gig::DimensionRegion::LFO3Phase); |
534 |
connect(eLFO3InternalDepth, &gig::DimensionRegion::LFO3InternalDepth); |
connect(eLFO3InternalDepth, &gig::DimensionRegion::LFO3InternalDepth); |
535 |
connect(eLFO3ControlDepth, &gig::DimensionRegion::LFO3ControlDepth); |
connect(eLFO3ControlDepth, &gig::DimensionRegion::LFO3ControlDepth); |
536 |
connect(eLFO3Controller, &gig::DimensionRegion::LFO3Controller); |
connect(eLFO3Controller, &gig::DimensionRegion::LFO3Controller); |
537 |
|
connect(eLFO3FlipPhase, &gig::DimensionRegion::LFO3FlipPhase); |
538 |
connect(eLFO3Sync, &gig::DimensionRegion::LFO3Sync); |
connect(eLFO3Sync, &gig::DimensionRegion::LFO3Sync); |
539 |
connect(eVCFEnabled, &gig::DimensionRegion::VCFEnabled); |
connect(eVCFEnabled, &gig::DimensionRegion::VCFEnabled); |
540 |
connect(eVCFType, &gig::DimensionRegion::VCFType); |
connect(eVCFType, &gig::DimensionRegion::VCFType); |
588 |
connect(eUnityNote, &DimRegionEdit::set_UnityNote); |
connect(eUnityNote, &DimRegionEdit::set_UnityNote); |
589 |
connect(eFineTune, &DimRegionEdit::set_FineTune); |
connect(eFineTune, &DimRegionEdit::set_FineTune); |
590 |
connect(eGain, &DimRegionEdit::set_Gain); |
connect(eGain, &DimRegionEdit::set_Gain); |
|
connect(eGainPlus6, &DimRegionEdit::set_Gain); |
|
591 |
connect(eSampleLoopEnabled, &DimRegionEdit::set_LoopEnabled); |
connect(eSampleLoopEnabled, &DimRegionEdit::set_LoopEnabled); |
592 |
connect(eSampleLoopType, &DimRegionEdit::set_LoopType); |
connect(eSampleLoopType, &DimRegionEdit::set_LoopType); |
593 |
connect(eSampleLoopStart, &DimRegionEdit::set_LoopStart); |
connect(eSampleLoopStart, &DimRegionEdit::set_LoopStart); |
598 |
sigc::mem_fun(*this, &DimRegionEdit::onButtonSelectSamplePressed) |
sigc::mem_fun(*this, &DimRegionEdit::onButtonSelectSamplePressed) |
599 |
); |
); |
600 |
|
|
601 |
for (int i = 0 ; i < 7 ; i++) { |
for (int i = 0; i < tableSize; i++) { |
602 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
603 |
table[i] = new Gtk::Grid; |
table[i] = new Gtk::Grid; |
604 |
table[i]->set_column_spacing(7); |
table[i]->set_column_spacing(7); |
703 |
eLFO2FlipPhase.set_tip( |
eLFO2FlipPhase.set_tip( |
704 |
"Inverts the LFO's generated wave vertically." |
"Inverts the LFO's generated wave vertically." |
705 |
); |
); |
706 |
|
eLFO3FlipPhase.set_tip( |
707 |
|
"Inverts the LFO's generated wave vertically." |
708 |
|
); |
709 |
|
|
710 |
pageno = 0; |
pageno = 0; |
711 |
rowno = 0; |
rowno = 0; |
754 |
|
|
755 |
addHeader(_("General Amplitude Settings")); |
addHeader(_("General Amplitude Settings")); |
756 |
addProp(eGain); |
addProp(eGain); |
|
addProp(eGainPlus6); |
|
757 |
addProp(ePan); |
addProp(ePan); |
758 |
addHeader(_("Amplitude Envelope (EG1)")); |
addHeader(_("Amplitude Envelope (EG1)")); |
759 |
addProp(eEG1PreAttack); |
addProp(eEG1PreAttack); |
774 |
nextPage(); |
nextPage(); |
775 |
|
|
776 |
addHeader(_("Amplitude Oscillator (LFO1)")); |
addHeader(_("Amplitude Oscillator (LFO1)")); |
777 |
|
addProp(eLFO1Wave); |
778 |
addProp(eLFO1Frequency); |
addProp(eLFO1Frequency); |
779 |
|
addProp(eLFO1Phase); |
780 |
addProp(eLFO1InternalDepth); |
addProp(eLFO1InternalDepth); |
781 |
addProp(eLFO1ControlDepth); |
addProp(eLFO1ControlDepth); |
782 |
{ |
{ |
794 |
addProp(eLFO1Controller); |
addProp(eLFO1Controller); |
795 |
addProp(eLFO1FlipPhase); |
addProp(eLFO1FlipPhase); |
796 |
addProp(eLFO1Sync); |
addProp(eLFO1Sync); |
797 |
|
{ |
798 |
|
Gtk::Frame* frame = new Gtk::Frame; |
799 |
|
frame->add(lfo1Graph); |
800 |
|
// on Gtk 3 there is no margin at all by default |
801 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
802 |
|
frame->set_margin_top(12); |
803 |
|
frame->set_margin_bottom(12); |
804 |
|
#endif |
805 |
|
#if USE_GTKMM_GRID |
806 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
807 |
|
#else |
808 |
|
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
809 |
|
Gtk::SHRINK, Gtk::SHRINK); |
810 |
|
#endif |
811 |
|
rowno++; |
812 |
|
} |
813 |
|
eLFO1Wave.signal_value_changed().connect( |
814 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
815 |
|
); |
816 |
|
eLFO1Frequency.signal_value_changed().connect( |
817 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
818 |
|
); |
819 |
|
eLFO1Phase.signal_value_changed().connect( |
820 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
821 |
|
); |
822 |
|
eLFO1InternalDepth.signal_value_changed().connect( |
823 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
824 |
|
); |
825 |
|
eLFO1ControlDepth.signal_value_changed().connect( |
826 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
827 |
|
); |
828 |
|
eLFO1Controller.signal_value_changed().connect( |
829 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
830 |
|
); |
831 |
|
eLFO1FlipPhase.signal_value_changed().connect( |
832 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
833 |
|
); |
834 |
|
eLFO1Sync.signal_value_changed().connect( |
835 |
|
sigc::mem_fun(lfo1Graph, &LFOGraph::queue_draw) |
836 |
|
); |
837 |
|
|
838 |
|
nextPage(); |
839 |
|
|
840 |
addHeader(_("Crossfade")); |
addHeader(_("Crossfade")); |
841 |
addProp(eAttenuationController); |
addProp(eAttenuationController); |
842 |
addProp(eInvertAttenuationController); |
addProp(eInvertAttenuationController); |
875 |
addHeader(_("General Filter Settings")); |
addHeader(_("General Filter Settings")); |
876 |
addProp(eVCFEnabled); |
addProp(eVCFEnabled); |
877 |
{ |
{ |
878 |
const char* choices[] = { _("lowpass"), _("lowpassturbo"), _("bandpass"), |
const char* choices[] = { |
879 |
_("highpass"), _("bandreject"), 0 }; |
_("lowpass"), _("lowpassturbo"), _("bandpass"), _("highpass"), |
880 |
|
_("bandreject"), |
881 |
|
_("lowpass 1-pole [EXT]"), |
882 |
|
_("lowpass 2-pole [EXT]"), |
883 |
|
_("lowpass 4-pole [EXT]"), |
884 |
|
_("lowpass 6-pole [EXT]"), |
885 |
|
_("highpass 1-pole [EXT]"), |
886 |
|
_("highpass 2-pole [EXT]"), |
887 |
|
_("highpass 4-pole [EXT]"), |
888 |
|
_("highpass 6-pole [EXT]"), |
889 |
|
_("bandpass 2-pole [EXT]"), |
890 |
|
_("bandreject 2-pole [EXT]"), |
891 |
|
NULL |
892 |
|
}; |
893 |
static const gig::vcf_type_t values[] = { |
static const gig::vcf_type_t values[] = { |
894 |
|
// GigaStudio original filter types |
895 |
gig::vcf_type_lowpass, |
gig::vcf_type_lowpass, |
896 |
gig::vcf_type_lowpassturbo, |
gig::vcf_type_lowpassturbo, |
897 |
gig::vcf_type_bandpass, |
gig::vcf_type_bandpass, |
898 |
gig::vcf_type_highpass, |
gig::vcf_type_highpass, |
899 |
gig::vcf_type_bandreject |
gig::vcf_type_bandreject, |
900 |
|
// LinuxSampler filter types (as gig format extension) |
901 |
|
gig::vcf_type_lowpass_1p, |
902 |
|
gig::vcf_type_lowpass_2p, |
903 |
|
gig::vcf_type_lowpass_4p, |
904 |
|
gig::vcf_type_lowpass_6p, |
905 |
|
gig::vcf_type_highpass_1p, |
906 |
|
gig::vcf_type_highpass_2p, |
907 |
|
gig::vcf_type_highpass_4p, |
908 |
|
gig::vcf_type_highpass_6p, |
909 |
|
gig::vcf_type_bandpass_2p, |
910 |
|
gig::vcf_type_bandreject_2p, |
911 |
}; |
}; |
912 |
eVCFType.set_choices(choices, values); |
eVCFType.set_choices(choices, values); |
913 |
} |
} |
1004 |
addProp(eEG2ControllerDecayInfluence); |
addProp(eEG2ControllerDecayInfluence); |
1005 |
addProp(eEG2ControllerReleaseInfluence); |
addProp(eEG2ControllerReleaseInfluence); |
1006 |
addLine(eEG2StateOptions); |
addLine(eEG2StateOptions); |
1007 |
|
|
1008 |
|
nextPage(); |
1009 |
|
|
1010 |
lLFO2 = addHeader(_("Filter Cutoff Oscillator (LFO2)")); |
lLFO2 = addHeader(_("Filter Cutoff Oscillator (LFO2)")); |
1011 |
|
addProp(eLFO2Wave); |
1012 |
addProp(eLFO2Frequency); |
addProp(eLFO2Frequency); |
1013 |
|
addProp(eLFO2Phase); |
1014 |
addProp(eLFO2InternalDepth); |
addProp(eLFO2InternalDepth); |
1015 |
addProp(eLFO2ControlDepth); |
addProp(eLFO2ControlDepth); |
1016 |
{ |
{ |
1028 |
addProp(eLFO2Controller); |
addProp(eLFO2Controller); |
1029 |
addProp(eLFO2FlipPhase); |
addProp(eLFO2FlipPhase); |
1030 |
addProp(eLFO2Sync); |
addProp(eLFO2Sync); |
1031 |
|
{ |
1032 |
|
Gtk::Frame* frame = new Gtk::Frame; |
1033 |
|
frame->add(lfo2Graph); |
1034 |
|
// on Gtk 3 there is no margin at all by default |
1035 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1036 |
|
frame->set_margin_top(12); |
1037 |
|
frame->set_margin_bottom(12); |
1038 |
|
#endif |
1039 |
|
#if USE_GTKMM_GRID |
1040 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
1041 |
|
#else |
1042 |
|
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
1043 |
|
Gtk::SHRINK, Gtk::SHRINK); |
1044 |
|
#endif |
1045 |
|
rowno++; |
1046 |
|
} |
1047 |
|
eLFO2Wave.signal_value_changed().connect( |
1048 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1049 |
|
); |
1050 |
|
eLFO2Frequency.signal_value_changed().connect( |
1051 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1052 |
|
); |
1053 |
|
eLFO2Phase.signal_value_changed().connect( |
1054 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1055 |
|
); |
1056 |
|
eLFO2InternalDepth.signal_value_changed().connect( |
1057 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1058 |
|
); |
1059 |
|
eLFO2ControlDepth.signal_value_changed().connect( |
1060 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1061 |
|
); |
1062 |
|
eLFO2Controller.signal_value_changed().connect( |
1063 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1064 |
|
); |
1065 |
|
eLFO2FlipPhase.signal_value_changed().connect( |
1066 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1067 |
|
); |
1068 |
|
eLFO2Sync.signal_value_changed().connect( |
1069 |
|
sigc::mem_fun(lfo2Graph, &LFOGraph::queue_draw) |
1070 |
|
); |
1071 |
|
|
1072 |
nextPage(); |
nextPage(); |
1073 |
|
|
1078 |
addProp(eEG3Attack); |
addProp(eEG3Attack); |
1079 |
addProp(eEG3Depth); |
addProp(eEG3Depth); |
1080 |
addHeader(_("Pitch Oscillator (LFO3)")); |
addHeader(_("Pitch Oscillator (LFO3)")); |
1081 |
|
addProp(eLFO3Wave); |
1082 |
addProp(eLFO3Frequency); |
addProp(eLFO3Frequency); |
1083 |
|
addProp(eLFO3Phase); |
1084 |
addProp(eLFO3InternalDepth); |
addProp(eLFO3InternalDepth); |
1085 |
addProp(eLFO3ControlDepth); |
addProp(eLFO3ControlDepth); |
1086 |
{ |
{ |
1096 |
eLFO3Controller.set_choices(choices, values); |
eLFO3Controller.set_choices(choices, values); |
1097 |
} |
} |
1098 |
addProp(eLFO3Controller); |
addProp(eLFO3Controller); |
1099 |
|
addProp(eLFO3FlipPhase); |
1100 |
addProp(eLFO3Sync); |
addProp(eLFO3Sync); |
1101 |
|
{ |
1102 |
|
Gtk::Frame* frame = new Gtk::Frame; |
1103 |
|
frame->add(lfo3Graph); |
1104 |
|
// on Gtk 3 there is no margin at all by default |
1105 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1106 |
|
frame->set_margin_top(12); |
1107 |
|
frame->set_margin_bottom(12); |
1108 |
|
#endif |
1109 |
|
#if USE_GTKMM_GRID |
1110 |
|
table[pageno]->attach(*frame, 1, rowno, 2); |
1111 |
|
#else |
1112 |
|
table[pageno]->attach(*frame, 1, 3, rowno, rowno + 1, |
1113 |
|
Gtk::SHRINK, Gtk::SHRINK); |
1114 |
|
#endif |
1115 |
|
rowno++; |
1116 |
|
} |
1117 |
|
eLFO3Wave.signal_value_changed().connect( |
1118 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1119 |
|
); |
1120 |
|
eLFO3Frequency.signal_value_changed().connect( |
1121 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1122 |
|
); |
1123 |
|
eLFO3Phase.signal_value_changed().connect( |
1124 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1125 |
|
); |
1126 |
|
eLFO3InternalDepth.signal_value_changed().connect( |
1127 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1128 |
|
); |
1129 |
|
eLFO3ControlDepth.signal_value_changed().connect( |
1130 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1131 |
|
); |
1132 |
|
eLFO3Controller.signal_value_changed().connect( |
1133 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1134 |
|
); |
1135 |
|
eLFO3FlipPhase.signal_value_changed().connect( |
1136 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1137 |
|
); |
1138 |
|
eLFO3Sync.signal_value_changed().connect( |
1139 |
|
sigc::mem_fun(lfo3Graph, &LFOGraph::queue_draw) |
1140 |
|
); |
1141 |
|
|
1142 |
nextPage(); |
nextPage(); |
1143 |
|
|
1290 |
eSampleLoopInfinite.signal_value_changed().connect( |
eSampleLoopInfinite.signal_value_changed().connect( |
1291 |
sigc::mem_fun(*this, &DimRegionEdit::loop_infinite_toggled)); |
sigc::mem_fun(*this, &DimRegionEdit::loop_infinite_toggled)); |
1292 |
|
|
1293 |
|
|
1294 |
|
addHeader(_("Script Patch Variables")); |
1295 |
|
|
1296 |
|
m_labelPatchVarsDescr.set_markup( |
1297 |
|
_("These are variables declared in scripts with keyword " |
1298 |
|
"<span color='#FF4FF3'><b>patch</b></span>. " |
1299 |
|
"A 'patch' variable allows to override its default value on a per " |
1300 |
|
"instrument basis. That way a script may be shared by instruments " |
1301 |
|
"while being able to fine tune certain script parameters for each " |
1302 |
|
"instrument individually if necessary. Overridden default values " |
1303 |
|
"are displayed in bold. To revert back to the script's default " |
1304 |
|
"value, select the variable(s) and hit <b>⌫</b> or " |
1305 |
|
"<b>⌦</b> key.") |
1306 |
|
); |
1307 |
|
scriptVarsDescrBox.set_spacing(13); |
1308 |
|
scriptVarsDescrBox.pack_start(m_labelPatchVarsDescr, true, true); |
1309 |
|
scriptVarsDescrBox.pack_start(editScriptSlotsButton, false, false); |
1310 |
|
#if USE_GTKMM_GRID |
1311 |
|
table[pageno]->attach(scriptVarsDescrBox, 1, rowno, 2); |
1312 |
|
#else |
1313 |
|
table[pageno]->attach(scriptVarsDescrBox, 1, 3, rowno, rowno + 1, |
1314 |
|
Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); |
1315 |
|
#endif |
1316 |
|
rowno++; |
1317 |
|
|
1318 |
|
#if GTKMM_MAJOR_VERSION >= 3 |
1319 |
|
scriptVars.set_margin_top(20); |
1320 |
|
#endif |
1321 |
|
#if USE_GTKMM_GRID |
1322 |
|
table[pageno]->attach(scriptVars, 1, rowno, 2); |
1323 |
|
#else |
1324 |
|
|
1325 |
|
table[pageno]->attach(scriptVars, 1, 3, rowno, rowno + 1, |
1326 |
|
Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL); |
1327 |
|
#endif |
1328 |
|
rowno++; |
1329 |
|
|
1330 |
|
|
1331 |
append_page(*table[0], _("Sample")); |
append_page(*table[0], _("Sample")); |
1332 |
append_page(*table[1], _("Amplitude (1)")); |
append_page(*table[1], _("Amp (1)")); |
1333 |
append_page(*table[2], _("Amplitude (2)")); |
append_page(*table[2], _("Amp (2)")); |
1334 |
append_page(*table[3], _("Filter (1)")); |
append_page(*table[3], _("Amp (3)")); |
1335 |
append_page(*table[4], _("Filter (2)")); |
append_page(*table[4], _("Filter (1)")); |
1336 |
append_page(*table[5], _("Pitch")); |
append_page(*table[5], _("Filter (2)")); |
1337 |
append_page(*table[6], _("Misc")); |
append_page(*table[6], _("Filter (3)")); |
1338 |
|
append_page(*table[7], _("Pitch")); |
1339 |
|
append_page(*table[8], _("Misc")); |
1340 |
|
append_page(*table[9], _("Script")); |
1341 |
|
|
1342 |
Settings::singleton()->showTooltips.get_proxy().signal_changed().connect( |
Settings::singleton()->showTooltips.get_proxy().signal_changed().connect( |
1343 |
sigc::mem_fun(*this, &DimRegionEdit::on_show_tooltips_changed) |
sigc::mem_fun(*this, &DimRegionEdit::on_show_tooltips_changed) |
1492 |
rowno++; |
rowno++; |
1493 |
} |
} |
1494 |
|
|
|
void DimRegionEdit::addProp(BoolEntryPlus6& boolentry) |
|
|
{ |
|
|
#if USE_GTKMM_GRID |
|
|
table[pageno]->attach(boolentry.widget, 1, rowno, 2); |
|
|
#else |
|
|
table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1, |
|
|
Gtk::FILL, Gtk::SHRINK); |
|
|
#endif |
|
|
rowno++; |
|
|
} |
|
|
|
|
1495 |
void DimRegionEdit::addProp(LabelWidget& prop) |
void DimRegionEdit::addProp(LabelWidget& prop) |
1496 |
{ |
{ |
1497 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
1535 |
release_curve.set_dim_region(d); |
release_curve.set_dim_region(d); |
1536 |
cutoff_curve.set_dim_region(d); |
cutoff_curve.set_dim_region(d); |
1537 |
crossfade_curve.set_dim_region(d); |
crossfade_curve.set_dim_region(d); |
1538 |
|
lfo1Graph.set_dim_region(d); |
1539 |
|
lfo2Graph.set_dim_region(d); |
1540 |
|
lfo3Graph.set_dim_region(d); |
1541 |
|
|
1542 |
set_sensitive(d); |
set_sensitive(d); |
1543 |
if (!d) return; |
if (!d) return; |
1561 |
eEG1StateOptions.checkBoxDecay1.set_value(d->EG1Options.Decay1Cancel); |
eEG1StateOptions.checkBoxDecay1.set_value(d->EG1Options.Decay1Cancel); |
1562 |
eEG1StateOptions.checkBoxDecay2.set_value(d->EG1Options.Decay2Cancel); |
eEG1StateOptions.checkBoxDecay2.set_value(d->EG1Options.Decay2Cancel); |
1563 |
eEG1StateOptions.checkBoxRelease.set_value(d->EG1Options.ReleaseCancel); |
eEG1StateOptions.checkBoxRelease.set_value(d->EG1Options.ReleaseCancel); |
1564 |
|
eLFO1Wave.set_value(d->LFO1WaveForm); |
1565 |
eLFO1Frequency.set_value(d->LFO1Frequency); |
eLFO1Frequency.set_value(d->LFO1Frequency); |
1566 |
|
eLFO1Phase.set_value(d->LFO1Phase); |
1567 |
eLFO1InternalDepth.set_value(d->LFO1InternalDepth); |
eLFO1InternalDepth.set_value(d->LFO1InternalDepth); |
1568 |
eLFO1ControlDepth.set_value(d->LFO1ControlDepth); |
eLFO1ControlDepth.set_value(d->LFO1ControlDepth); |
1569 |
eLFO1Controller.set_value(d->LFO1Controller); |
eLFO1Controller.set_value(d->LFO1Controller); |
1586 |
eEG2StateOptions.checkBoxDecay1.set_value(d->EG2Options.Decay1Cancel); |
eEG2StateOptions.checkBoxDecay1.set_value(d->EG2Options.Decay1Cancel); |
1587 |
eEG2StateOptions.checkBoxDecay2.set_value(d->EG2Options.Decay2Cancel); |
eEG2StateOptions.checkBoxDecay2.set_value(d->EG2Options.Decay2Cancel); |
1588 |
eEG2StateOptions.checkBoxRelease.set_value(d->EG2Options.ReleaseCancel); |
eEG2StateOptions.checkBoxRelease.set_value(d->EG2Options.ReleaseCancel); |
1589 |
|
eLFO2Wave.set_value(d->LFO2WaveForm); |
1590 |
eLFO2Frequency.set_value(d->LFO2Frequency); |
eLFO2Frequency.set_value(d->LFO2Frequency); |
1591 |
|
eLFO2Phase.set_value(d->LFO2Phase); |
1592 |
eLFO2InternalDepth.set_value(d->LFO2InternalDepth); |
eLFO2InternalDepth.set_value(d->LFO2InternalDepth); |
1593 |
eLFO2ControlDepth.set_value(d->LFO2ControlDepth); |
eLFO2ControlDepth.set_value(d->LFO2ControlDepth); |
1594 |
eLFO2Controller.set_value(d->LFO2Controller); |
eLFO2Controller.set_value(d->LFO2Controller); |
1596 |
eLFO2Sync.set_value(d->LFO2Sync); |
eLFO2Sync.set_value(d->LFO2Sync); |
1597 |
eEG3Attack.set_value(d->EG3Attack); |
eEG3Attack.set_value(d->EG3Attack); |
1598 |
eEG3Depth.set_value(d->EG3Depth); |
eEG3Depth.set_value(d->EG3Depth); |
1599 |
|
eLFO3Wave.set_value(d->LFO3WaveForm); |
1600 |
eLFO3Frequency.set_value(d->LFO3Frequency); |
eLFO3Frequency.set_value(d->LFO3Frequency); |
1601 |
|
eLFO3Phase.set_value(d->LFO3Phase); |
1602 |
eLFO3InternalDepth.set_value(d->LFO3InternalDepth); |
eLFO3InternalDepth.set_value(d->LFO3InternalDepth); |
1603 |
eLFO3ControlDepth.set_value(d->LFO3ControlDepth); |
eLFO3ControlDepth.set_value(d->LFO3ControlDepth); |
1604 |
eLFO3Controller.set_value(d->LFO3Controller); |
eLFO3Controller.set_value(d->LFO3Controller); |
1605 |
|
eLFO3FlipPhase.set_value(d->LFO3FlipPhase); |
1606 |
eLFO3Sync.set_value(d->LFO3Sync); |
eLFO3Sync.set_value(d->LFO3Sync); |
1607 |
eVCFEnabled.set_value(d->VCFEnabled); |
eVCFEnabled.set_value(d->VCFEnabled); |
1608 |
eVCFType.set_value(d->VCFType); |
eVCFType.set_value(d->VCFType); |
1692 |
buttonSelectSample.set_sensitive(d && d->pSample); |
buttonSelectSample.set_sensitive(d && d->pSample); |
1693 |
eFineTune.set_value(d->FineTune); |
eFineTune.set_value(d->FineTune); |
1694 |
eGain.set_value(d->Gain); |
eGain.set_value(d->Gain); |
|
eGainPlus6.set_value(d->Gain); |
|
1695 |
eSampleLoopEnabled.set_value(d->SampleLoops); |
eSampleLoopEnabled.set_value(d->SampleLoops); |
1696 |
eSampleLoopType.set_value( |
eSampleLoopType.set_value( |
1697 |
d->SampleLoops ? d->pSampleLoops[0].LoopType : 0); |
d->SampleLoops ? d->pSampleLoops[0].LoopType : 0); |
1708 |
wSample->set_text(d->pSample ? gig_to_utf8(d->pSample->pInfo->Name) : |
wSample->set_text(d->pSample ? gig_to_utf8(d->pSample->pInfo->Name) : |
1709 |
_("NULL")); |
_("NULL")); |
1710 |
|
|
1711 |
|
scriptVars.setInstrument( |
1712 |
|
(gig::Instrument*) d->GetParent()->GetParent() |
1713 |
|
); |
1714 |
|
|
1715 |
update_loop_elements(); |
update_loop_elements(); |
1716 |
VCFEnabled_toggled(); |
VCFEnabled_toggled(); |
1717 |
} |
} |
1743 |
eEG2ControllerReleaseInfluence.set_sensitive(sensitive); |
eEG2ControllerReleaseInfluence.set_sensitive(sensitive); |
1744 |
eEG2StateOptions.set_sensitive(sensitive); |
eEG2StateOptions.set_sensitive(sensitive); |
1745 |
lLFO2->set_sensitive(sensitive); |
lLFO2->set_sensitive(sensitive); |
1746 |
|
eLFO2Wave.set_sensitive(sensitive); |
1747 |
eLFO2Frequency.set_sensitive(sensitive); |
eLFO2Frequency.set_sensitive(sensitive); |
1748 |
|
eLFO2Phase.set_sensitive(sensitive); |
1749 |
eLFO2InternalDepth.set_sensitive(sensitive); |
eLFO2InternalDepth.set_sensitive(sensitive); |
1750 |
eLFO2ControlDepth.set_sensitive(sensitive); |
eLFO2ControlDepth.set_sensitive(sensitive); |
1751 |
eLFO2Controller.set_sensitive(sensitive); |
eLFO2Controller.set_sensitive(sensitive); |
1752 |
eLFO2FlipPhase.set_sensitive(sensitive); |
eLFO2FlipPhase.set_sensitive(sensitive); |
1753 |
eLFO2Sync.set_sensitive(sensitive); |
eLFO2Sync.set_sensitive(sensitive); |
1754 |
|
lfo2Graph.set_sensitive(sensitive); |
1755 |
if (sensitive) { |
if (sensitive) { |
1756 |
VCFCutoffController_changed(); |
VCFCutoffController_changed(); |
1757 |
VCFResonanceController_changed(); |
VCFResonanceController_changed(); |
2041 |
} |
} |
2042 |
|
|
2043 |
|
|
2044 |
void DimRegionEdit::set_UnityNote(gig::DimensionRegion* d, uint8_t value) |
void DimRegionEdit::set_UnityNote(gig::DimensionRegion& d, uint8_t value) |
2045 |
{ |
{ |
2046 |
d->UnityNote = value; |
d.UnityNote = value; |
2047 |
} |
} |
2048 |
|
|
2049 |
void DimRegionEdit::set_FineTune(gig::DimensionRegion* d, int16_t value) |
void DimRegionEdit::set_FineTune(gig::DimensionRegion& d, int16_t value) |
2050 |
{ |
{ |
2051 |
d->FineTune = value; |
d.FineTune = value; |
2052 |
} |
} |
2053 |
|
|
2054 |
void DimRegionEdit::set_Crossfade_in_start(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_in_start(gig::DimensionRegion& d, |
2055 |
uint8_t value) |
uint8_t value) |
2056 |
{ |
{ |
2057 |
d->Crossfade.in_start = value; |
d.Crossfade.in_start = value; |
2058 |
if (d->Crossfade.in_end < value) set_Crossfade_in_end(d, value); |
if (d.Crossfade.in_end < value) set_Crossfade_in_end(d, value); |
2059 |
} |
} |
2060 |
|
|
2061 |
void DimRegionEdit::set_Crossfade_in_end(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_in_end(gig::DimensionRegion& d, |
2062 |
uint8_t value) |
uint8_t value) |
2063 |
{ |
{ |
2064 |
d->Crossfade.in_end = value; |
d.Crossfade.in_end = value; |
2065 |
if (value < d->Crossfade.in_start) set_Crossfade_in_start(d, value); |
if (value < d.Crossfade.in_start) set_Crossfade_in_start(d, value); |
2066 |
if (value > d->Crossfade.out_start) set_Crossfade_out_start(d, value); |
if (value > d.Crossfade.out_start) set_Crossfade_out_start(d, value); |
2067 |
} |
} |
2068 |
|
|
2069 |
void DimRegionEdit::set_Crossfade_out_start(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_out_start(gig::DimensionRegion& d, |
2070 |
uint8_t value) |
uint8_t value) |
2071 |
{ |
{ |
2072 |
d->Crossfade.out_start = value; |
d.Crossfade.out_start = value; |
2073 |
if (value < d->Crossfade.in_end) set_Crossfade_in_end(d, value); |
if (value < d.Crossfade.in_end) set_Crossfade_in_end(d, value); |
2074 |
if (value > d->Crossfade.out_end) set_Crossfade_out_end(d, value); |
if (value > d.Crossfade.out_end) set_Crossfade_out_end(d, value); |
2075 |
} |
} |
2076 |
|
|
2077 |
void DimRegionEdit::set_Crossfade_out_end(gig::DimensionRegion* d, |
void DimRegionEdit::set_Crossfade_out_end(gig::DimensionRegion& d, |
2078 |
uint8_t value) |
uint8_t value) |
2079 |
{ |
{ |
2080 |
d->Crossfade.out_end = value; |
d.Crossfade.out_end = value; |
2081 |
if (value < d->Crossfade.out_start) set_Crossfade_out_start(d, value); |
if (value < d.Crossfade.out_start) set_Crossfade_out_start(d, value); |
2082 |
} |
} |
2083 |
|
|
2084 |
void DimRegionEdit::set_Gain(gig::DimensionRegion* d, int32_t value) |
void DimRegionEdit::set_Gain(gig::DimensionRegion& d, int32_t value) |
2085 |
{ |
{ |
2086 |
d->SetGain(value); |
d.SetGain(value); |
2087 |
} |
} |
2088 |
|
|
2089 |
void DimRegionEdit::set_LoopEnabled(gig::DimensionRegion* d, bool value) |
void DimRegionEdit::set_LoopEnabled(gig::DimensionRegion& d, bool value) |
2090 |
{ |
{ |
2091 |
if (value) { |
if (value) { |
2092 |
// create a new sample loop in case there is none yet |
// create a new sample loop in case there is none yet |
2093 |
if (!d->SampleLoops) { |
if (!d.SampleLoops) { |
2094 |
DimRegionChangeGuard(this, d); |
DimRegionChangeGuard(this, &d); |
2095 |
|
|
2096 |
DLS::sample_loop_t loop; |
DLS::sample_loop_t loop; |
2097 |
loop.LoopType = gig::loop_type_normal; |
loop.LoopType = gig::loop_type_normal; |
2098 |
// loop the whole sample by default |
// loop the whole sample by default |
2099 |
loop.LoopStart = 0; |
loop.LoopStart = 0; |
2100 |
loop.LoopLength = |
loop.LoopLength = |
2101 |
(d->pSample) ? d->pSample->SamplesTotal : 0; |
(d.pSample) ? d.pSample->SamplesTotal : 0; |
2102 |
d->AddSampleLoop(&loop); |
d.AddSampleLoop(&loop); |
2103 |
} |
} |
2104 |
} else { |
} else { |
2105 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
2106 |
DimRegionChangeGuard(this, d); |
DimRegionChangeGuard(this, &d); |
2107 |
|
|
2108 |
// delete ALL existing sample loops |
// delete ALL existing sample loops |
2109 |
while (d->SampleLoops) { |
while (d.SampleLoops) { |
2110 |
d->DeleteSampleLoop(&d->pSampleLoops[0]); |
d.DeleteSampleLoop(&d.pSampleLoops[0]); |
2111 |
} |
} |
2112 |
} |
} |
2113 |
} |
} |
2114 |
} |
} |
2115 |
|
|
2116 |
void DimRegionEdit::set_LoopType(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopType(gig::DimensionRegion& d, uint32_t value) |
2117 |
{ |
{ |
2118 |
if (d->SampleLoops) d->pSampleLoops[0].LoopType = value; |
if (d.SampleLoops) d.pSampleLoops[0].LoopType = value; |
2119 |
} |
} |
2120 |
|
|
2121 |
void DimRegionEdit::set_LoopStart(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopStart(gig::DimensionRegion& d, uint32_t value) |
2122 |
{ |
{ |
2123 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
2124 |
d->pSampleLoops[0].LoopStart = |
d.pSampleLoops[0].LoopStart = |
2125 |
d->pSample ? |
d.pSample ? |
2126 |
std::min(value, uint32_t(d->pSample->SamplesTotal - |
std::min(value, uint32_t(d.pSample->SamplesTotal - |
2127 |
d->pSampleLoops[0].LoopLength)) : |
d.pSampleLoops[0].LoopLength)) : |
2128 |
0; |
0; |
2129 |
} |
} |
2130 |
} |
} |
2131 |
|
|
2132 |
void DimRegionEdit::set_LoopLength(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopLength(gig::DimensionRegion& d, uint32_t value) |
2133 |
{ |
{ |
2134 |
if (d->SampleLoops) { |
if (d.SampleLoops) { |
2135 |
d->pSampleLoops[0].LoopLength = |
d.pSampleLoops[0].LoopLength = |
2136 |
d->pSample ? |
d.pSample ? |
2137 |
std::min(value, uint32_t(d->pSample->SamplesTotal - |
std::min(value, uint32_t(d.pSample->SamplesTotal - |
2138 |
d->pSampleLoops[0].LoopStart)) : |
d.pSampleLoops[0].LoopStart)) : |
2139 |
0; |
0; |
2140 |
} |
} |
2141 |
} |
} |
2142 |
|
|
2143 |
void DimRegionEdit::set_LoopInfinite(gig::DimensionRegion* d, bool value) |
void DimRegionEdit::set_LoopInfinite(gig::DimensionRegion& d, bool value) |
2144 |
{ |
{ |
2145 |
if (d->pSample) { |
if (d.pSample) { |
2146 |
if (value) d->pSample->LoopPlayCount = 0; |
if (value) d.pSample->LoopPlayCount = 0; |
2147 |
else if (d->pSample->LoopPlayCount == 0) d->pSample->LoopPlayCount = 1; |
else if (d.pSample->LoopPlayCount == 0) d.pSample->LoopPlayCount = 1; |
2148 |
} |
} |
2149 |
} |
} |
2150 |
|
|
2151 |
void DimRegionEdit::set_LoopPlayCount(gig::DimensionRegion* d, uint32_t value) |
void DimRegionEdit::set_LoopPlayCount(gig::DimensionRegion& d, uint32_t value) |
2152 |
{ |
{ |
2153 |
if (d->pSample) d->pSample->LoopPlayCount = value; |
if (d.pSample) d.pSample->LoopPlayCount = value; |
2154 |
} |
} |
2155 |
|
|
2156 |
void DimRegionEdit::nullOutSampleReference() { |
void DimRegionEdit::nullOutSampleReference() { |