19 |
|
|
20 |
#include "dimregionedit.h" |
#include "dimregionedit.h" |
21 |
|
|
22 |
|
#include <libintl.h> |
23 |
|
#define _(String) gettext(String) |
24 |
|
|
25 |
DimRegionEdit::DimRegionEdit() : |
DimRegionEdit::DimRegionEdit() : |
26 |
eEG1PreAttack("PreAttack", 0, 100, 2), |
eEG1PreAttack("PreAttack", 0, 100, 2), |
27 |
eEG1Attack("Attack", 0, 60, 3), |
eEG1Attack("Attack", 0, 60, 3), |
107 |
eGainPlus6("Gain +6dB", eGain, 6 * -655360), |
eGainPlus6("Gain +6dB", eGain, 6 * -655360), |
108 |
eSampleLoops("SampleLoops", 0, 1) |
eSampleLoops("SampleLoops", 0, 1) |
109 |
{ |
{ |
110 |
for (int i = 0 ; i < 5 ; i++) { |
for (int i = 0 ; i < 7 ; i++) { |
111 |
table[i] = new Gtk::Table(3, 1); |
table[i] = new Gtk::Table(3, 1); |
112 |
table[i]->set_col_spacings(5); |
table[i]->set_col_spacings(7); |
113 |
} |
} |
114 |
|
|
115 |
|
// set tooltips |
116 |
|
eUnityNote.set_tip( |
117 |
|
_("note this sample is associated with (a.k.a. 'root note')") |
118 |
|
); |
119 |
|
eSampleStartOffset.set_tip(_("sample position at which playback should be started")); |
120 |
|
ePan.set_tip(_("stereo balance (left/right)")); |
121 |
|
eChannelOffset.set_tip( |
122 |
|
_("output channel where the audio signal should be routed to (0 - 9)") |
123 |
|
); |
124 |
|
ePitchTrack.set_tip( |
125 |
|
_("if true: sample will be pitched according to the key position " |
126 |
|
"(this would be disabled for drums for example)") |
127 |
|
); |
128 |
|
|
129 |
pageno = 0; |
pageno = 0; |
130 |
rowno = 0; |
rowno = 0; |
131 |
firstRowInBlock = 0; |
firstRowInBlock = 0; |
132 |
|
|
133 |
|
addHeader(_("Mandatory Settings:")); |
134 |
addString("Sample", lSample, wSample); |
addString("Sample", lSample, wSample); |
135 |
//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); |
136 |
tooltips.set_tip(*wSample, "drop a sample here"); |
tooltips.set_tip(*wSample, _("drop a sample here")); |
137 |
addHeader("EG1"); |
addProp(eUnityNote); |
138 |
|
addHeader(_("Optional Settings:")); |
139 |
|
addProp(eSampleStartOffset); |
140 |
|
addProp(ePan); |
141 |
|
addProp(eChannelOffset); |
142 |
|
addHeader("Loops:"); |
143 |
|
addProp(eSampleLoops); |
144 |
|
addHeader("Crossfade:"); |
145 |
|
addProp(eCrossfade_in_start); |
146 |
|
addProp(eCrossfade_in_end); |
147 |
|
addProp(eCrossfade_out_start); |
148 |
|
addProp(eCrossfade_out_end); |
149 |
|
|
150 |
|
nextPage(); |
151 |
|
|
152 |
|
addHeader(_("General Amplitude Settings:")); |
153 |
|
addProp(eGain); |
154 |
|
addProp(eGainPlus6); |
155 |
|
addProp(eAttenuationController); |
156 |
|
addProp(eInvertAttenuationController); |
157 |
|
addProp(eAttenuationControllerThreshold); |
158 |
|
addHeader(_("Amplitude Envelope (EG1):")); |
159 |
addProp(eEG1PreAttack); |
addProp(eEG1PreAttack); |
160 |
addProp(eEG1Attack); |
addProp(eEG1Attack); |
161 |
addProp(eEG1Decay1); |
addProp(eEG1Decay1); |
169 |
addProp(eEG1ControllerAttackInfluence); |
addProp(eEG1ControllerAttackInfluence); |
170 |
addProp(eEG1ControllerDecayInfluence); |
addProp(eEG1ControllerDecayInfluence); |
171 |
addProp(eEG1ControllerReleaseInfluence); |
addProp(eEG1ControllerReleaseInfluence); |
172 |
addHeader("LFO1"); |
|
173 |
|
nextPage(); |
174 |
|
|
175 |
|
addHeader(_("Amplitude Oscillator (LFO1):")); |
176 |
addProp(eLFO1Frequency); |
addProp(eLFO1Frequency); |
177 |
addProp(eLFO1InternalDepth); |
addProp(eLFO1InternalDepth); |
178 |
addProp(eLFO1ControlDepth); |
addProp(eLFO1ControlDepth); |
193 |
addProp(eLFO1Sync); |
addProp(eLFO1Sync); |
194 |
|
|
195 |
nextPage(); |
nextPage(); |
|
addHeader("EG2"); |
|
|
addProp(eEG2PreAttack); |
|
|
addProp(eEG2Attack); |
|
|
addProp(eEG2Decay1); |
|
|
addProp(eEG2Decay2); |
|
|
addProp(eEG2InfiniteSustain); |
|
|
addProp(eEG2Sustain); |
|
|
addProp(eEG2Release); |
|
|
addProp(eEG2Controller); |
|
|
addProp(eEG2ControllerInvert); |
|
|
addProp(eEG2ControllerAttackInfluence); |
|
|
addProp(eEG2ControllerDecayInfluence); |
|
|
addProp(eEG2ControllerReleaseInfluence); |
|
|
addHeader("LFO2"); |
|
|
addProp(eLFO2Frequency); |
|
|
addProp(eLFO2InternalDepth); |
|
|
addProp(eLFO2ControlDepth); |
|
|
{ |
|
|
char* choices[] = { "internal", "modwheel", "foot", |
|
|
"internal+modwheel", "internal+foot", 0 }; |
|
|
static const gig::lfo2_ctrl_t values[] = { |
|
|
gig::lfo2_ctrl_internal, |
|
|
gig::lfo2_ctrl_modwheel, |
|
|
gig::lfo2_ctrl_foot, |
|
|
gig::lfo2_ctrl_internal_modwheel, |
|
|
gig::lfo2_ctrl_internal_foot |
|
|
}; |
|
|
eLFO2Controller.set_choices(choices, values); |
|
|
} |
|
|
addProp(eLFO2Controller); |
|
|
addProp(eLFO2FlipPhase); |
|
|
addProp(eLFO2Sync); |
|
196 |
|
|
197 |
nextPage(); |
addHeader(_("General Filter Settings:")); |
|
|
|
|
addHeader("EG3"); |
|
|
addProp(eEG3Attack); |
|
|
addProp(eEG3Depth); |
|
|
addHeader("LFO3"); |
|
|
addProp(eLFO3Frequency); |
|
|
addProp(eLFO3InternalDepth); |
|
|
addProp(eLFO3ControlDepth); |
|
|
{ |
|
|
char* choices[] = { "internal", "modwheel", "aftertouch", |
|
|
"internal+modwheel", "internal+aftertouch", 0 }; |
|
|
static const gig::lfo3_ctrl_t values[] = { |
|
|
gig::lfo3_ctrl_internal, |
|
|
gig::lfo3_ctrl_modwheel, |
|
|
gig::lfo3_ctrl_aftertouch, |
|
|
gig::lfo3_ctrl_internal_modwheel, |
|
|
gig::lfo3_ctrl_internal_aftertouch |
|
|
}; |
|
|
eLFO3Controller.set_choices(choices, values); |
|
|
} |
|
|
addProp(eLFO3Controller); |
|
|
addProp(eLFO3Sync); |
|
|
addHeader("VCF"); |
|
198 |
addProp(eVCFEnabled); |
addProp(eVCFEnabled); |
199 |
{ |
{ |
200 |
char* choices[] = { "lowpass", "lowpassturbo", "bandpass", |
char* choices[] = { "lowpass", "lowpassturbo", "bandpass", |
262 |
|
|
263 |
nextPage(); |
nextPage(); |
264 |
|
|
265 |
|
addHeader(_("Filter Cutoff Envelope (EG2):")); |
266 |
|
addProp(eEG2PreAttack); |
267 |
|
addProp(eEG2Attack); |
268 |
|
addProp(eEG2Decay1); |
269 |
|
addProp(eEG2Decay2); |
270 |
|
addProp(eEG2InfiniteSustain); |
271 |
|
addProp(eEG2Sustain); |
272 |
|
addProp(eEG2Release); |
273 |
|
addProp(eEG2Controller); |
274 |
|
addProp(eEG2ControllerInvert); |
275 |
|
addProp(eEG2ControllerAttackInfluence); |
276 |
|
addProp(eEG2ControllerDecayInfluence); |
277 |
|
addProp(eEG2ControllerReleaseInfluence); |
278 |
|
addHeader(_("Filter Cutoff Oscillator (LFO2):")); |
279 |
|
addProp(eLFO2Frequency); |
280 |
|
addProp(eLFO2InternalDepth); |
281 |
|
addProp(eLFO2ControlDepth); |
282 |
|
{ |
283 |
|
char* choices[] = { "internal", "modwheel", "foot", |
284 |
|
"internal+modwheel", "internal+foot", 0 }; |
285 |
|
static const gig::lfo2_ctrl_t values[] = { |
286 |
|
gig::lfo2_ctrl_internal, |
287 |
|
gig::lfo2_ctrl_modwheel, |
288 |
|
gig::lfo2_ctrl_foot, |
289 |
|
gig::lfo2_ctrl_internal_modwheel, |
290 |
|
gig::lfo2_ctrl_internal_foot |
291 |
|
}; |
292 |
|
eLFO2Controller.set_choices(choices, values); |
293 |
|
} |
294 |
|
addProp(eLFO2Controller); |
295 |
|
addProp(eLFO2FlipPhase); |
296 |
|
addProp(eLFO2Sync); |
297 |
|
|
298 |
|
nextPage(); |
299 |
|
|
300 |
|
addHeader(_("General Pitch Settings:")); |
301 |
|
addProp(eFineTune); |
302 |
|
addProp(ePitchTrack); |
303 |
|
addHeader(_("Pitch Envelope (EG3):")); |
304 |
|
addProp(eEG3Attack); |
305 |
|
addProp(eEG3Depth); |
306 |
|
addHeader(_("Pitch Oscillator (LFO3):")); |
307 |
|
addProp(eLFO3Frequency); |
308 |
|
addProp(eLFO3InternalDepth); |
309 |
|
addProp(eLFO3ControlDepth); |
310 |
|
{ |
311 |
|
char* choices[] = { "internal", "modwheel", "aftertouch", |
312 |
|
"internal+modwheel", "internal+aftertouch", 0 }; |
313 |
|
static const gig::lfo3_ctrl_t values[] = { |
314 |
|
gig::lfo3_ctrl_internal, |
315 |
|
gig::lfo3_ctrl_modwheel, |
316 |
|
gig::lfo3_ctrl_aftertouch, |
317 |
|
gig::lfo3_ctrl_internal_modwheel, |
318 |
|
gig::lfo3_ctrl_internal_aftertouch |
319 |
|
}; |
320 |
|
eLFO3Controller.set_choices(choices, values); |
321 |
|
} |
322 |
|
addProp(eLFO3Controller); |
323 |
|
addProp(eLFO3Sync); |
324 |
|
|
325 |
|
nextPage(); |
326 |
|
|
327 |
eVelocityResponseCurve.set_choices(curve_type_texts, curve_type_values); |
eVelocityResponseCurve.set_choices(curve_type_texts, curve_type_values); |
328 |
addProp(eVelocityResponseCurve); |
addProp(eVelocityResponseCurve); |
329 |
addProp(eVelocityResponseDepth); |
addProp(eVelocityResponseDepth); |
333 |
addProp(eReleaseVelocityResponseCurve); |
addProp(eReleaseVelocityResponseCurve); |
334 |
addProp(eReleaseVelocityResponseDepth); |
addProp(eReleaseVelocityResponseDepth); |
335 |
addProp(eReleaseTriggerDecay); |
addProp(eReleaseTriggerDecay); |
|
addProp(eCrossfade_in_start); |
|
|
addProp(eCrossfade_in_end); |
|
|
addProp(eCrossfade_out_start); |
|
|
addProp(eCrossfade_out_end); |
|
|
addProp(ePitchTrack); |
|
336 |
{ |
{ |
337 |
char* choices[] = { "none", "effect4depth", "effect5depth", 0 }; |
char* choices[] = { "none", "effect4depth", "effect5depth", 0 }; |
338 |
static const gig::dim_bypass_ctrl_t values[] = { |
static const gig::dim_bypass_ctrl_t values[] = { |
343 |
eDimensionBypass.set_choices(choices, values); |
eDimensionBypass.set_choices(choices, values); |
344 |
} |
} |
345 |
addProp(eDimensionBypass); |
addProp(eDimensionBypass); |
|
addProp(ePan); |
|
346 |
addProp(eSelfMask); |
addProp(eSelfMask); |
|
addProp(eAttenuationController); |
|
|
addProp(eInvertAttenuationController); |
|
|
addProp(eAttenuationControllerThreshold); |
|
|
addProp(eChannelOffset); |
|
347 |
addProp(eSustainDefeat); |
addProp(eSustainDefeat); |
|
|
|
|
nextPage(); |
|
348 |
addProp(eMSDecode); |
addProp(eMSDecode); |
349 |
addProp(eSampleStartOffset); |
|
|
addProp(eUnityNote); |
|
|
addProp(eFineTune); |
|
|
addProp(eGain); |
|
|
addProp(eGainPlus6); |
|
|
addProp(eSampleLoops); |
|
350 |
nextPage(); |
nextPage(); |
351 |
|
|
352 |
|
|
353 |
eEG1InfiniteSustain.signal_toggled().connect( |
eEG1InfiniteSustain.signal_toggled().connect( |
354 |
sigc::mem_fun(*this, &DimRegionEdit::EG1InfiniteSustain_toggled) ); |
sigc::mem_fun(*this, &DimRegionEdit::EG1InfiniteSustain_toggled) ); |
355 |
eEG2InfiniteSustain.signal_toggled().connect( |
eEG2InfiniteSustain.signal_toggled().connect( |
382 |
eCrossfade_out_end.signal_value_changed().connect( |
eCrossfade_out_end.signal_value_changed().connect( |
383 |
sigc::mem_fun(*this, &DimRegionEdit::crossfade4_changed)); |
sigc::mem_fun(*this, &DimRegionEdit::crossfade4_changed)); |
384 |
|
|
385 |
append_page(*table[0], "EG1"); |
append_page(*table[0], "Sample"); |
386 |
append_page(*table[1], "EG2"); |
append_page(*table[1], "Amplitude (1)"); |
387 |
append_page(*table[2], "EG3"); |
append_page(*table[2], "Amplitude (2)"); |
388 |
append_page(*table[3], "Velocity"); |
append_page(*table[3], "Filter (1)"); |
389 |
append_page(*table[4], "Misc"); |
append_page(*table[4], "Filter (2)"); |
390 |
|
append_page(*table[5], "Pitch"); |
391 |
|
append_page(*table[6], "Misc"); |
392 |
} |
} |
393 |
|
|
394 |
DimRegionEdit::~DimRegionEdit() |
DimRegionEdit::~DimRegionEdit() |