1 |
/* |
/* |
2 |
* Copyright (C) 2006-2008 Andreas Persson |
* Copyright (C) 2006-2009 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 |
22 |
#include "global.h" |
#include "global.h" |
23 |
|
|
24 |
DimRegionEdit::DimRegionEdit() : |
DimRegionEdit::DimRegionEdit() : |
25 |
eEG1PreAttack("Pre-attack", 0, 100, 2), |
eEG1PreAttack(_("Pre-attack"), 0, 100, 2), |
26 |
eEG1Attack("Attack", 0, 60, 3), |
eEG1Attack(_("Attack"), 0, 60, 3), |
27 |
eEG1Decay1("Decay 1", 0.005, 60, 3), |
eEG1Decay1(_("Decay 1"), 0.005, 60, 3), |
28 |
eEG1Decay2("Decay 2", 0, 60, 3), |
eEG1Decay2(_("Decay 2"), 0, 60, 3), |
29 |
eEG1InfiniteSustain("Infinite sustain"), |
eEG1InfiniteSustain(_("Infinite sustain")), |
30 |
eEG1Sustain("Sustain", 0, 100, 2), |
eEG1Sustain(_("Sustain"), 0, 100, 2), |
31 |
eEG1Release("Release", 0, 60, 3), |
eEG1Release(_("Release"), 0, 60, 3), |
32 |
eEG1Hold("Hold"), |
eEG1Hold(_("Hold")), |
33 |
eEG1Controller("Controller"), |
eEG1Controller(_("Controller")), |
34 |
eEG1ControllerInvert("Controller invert"), |
eEG1ControllerInvert(_("Controller invert")), |
35 |
eEG1ControllerAttackInfluence("Controller attack influence", 0, 3), |
eEG1ControllerAttackInfluence(_("Controller attack influence"), 0, 3), |
36 |
eEG1ControllerDecayInfluence("Controller decay influence", 0, 3), |
eEG1ControllerDecayInfluence(_("Controller decay influence"), 0, 3), |
37 |
eEG1ControllerReleaseInfluence("Controller release influence", 0, 3), |
eEG1ControllerReleaseInfluence(_("Controller release influence"), 0, 3), |
38 |
eLFO1Frequency("Frequency", 0.1, 10, 2), |
eLFO1Frequency(_("Frequency"), 0.1, 10, 2), |
39 |
eLFO1InternalDepth("Internal depth", 0, 1200), |
eLFO1InternalDepth(_("Internal depth"), 0, 1200), |
40 |
eLFO1ControlDepth("Control depth", 0, 1200), |
eLFO1ControlDepth(_("Control depth"), 0, 1200), |
41 |
eLFO1Controller("Controller"), |
eLFO1Controller(_("Controller")), |
42 |
eLFO1FlipPhase("Flip phase"), |
eLFO1FlipPhase(_("Flip phase")), |
43 |
eLFO1Sync("Sync"), |
eLFO1Sync(_("Sync")), |
44 |
eEG2PreAttack("Pre-attack", 0, 100, 2), |
eEG2PreAttack(_("Pre-attack"), 0, 100, 2), |
45 |
eEG2Attack("Attack", 0, 60, 3), |
eEG2Attack(_("Attack"), 0, 60, 3), |
46 |
eEG2Decay1("Decay 1", 0.005, 60, 3), |
eEG2Decay1(_("Decay 1"), 0.005, 60, 3), |
47 |
eEG2Decay2("Decay 2", 0, 60, 3), |
eEG2Decay2(_("Decay 2"), 0, 60, 3), |
48 |
eEG2InfiniteSustain("Infinite sustain"), |
eEG2InfiniteSustain(_("Infinite sustain")), |
49 |
eEG2Sustain("Sustain", 0, 100, 2), |
eEG2Sustain(_("Sustain"), 0, 100, 2), |
50 |
eEG2Release("Release", 0, 60, 3), |
eEG2Release(_("Release"), 0, 60, 3), |
51 |
eEG2Controller("Controller"), |
eEG2Controller(_("Controller")), |
52 |
eEG2ControllerInvert("Controller invert"), |
eEG2ControllerInvert(_("Controller invert")), |
53 |
eEG2ControllerAttackInfluence("Controller attack influence", 0, 3), |
eEG2ControllerAttackInfluence(_("Controller attack influence"), 0, 3), |
54 |
eEG2ControllerDecayInfluence("Controller decay influence", 0, 3), |
eEG2ControllerDecayInfluence(_("Controller decay influence"), 0, 3), |
55 |
eEG2ControllerReleaseInfluence("Controller release influence", 0, 3), |
eEG2ControllerReleaseInfluence(_("Controller release influence"), 0, 3), |
56 |
eLFO2Frequency("Frequency", 0.1, 10, 2), |
eLFO2Frequency(_("Frequency"), 0.1, 10, 2), |
57 |
eLFO2InternalDepth("Internal depth", 0, 1200), |
eLFO2InternalDepth(_("Internal depth"), 0, 1200), |
58 |
eLFO2ControlDepth("Control depth", 0, 1200), |
eLFO2ControlDepth(_("Control depth"), 0, 1200), |
59 |
eLFO2Controller("Controller"), |
eLFO2Controller(_("Controller")), |
60 |
eLFO2FlipPhase("Flip phase"), |
eLFO2FlipPhase(_("Flip phase")), |
61 |
eLFO2Sync("Sync"), |
eLFO2Sync(_("Sync")), |
62 |
eEG3Attack("Attack", 0, 10, 3), |
eEG3Attack(_("Attack"), 0, 10, 3), |
63 |
eEG3Depth("Depth", -1200, 1200), |
eEG3Depth(_("Depth"), -1200, 1200), |
64 |
eLFO3Frequency("Frequency", 0.1, 10, 2), |
eLFO3Frequency(_("Frequency"), 0.1, 10, 2), |
65 |
eLFO3InternalDepth("Internal depth", 0, 1200), |
eLFO3InternalDepth(_("Internal depth"), 0, 1200), |
66 |
eLFO3ControlDepth("Control depth", 0, 1200), |
eLFO3ControlDepth(_("Control depth"), 0, 1200), |
67 |
eLFO3Controller("Controller"), |
eLFO3Controller(_("Controller")), |
68 |
eLFO3Sync("Sync"), |
eLFO3Sync(_("Sync")), |
69 |
eVCFEnabled("Enabled"), |
eVCFEnabled(_("Enabled")), |
70 |
eVCFType("Type"), |
eVCFType(_("Type")), |
71 |
eVCFCutoffController("Cutoff controller"), |
eVCFCutoffController(_("Cutoff controller")), |
72 |
eVCFCutoffControllerInvert("Cutoff controller invert"), |
eVCFCutoffControllerInvert(_("Cutoff controller invert")), |
73 |
eVCFCutoff("Cutoff"), |
eVCFCutoff(_("Cutoff")), |
74 |
eVCFVelocityCurve("Velocity curve"), |
eVCFVelocityCurve(_("Velocity curve")), |
75 |
eVCFVelocityScale("Velocity scale"), |
eVCFVelocityScale(_("Velocity scale")), |
76 |
eVCFVelocityDynamicRange("Velocity dynamic range", 0, 4), |
eVCFVelocityDynamicRange(_("Velocity dynamic range"), 0, 4), |
77 |
eVCFResonance("Resonance"), |
eVCFResonance(_("Resonance")), |
78 |
eVCFResonanceDynamic("Resonance dynamic"), |
eVCFResonanceDynamic(_("Resonance dynamic")), |
79 |
eVCFResonanceController("Resonance controller"), |
eVCFResonanceController(_("Resonance controller")), |
80 |
eVCFKeyboardTracking("Keyboard tracking"), |
eVCFKeyboardTracking(_("Keyboard tracking")), |
81 |
eVCFKeyboardTrackingBreakpoint("Keyboard tracking breakpoint"), |
eVCFKeyboardTrackingBreakpoint(_("Keyboard tracking breakpoint")), |
82 |
eVelocityResponseCurve("Velocity response curve"), |
eVelocityResponseCurve(_("Velocity response curve")), |
83 |
eVelocityResponseDepth("Velocity response depth", 0, 4), |
eVelocityResponseDepth(_("Velocity response depth"), 0, 4), |
84 |
eVelocityResponseCurveScaling("Velocity response curve scaling"), |
eVelocityResponseCurveScaling(_("Velocity response curve scaling")), |
85 |
eReleaseVelocityResponseCurve("Release velocity response curve"), |
eReleaseVelocityResponseCurve(_("Release velocity response curve")), |
86 |
eReleaseVelocityResponseDepth("Release velocity response depth", 0, 4), |
eReleaseVelocityResponseDepth(_("Release velocity response depth"), 0, 4), |
87 |
eReleaseTriggerDecay("Release trigger decay", 0, 8), |
eReleaseTriggerDecay(_("Release trigger decay"), 0, 8), |
88 |
eCrossfade_in_start("Crossfade-in start"), |
eCrossfade_in_start(_("Crossfade-in start")), |
89 |
eCrossfade_in_end("Crossfade-in end"), |
eCrossfade_in_end(_("Crossfade-in end")), |
90 |
eCrossfade_out_start("Crossfade-out start"), |
eCrossfade_out_start(_("Crossfade-out start")), |
91 |
eCrossfade_out_end("Crossfade-out end"), |
eCrossfade_out_end(_("Crossfade-out end")), |
92 |
ePitchTrack("Pitch track"), |
ePitchTrack(_("Pitch track")), |
93 |
eDimensionBypass("Dimension bypass"), |
eDimensionBypass(_("Dimension bypass")), |
94 |
ePan("Pan", -64, 63), |
ePan(_("Pan"), -64, 63), |
95 |
eSelfMask("Self mask"), |
eSelfMask(_("Self mask")), |
96 |
eAttenuationController("Attenuation controller"), |
eAttenuationController(_("Attenuation controller")), |
97 |
eInvertAttenuationController("Invert attenuation controller"), |
eInvertAttenuationController(_("Invert attenuation controller")), |
98 |
eAttenuationControllerThreshold("Attenuation controller threshold"), |
eAttenuationControllerThreshold(_("Attenuation controller threshold")), |
99 |
eChannelOffset("Channel offset", 0, 9), |
eChannelOffset(_("Channel offset"), 0, 9), |
100 |
eSustainDefeat("Sustain defeat"), |
eSustainDefeat(_("Sustain defeat")), |
101 |
eMSDecode("MS decode"), |
eMSDecode(_("MS decode")), |
102 |
eSampleStartOffset("Sample start offset", 0, 2000), |
eSampleStartOffset(_("Sample start offset"), 0, 2000), |
103 |
eUnityNote("Unity note"), |
eUnityNote(_("Unity note")), |
104 |
eFineTune("Fine tune", -49, 50), |
eFineTune(_("Fine tune"), -49, 50), |
105 |
eGain("Gain", -96, 0, 2, -655360), |
eGain(_("Gain"), -96, 0, 2, -655360), |
106 |
eGainPlus6("Gain +6dB", eGain, 6 * -655360), |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
107 |
eSampleLoopEnabled("Enabled"), |
eSampleLoopEnabled(_("Enabled")), |
108 |
eSampleLoopStart("Loop start positon"), |
eSampleLoopStart(_("Loop start positon")), |
109 |
eSampleLoopLength("Loop size"), |
eSampleLoopLength(_("Loop size")), |
110 |
eSampleLoopType("Loop type"), |
eSampleLoopType(_("Loop type")), |
111 |
eSampleLoopInfinite("Infinite loop"), |
eSampleLoopInfinite(_("Infinite loop")), |
112 |
eSampleLoopPlayCount("Playback count", 1), |
eSampleLoopPlayCount(_("Playback count"), 1), |
113 |
update_model(0) |
update_model(0) |
114 |
{ |
{ |
115 |
connect(eEG1PreAttack, &gig::DimensionRegion::EG1PreAttack); |
connect(eEG1PreAttack, &gig::DimensionRegion::EG1PreAttack); |
265 |
firstRowInBlock = 0; |
firstRowInBlock = 0; |
266 |
|
|
267 |
addHeader(_("Mandatory Settings")); |
addHeader(_("Mandatory Settings")); |
268 |
addString("Sample", lSample, wSample); |
addString(_("Sample"), lSample, wSample); |
269 |
//TODO: the following would break drag&drop: wSample->property_editable().set_value(false); or this: wSample->set_editable(false); |
//TODO: the following would break drag&drop: wSample->property_editable().set_value(false); or this: wSample->set_editable(false); |
270 |
tooltips.set_tip(*wSample, _("Drop a sample here")); |
tooltips.set_tip(*wSample, _("Drop a sample here")); |
271 |
addProp(eUnityNote); |
addProp(eUnityNote); |
272 |
addHeader(_("Optional Settings")); |
addHeader(_("Optional Settings")); |
273 |
addProp(eSampleStartOffset); |
addProp(eSampleStartOffset); |
274 |
addProp(eChannelOffset); |
addProp(eChannelOffset); |
275 |
addHeader("Loops"); |
addHeader(_("Loops")); |
276 |
addProp(eSampleLoopEnabled); |
addProp(eSampleLoopEnabled); |
277 |
addProp(eSampleLoopStart); |
addProp(eSampleLoopStart); |
278 |
addProp(eSampleLoopLength); |
addProp(eSampleLoopLength); |
279 |
{ |
{ |
280 |
const char* choices[] = { "normal", "bidirectional", "backward", 0 }; |
const char* choices[] = { _("normal"), _("bidirectional"), _("backward"), 0 }; |
281 |
static const uint32_t values[] = { |
static const uint32_t values[] = { |
282 |
gig::loop_type_normal, |
gig::loop_type_normal, |
283 |
gig::loop_type_bidirectional, |
gig::loop_type_bidirectional, |
317 |
addProp(eLFO1InternalDepth); |
addProp(eLFO1InternalDepth); |
318 |
addProp(eLFO1ControlDepth); |
addProp(eLFO1ControlDepth); |
319 |
{ |
{ |
320 |
const char* choices[] = { "internal", "modwheel", "breath", |
const char* choices[] = { _("internal"), _("modwheel"), _("breath"), |
321 |
"internal+modwheel", "internal+breath", 0 }; |
_("internal+modwheel"), _("internal+breath"), 0 }; |
322 |
static const gig::lfo1_ctrl_t values[] = { |
static const gig::lfo1_ctrl_t values[] = { |
323 |
gig::lfo1_ctrl_internal, |
gig::lfo1_ctrl_internal, |
324 |
gig::lfo1_ctrl_modwheel, |
gig::lfo1_ctrl_modwheel, |
331 |
addProp(eLFO1Controller); |
addProp(eLFO1Controller); |
332 |
addProp(eLFO1FlipPhase); |
addProp(eLFO1FlipPhase); |
333 |
addProp(eLFO1Sync); |
addProp(eLFO1Sync); |
334 |
addHeader("Crossfade"); |
addHeader(_("Crossfade")); |
335 |
addProp(eAttenuationController); |
addProp(eAttenuationController); |
336 |
addProp(eInvertAttenuationController); |
addProp(eInvertAttenuationController); |
337 |
addProp(eAttenuationControllerThreshold); |
addProp(eAttenuationControllerThreshold); |
345 |
addHeader(_("General Filter Settings")); |
addHeader(_("General Filter Settings")); |
346 |
addProp(eVCFEnabled); |
addProp(eVCFEnabled); |
347 |
{ |
{ |
348 |
const char* choices[] = { "lowpass", "lowpassturbo", "bandpass", |
const char* choices[] = { _("lowpass"), _("lowpassturbo"), _("bandpass"), |
349 |
"highpass", "bandreject", 0 }; |
_("highpass"), _("bandreject"), 0 }; |
350 |
static const gig::vcf_type_t values[] = { |
static const gig::vcf_type_t values[] = { |
351 |
gig::vcf_type_lowpass, |
gig::vcf_type_lowpass, |
352 |
gig::vcf_type_lowpassturbo, |
gig::vcf_type_lowpassturbo, |
358 |
} |
} |
359 |
addProp(eVCFType); |
addProp(eVCFType); |
360 |
{ |
{ |
361 |
const char* choices[] = { "none", "none2", "modwheel", "effect1", "effect2", |
const char* choices[] = { _("none"), _("none2"), _("modwheel"), _("effect1"), _("effect2"), |
362 |
"breath", "foot", "sustainpedal", "softpedal", |
_("breath"), _("foot"), _("sustainpedal"), _("softpedal"), |
363 |
"genpurpose7", "genpurpose8", "aftertouch", 0 }; |
_("genpurpose7"), _("genpurpose8"), _("aftertouch"), 0 }; |
364 |
static const gig::vcf_cutoff_ctrl_t values[] = { |
static const gig::vcf_cutoff_ctrl_t values[] = { |
365 |
gig::vcf_cutoff_ctrl_none, |
gig::vcf_cutoff_ctrl_none, |
366 |
gig::vcf_cutoff_ctrl_none2, |
gig::vcf_cutoff_ctrl_none2, |
380 |
addProp(eVCFCutoffController); |
addProp(eVCFCutoffController); |
381 |
addProp(eVCFCutoffControllerInvert); |
addProp(eVCFCutoffControllerInvert); |
382 |
addProp(eVCFCutoff); |
addProp(eVCFCutoff); |
383 |
const char* curve_type_texts[] = { "nonlinear", "linear", "special", 0 }; |
const char* curve_type_texts[] = { _("nonlinear"), _("linear"), _("special"), 0 }; |
384 |
static const gig::curve_type_t curve_type_values[] = { |
static const gig::curve_type_t curve_type_values[] = { |
385 |
gig::curve_type_nonlinear, |
gig::curve_type_nonlinear, |
386 |
gig::curve_type_linear, |
gig::curve_type_linear, |
393 |
addProp(eVCFResonance); |
addProp(eVCFResonance); |
394 |
addProp(eVCFResonanceDynamic); |
addProp(eVCFResonanceDynamic); |
395 |
{ |
{ |
396 |
const char* choices[] = { "none", "genpurpose3", "genpurpose4", |
const char* choices[] = { _("none"), _("genpurpose3"), _("genpurpose4"), |
397 |
"genpurpose5", "genpurpose6", 0 }; |
_("genpurpose5"), _("genpurpose6"), 0 }; |
398 |
static const gig::vcf_res_ctrl_t values[] = { |
static const gig::vcf_res_ctrl_t values[] = { |
399 |
gig::vcf_res_ctrl_none, |
gig::vcf_res_ctrl_none, |
400 |
gig::vcf_res_ctrl_genpurpose3, |
gig::vcf_res_ctrl_genpurpose3, |
428 |
addProp(eLFO2InternalDepth); |
addProp(eLFO2InternalDepth); |
429 |
addProp(eLFO2ControlDepth); |
addProp(eLFO2ControlDepth); |
430 |
{ |
{ |
431 |
const char* choices[] = { "internal", "modwheel", "foot", |
const char* choices[] = { _("internal"), _("modwheel"), _("foot"), |
432 |
"internal+modwheel", "internal+foot", 0 }; |
_("internal+modwheel"), _("internal+foot"), 0 }; |
433 |
static const gig::lfo2_ctrl_t values[] = { |
static const gig::lfo2_ctrl_t values[] = { |
434 |
gig::lfo2_ctrl_internal, |
gig::lfo2_ctrl_internal, |
435 |
gig::lfo2_ctrl_modwheel, |
gig::lfo2_ctrl_modwheel, |
456 |
addProp(eLFO3InternalDepth); |
addProp(eLFO3InternalDepth); |
457 |
addProp(eLFO3ControlDepth); |
addProp(eLFO3ControlDepth); |
458 |
{ |
{ |
459 |
const char* choices[] = { "internal", "modwheel", "aftertouch", |
const char* choices[] = { _("internal"), _("modwheel"), _("aftertouch"), |
460 |
"internal+modwheel", "internal+aftertouch", 0 }; |
_("internal+modwheel"), _("internal+aftertouch"), 0 }; |
461 |
static const gig::lfo3_ctrl_t values[] = { |
static const gig::lfo3_ctrl_t values[] = { |
462 |
gig::lfo3_ctrl_internal, |
gig::lfo3_ctrl_internal, |
463 |
gig::lfo3_ctrl_modwheel, |
gig::lfo3_ctrl_modwheel, |
482 |
addProp(eReleaseVelocityResponseDepth); |
addProp(eReleaseVelocityResponseDepth); |
483 |
addProp(eReleaseTriggerDecay); |
addProp(eReleaseTriggerDecay); |
484 |
{ |
{ |
485 |
const char* choices[] = { "none", "effect4depth", "effect5depth", 0 }; |
const char* choices[] = { _("none"), _("effect4depth"), _("effect5depth"), 0 }; |
486 |
static const gig::dim_bypass_ctrl_t values[] = { |
static const gig::dim_bypass_ctrl_t values[] = { |
487 |
gig::dim_bypass_ctrl_none, |
gig::dim_bypass_ctrl_none, |
488 |
gig::dim_bypass_ctrl_94, |
gig::dim_bypass_ctrl_94, |
539 |
eSampleLoopInfinite.signal_value_changed().connect( |
eSampleLoopInfinite.signal_value_changed().connect( |
540 |
sigc::mem_fun(*this, &DimRegionEdit::loop_infinite_toggled)); |
sigc::mem_fun(*this, &DimRegionEdit::loop_infinite_toggled)); |
541 |
|
|
542 |
append_page(*table[0], "Sample"); |
append_page(*table[0], _("Sample")); |
543 |
append_page(*table[1], "Amplitude (1)"); |
append_page(*table[1], _("Amplitude (1)")); |
544 |
append_page(*table[2], "Amplitude (2)"); |
append_page(*table[2], _("Amplitude (2)")); |
545 |
append_page(*table[3], "Filter (1)"); |
append_page(*table[3], _("Filter (1)")); |
546 |
append_page(*table[4], "Filter (2)"); |
append_page(*table[4], _("Filter (2)")); |
547 |
append_page(*table[5], "Pitch"); |
append_page(*table[5], _("Pitch")); |
548 |
append_page(*table[6], "Misc"); |
append_page(*table[6], _("Misc")); |
549 |
} |
} |
550 |
|
|
551 |
DimRegionEdit::~DimRegionEdit() |
DimRegionEdit::~DimRegionEdit() |
730 |
d->pSample ? d->pSample->LoopPlayCount : 0); |
d->pSample ? d->pSample->LoopPlayCount : 0); |
731 |
update_model--; |
update_model--; |
732 |
|
|
733 |
wSample->set_text(d->pSample ? d->pSample->pInfo->Name.c_str() : "NULL"); |
wSample->set_text(d->pSample ? d->pSample->pInfo->Name.c_str() : _("NULL")); |
734 |
|
|
735 |
update_loop_elements(); |
update_loop_elements(); |
736 |
VCFEnabled_toggled(); |
VCFEnabled_toggled(); |
793 |
eVCFCutoffControllerInvert.set_sensitive(hasController); |
eVCFCutoffControllerInvert.set_sensitive(hasController); |
794 |
eVCFCutoff.set_sensitive(!hasController); |
eVCFCutoff.set_sensitive(!hasController); |
795 |
eVCFResonanceDynamic.set_sensitive(!hasController); |
eVCFResonanceDynamic.set_sensitive(!hasController); |
796 |
eVCFVelocityScale.label.set_text(hasController ? "Minimum cutoff:" : |
eVCFVelocityScale.label.set_text(hasController ? _("Minimum cutoff:") : |
797 |
"Velocity scale:"); |
_("Velocity scale:")); |
798 |
} |
} |
799 |
|
|
800 |
void DimRegionEdit::VCFResonanceController_changed() |
void DimRegionEdit::VCFResonanceController_changed() |