From 67b8cdf816c2f83b54c3a03ddadb790823c2940f Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Wed, 22 Jul 2015 01:19:01 +0200 Subject: [PATCH] First steps for new multi-mode delay --- gui/gui-vintagedelay.xml | 189 +++++++++++++++++++++++++------------- gui/styles/Calf_0.0.19/gtk.rc.in | 2 +- gui/styles/Calf_Default/gtk.rc.in | 2 +- gui/styles/Calf_Hybreed/gtk.rc.in | 2 +- gui/styles/Calf_Wood/gtk.rc.in | 2 +- src/calf/metadata.h | 9 +- src/calf/modules_delay.h | 4 +- src/metadata.cpp | 22 +++++ 8 files changed, 160 insertions(+), 72 deletions(-) rewrite gui/gui-vintagedelay.xml (76%) diff --git a/gui/gui-vintagedelay.xml b/gui/gui-vintagedelay.xml dissimilarity index 76% index 9f5fb53..431234b 100644 --- a/gui/gui-vintagedelay.xml +++ b/gui/gui-vintagedelay.xml @@ -1,65 +1,124 @@ - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - -
-
- - -
+ + +
+ + + + + + +
+ + + + + + + +
+ + + + + +
+
+ + + + + + + +
+
+ +
+ + + + + + + + + +
+ + +
+
diff --git a/gui/styles/Calf_0.0.19/gtk.rc.in b/gui/styles/Calf_0.0.19/gtk.rc.in index 25b5cdf..0e3a5b5 100644 --- a/gui/styles/Calf_0.0.19/gtk.rc.in +++ b/gui/styles/Calf_0.0.19/gtk.rc.in @@ -244,7 +244,7 @@ style "calf-notebook" { CalfNotebook::background-alpha = 0.5 - xthickness = 24 + xthickness = 18 ythickness = 8 fg[NORMAL] = "#fff" diff --git a/gui/styles/Calf_Default/gtk.rc.in b/gui/styles/Calf_Default/gtk.rc.in index 3ecd5d5..83c5f3b 100644 --- a/gui/styles/Calf_Default/gtk.rc.in +++ b/gui/styles/Calf_Default/gtk.rc.in @@ -245,7 +245,7 @@ style "calf-notebook" { CalfNotebook::background-alpha = 0.5 - xthickness = 24 + xthickness = 18 ythickness = 8 fg[NORMAL] = "#fff" diff --git a/gui/styles/Calf_Hybreed/gtk.rc.in b/gui/styles/Calf_Hybreed/gtk.rc.in index 0db9788..3f7d88c 100644 --- a/gui/styles/Calf_Hybreed/gtk.rc.in +++ b/gui/styles/Calf_Hybreed/gtk.rc.in @@ -244,7 +244,7 @@ style "calf-notebook" { CalfNotebook::background-alpha = 0.4 - xthickness = 24 + xthickness = 18 ythickness = 8 fg[NORMAL] = "#000" diff --git a/gui/styles/Calf_Wood/gtk.rc.in b/gui/styles/Calf_Wood/gtk.rc.in index 09fe735..5c45d5a 100644 --- a/gui/styles/Calf_Wood/gtk.rc.in +++ b/gui/styles/Calf_Wood/gtk.rc.in @@ -244,7 +244,7 @@ style "calf-notebook" { CalfNotebook::background-alpha = 0.33 - xthickness = 24 + xthickness = 18 ythickness = 8 fg[NORMAL] = "#d3eb7a" diff --git a/src/calf/metadata.h b/src/calf/metadata.h index a0a01f5..01250e0 100644 --- a/src/calf/metadata.h +++ b/src/calf/metadata.h @@ -87,7 +87,14 @@ struct reverb_metadata: public plugin_metadata struct vintage_delay_metadata: public plugin_metadata { - enum { par_bpm, par_bpm_host, par_divide, par_time_l, par_time_r, par_feedback, par_amount, par_mixmode, par_medium, par_dryamount, par_width, par_sync, param_count }; + enum { param_bypass, param_level_in, param_level_out, + STEREO_VU_METER_PARAMS, + par_bpm, par_bpm_host, par_divide, + par_time_l, par_time_r, par_feedback, + par_amount, par_mixmode, par_medium, par_dryamount, + par_width, par_sync, par_timing, par_frag, par_ms, + par_psubdiv, par_pbeats, + param_count }; enum { in_count = 2, out_count = 2, ins_optional = 0, outs_optional = 0, rt_capable = true, support_midi = false, require_midi = false }; PLUGIN_NAME_ID_LABEL("vintagedelay", "vintagedelay", "Vintage Delay") }; diff --git a/src/calf/modules_delay.h b/src/calf/modules_delay.h index 918791a..488041e 100644 --- a/src/calf/modules_delay.h +++ b/src/calf/modules_delay.h @@ -66,11 +66,11 @@ public: * VINTAGE DELAY by Krzysztof Foltman **********************************************************************/ -class vintage_delay_audio_module: public audio_module +class vintage_delay_audio_module: public audio_module, public frequency_response_line_graph { public: // 1MB of delay memory per channel... uh, RAM is cheap - enum { MAX_DELAY = 262144, ADDR_MASK = MAX_DELAY - 1 }; + enum { MAX_DELAY = 524288, ADDR_MASK = MAX_DELAY - 1 }; enum { MIXMODE_STEREO, MIXMODE_PINGPONG, MIXMODE_LR, MIXMODE_RL }; float buffers[2][MAX_DELAY]; int bufptr, deltime_l, deltime_r, mixmode, medium, old_medium; diff --git a/src/metadata.cpp b/src/metadata.cpp index e8089de..a8550fc 100644 --- a/src/metadata.cpp +++ b/src/metadata.cpp @@ -239,7 +239,20 @@ const char *vintage_delay_fbmodes[] = { "Old Tape", }; +const char *vintage_delay_timing[] = { + "BPM", + "Time", + "Sync", +}; + +const char *vintage_delay_fragmentation[] = { + "Repeating", + "Pattern", +}; + CALF_PORT_PROPS(vintage_delay) = { + BYPASS_AND_LEVEL_PARAMS + METERING_PARAMS { 120, 30, 300, 1, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_BPM, NULL, "bpm", "Tempo" }, { 120, 1, 300, 1, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_BPM | PF_SYNC_BPM, NULL, "bpm_host", "Host BPM" }, { 4, 1, 16, 1, PF_INT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "subdiv", "Subdivide"}, @@ -252,6 +265,15 @@ CALF_PORT_PROPS(vintage_delay) = { { 1.0, 0, 4, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "dry", "Dry Amount" }, { 1.0, -1, 1, 0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB , NULL, "width", "Stereo Width" }, { 0, 0, 1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "sync", "Sync BPM" }, + + { 0, 0, 2, 0, PF_ENUM | PF_CTL_COMBO, vintage_delay_timing, "timing", "Timing" }, + { 0, 0, 1, 0, PF_ENUM | PF_CTL_COMBO, vintage_delay_fragmentation, "fragmentation", "Fragmentation" }, + + { 500, 200, 2000, 1, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "ms", "ms" }, + + { 4, 1, 8, 1, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "psubdiv", "Pattern Subdivide" }, + { 4, 1, 8, 1, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "pbeats", "Pattern Beats" }, + {} }; -- 2.11.4.GIT