aboutsummaryrefslogtreecommitdiff
path: root/dssi
diff options
context:
space:
mode:
Diffstat (limited to 'dssi')
-rw-r--r--dssi/RELEASE9
-rw-r--r--dssi/doc/help-dssi.pd203
-rw-r--r--dssi/src/dssi~.c66
-rw-r--r--dssi/src/dssi~.h2
4 files changed, 165 insertions, 115 deletions
diff --git a/dssi/RELEASE b/dssi/RELEASE
index 8c1dec6..948c9ea 100644
--- a/dssi/RELEASE
+++ b/dssi/RELEASE
@@ -1,3 +1,12 @@
+
+0.93
+
+- Fixed control in bug and a few others
+
+0.91
+
+-Fixed bugs created by adding LADSPA support
+
0.89
-Added support for LADSPA plugins mostly using code from plugin~
diff --git a/dssi/doc/help-dssi.pd b/dssi/doc/help-dssi.pd
index 821779f..b4e5ba3 100644
--- a/dssi/doc/help-dssi.pd
+++ b/dssi/doc/help-dssi.pd
@@ -1,5 +1,5 @@
-#N canvas 65 172 1411 654 10;
-#X obj 1177 528 catch~ mix;
+#N canvas 186 66 1411 654 10;
+#X obj 1268 524 catch~ mix;
#X text 602 15 dssi~ - a DSSI host for Pure Data ---------------------------------
;
#X obj 7 63 cnv 15 1400 300 empty empty dssi~_instance_1 20 12 0 14
@@ -10,16 +10,8 @@
#X msg 443 122 0;
#X floatatom 300 185 5 0 0 0 - - -;
#X floatatom 443 165 5 0 0 0 - - -;
-#X obj 345 295 dssi~ /usr/local/lib/dssi/hexter.so 2;
-#X msg 1214 136 show 2;
-#X obj 598 274 list;
-#X msg 1130 137 hide;
-#X msg 1171 136 show;
-#X msg 915 162 configure GLOBAL:polyphony 10;
#X msg 72 256 n \$1;
#X obj 110 256 r chan;
-#X msg 731 140 load TX-SYX/TFI2.SYX 2;
-#X msg 732 160 load TX-SYX/TFI1.SYX 1;
#X obj 51 231 list prepend n 2;
#X obj 300 226 list prepend c 2;
#X obj 51 208 pack f f;
@@ -27,19 +19,19 @@
#X msg 78 147 80;
#X msg 300 205 7 \$1;
#X obj 441 247 list prepend b 2 0;
-#X obj 344 322 throw~ mix;
+#X obj 441 324 throw~ mix;
#X obj 119 148 hsl 128 15 60 80 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 9200 1;
+-1 -1 0 1;
#X obj 167 206 select -1;
#X obj 356 250 r chan;
#X obj 303 146 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X obj 446 144 hsl 128 15 -63 63 0 1 empty empty empty -2 -6 0 8 -262144
-1 -1 6350 1;
-#X obj 598 254 r dssi1-config;
-#X obj 730 185 s dssi1-config;
-#X obj 916 184 s dssi1-config;
-#X obj 1129 186 s dssi1-config;
+#X obj 600 291 r dssi1-config;
+#X obj 708 179 s dssi1-config;
+#X obj 912 178 s dssi1-config;
+#X obj 1194 180 s dssi1-config;
#X floatatom 595 142 5 0 0 0 - - -;
#X msg 318 250 c \$1;
#X obj 528 268 r chan;
@@ -52,90 +44,129 @@
#X text 585 97 --program change--;
#X text 105 96 -----notes-----;
#X text 718 97 --sysex patch/bank load--;
-#X msg 914 140 configure polyphony 10 2;
-#X obj 5 371 cnv 15 400 300 empty empty dssi~_instance_2 20 12 0 14
+#X obj 5 371 cnv 15 600 300 empty empty dssi~_instance_2 20 12 0 14
-225280 -66577 0;
-#X obj 38 540 dssi~ /usr/lib/dssi/less_trivial_synth.so;
-#X msg 319 495 show;
-#X obj 321 519 list;
-#X msg 357 496 hide;
-#X obj 39 512 list prepend n 1;
-#X msg 40 435 80;
-#X obj 37 561 throw~ mix;
-#X obj 39 492 pack f f;
-#X msg 88 436 60;
-#X text 563 480 Usage: [dssi~ <path to plugin> <number of plugin instances>]
-;
+#X obj 435 620 throw~ mix;
#X obj 474 122 loadbang;
-#X text 806 212 LAST ARGUMENT GIVES PLUGIN INSTANCE TO BE CONFIGURED
-NO LAST ARGUMENT=(ALL INSTANCES);
#X msg 613 221 p \$1 0;
#X text 940 96 --configuration--;
#X text 947 113 (key value pair);
#X text 867 279 Select channel (hexter instance) for note \, bend \,
program and control data:;
#X obj 595 199 list prepend p 2 0;
-#X obj 39 461 makenote 100 1000;
#X text 1126 98 --show/hide GUI--;
-#X obj 1175 551 dssi/output~;
+#X obj 1266 547 dssi/output~;
#X obj 49 186 makenote 80 10000;
#X msg 1282 136 reset;
#X msg 1340 136 reset 1;
#X text 1286 98 -reset plugin-;
#X text 1286 115 (all notes off);
-#X connect 0 0 69 0;
-#X connect 0 0 69 1;
+#X obj 229 315 print;
+#X msg 78 305 listplugins;
+#X msg 101 329 info;
+#X msg 709 134 dssi load TX-SYX/TFI2.SYX 2;
+#X msg 710 154 dssi load TX-SYX/TFI1.SYX 1;
+#X msg 910 134 dssi configure polyphony 10 2;
+#X msg 911 156 dssi configure GLOBAL:polyphony 10;
+#X msg 1134 114 dssi hide;
+#X msg 1135 135 dssi show;
+#X msg 1206 114 dssi show 2;
+#X text 806 212 LAST ARGUMENT GIVES PLUGIN INSTANCE TO BE CONFIGURED
+\, NO LAST ARGUMENT=(ALL INSTANCES);
+#X obj 388 620 print;
+#X text 738 458 Usage: [dssi~ <[path to libary:plugin name] or [plugin
+name]> <number of plugin instances>];
+#X obj 229 291 dssi~ /usr/local/lib/dssi/hexter.so:hexter 2;
+#X msg 193 342 control #1 445;
+#X obj 451 394 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 7900 1;
+#X obj 378 582 dssi~ sine_faaa 6 -------------;
+#X obj 284 438 expr $f1 \; $f1*2 \; $f1*3 \; $f1*4 \; $f1*5 \; $f1*6
+;
+#X obj 285 397 loadbang;
+#X msg 285 419 220;
+#X obj 471 394 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 6700 1;
+#X obj 491 394 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 6700 1;
+#X obj 511 394 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 6100 1;
+#X obj 531 394 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X obj 551 394 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X text 591 561 <- Audio rate control inputs can be audio or control
+values;
+#X text 14 491 Experimental - use with caution!;
+#X msg 54 509 plug sine_faac 6;
+#X connect 0 0 49 0;
+#X connect 0 0 49 1;
#X connect 3 0 5 0;
#X connect 4 0 3 0;
-#X connect 5 0 25 0;
-#X connect 6 0 31 0;
-#X connect 7 0 24 0;
+#X connect 5 0 17 0;
+#X connect 6 0 23 0;
+#X connect 7 0 16 0;
#X connect 8 0 4 0;
-#X connect 9 0 26 0;
-#X connect 9 1 26 0;
-#X connect 10 0 35 0;
-#X connect 11 0 9 1;
-#X connect 12 0 35 0;
-#X connect 13 0 35 0;
-#X connect 14 0 34 0;
-#X connect 15 0 19 1;
-#X connect 16 0 15 0;
-#X connect 17 0 33 0;
-#X connect 18 0 33 0;
-#X connect 19 0 9 0;
-#X connect 20 0 9 0;
-#X connect 21 0 19 0;
-#X connect 22 0 70 0;
-#X connect 23 0 70 0;
-#X connect 24 0 20 0;
-#X connect 25 0 9 0;
-#X connect 27 0 70 0;
-#X connect 28 1 70 0;
-#X connect 29 0 37 0;
-#X connect 30 0 7 0;
-#X connect 31 0 8 0;
-#X connect 32 0 11 0;
-#X connect 36 0 66 0;
-#X connect 37 0 20 1;
-#X connect 38 0 39 0;
-#X connect 39 0 25 1;
-#X connect 41 0 40 0;
-#X connect 43 0 62 0;
-#X connect 48 0 34 0;
-#X connect 50 0 56 0;
-#X connect 51 0 52 0;
-#X connect 52 0 50 1;
-#X connect 53 0 52 0;
-#X connect 54 0 50 0;
-#X connect 55 0 67 0;
-#X connect 57 0 54 0;
-#X connect 58 0 67 0;
-#X connect 60 0 6 0;
-#X connect 62 0 66 1;
-#X connect 66 0 9 0;
-#X connect 67 0 57 0;
-#X connect 67 1 57 1;
-#X connect 70 0 21 0;
-#X connect 70 1 21 1;
-#X connect 71 0 35 0;
-#X connect 72 0 35 0;
+#X connect 9 0 11 1;
+#X connect 10 0 9 0;
+#X connect 11 0 68 0;
+#X connect 12 0 68 0;
+#X connect 13 0 11 0;
+#X connect 14 0 50 0;
+#X connect 15 0 50 0;
+#X connect 16 0 12 0;
+#X connect 17 0 68 0;
+#X connect 19 0 50 0;
+#X connect 20 1 50 0;
+#X connect 21 0 29 0;
+#X connect 22 0 7 0;
+#X connect 23 0 8 0;
+#X connect 24 0 68 0;
+#X connect 28 0 47 0;
+#X connect 29 0 12 1;
+#X connect 30 0 31 0;
+#X connect 31 0 17 1;
+#X connect 33 0 32 0;
+#X connect 35 0 43 0;
+#X connect 42 0 6 0;
+#X connect 43 0 47 1;
+#X connect 47 0 68 0;
+#X connect 50 0 13 0;
+#X connect 50 1 13 1;
+#X connect 51 0 27 0;
+#X connect 52 0 27 0;
+#X connect 56 0 68 0;
+#X connect 57 0 68 0;
+#X connect 58 0 25 0;
+#X connect 59 0 25 0;
+#X connect 60 0 26 0;
+#X connect 61 0 26 0;
+#X connect 62 0 27 0;
+#X connect 63 0 27 0;
+#X connect 64 0 27 0;
+#X connect 68 0 55 0;
+#X connect 68 1 18 0;
+#X connect 68 2 18 0;
+#X connect 69 0 68 0;
+#X connect 70 0 71 2;
+#X connect 71 0 66 0;
+#X connect 71 1 41 0;
+#X connect 71 2 41 0;
+#X connect 71 3 41 0;
+#X connect 71 4 41 0;
+#X connect 71 5 41 0;
+#X connect 71 6 41 0;
+#X connect 72 0 71 1;
+#X connect 72 1 71 3;
+#X connect 72 2 71 5;
+#X connect 72 3 71 7;
+#X connect 72 4 71 9;
+#X connect 72 5 71 11;
+#X connect 73 0 74 0;
+#X connect 74 0 72 0;
+#X connect 75 0 71 4;
+#X connect 76 0 71 6;
+#X connect 77 0 71 8;
+#X connect 78 0 71 10;
+#X connect 79 0 71 12;
+#X connect 82 0 71 0;
diff --git a/dssi/src/dssi~.c b/dssi/src/dssi~.c
index 619e773..9dd6af4 100644
--- a/dssi/src/dssi~.c
+++ b/dssi/src/dssi~.c
@@ -341,8 +341,9 @@ static void dssi_tilde_connect_ports(t_dssi_tilde *x, t_int instance){
}
-static void dssi_tilde_activate(t_dssi_tilde *x, t_int instance){
+static void dssi_tilde_activate_plugin(t_dssi_tilde *x, t_float instance_f){
+ t_int instance = (t_int)instance_f;
if(x->descriptor->LADSPA_Plugin->activate)
x->descriptor->LADSPA_Plugin->activate(x->instanceHandles[instance]);
#if DEBUG
@@ -350,6 +351,16 @@ static void dssi_tilde_activate(t_dssi_tilde *x, t_int instance){
#endif
}
+static void dssi_tilde_deactivate_plugin(t_dssi_tilde *x, t_float instance_f){
+
+ t_int instance = (t_int)instance_f;
+ if(x->descriptor->LADSPA_Plugin->deactivate)
+ x->descriptor->LADSPA_Plugin->deactivate(x->instanceHandles[instance]);
+#if DEBUG
+ post("plugin deactivated!");
+#endif
+}
+
static void osc_error(int num, const char *msg, const char *where)
{
post("dssi~: osc error %d in path %s: %s\n",num, where, msg);
@@ -602,16 +613,14 @@ static void dssi_tilde_control (t_dssi_tilde *x,
/* Change the value of a named control port of the plug-in */
{
unsigned parm_num = 0;
- t_int instance = (t_int)instance_f;
+ t_int instance = (t_int)instance_f - 1;
int n_instances = x->n_instances;
if (instance > x->n_instances || instance < 0){
- post("dssi~: control: invalid instance number");
+ post("dssi~: control: invalid instance number %d", instance);
return;
}
- instance -= 1;
-
#if DEBUG
post("Received LADSPA control data for instance %d", instance);
#endif
@@ -645,22 +654,24 @@ static void dssi_tilde_control (t_dssi_tilde *x,
static void dssi_tilde_info (t_dssi_tilde *x){
unsigned int i;
- t_atom argv[6];
+ t_atom argv[7];
for(i = 0; i < x->descriptor->LADSPA_Plugin->PortCount; i++){
memcpy(&argv[0], &x->port_info[i].type,
sizeof(t_atom));
memcpy(&argv[1], &x->port_info[i].data_type,
sizeof(t_atom));
- memcpy(&argv[2], &x->port_info[i].name,
+ memcpy(&argv[3], &x->port_info[i].name,
sizeof(t_atom));
- memcpy(&argv[3], &x->port_info[i].lower_bound,
+ memcpy(&argv[4], &x->port_info[i].lower_bound,
sizeof(t_atom));
- memcpy(&argv[4], &x->port_info[i].upper_bound,
+ memcpy(&argv[5], &x->port_info[i].upper_bound,
sizeof(t_atom));
- memcpy(&argv[5], &x->port_info[i].p_default,
+ memcpy(&argv[6], &x->port_info[i].p_default,
sizeof(t_atom));
- outlet_anything (x->control_outlet, gensym ("port"), 6, argv);
+ argv[2].a_type = A_FLOAT;
+ argv[2].a_w.w_float = (t_float)i - 1;
+ outlet_anything (x->control_outlet, gensym ("port"), 7, argv);
}
}
@@ -750,16 +761,18 @@ static int osc_debug_handler(const char *path, const char *types, lo_arg **argv,
static void dssi_tilde_get_current_program(t_dssi_tilde *x, int instance){
int i;
- t_atom argv[2];
+ t_atom argv[3];
argv[0].a_type = A_FLOAT;
- argv[1].a_type = A_SYMBOL;
+ argv[1].a_type = A_FLOAT;
+ argv[2].a_type = A_SYMBOL;
i = x->instances[instance].currentProgram;
- argv[0].a_w.w_float = x->instances[instance].pluginPrograms[i].Program;
- argv[1].a_w.w_symbol =
+ argv[0].a_w.w_float = (t_float)instance;
+ argv[1].a_w.w_float = x->instances[instance].pluginPrograms[i].Program;
+ argv[2].a_w.w_symbol =
gensym ((char*)x->instances[instance].pluginPrograms[i].Name);
- outlet_anything (x->control_outlet, gensym ("program"), 2, argv);
+ outlet_anything (x->control_outlet, gensym ("program"), 3, argv);
}
@@ -1405,7 +1418,7 @@ static t_int dssi_tilde_configure_buffer_free(t_dssi_tilde *x){
static t_int dssi_tilde_reset(t_dssi_tilde *x, t_float instance_f){
- t_int instance = (t_int)instance_f;
+ t_int instance = (t_int)instance_f - 1;
if (instance == -1){
for(instance = 0; instance < x->n_instances; instance++) {
if (x->descriptor->LADSPA_Plugin->deactivate &&
@@ -1927,10 +1940,11 @@ static void dssi_tilde_quit_plugin(t_dssi_tilde *x){
}
/* no -- see comment in osc_exiting_handler */
/* if (!instances[i].inactive) { */
- if (x->descriptor->LADSPA_Plugin->deactivate) {
+/* if (x->descriptor->LADSPA_Plugin->deactivate) {
x->descriptor->LADSPA_Plugin->deactivate
(x->instanceHandles[instance]);
- }
+ }*/
+ dssi_tilde_deactivate_plugin(x, (t_float)instance);
/* } */
if (x->descriptor->LADSPA_Plugin &&
x->descriptor->LADSPA_Plugin->cleanup) {
@@ -2170,7 +2184,7 @@ static void *dssi_tilde_load_plugin(t_dssi_tilde *x, t_int argc, t_atom *argv){
for(i = 0;i < x->n_instances; i++)
dssi_tilde_connect_ports(x, i);
for(i = 0;i < x->n_instances; i++)
- dssi_tilde_activate(x, i);
+ dssi_tilde_activate_plugin(x, (t_float)i);
if(x->is_DSSI){
for(i = 0;i < x->n_instances; i++)
dssi_tilde_osc_setup(x, i);
@@ -2233,12 +2247,6 @@ static void dssi_tilde_plug_plugin(t_dssi_tilde *x, t_symbol *s, int argc, t_ato
dssi_tilde_load_plugin(x, argc, argv);
}
-static void dssi_tilde_activate_plugin(t_dssi_tilde *x){
-
- x->dsp = 1;
-
-}
-
static void *dssi_tilde_new(t_symbol *s, t_int argc, t_atom *argv){
t_dssi_tilde *x = (t_dssi_tilde *)pd_new(dssi_tilde_class);
@@ -2288,8 +2296,10 @@ void dssi_tilde_setup(void) {
gensym ("reset"), A_DEFFLOAT, 0);
class_addmethod (dssi_tilde_class,(t_method)dssi_tilde_plug_plugin,
gensym ("plug"),A_GIMME,0);
- class_addmethod (dssi_tilde_class,(t_method)dssi_tilde_activate_plugin,
- gensym ("active"),A_DEFFLOAT,0);
+/* class_addmethod (dssi_tilde_class,(t_method)dssi_tilde_activate_plugin,
+ gensym ("activate"),A_DEFFLOAT - 1,0);
+ class_addmethod (dssi_tilde_class,(t_method)dssi_tilde_deactivate_plugin,
+ gensym ("deactivate"),A_DEFFLOAT - 1,0);*/
class_sethelpsymbol(dssi_tilde_class, gensym("help-dssi"));
CLASS_MAINSIGNALIN(dssi_tilde_class, t_dssi_tilde, f);
}
diff --git a/dssi/src/dssi~.h b/dssi/src/dssi~.h
index 0a85248..9a4084e 100644
--- a/dssi/src/dssi~.h
+++ b/dssi/src/dssi~.h
@@ -41,7 +41,7 @@
#define DX7_DUMP_SIZE_BULK 4096+8
-#define VERSION 0.92
+#define VERSION 0.93
#define EVENT_BUFSIZE 1024
#define OSC_BASE_MAX 1024
#define TYPE_STRING_SIZE 20 /* Max size of event type string (must be two more bytes than needed) */