Update of /cvsroot/pure-data/externals/plugin~
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4740
Modified Files:
ChangeLog plugin~-help.pd plugin~.c plugin~.h
Log Message:
enter the knifeman
Index: plugin~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/plugin~/plugin~.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** plugin~.c 29 Apr 2005 00:43:36 -0000 1.3
--- plugin~.c 30 Apr 2005 07:38:55 -0000 1.4
***************
*** 1,9 ****
/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins
Copyright (C) 2000 Jarno Seppänen
! remIXed 2005 Carmen Rocco
$Id$
- This file is part of plugin~.
-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
--- 1,7 ----
/* plugin~, a Pd tilde object for hosting LADSPA/VST plug-ins
Copyright (C) 2000 Jarno Seppänen
! remIXed 2005
$Id$
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
***************
*** 54,59 ****
class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_info,gensym ("info"),0);
class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_list,gensym ("listplugins"),0);
! class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_plug,gensym ("plug"),0);
! class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_bypass,gensym ("bypass"),0);
class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_reset,gensym ("reset"),0);
class_addmethod (plugin_tilde_class,nullfn,gensym ("signal"),0);
--- 52,57 ----
class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_info,gensym ("info"),0);
class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_list,gensym ("listplugins"),0);
! class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_plug,gensym ("plug"),A_DEFSYM,0);
! class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_bypass,gensym ("bypass"),A_DEFFLOAT,0);
class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_reset,gensym ("reset"),0);
class_addmethod (plugin_tilde_class,nullfn,gensym ("signal"),0);
***************
*** 75,79 ****
x->num_audio_outputs = 2;
x->num_control_inputs = 1;
! x->num_control_outputs = 0;
x->audio_inlets = NULL;
x->audio_outlets = NULL;
--- 73,77 ----
x->num_audio_outputs = 2;
x->num_control_inputs = 1;
! x->num_control_outputs = 1;
x->audio_inlets = NULL;
x->audio_outlets = NULL;
***************
*** 81,108 ****
x->dsp_vec = NULL;
x->dsp_vec_length = 0;
!
if (s_lib_name != NULL) {
if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0) {
- /* Search for the plugin library */
x->plugin_library_filename = plugin_tilde_search_plugin (x, s_name->s_name);
if (x->plugin_library_filename == NULL) {
post("plugin~: plugin not found in any library");
- goto PLUGIN_TILDE_NEW_RETURN_NULL;
}
}
else {
- /* Search in the given plugin library */
x->plugin_library_filename = strdup (s_lib_name->s_name);
}
- /* Load LADSPA/VST plugin */
if (plugin_tilde_open_plugin (x,
s_name->s_name,
x->plugin_library_filename,
! (unsigned long)sys_getsr ())) {
post("plugin~: Unable to open plugin");
- goto PLUGIN_TILDE_NEW_RETURN_NULL;
- }
}
!
/* Create in- and outlet(s) */
--- 79,100 ----
x->dsp_vec = NULL;
x->dsp_vec_length = 0;
!
if (s_lib_name != NULL) {
if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0) {
x->plugin_library_filename = plugin_tilde_search_plugin (x, s_name->s_name);
if (x->plugin_library_filename == NULL) {
post("plugin~: plugin not found in any library");
}
}
else {
x->plugin_library_filename = strdup (s_lib_name->s_name);
}
if (plugin_tilde_open_plugin (x,
s_name->s_name,
x->plugin_library_filename,
! (unsigned long)sys_getsr ()))
post("plugin~: Unable to open plugin");
}
!
/* Create in- and outlet(s) */
***************
*** 136,146 ****
return x;
- PLUGIN_TILDE_NEW_RETURN_NULL:
- if (x->plugin_library_filename != NULL) {
- free ((void*)x->plugin_library_filename);
- x->plugin_library_filename = NULL;
- }
- return NULL; /* Indicate error to Pd */
-
}
--- 128,131 ----
***************
*** 226,230 ****
/* precondition(s) */
assert (w != NULL);
!
/* Unpack DSP parameter vector */
x = (Pd_Plugin_Tilde*)(w[1]);
--- 211,215 ----
/* precondition(s) */
assert (w != NULL);
!
/* Unpack DSP parameter vector */
x = (Pd_Plugin_Tilde*)(w[1]);
***************
*** 280,288 ****
static void plugin_tilde_info (Pd_Plugin_Tilde* x) {
- assert (x != NULL);
unsigned port_index = 0;
- unsigned input_count = 0;
- unsigned output_count = 0;
t_atom at[5];
at[0].a_type = A_SYMBOL;
at[1].a_type = A_SYMBOL;
--- 265,273 ----
static void plugin_tilde_info (Pd_Plugin_Tilde* x) {
unsigned port_index = 0;
t_atom at[5];
+ LADSPA_PortDescriptor port_type;
+ LADSPA_PortRangeHintDescriptor iHintDescriptor;
+
at[0].a_type = A_SYMBOL;
at[1].a_type = A_SYMBOL;
***************
*** 292,297 ****
for (port_index = 0; port_index < x->plugin.ladspa.type->PortCount; port_index++) {
- LADSPA_PortDescriptor port_type;
- LADSPA_PortRangeHintDescriptor iHintDescriptor;
port_type = x->plugin.ladspa.type->PortDescriptors[port_index];
iHintDescriptor = x->plugin.ladspa.type->PortRangeHints[port_index].HintDescriptor;
--- 277,280 ----
***************
*** 317,334 ****
outlet_anything (x->control_outlet, gensym ("port"), 5, at);
}
-
}
static void plugin_tilde_list (Pd_Plugin_Tilde* x) {
! post("listing plugins\n");
! LADSPAPluginSearch(plugin_tilde_describe,x);
}
! static void plugin_tilde_describe(const char * pcFullFilename,
void * pvPluginHandle,
! LADSPA_Descriptor_Function fDescriptorFunction, Pd_Plugin_Tilde* x) {
t_atom at[1];
const LADSPA_Descriptor * psDescriptor;
long lIndex;
at[0].a_type = A_SYMBOL;
--- 300,320 ----
outlet_anything (x->control_outlet, gensym ("port"), 5, at);
}
}
static void plugin_tilde_list (Pd_Plugin_Tilde* x) {
! void* user_data[1];
! user_data[0] = x;
! LADSPAPluginSearch(plugin_tilde_ladspa_describe,(void*)user_data);
}
! static void plugin_tilde_ladspa_describe(const char * pcFullFilename,
void * pvPluginHandle,
! LADSPA_Descriptor_Function fDescriptorFunction, void* user_data) {
!
! Pd_Plugin_Tilde* x = (((void**)user_data)[0]);
t_atom at[1];
const LADSPA_Descriptor * psDescriptor;
long lIndex;
+
at[0].a_type = A_SYMBOL;
***************
*** 357,364 ****
}
! static void plugin_tilde_plug (Pd_Plugin_Tilde* x) {
}
-
static void plugin_tilde_reset (Pd_Plugin_Tilde* x)
{
--- 343,356 ----
}
! static void plugin_tilde_plug (Pd_Plugin_Tilde* x, t_symbol* plug_name) {
! plugin_tilde_ladspa_close_plugin(x);
! x->plugin_library_filename = NULL;
! x->plugin_library_filename = plugin_tilde_search_plugin (x, plug_name->s_name);
! if (x->plugin_library_filename == NULL)
! post("plugin~: plugin not found in any library");
! if (plugin_tilde_open_plugin (x, plug_name->s_name, x->plugin_library_filename,(unsigned long)sys_getsr ()))
! post("plugin~: Unable to open plugin");
}
static void plugin_tilde_reset (Pd_Plugin_Tilde* x)
{
Index: plugin~.h
===================================================================
RCS file: /cvsroot/pure-data/externals/plugin~/plugin~.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** plugin~.h 29 Apr 2005 00:43:36 -0000 1.3
--- plugin~.h 30 Apr 2005 07:38:55 -0000 1.4
***************
*** 80,84 ****
static void plugin_tilde_list (Pd_Plugin_Tilde* x);
static void plugin_tilde_info (Pd_Plugin_Tilde* x);
! static void plugin_tilde_plug (Pd_Plugin_Tilde* x);
static void plugin_tilde_bypass (Pd_Plugin_Tilde* x);
/* First inlet message callback for "reset" messages */
--- 80,84 ----
static void plugin_tilde_list (Pd_Plugin_Tilde* x);
static void plugin_tilde_info (Pd_Plugin_Tilde* x);
! static void plugin_tilde_plug (Pd_Plugin_Tilde* x, t_symbol* plug_name);
static void plugin_tilde_bypass (Pd_Plugin_Tilde* x);
/* First inlet message callback for "reset" messages */
***************
*** 136,143 ****
/* Local subroutines */
! static void plugin_tilde_describe (const char* full_filename,
void* plugin_handle,
LADSPA_Descriptor_Function descriptor_function,
! Pd_Plugin_Tilde* x);
static void plugin_tilde_ladspa_search_plugin_callback (const char* full_filename,
void* plugin_handle,
--- 136,143 ----
/* Local subroutines */
! static void plugin_tilde_ladspa_describe (const char* full_filename,
void* plugin_handle,
LADSPA_Descriptor_Function descriptor_function,
! void* user_data);
static void plugin_tilde_ladspa_search_plugin_callback (const char* full_filename,
void* plugin_handle,
Index: plugin~-help.pd
===================================================================
RCS file: /cvsroot/pure-data/externals/plugin~/plugin~-help.pd,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** plugin~-help.pd 29 Apr 2005 00:43:36 -0000 1.1
--- plugin~-help.pd 30 Apr 2005 07:38:55 -0000 1.2
***************
*** 1,126 ****
! #N canvas 146 82 1105 734 12;
! #X floatatom 415 488 0 0 555 0 - - -;
! #X msg 414 467 440;
! #X obj 359 483 loadbang;
! #X msg 416 508 control freq \$1;
! #X msg 318 507 control amp \$1;
! #X msg 316 464 0.7;
! #X floatatom 316 487 0 0 1 0 - - -;
! #X msg 67 351 control gain \$1;
! #X floatatom 67 326 0 0 1 0 - - -;
! #X msg 66 300 0.7;
! #X obj 378 534 plugin~ sine_fcac;
! #X obj 217 365 adc~;
! #X obj 200 436 dac~;
! #X obj 66 269 loadbang;
! #N canvas 0 0 450 300 graph1 0;
! #X array array1 100 float 0;
! #X coords 0 1 100 -1 200 140 1;
! #X restore 84 465 graph;
! #X obj 377 558 tabwrite~ array1;
! #X obj 314 578 metro 500;
! #X msg 312 557 1;
! #X obj 313 534 loadbang;
! #X msg 14 310 reset;
! #X msg 20 258 info;
! #X msg 21 234 listplugins;
! #X obj 544 105 route id name label maker;
! #X obj 543 103 widget q q1 -bg black -fg "#ff0045" -height 42 -width
5;
! #X obj 574 103 widget q q1 -bg black -fg white -height 42 -width 23
;
! #X obj 715 702 print;
! #X obj 599 622 route scroll;
! #X msg 600 645 scroll \$1;
! #X obj 578 106 prepend add;
! #X obj 713 103 widget q q1 -bg black -fg orange -height 42 -width 16
;
! #X obj 723 642 route scroll;
! #X msg 722 667 scroll \$1;
! #X obj 547 644 route scroll;
! #X msg 547 667 scroll \$1;
! #X obj 842 629 route scroll;
! #X msg 840 652 scroll \$1;
! #X obj 810 103 widget q q1 -bg black -fg cyan -height 42 -width 49
;
! #X obj 546 106 prepend add;
! #X obj 716 107 prepend add;
! #X obj 814 109 prepend add;
! #X obj 96 389 plugin~ tap_equalizer;
! #X obj 165 87 widget q q1 -width 24 -bg gray -fg purple -height 18
;
! #X obj 234 47 unpack s f f;
! #X obj 46 7 route port;
! #X obj 69 32 route in;
! #X obj 129 24 route control;
! #X obj 197 50 a2l;
! #X msg 364 66 add \$1;
! #X msg 316 66 add \$1;
! #X obj 311 87 widget q q1 -width 8 -bg gray -fg purple -height 18;
! #X obj 361 87 widget q q1 -width 8 -bg gray -fg purple -height 18;
! #X msg 120 224 clear;
! #X connect 0 0 3 0;
! #X connect 1 0 0 0;
! #X connect 2 0 1 0;
! #X connect 2 0 5 0;
! #X connect 3 0 10 0;
! #X connect 4 0 10 0;
! #X connect 5 0 6 0;
! #X connect 6 0 4 0;
! #X connect 7 0 40 0;
! #X connect 8 0 7 0;
! #X connect 9 0 8 0;
! #X connect 10 1 15 0;
! #X connect 11 0 40 1;
! #X connect 13 0 9 0;
! #X connect 16 0 15 0;
! #X connect 17 0 16 0;
! #X connect 18 0 17 0;
! #X connect 19 0 40 0;
! #X connect 20 0 51 0;
! #X connect 20 0 40 0;
! #X connect 21 0 40 0;
! #X connect 22 0 37 0;
! #X connect 22 1 28 0;
! #X connect 22 2 38 0;
! #X connect 22 3 39 0;
! #X connect 23 0 32 0;
! #X connect 24 0 26 0;
#X connect 26 0 27 0;
#X connect 27 0 23 0;
! #X connect 27 0 29 0;
! #X connect 27 0 36 0;
! #X connect 28 0 24 0;
#X connect 29 0 30 0;
! #X connect 29 0 25 0;
! #X connect 30 0 31 0;
! #X connect 31 0 23 0;
! #X connect 31 0 24 0;
! #X connect 31 0 36 0;
! #X connect 32 0 33 0;
! #X connect 33 0 24 0;
! #X connect 33 0 29 0;
! #X connect 33 0 36 0;
! #X connect 34 0 35 0;
! #X connect 35 0 23 0;
! #X connect 35 0 24 0;
! #X connect 35 0 29 0;
! #X connect 36 0 34 0;
! #X connect 37 0 23 0;
! #X connect 38 0 29 0;
! #X connect 39 0 36 0;
! #X connect 40 0 22 0;
#X connect 40 0 43 0;
! #X connect 40 1 12 0;
! #X connect 42 0 41 0;
! #X connect 42 1 48 0;
! #X connect 42 2 47 0;
! #X connect 43 0 44 0;
! #X connect 44 0 45 0;
! #X connect 45 0 46 0;
! #X connect 46 0 42 0;
! #X connect 47 0 50 0;
! #X connect 48 0 49 0;
! #X connect 51 0 49 0;
! #X connect 51 0 41 0;
! #X connect 51 0 50 0;
--- 1,131 ----
! #N canvas 0 82 939 822 12;
! #X obj 497 2 adc~;
! #X obj 450 78 dac~;
! #X msg 240 3 info;
! #X msg 274 2 listplugins;
! #X obj 388 105 route id name label maker;
! #X obj 387 103 widget q q1 -bg black -fg "#ff0045" -height 42 -width
5;
! #X obj 418 103 widget q q1 -bg black -fg white -height 42 -width 23
;
! #X obj 443 622 route scroll;
! #X msg 444 645 scroll \$1;
! #X obj 422 106 prepend add;
! #X obj 557 103 widget q q1 -bg black -fg orange -height 42 -width 16
;
! #X obj 567 642 route scroll;
! #X msg 566 667 scroll \$1;
! #X obj 391 644 route scroll;
! #X msg 391 667 scroll \$1;
! #X obj 686 629 route scroll;
! #X msg 684 652 scroll \$1;
! #X obj 654 103 widget q q1 -bg black -fg cyan -height 42 -width 49
;
! #X obj 390 106 prepend add;
! #X obj 560 107 prepend add;
! #X obj 658 109 prepend add;
! #X obj 298 47 plugin~ tap_equalizer;
! #X obj 41 69 widget q q1 -width 24 -bg gray -fg purple -height 18;
! #X obj 107 76 unpack s f f;
! #X obj 298 66 route port;
! #X obj 298 85 route in;
! #X obj 298 104 route control;
! #X obj 87 76 a2l;
! #X msg 238 70 add \$1;
! #X msg 189 70 add \$1;
! #X obj 187 69 widget q q1 -width 8 -bg gray -fg purple -height 18;
! #X obj 237 69 widget q q1 -width 8 -bg gray -fg purple -height 18;
! #X msg 188 70 clear;
! #X obj 113 425 widget ngrid n1 #w 256 #h 256;
! #X obj 193 325 niagara 1;
! #X obj 193 382 glue;
! #X obj 193 363 a2l;
! #X obj 193 401 prepend add;
! #X msg 112 393 move swarm;
! #X msg 120 373 move;
! #X obj 335 28 prepend control;
! #X text 557 7 plugin~;
! #X text 570 23 currently supports LADSPA;
! #X obj 427 47 plugin~ tap_equalizer;
! #X text 643 400 if you can see this \, you need widgets from /extensions/gui/ix
;
! #X msg 114 428 redefine;
! #X obj 242 344 expr $f1 + ($f2-$f1)/2.;
! #X obj 193 344 Append;
! #X text 41 51 param;
! #X text 211 52 min;
! #X text 261 52 max;
! #X text 388 85 id;
! #X text 522 85 name;
! #X text 628 85 label;
! #X text 916 85 maker;
! #X obj 559 667 route symbol;
! #X msg 427 28 plug \$1;
! #X connect 0 0 21 1;
! #X connect 0 1 43 1;
! #X connect 2 0 32 0;
! #X connect 2 0 21 0;
! #X connect 3 0 21 0;
! #X connect 4 0 18 0;
! #X connect 4 1 9 0;
! #X connect 4 2 19 0;
! #X connect 4 3 20 0;
! #X connect 5 0 13 0;
! #X connect 6 0 7 0;
! #X connect 7 0 8 0;
! #X connect 8 0 5 0;
! #X connect 8 0 10 0;
! #X connect 8 0 17 0;
! #X connect 9 0 6 0;
! #X connect 10 0 11 0;
! #X connect 10 0 55 0;
! #X connect 11 0 12 0;
! #X connect 12 0 5 0;
! #X connect 12 0 6 0;
! #X connect 12 0 17 0;
! #X connect 13 0 14 0;
! #X connect 14 0 6 0;
! #X connect 14 0 10 0;
! #X connect 14 0 17 0;
! #X connect 15 0 16 0;
! #X connect 16 0 5 0;
! #X connect 16 0 6 0;
! #X connect 16 0 10 0;
! #X connect 17 0 15 0;
! #X connect 18 0 5 0;
! #X connect 19 0 10 0;
! #X connect 20 0 17 0;
! #X connect 21 0 4 0;
! #X connect 21 0 24 0;
! #X connect 21 1 1 0;
! #X connect 23 0 22 0;
! #X connect 23 1 29 0;
! #X connect 23 2 28 0;
! #X connect 24 0 25 0;
! #X connect 25 0 26 0;
#X connect 26 0 27 0;
+ #X connect 26 0 34 0;
#X connect 27 0 23 0;
! #X connect 28 0 31 0;
#X connect 29 0 30 0;
! #X connect 32 0 30 0;
! #X connect 32 0 22 0;
! #X connect 32 0 31 0;
! #X connect 32 0 45 0;
! #X connect 33 0 40 0;
! #X connect 34 0 47 0;
! #X connect 34 1 46 0;
! #X connect 34 1 35 1;
! #X connect 35 0 37 0;
! #X connect 36 0 35 0;
! #X connect 37 0 33 0;
! #X connect 38 0 33 0;
! #X connect 39 0 33 0;
! #X connect 40 0 21 0;
#X connect 40 0 43 0;
! #X connect 43 1 1 1;
! #X connect 45 0 33 0;
! #X connect 46 0 47 1;
! #X connect 47 0 36 0;
! #X connect 55 0 56 0;
! #X connect 56 0 43 0;
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pure-data/externals/plugin~/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ChangeLog 29 Apr 2005 00:43:36 -0000 1.2
--- ChangeLog 30 Apr 2005 07:38:55 -0000 1.3
***************
*** 1,2 ****
--- 1,11 ----
+ 2005-05-00 Carmen Rocco <user(a)whats-your.name>
+
+ * VST support is gone, actually, it was never here, but removed some stuff to clean it up, VST? detour to /externals/grill/vst/
+
+ new methods:
+ * listplugins: lists all your LADSPA plugins...
+ * info: info on the current plugin, like assignable params, etc.
+ * plug: load a new plug
+
2001-04-04 Jarno Seppänen <jams(a)cs.tut.fi (Jarno Seppanen)>