summaryrefslogtreecommitdiffstats
path: root/arts/modules
diff options
context:
space:
mode:
Diffstat (limited to 'arts/modules')
-rw-r--r--arts/modules/CMakeLists.txt2
-rw-r--r--arts/modules/README.environments38
-rw-r--r--arts/modules/effects/kstereovolumecontrolgui_impl.cpp2
-rw-r--r--arts/modules/effects/kstereovolumecontrolgui_impl.h4
-rw-r--r--arts/modules/synth/c_filter_stuff.c138
-rw-r--r--arts/modules/synth/c_filter_stuff.h60
6 files changed, 90 insertions, 154 deletions
diff --git a/arts/modules/CMakeLists.txt b/arts/modules/CMakeLists.txt
index fb6d07e2..0cc76da1 100644
--- a/arts/modules/CMakeLists.txt
+++ b/arts/modules/CMakeLists.txt
@@ -42,7 +42,7 @@ tde_add_library( artsmodules SHARED
artsmodules.cpp
VERSION 0.0.0
LINK
- tdecore-shared ${DL_LIBRARIES} mcop artsflow
+ tdecore-shared ${CMAKE_DL_LIBS} mcop artsflow
artsbuilder-shared artsgui_idl-shared artsmidi_idl-shared
artsmodulescommon-shared artsmodulessynth-shared
artsmoduleseffects-shared artsmodulesmixers-shared
diff --git a/arts/modules/README.environments b/arts/modules/README.environments
index c3b7b985..d8ca4dde 100644
--- a/arts/modules/README.environments
+++ b/arts/modules/README.environments
@@ -25,28 +25,28 @@ for composing a song, you might require
- several audio tracks
- a mixer
-While with artscontrol, the user can setup much of this himself manually, the
-problem is that this has to be done over and over again. That is, if he saves
-the song, the settings of his effects, instruments and the mixer will not be
-saved with it.
+While with artscontrol, the users can setup much of this themselves manually,
+the problem is that this has to be done over and over again. That is, if they
+save the song, the settings of their effects, instruments and the mixer will
+not be saved with it.
The main idea of the new interfaces in Arts::Environment is that the sequencer
can save the environment required to create a song along with the the song, so
-that the user will find himself surrounded by the same effects, instruments,...
-with the same settings again, once he loads the song again.
-
-So, conceptually, we can imagine the environment as a "room", where the user
-works in to create a song. He needs to install the things inside the room he
-needs. Initially, the room will be empty. Now, the user things: oh, I am going
-to need this nice 24 channel mixer. *plop* - it appears in the room. Now he
-thinks I need some sampler which can play my piano. *plop* - it appears in
-the room.
-
-Now he starts working, and adds the "items" he needs. Finally, if he stops
-working on the song, he can pack all what is in the environment in a little
-box, and whenever he starts working on the song again, he can start where he
-left off. He can even take the environment to a friend, and continue working
-on the song there.
+that the users will find themselves surrounded by the same effects,
+instruments,... with the same settings again, once they load the song again.
+
+So, conceptually, we can imagine the environment as a "room", where a user
+works in to create a song. They needs to install the things inside the room
+they need. Initially, the room will be empty. Now, the user thinks: oh, I am
+going to need this nice 24 channel mixer. *plop* - it appears in the room.
+Now they think: I need some sampler which can play my piano. *plop* - it
+appears in the room.
+
+Now they starts working, adding the "items" they need. Finally, if they stop
+working on the song, they can pack all what is in the environment in a little
+box, and whenever they starts working on the song again, they can start where
+they left off. They can even take the environment to a friend, and continue
+working on the song there.
Note that there might be other tasks (such as creating a film, playing an
mp3 with noatun,...) which will have similar requirements of saving the
diff --git a/arts/modules/effects/kstereovolumecontrolgui_impl.cpp b/arts/modules/effects/kstereovolumecontrolgui_impl.cpp
index cc5b42de..d7f8d30b 100644
--- a/arts/modules/effects/kstereovolumecontrolgui_impl.cpp
+++ b/arts/modules/effects/kstereovolumecontrolgui_impl.cpp
@@ -30,7 +30,7 @@ using namespace Arts;
KStereoVolumeControlGui_impl::KStereoVolumeControlGui_impl( TQFrame* w ) : KLayoutBox_impl( w ? w : new TQFrame( 0 ) )
{
//kdDebug()<<"KStereoVolumeControlGui_impl::KStereoVolumeControlGui_impl( TQFrame* "<<w<<" )"<<endl;
- _mapper = new KStereoVolumeControlGui_EventMapper( this, TQT_TQOBJECT(_qframe) );
+ _mapper = new KStereoVolumeControlGui_EventMapper( this, _qframe );
this->addWidget( _label, -100 );
_label.bottom( Arts::East );
_label.text( "Volume" );
diff --git a/arts/modules/effects/kstereovolumecontrolgui_impl.h b/arts/modules/effects/kstereovolumecontrolgui_impl.h
index c9f76dd9..ff5d96dd 100644
--- a/arts/modules/effects/kstereovolumecontrolgui_impl.h
+++ b/arts/modules/effects/kstereovolumecontrolgui_impl.h
@@ -80,7 +80,7 @@ private:
#include <tqtimer.h>
class KStereoVolumeControlGui_EventMapper : public TQObject {
- Q_OBJECT
+ TQ_OBJECT
public:
TQTimer* _timer;
@@ -88,7 +88,7 @@ public:
public:
KStereoVolumeControlGui_EventMapper( Arts::KStereoVolumeControlGui_impl* impl, TQObject* parent, const char* name=0 ) : TQObject( parent,name ), _impl( impl ) {
_timer = new TQTimer( this );
- connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimerSignal() ) );
+ connect( _timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotTimerSignal() ) );
}
public slots:
void slotTimerSignal() { _impl->updateValues(); }
diff --git a/arts/modules/synth/c_filter_stuff.c b/arts/modules/synth/c_filter_stuff.c
index 531d5015..c3a42697 100644
--- a/arts/modules/synth/c_filter_stuff.c
+++ b/arts/modules/synth/c_filter_stuff.c
@@ -42,8 +42,7 @@
/*#define SPN MINDOUBLE*/
#define SPN 0.00001
-double bw2angle(a,bw)
-double a,bw;
+double bw2angle(double a, double bw)
{
double T,d,sn,cs,mag,delta,theta,tmp,a2,a4,asnd;
@@ -63,8 +62,8 @@ double a,bw;
return(theta/(2.0*PI));
}
-void presence(cf,boost,bw,a0,a1,a2,b1,b2)
-double cf,boost,bw,*a0,*a1,*a2,*b1,*b2;
+void presence(double cf, double boost, double bw, double *a0,
+ double *a1, double *a2, double *b1, double *b2)
{
double a,A,F,xfmbw,C,tmp,alphan,alphad,b0,recipb0,asq,F2,a2plus1,ma2plus1;
@@ -100,8 +99,8 @@ double cf,boost,bw,*a0,*a1,*a2,*b1,*b2;
*b2 *= recipb0;
}
-void shelve(cf,boost,a0,a1,a2,b1,b2)
-double cf,boost,*a0,*a1,*a2,*b1,*b2;
+void shelve(double cf, double boost, double *a0, double *a1,
+ double *a2, double *b1, double *b2)
{
double a,A,F,tmp,b0,recipb0,asq,F2,gamma2,siggam2,gam2p1;
double gamman,gammad,ta0,ta1,ta2,tb0,tb1,tb2,aa1,ab1;
@@ -160,9 +159,7 @@ void initfilter(filter *f)
f->y = 0.0;
}
-void setfilter_presence(f,freq,boost,bw)
-filter *f;
-double freq,boost,bw;
+void setfilter_presence(filter *f, double freq, double boost, double bw)
{
presence(freq/(double)SR,boost,bw/(double)SR,
&f->cx,&f->cx1,&f->cx2,&f->cy1,&f->cy2);
@@ -196,9 +193,7 @@ void setfilter_shelvelowpass(filter *f, double freq, double boost)
* As in ''An introduction to digital filter theory'' by Julius O. Smith
* and in Moore's book; I use the normalized version in Moore's book.
*/
-void setfilter_2polebp(f,freq,R)
-filter *f;
-double freq,R;
+void setfilter_2polebp(filter *f, double freq, double R)
{
double theta;
@@ -217,9 +212,7 @@ double freq,R;
* for digital audio equalization
* JAES, Vol. 34, No. 6, 1986 June
*/
-void setfilter_peaknotch(f,freq,M,bw)
-filter *f;
-double freq,M,bw;
+void setfilter_peaknotch(filter *f, double freq, double M, double bw)
{
double w0,om,ta,d, p=0.0 /* prevents compiler warning */;
@@ -244,9 +237,7 @@ double freq,M,bw;
* Some JAES's article on ladder filter.
* freq (Hz), gdb (dB), bw (Hz)
*/
-void setfilter_peaknotch2(f,freq,gdb,bw)
-filter *f;
-double freq,gdb,bw;
+void setfilter_peaknotch2(filter *f, double freq, double gdb, double bw)
{
double k,w,bwr,abw,gain;
@@ -262,9 +253,7 @@ double freq,gdb,bw;
f->cy2 = -abw;
}
-double applyfilter(f,x)
-filter *f;
-double x;
+double applyfilter(filter *f, double x)
{
f->x = x;
f->y = f->cx * f->x + f->cx1 * f->x1 + f->cx2 * f->x2
@@ -281,8 +270,7 @@ double x;
*/
#if 0
-int saturate16(x)
-double x;
+int saturate16(double x)
{
if (x > 32765.0) {
return(32765);
@@ -291,9 +279,7 @@ double x;
} else return((int)x);
}
-void initdelay(d,n)
-delay *d;
-int n;
+void initdelay(delay *d, int n)
{
int i;
@@ -304,8 +290,7 @@ int n;
for(i = 0; i < n; i++) d->buf[i] = 0.0;
}
-double readdelay(d)
-delay *d;
+double readdelay(delay *d)
{
double y;
@@ -315,18 +300,14 @@ delay *d;
return(y);
}
-void writedelay(d,x)
-delay *d;
-double x;
+void writedelay(delay *d, double x)
{
d->buf[d->wloc] = x;
d->wloc++;
if (d->wloc == d->len) d->wloc = 0;
}
-void initringbufferd(rb,n)
-ringbufferd *rb;
-int n;
+void initringbufferd(ringbufferd *rb, int n)
{
int i;
@@ -336,9 +317,7 @@ int n;
for(i = 0; i < n; i++) rb->buf[i] = 0.0;
}
-double readringbufferd(rb,n)
-ringbufferd *rb;
-int n;
+double readringbufferd(ringbufferd *rb, int n)
{
int i;
@@ -348,18 +327,14 @@ int n;
return(rb->buf[i]);
}
-void writeringbufferd(rb,x)
-ringbufferd *rb;
-double x;
+void writeringbufferd(ringbufferd *rb, double x)
{
rb->buf[rb->wloc] = x;
rb->wloc++;
if (rb->wloc == rb->len) rb->wloc = 0;
}
-void initringbufferi(rb,n)
-ringbufferi *rb;
-int n;
+void initringbufferi(ringbufferd *rb, int n)
{
int i;
@@ -369,9 +344,7 @@ int n;
for(i = 0; i < n; i++) rb->buf[i] = 0;
}
-int readringbufferi(rb,n)
-ringbufferi *rb;
-int n;
+int readringbufferi(ringbufferd *rb, int n)
{
int i;
@@ -381,9 +354,7 @@ int n;
return(rb->buf[i]);
}
-void writeringbufferi(rb,x)
-ringbufferi *rb;
-int x;
+void writeringbufferi(ringbufferd *rb, int x)
{
rb->buf[rb->wloc] = x;
rb->wloc++;
@@ -396,8 +367,7 @@ int buffi[BUFFSIZE];
int **buffs;
-int makenodes(n)
-int n;
+int makenodes(int n)
{
int *p;
int i;
@@ -407,8 +377,7 @@ int n;
return((int)p);
}
-int makeints(n)
-int n;
+int makeints(int n)
{
int *p;
int i;
@@ -419,13 +388,9 @@ int n;
}
/*
-
constant memory size:
(i) one big malloc
(ii) many mallocs, upper limit in doing mallocs
-
-
-
*/
@@ -461,10 +426,7 @@ constant memory size:
*
*/
/*
-int newfreadbufs(buf,n,p)
-short **buf;
-int n;
-ty_audiofile *p;
+int newfreadbufs(short **buf, int n, ty_audiofile *p)
{
if (n*p->afsc > BUFFSIZE) {
fprintf(stderr,"freadbufi: reading too many samples\n");
@@ -475,10 +437,7 @@ ty_audiofile *p;
return(m);
}
-int newfreadbufi(buf,n,p)
-int **buf;
-int n;
-ty_audiofile *p;
+int newfreadbufi(int **buf, int n, ty_audiofile *p)
{
if (n*p->afsc > BUFFSIZE) {
fprintf(stderr,"freadbufi: reading too many samples\n");
@@ -489,10 +448,7 @@ ty_audiofile *p;
return(m);
}
-int newfreadbuff(buf,n,p)
-float **buf;
-int n;
-ty_audiofile *p;
+int newfreadbuff(float **buf, int n, ty_audiofile *p)
{
if (n*p->afsc > BUFFSIZE) {
fprintf(stderr,"freadbufi: reading too many samples\n");
@@ -504,9 +460,7 @@ ty_audiofile *p;
}
-int newfreadbuf(buf,p)
-ty_buffer *buf;
-ty_audiofile *p;
+int newfreadbuf(ty_buffer **buf, ty_audiofile *p)
{
}
@@ -519,10 +473,7 @@ ty_audiofile *p;
* Return value is the number of the samples read.
*/
-int freadbuf(buf,n,p)
-int **buf;
-int n;
-ty_audiofile *p;
+int freadbuf(int **buf, int n, ty_audiofile *p)
{
int h,i,j,k,l,s;
unsigned int us;
@@ -571,10 +522,7 @@ ty_audiofile *p;
}
-int fwritebuf(buf,n,p)
-int **buf;
-int n;
-ty_audiofile *p;
+int fwritebuf(int **buf, int n, ty_audiofile *p)
{
int h,i,j,k,l,s;
unsigned int us1,us2;
@@ -640,10 +588,7 @@ ty_audiofile *p;
}
-ty_audiofile *initaf(afm,afn,aft)
-ty_afmethod *afm;
-ty_afname *afn;
-ty_aftype *aft;
+ty_audiofile *initaf(ty_afmethod *afm, ty_afname *afn, ty_aftype *aft)
{
ty_audiofile *p;
int i,j,k,n,s;
@@ -769,8 +714,7 @@ void bye()
}
-ty_sample *makesample(sc)
-int sc;
+ty_sample *makesample(int sc)
{
ty_sample *p;
@@ -780,10 +724,7 @@ int sc;
}
-int readsample(p,n,s)
-ty_audiofile *p;
-int n;
-ty_sample *s;
+int readsample(ty_audiofile *p, int n, ty_sample *s)
{
int i,j,k,dt,l;
FILE *fp;
@@ -839,10 +780,7 @@ ty_sample *s;
}
-int writesample(p,n,s)
-ty_audiofile *p;
-int n;
-ty_sample *s;
+int writesample(ty_audiofile *p, int n, ty_sample *s)
{
int i,j,k,dt,l;
FILE *fp;
@@ -878,8 +816,7 @@ ty_afmethod *afmethod_flowout()
return(p);
}
-ty_afmethod *afmethod_rb(n)
-int n;
+ty_afmethod *afmethod_rb(int n)
{
ty_afmethod *p;
@@ -902,8 +839,7 @@ ty_afmethod *afmethod_aimro()
return(p);
}
-ty_afname *afname(s)
-char *s;
+ty_afname *afname(char *s)
{
ty_afname *p;
@@ -936,8 +872,7 @@ ty_afname *afname_stdout()
return(p);
}
-ty_aftype *aftype(sr,sc,stype)
-int sr,sc,stype;
+ty_aftype *aftype(int sr, int sc, int stype)
{
ty_aftype *p;
@@ -954,8 +889,7 @@ ty_aftype *aftype_defstereo()
}
-ty_audiofile *initaf_aimdefstereo(filename)
-char *filename;
+ty_audiofile *initaf_aimdefstereo(char *filename)
{
return(initaf(afmethod_aimro(),afname(filename),aftype_defstereo()));
}
diff --git a/arts/modules/synth/c_filter_stuff.h b/arts/modules/synth/c_filter_stuff.h
index 89e93de3..4f3d7f6a 100644
--- a/arts/modules/synth/c_filter_stuff.h
+++ b/arts/modules/synth/c_filter_stuff.h
@@ -40,16 +40,18 @@ typedef struct {
double x,x1,x2,y,y1,y2;
} filter;
-void presence();
-void shelve();
+void presence(double cf, double boost, double bw, double *a0,
+ double *a1, double *a2, double *b1, double *b2);
+void shelve(double cf, double boost, double *a0, double *a1,
+ double *a2, double *b1, double *b2);
void initfilter(filter *f);
-void setfilter_presence();
+void setfilter_presence(filter *f, double freq, double boost, double bw);
void setfilter_shelve(filter *f, double freq, double boost);
void setfilter_shelvelowpass(filter *f, double freq, double boost);
-void setfilter_2polebp();
-void setfilter_peaknotch();
-void setfilter_peaknotch2();
-double applyfilter();
+void setfilter_2polebp(filter *f, double freq, double R);
+void setfilter_peaknotch(filter *f, double freq, double M, double bw);
+void setfilter_peaknotch2(filter *f, double freq, double gdb, double bw);
+double applyfilter(filter *f, double x);
#ifdef __cplusplus
}
@@ -208,38 +210,38 @@ typedef struct {
ty_audiofile *gaf[C_MAXAUDIOFILES];
-int makenodes();
-int makeints();
+int makenodes(int n);
+int makeints(int n);
/*
-int freadbuf();
-int fwritebuf();
+int freadbuf(int **buf, int n, ty_audiofile *p);
+int fwritebuf(int **buf, int n, ty_audiofile *p);
*/
-ty_audiofile *initaf();
+ty_audiofile *initaf(ty_afmethod *afm, ty_afname *afn, ty_aftype *aft);
void bye();
-ty_sample *makesample();
-int readsample();
-int writesample();
+ty_sample *makesample(int sc);
+int readsample(ty_audiofile *p, int n, ty_sample *s);
+int writesample(ty_audiofile *p, int n, ty_sample *s);
ty_afmethod *afmethod_flowout();
-ty_afmethod *afmethod_rb();
+ty_afmethod *afmethod_rb(int n);
ty_afmethod *afmethod_aimro();
-ty_afname *afname();
+ty_afname *afname(char *s);
ty_afname *afname_stdin();
ty_afname *afname_stdout();
-ty_aftype *aftype();
+ty_aftype *aftype(int sr, int sc, int stype);
ty_aftype *aftype_defstereo();
-ty_audiofile *initaf_aimdefstereo();
+ty_audiofile *initaf_aimdefstereo(char *filename);
ty_audiofile *initaf_stdin();
void init();
-int saturate16();
-void initdelay();
-double readdelay();
-void writedelay();
-void initringbufferd();
-double readringbufferd();
-void writeringbufferd();
-void initringbufferi();
-int readringbufferi();
-void writeringbufferi();
+int saturate16(double x);
+void initdelay(delay *d, int n);
+double readdelay(delay *d);
+void writedelay(delay *d, double x);
+void initringbufferd(ringbufferd *rb, int n);
+double readringbufferd(ringbufferd *rb, int n);
+void writeringbufferd(ringbufferd *rb, double x);
+void initringbufferi(ringbufferd *rb, int n);
+int readringbufferi(ringbufferd *rb, int n);
+void writeringbufferi(ringbufferd *rb, int x);
#endif
#endif // C_FILTER_STUFF_H