aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/xsample')
-rw-r--r--externals/grill/xsample/source/groove.cpp60
-rw-r--r--externals/grill/xsample/source/play.cpp34
-rw-r--r--externals/grill/xsample/source/record.cpp63
3 files changed, 33 insertions, 124 deletions
diff --git a/externals/grill/xsample/source/groove.cpp b/externals/grill/xsample/source/groove.cpp
index e756f28a..306c660b 100644
--- a/externals/grill/xsample/source/groove.cpp
+++ b/externals/grill/xsample/source/groove.cpp
@@ -10,6 +10,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "main.h"
#include <math.h>
+#include <stdio.h>
#ifdef _MSC_VER
#pragma warning (disable:4244)
@@ -30,10 +31,6 @@ public:
virtual BL Init();
-#if FLEXT_SYS == FLEXT_SYS_MAX
- virtual V m_assist(L msg,L arg,C *s);
-#endif
-
virtual V m_help();
virtual V m_print();
@@ -177,12 +174,18 @@ xgroove::xgroove(I argc,const t_atom *argv):
else
buf = new buffer(NULL,true);
- AddInSignal(); // speed signal
- AddInFloat(2); // min & max play pos
- AddOutSignal(outchns); // output
- AddOutSignal(); // position
- AddOutFloat(2); // play min & max
- AddOutBang(); // loop bang
+ AddInSignal("Signal of playing speed"); // speed signal
+ AddInFloat("Starting point"); // min play pos
+ AddInFloat("Ending point"); // max play pos
+ for(I ci = 0; ci < outchns; ++ci) {
+ C tmp[30];
+ sprintf(tmp,"Audio signal channel %i",ci+1);
+ AddOutSignal(tmp); // output
+ }
+ AddOutSignal("Position currently played"); // position
+ AddOutFloat("Starting point (rounded to frame)"); // play min
+ AddOutFloat("Ending point (rounded to frame)"); // play max
+ AddOutBang("Bang on loop end/rollover"); // loop bang
znbuf = new S *[outchns];
@@ -674,40 +677,3 @@ V xgroove::m_print()
post("");
}
-#if FLEXT_SYS == FLEXT_SYS_MAX
-V xgroove::m_assist(long msg, long arg, char *s)
-{
- switch(msg) {
- case 1: //ASSIST_INLET:
- switch(arg) {
- case 0:
- sprintf(s,"Signal of playing speed"); break;
- case 1:
- sprintf(s,"Starting point"); break;
- case 2:
- sprintf(s,"Ending point"); break;
- }
- break;
- case 2: //ASSIST_OUTLET:
- if(arg < outchns)
- sprintf(s,"Audio signal channel %li",arg+1);
- else
- switch(arg-outchns) {
- case 0:
- sprintf(s,"Position currently played"); break;
- case 1:
- sprintf(s,"Starting point (rounded to frame)"); break;
- case 2:
- sprintf(s,"Ending point (rounded to frame)"); break;
- case 3:
- sprintf(s,"Bang on loop end/rollover"); break;
- }
- break;
- }
-}
-#endif
-
-
-
-
-
diff --git a/externals/grill/xsample/source/play.cpp b/externals/grill/xsample/source/play.cpp
index c2e6ef41..770dd6b6 100644
--- a/externals/grill/xsample/source/play.cpp
+++ b/externals/grill/xsample/source/play.cpp
@@ -9,6 +9,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include "main.h"
+#include <stdio.h>
#ifdef _MSC_VER
#pragma warning (disable:4244)
@@ -25,10 +26,6 @@ public:
virtual BL Init();
-#if FLEXT_SYS == FLEXT_SYS_MAX
- virtual V m_assist(L msg,L arg,C *s);
-#endif
-
virtual V m_help();
virtual V m_print();
@@ -69,8 +66,12 @@ xplay::xplay(I argc,const t_atom *argv)
else
buf = new buffer(NULL,true);
- AddInSignal(); // pos signal
- AddOutSignal(outchns);
+ AddInSignal("Messages and Signal of playing position"); // pos signal
+ for(I ci = 0; ci < outchns; ++ci) {
+ C tmp[30];
+ sprintf(tmp,"Audio signal channel %i",ci+1);
+ AddOutSignal(tmp);
+ }
m_reset();
}
@@ -126,24 +127,3 @@ V xplay::m_print()
}
-#if FLEXT_SYS == FLEXT_SYS_MAX
-V xplay::m_assist(L msg,L arg,C *s)
-{
- switch(msg) {
- case 1: //ASSIST_INLET:
- switch(arg) {
- case 0:
- sprintf(s,"Messages and Signal of playing position"); break;
- }
- break;
- case 2: //ASSIST_OUTLET:
- if(arg < outchns)
- sprintf(s,"Audio signal channel %li",arg+1);
- break;
- }
-}
-#endif
-
-
-
-
diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp
index 318e01d2..36d6549a 100644
--- a/externals/grill/xsample/source/record.cpp
+++ b/externals/grill/xsample/source/record.cpp
@@ -9,6 +9,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include "main.h"
+#include <stdio.h>
#ifdef _MSC_VER
#pragma warning (disable:4244)
@@ -25,10 +26,6 @@ public:
virtual BL Init();
-#if FLEXT_SYS == FLEXT_SYS_MAX
- virtual V m_assist(L msg,L arg,C *s);
-#endif
-
virtual V m_help();
virtual V m_print();
@@ -143,12 +140,18 @@ xrecord::xrecord(I argc,const t_atom *argv):
else
buf = new buffer(NULL,true);
- AddInSignal(inchns); // audio signals
- AddInSignal(); // on/off signal
- AddInFloat(2); // min & max
- AddOutSignal(); // pos signal
- AddOutFloat(2); // min & max
- AddOutBang(); // loop bang
+ for(I ci = 0; ci < inchns; ++ci) {
+ C tmp[30];
+ sprintf(tmp,"Audio channel %i",ci+1);
+ AddInSignal(tmp); // audio signals
+ }
+ AddInSignal("On/Off/Fade/Mix signal (0..1)"); // on/off signal
+ AddInFloat("Starting point of recording"); // min
+ AddInFloat("Ending point of recording"); // max
+ AddOutSignal("Current position of recording"); // pos signal
+ AddOutFloat("Starting point (rounded to frame)"); // min
+ AddOutFloat("Ending point (rounded to frame)"); // max
+ AddOutBang("Bang on loop end/rollover"); // loop bang
FLEXT_ADDMETHOD(inchns+1,m_min);
FLEXT_ADDMETHOD(inchns+2,m_max);
@@ -460,43 +463,3 @@ V xrecord::m_print()
post("");
}
-
-#if FLEXT_SYS == FLEXT_SYS_MAX
-V xrecord::m_assist(L msg,L arg,C *s)
-{
- switch(msg) {
- case 1: //ASSIST_INLET:
- if(arg < inchns) {
- if(arg)
- sprintf(s,"Messages and Audio channel 1");
- else
- sprintf(s,"Audio channel %li",arg+1);
- }
- else
- switch(arg-inchns) {
- case 0:
- sprintf(s,"On/Off/Fade/Mix signal (0..1)"); break;
- case 1:
- sprintf(s,"Starting point of recording"); break;
- case 2:
- sprintf(s,"Ending point of recording"); break;
- }
- break;
- case 2: //ASSIST_OUTLET:
- switch(arg) {
- case 0:
- sprintf(s,"Current position of recording"); break;
- case 1:
- sprintf(s,"Starting point (rounded to frame)"); break;
- case 2:
- sprintf(s,"Ending point (rounded to frame)"); break;
- case 3:
- sprintf(s,"Bang on loop end/rollover"); break;
- }
- break;
- }
-}
-#endif
-
-
-