Codebase list guitarix / 9ba8d7a
Imported Upstream version 0.24.2 Ross Gammon 8 years ago
17 changed file(s) with 186 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
0 guitarix2 (0.24.0) unstable; urgency=low
1 * GIT head
2
3 -- brummer <brummer-@web.de> Mon, 12 Jul 2012 06:37:35 +0200
0 guitarix2 (0.24.2) unstable; urgency=low
1 * remove dunwah from build to avoid unwonted install
2 * correct version mismatch in wscript
3
4 -- brummer <brummer-@web.de> Sat, 20 Oct 2012 05:37:35 +0200
5
6 guitarix2 (0.24.1) unstable; urgency=low
7 * fix In "organize" mod copying preset form one bank to the
8 same one corrupts the bank
9 * add sse4a (optimization) to wscript
10 * add treble booster unit
11 * set osc buffersize menu to sensitive false when jack buffer
12 is larger then 1023
13
14 -- brummer <brummer-@web.de> Mon, 14 Oct 2012 05:37:35 +0200
415
516 guitarix2 (0.17.0svn) unstable; urgency=low
617 * SVN head
0 declare name "Treble boost";
1 declare category "Tone control";
2
3 import("filter.lib");
4
5 level = vslider("Level", 0, 0.5, 20, 0.5) ;
6 hfboost(level,fx,x) = x + (db2linear(level)-1)*highpass(1,fx,x);
7
8 process = hfboost(level, 1500);
8282 'gx_outputlevel.dsp',
8383 'gx_outputlevel_ladspa.dsp',
8484 'gxfeed.dsp',
85 'highbooster.dsp',
8586
8687 # tone stacks
8788 'tonestack_default.dsp',
0 // generated from file '../src/faust/highbooster.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace highbooster {
5
6 class Dsp: public PluginDef {
7 private:
8 int fSamplingFreq;
9 double fConst0;
10 double fConst1;
11 double fConst2;
12 double fVec0[2];
13 double fConst3;
14 double fConst4;
15 double fRec0[2];
16 FAUSTFLOAT fslider0;
17 void clear_state_f();
18 void init(unsigned int samplingFreq);
19 void compute(int count, float *input0, float *output0);
20 int register_par(const ParamReg& reg);
21
22 static void clear_state_f_static(PluginDef*);
23 static void init_static(unsigned int samplingFreq, PluginDef*);
24 static void compute_static(int count, float *input0, float *output0, PluginDef*);
25 static int register_params_static(const ParamReg& reg);
26 static void del_instance(PluginDef *p);
27
28 public:
29 Dsp();
30 ~Dsp();
31 };
32
33
34
35 Dsp::Dsp()
36 : PluginDef() {
37 version = PLUGINDEF_VERSION;
38 flags = 0;
39 id = "highbooster";
40 name = N_("Treble boost");
41 groups = 0;
42 description = ""; // description (tooltip)
43 category = N_("Tone control"); // category
44 shortname = ""; // shortname
45 mono_audio = compute_static;
46 stereo_audio = 0;
47 set_samplerate = init_static;
48 activate_plugin = 0;
49 register_params = register_params_static;
50 load_ui = 0;
51 clear_state = clear_state_f_static;
52 delete_instance = del_instance;
53 }
54
55 Dsp::~Dsp() {
56 }
57
58 inline void Dsp::clear_state_f()
59 {
60 for (int i=0; i<2; i++) fVec0[i] = 0;
61 for (int i=0; i<2; i++) fRec0[i] = 0;
62 }
63
64 void Dsp::clear_state_f_static(PluginDef *p)
65 {
66 static_cast<Dsp*>(p)->clear_state_f();
67 }
68
69 inline void Dsp::init(unsigned int samplingFreq)
70 {
71 fSamplingFreq = samplingFreq;
72 fConst0 = (1.0 / tan((4712.38898038469 / min(192000, max(1, fSamplingFreq)))));
73 fConst1 = (1 + fConst0);
74 fConst2 = (0 - ((1 - fConst0) / fConst1));
75 fConst3 = (0 - fConst0);
76 fConst4 = (1.0 / fConst1);
77 clear_state_f();
78 }
79
80 void Dsp::init_static(unsigned int samplingFreq, PluginDef *p)
81 {
82 static_cast<Dsp*>(p)->init(samplingFreq);
83 }
84
85 inline void Dsp::compute(int count, float *input0, float *output0)
86 {
87 double fSlow0 = (pow(10,(0.05 * fslider0)) - 1);
88 for (int i=0; i<count; i++) {
89 double fTemp0 = (double)input0[i];
90 fVec0[0] = fTemp0;
91 fRec0[0] = ((fConst4 * ((fConst3 * fVec0[1]) + (fConst0 * fVec0[0]))) + (fConst2 * fRec0[1]));
92 output0[i] = (FAUSTFLOAT)(fVec0[0] + (fSlow0 * fRec0[0]));
93 // post processing
94 fRec0[1] = fRec0[0];
95 fVec0[1] = fVec0[0];
96 }
97 }
98
99 void Dsp::compute_static(int count, float *input0, float *output0, PluginDef *p)
100 {
101 static_cast<Dsp*>(p)->compute(count, input0, output0);
102 }
103
104 int Dsp::register_par(const ParamReg& reg)
105 {
106 reg.registerVar("highbooster.Level","","S","",&fslider0, 0.0, 0.5, 2e+01, 0.5);
107 return 0;
108 }
109
110 int Dsp::register_params_static(const ParamReg& reg)
111 {
112 return static_cast<Dsp*>(reg.plugin)->register_par(reg);
113 }
114
115 PluginDef *plugin() {
116 return new Dsp();
117 }
118
119 void Dsp::del_instance(PluginDef *p)
120 {
121 delete static_cast<Dsp*>(p);
122 }
123
124 } // end namespace highbooster
39353935 <packing>
39363936 <property name="left_attach">2</property>
39373937 <property name="right_attach">3</property>
3938 <property name="y_options"></property>
3938 <property name="y_options"/>
39393939 </packing>
39403940 </child>
39413941 <child>
41154115 </attributes>
41164116 </object>
41174117 <packing>
4118 <property name="y_options"></property>
4118 <property name="y_options"/>
41194119 </packing>
41204120 </child>
41214121 </object>
215215
216216 // mono
217217 pl.add(gx_effects::low_high_pass::plugin(), PLUGIN_POS_RACK, PGN_GUI);
218 pl.add(gx_effects::highbooster::plugin(), PLUGIN_POS_RACK, PGN_GUI);
218219 pl.add(gx_effects::selecteq::plugin(), PLUGIN_POS_RACK, PGN_GUI);
219220 pl.add(&crybaby.plugin, PLUGIN_POS_RACK, PGN_GUI);
220221 pl.add(gx_effects::gx_distortion::plugin(), PLUGIN_POS_RACK, PGN_GUI);
237238 pl.add(gx_effects::gx_feedback::plugin(), PLUGIN_POS_RACK, PGN_GUI);
238239 pl.add(&tonestack.plugin, PLUGIN_POS_RACK, PGN_GUI);
239240 pl.add(&cabinet.plugin, PLUGIN_POS_RACK, PGN_GUI);
240 pl.add(&preamp.plugin, PLUGIN_POS_RACK, PGN_GUI);
241 pl.add(&preamp.plugin, PLUGIN_POS_RACK, PGN_GUI);
241242 pl.add(pluginlib::abgate::plugin(), PLUGIN_POS_RACK);
242243 pl.add(pluginlib::vibe::plugin_mono(), PLUGIN_POS_RACK);
243244 // stereo
8080
8181 namespace gx_effects {
8282 #include "faust/bassbooster.cc"
83 #include "faust/highbooster.cc"
8384 #include "faust/gxfeed.cc"
8485 #include "faust/gx_feedback.cc"
8586 #include "faust/gx_outputlevel.cc"
199199 size_change(0);
200200 float *b = buffer;
201201 unsigned int d = mul_buffer;
202 if (size_ > 1023) d = 1;
202203 buffer = new float[size_ * d];
203204 size = size_* d;
204205 clear_buffer();
12781278 if (n > 0) {
12791279 actions.latency->set_current_value(n);
12801280 }
1281 if (n > 1023) actions.osc_buffer_menu->set_sensitive(false);
1282 else actions.osc_buffer_menu->set_sensitive(true);
12811283 }
12821284
12831285 void gx_show_help() {
589589 closeBox();
590590 }
591591
592 void StackBoxBuilder::make_rackbox_highbooster() {
593 openHorizontalhideBox("");
594 create_master_slider("highbooster.Level", _("Level"));
595 closeBox();
596 openVerticalBox("");
597 {
598 openHorizontalBox("");
599 {
600 create_small_rackknobr("highbooster.Level", _("Level"));
601 }
602 closeBox();
603 }
604 closeBox();
605 }
606
592607 void StackBoxBuilder::make_rackbox_midi_out() {
593608 openVerticalMidiBox(_(" MIDI out "));
594609 {
384384 }
385385 Glib::ustring src_bank = get_current_bank();
386386 gx_system::PresetFile& pf = *gx_settings.banks.get_file(src_bank);
387 if (src_bank == bank) {
388 gx_system::gx_print_error("preset", "can't copy inside the same bank");
389 return;
390 }
387391 Gtk::TreeModel::Path pt;
388392 Gtk::TreeViewDropPosition dst;
389393 if (!presets_target_treeview->get_dest_row_at_pos(x, y, pt, dst)) {
212212 //{ "amp.tonestack", &StackBoxBuilder::make_rackbox_amp_tonestack },
213213 { "cab", &StackBoxBuilder::make_rackbox_cab },
214214 { "pre", &StackBoxBuilder::make_rackbox_pre },
215 { "highbooster", &StackBoxBuilder::make_rackbox_highbooster },
215216 { "jconv_mono", &StackBoxBuilder::make_rackbox_jconv_mono },
216217 { "midi_out", &StackBoxBuilder::make_rackbox_midi_out },
217218 // stereo
8484 declare(noise_shaper)
8585 declare(softclip)
8686 declare(bassbooster)
87 declare(highbooster)
8788 declare(gx_ampout)
8889 declare(gxfeed)
8990 declare(gx_outputlevel)
208208 void make_rackbox_cab();
209209 void make_rackbox_pre();
210210 void make_rackbox_jconv_mono();
211 void make_rackbox_highbooster();
211212 void make_rackbox_midi_out();
212213 // stereo
213214 void make_rackbox_chorus();
981981
982982 // mono
983983 pl.add(gx_effects::low_high_pass::plugin(), PLUGIN_POS_RACK, PGN_GUI);
984 pl.add(gx_effects::highbooster::plugin(), PLUGIN_POS_RACK, PGN_GUI);
984985 pl.add(gx_effects::selecteq::plugin(), PLUGIN_POS_RACK, PGN_GUI);
985986 pl.add(&crybaby.plugin, PLUGIN_POS_RACK, PGN_GUI);
986987 pl.add(gx_effects::gx_distortion::plugin(), PLUGIN_POS_RACK, PGN_GUI);
77 ]
88
99 sources = [ # generate .so files that can be loaded by guitarix
10 # "dunwah.dsp",
10 #"dunwah.dsp",
1111 ]
1212
1313 lib_csource_defs = [ # put in static library linked with guitarix
2323 use_2to3 = True
2424
2525 # used by waf dist and waf build
26 VERSION='0.24.0'
26 VERSION='0.24.2'
2727 APPNAME='guitarix'
2828
2929 good_faust_versions = ['0.9.43','0.9.46']
273273 elif "ssse3" in x86_flags:
274274 cxxflags.append ("-mssse3")
275275 cxxflags.append ("-mfpmath=sse")
276 elif "sse4a" in x86_flags:
277 cxxflags.append ("-msse4a")
278 cxxflags.append ("-mfpmath=sse")
276279 elif "sse4" in x86_flags:
277280 cxxflags.append ("-msse4")
278281 cxxflags.append ("-mfpmath=sse")