summaryrefslogtreecommitdiffstats
path: root/arts/modules/synth
diff options
context:
space:
mode:
Diffstat (limited to 'arts/modules/synth')
-rw-r--r--arts/modules/synth/CMakeLists.txt30
-rw-r--r--arts/modules/synth/Makefile.am26
-rw-r--r--arts/modules/synth/artsmodulessynth.idl2
-rw-r--r--arts/modules/synth/c_filter_stuff.c138
-rw-r--r--arts/modules/synth/c_filter_stuff.h60
-rw-r--r--arts/modules/synth/objectcache_impl.cpp (renamed from arts/modules/synth/objectcache_impl.cc)0
-rw-r--r--arts/modules/synth/synth_atan_saturate_impl.cpp (renamed from arts/modules/synth/synth_atan_saturate_impl.cc)0
-rw-r--r--arts/modules/synth/synth_autopanner_impl.cpp (renamed from arts/modules/synth/synth_autopanner_impl.cc)0
-rw-r--r--arts/modules/synth/synth_brickwall_limiter_impl.cpp (renamed from arts/modules/synth/synth_brickwall_limiter_impl.cc)0
-rw-r--r--arts/modules/synth/synth_capture_wav_impl.cpp (renamed from arts/modules/synth/synth_capture_wav_impl.cc)0
-rw-r--r--arts/modules/synth/synth_cdelay_impl.cpp (renamed from arts/modules/synth/synth_cdelay_impl.cc)3
-rw-r--r--arts/modules/synth/synth_compressor_impl.cpp (renamed from arts/modules/synth/synth_compressor_impl.cc)0
-rw-r--r--arts/modules/synth/synth_data_impl.cpp (renamed from arts/modules/synth/synth_data_impl.cc)0
-rw-r--r--arts/modules/synth/synth_debug_impl.cpp (renamed from arts/modules/synth/synth_debug_impl.cc)0
-rw-r--r--arts/modules/synth/synth_delay_impl.cpp (renamed from arts/modules/synth/synth_delay_impl.cc)0
-rw-r--r--arts/modules/synth/synth_div_impl.cpp (renamed from arts/modules/synth/synth_div_impl.cc)0
-rw-r--r--arts/modules/synth/synth_envelope_adsr_impl.cpp (renamed from arts/modules/synth/synth_envelope_adsr_impl.cc)0
-rw-r--r--arts/modules/synth/synth_fm_source_impl.cpp (renamed from arts/modules/synth/synth_fm_source_impl.cc)0
-rw-r--r--arts/modules/synth/synth_fx_cflanger_impl.cpp (renamed from arts/modules/synth/synth_fx_cflanger_impl.cc)0
-rw-r--r--arts/modules/synth/synth_midi_debug_impl.cpp (renamed from arts/modules/synth/synth_midi_debug_impl.cc)0
-rw-r--r--arts/modules/synth/synth_midi_test_impl.cpp (renamed from arts/modules/synth/synth_midi_test_impl.cc)0
-rw-r--r--arts/modules/synth/synth_moog_vcf_impl.cpp (renamed from arts/modules/synth/synth_moog_vcf_impl.cc)0
-rw-r--r--arts/modules/synth/synth_nil_impl.cpp (renamed from arts/modules/synth/synth_nil_impl.cc)0
-rw-r--r--arts/modules/synth/synth_noise_impl.cpp (renamed from arts/modules/synth/synth_noise_impl.cc)0
-rw-r--r--arts/modules/synth/synth_osc_impl.cpp (renamed from arts/modules/synth/synth_osc_impl.cc)0
-rw-r--r--arts/modules/synth/synth_pitch_shift_fft_impl.cpp (renamed from arts/modules/synth/synth_pitch_shift_fft_impl.cc)0
-rw-r--r--arts/modules/synth/synth_pitch_shift_impl.cpp (renamed from arts/modules/synth/synth_pitch_shift_impl.cc)0
-rw-r--r--arts/modules/synth/synth_play_pat_impl.cpp (renamed from arts/modules/synth/synth_play_pat_impl.cc)0
-rw-r--r--arts/modules/synth/synth_pscale_impl.cpp (renamed from arts/modules/synth/synth_pscale_impl.cc)0
-rw-r--r--arts/modules/synth/synth_rc_impl.cpp (renamed from arts/modules/synth/synth_rc_impl.cc)2
-rw-r--r--arts/modules/synth/synth_sequence_freq_impl.cpp (renamed from arts/modules/synth/synth_sequence_freq_impl.cc)1
-rw-r--r--arts/modules/synth/synth_sequence_impl.cpp (renamed from arts/modules/synth/synth_sequence_impl.cc)1
-rw-r--r--arts/modules/synth/synth_shelve_cutoff_impl.cpp (renamed from arts/modules/synth/synth_shelve_cutoff_impl.cc)0
-rw-r--r--arts/modules/synth/synth_std_equalizer_impl.cpp (renamed from arts/modules/synth/synth_std_equalizer_impl.cc)0
-rw-r--r--arts/modules/synth/synth_tremolo_impl.cpp (renamed from arts/modules/synth/synth_tremolo_impl.cc)0
-rw-r--r--arts/modules/synth/synth_wave_pulse_impl.cpp (renamed from arts/modules/synth/synth_wave_pulse_impl.cc)0
-rw-r--r--arts/modules/synth/synth_wave_softsaw_impl.cpp (renamed from arts/modules/synth/synth_wave_softsaw_impl.cc)0
-rw-r--r--arts/modules/synth/synth_wave_square_impl.cpp (renamed from arts/modules/synth/synth_wave_square_impl.cc)0
-rw-r--r--arts/modules/synth/synth_wave_tri_impl.cpp (renamed from arts/modules/synth/synth_wave_tri_impl.cc)0
-rw-r--r--arts/modules/synth/synth_xfade_impl.cpp (renamed from arts/modules/synth/synth_xfade_impl.cc)0
40 files changed, 97 insertions, 166 deletions
diff --git a/arts/modules/synth/CMakeLists.txt b/arts/modules/synth/CMakeLists.txt
index 4362aaa7..9930b55d 100644
--- a/arts/modules/synth/CMakeLists.txt
+++ b/arts/modules/synth/CMakeLists.txt
@@ -34,20 +34,20 @@ link_directories(
tde_add_library( artsmodulessynth SHARED
SOURCES
- artsmodulessynth.cc
- synth_xfade_impl.cc synth_autopanner_impl.cc synth_delay_impl.cc
- synth_cdelay_impl.cc synth_envelope_adsr_impl.cc synth_pscale_impl.cc
- synth_tremolo_impl.cc synth_fx_cflanger_impl.cc synth_compressor_impl.cc
- synth_pitch_shift_impl.cc synth_pitch_shift_fft_impl.cc c_filter_stuff.c
- synth_shelve_cutoff_impl.cc synth_brickwall_limiter_impl.cc
- synth_std_equalizer_impl.cc synth_rc_impl.cc synth_moog_vcf_impl.cc
- synth_atan_saturate_impl.cc synth_fm_source_impl.cc
- synth_wave_tri_impl.cc synth_noise_impl.cc synth_wave_softsaw_impl.cc
- synth_wave_square_impl.cc synth_wave_pulse_impl.cc synth_osc_impl.cc
- synth_play_pat_impl.cc synth_capture_wav_impl.cc
- synth_midi_test_impl.cc synth_sequence_impl.cc synth_sequence_freq_impl.cc
- synth_midi_debug_impl.cc objectcache_impl.cc synth_nil_impl.cc
- synth_debug_impl.cc synth_data_impl.cc synth_div_impl.cc
+ artsmodulessynth.cpp
+ synth_xfade_impl.cpp synth_autopanner_impl.cpp synth_delay_impl.cpp
+ synth_cdelay_impl.cpp synth_envelope_adsr_impl.cpp synth_pscale_impl.cpp
+ synth_tremolo_impl.cpp synth_fx_cflanger_impl.cpp synth_compressor_impl.cpp
+ synth_pitch_shift_impl.cpp synth_pitch_shift_fft_impl.cpp c_filter_stuff.c
+ synth_shelve_cutoff_impl.cpp synth_brickwall_limiter_impl.cpp
+ synth_std_equalizer_impl.cpp synth_rc_impl.cpp synth_moog_vcf_impl.cpp
+ synth_atan_saturate_impl.cpp synth_fm_source_impl.cpp
+ synth_wave_tri_impl.cpp synth_noise_impl.cpp synth_wave_softsaw_impl.cpp
+ synth_wave_square_impl.cpp synth_wave_pulse_impl.cpp synth_osc_impl.cpp
+ synth_play_pat_impl.cpp synth_capture_wav_impl.cpp
+ synth_midi_test_impl.cpp synth_sequence_impl.cpp synth_sequence_freq_impl.cpp
+ synth_midi_debug_impl.cpp objectcache_impl.cpp synth_nil_impl.cpp
+ synth_debug_impl.cpp synth_data_impl.cpp synth_div_impl.cpp
VERSION 0.0.0
LINK
artsbuilder-shared artsmidi_idl-shared
@@ -57,7 +57,7 @@ tde_add_library( artsmodulessynth SHARED
add_custom_command(
OUTPUT
- artsmodulessynth.cc artsmodulessynth.h
+ artsmodulessynth.cpp artsmodulessynth.h
artsmodulessynth.mcopclass artsmodulessynth.mcoptype
COMMAND ${ARTS_MCOPIDL_EXECUTABLE} -t
-I${CMAKE_SOURCE_DIR}/arts/gui/common
diff --git a/arts/modules/synth/Makefile.am b/arts/modules/synth/Makefile.am
index 520b33fe..211d973c 100644
--- a/arts/modules/synth/Makefile.am
+++ b/arts/modules/synth/Makefile.am
@@ -15,17 +15,17 @@ MCOP_INCLUDES= \
lib_LTLIBRARIES = libartsmodulessynth.la
-libartsmodulessynth_la_SOURCES = artsmodulessynth.cc \
- synth_xfade_impl.cc synth_autopanner_impl.cc synth_delay_impl.cc synth_cdelay_impl.cc \
- synth_envelope_adsr_impl.cc synth_pscale_impl.cc \
- synth_tremolo_impl.cc synth_fx_cflanger_impl.cc synth_compressor_impl.cc \
- synth_pitch_shift_impl.cc synth_pitch_shift_fft_impl.cc c_filter_stuff.c synth_shelve_cutoff_impl.cc synth_brickwall_limiter_impl.cc synth_std_equalizer_impl.cc synth_rc_impl.cc synth_moog_vcf_impl.cc synth_atan_saturate_impl.cc \
- synth_fm_source_impl.cc \
- synth_wave_tri_impl.cc synth_noise_impl.cc synth_wave_softsaw_impl.cc synth_wave_square_impl.cc synth_wave_pulse_impl.cc synth_osc_impl.cc synth_play_pat_impl.cc \
- synth_capture_wav_impl.cc \
- synth_midi_test_impl.cc synth_sequence_impl.cc synth_sequence_freq_impl.cc \
- synth_midi_debug_impl.cc objectcache_impl.cc synth_nil_impl.cc synth_debug_impl.cc synth_data_impl.cc \
- synth_div_impl.cc
+libartsmodulessynth_la_SOURCES = artsmodulessynth.cpp \
+ synth_xfade_impl.cpp synth_autopanner_impl.cpp synth_delay_impl.cpp synth_cdelay_impl.cpp \
+ synth_envelope_adsr_impl.cpp synth_pscale_impl.cpp \
+ synth_tremolo_impl.cpp synth_fx_cflanger_impl.cpp synth_compressor_impl.cpp \
+ synth_pitch_shift_impl.cpp synth_pitch_shift_fft_impl.cpp c_filter_stuff.c synth_shelve_cutoff_impl.cpp synth_brickwall_limiter_impl.cpp synth_std_equalizer_impl.cpp synth_rc_impl.cpp synth_moog_vcf_impl.cpp synth_atan_saturate_impl.cpp \
+ synth_fm_source_impl.cpp \
+ synth_wave_tri_impl.cpp synth_noise_impl.cpp synth_wave_softsaw_impl.cpp synth_wave_square_impl.cpp synth_wave_pulse_impl.cpp synth_osc_impl.cpp synth_play_pat_impl.cpp \
+ synth_capture_wav_impl.cpp \
+ synth_midi_test_impl.cpp synth_sequence_impl.cpp synth_sequence_freq_impl.cpp \
+ synth_midi_debug_impl.cpp objectcache_impl.cpp synth_nil_impl.cpp synth_debug_impl.cpp synth_data_impl.cpp \
+ synth_div_impl.cpp
libartsmodulessynth_la_COMPILE_FIRST = artsmodulessynth.h ../../midi/artsmidi.h
libartsmodulessynth_la_LIBADD = \
@@ -36,10 +36,10 @@ libartsmodulessynth_la_LIBADD = \
#libartsmodulessynth_la_LIBADD = $(top_builddir)/arts/gui/common/libartsgui_idl.la $(top_builddir)/arts/midi/libartsmidi_idl.la -lartsflow -lartsflow_idl -lmcop $(LIBDL) $(LIB_TDEUI) $(LIB_TDECORE)
libartsmodulessynth_la_LDFLAGS = $(all_libraries) -L$(arts_libraries) -lartsflow -lartsgsl -no-undefined
-artsmodulessynth.cc artsmodulessynth.h artsmodulessynth.mcoptype artsmodulessynth.mcopclass: $(srcdir)/artsmodulessynth.idl $(MCOPIDL)
+artsmodulessynth.cpp artsmodulessynth.h artsmodulessynth.mcoptype artsmodulessynth.mcopclass: $(srcdir)/artsmodulessynth.idl $(MCOPIDL)
$(MCOPIDL) -t $(MCOP_INCLUDES) $(srcdir)/artsmodulessynth.idl
-DISTCLEANFILES= artsmodulessynth.cc artsmodulessynth.h artsmodulessynth.mcop*
+DISTCLEANFILES= artsmodulessynth.cpp artsmodulessynth.h artsmodulessynth.mcop*
artsincludedir = $(includedir)/arts
artsinclude_HEADERS = artsmodulessynth.h artsmodulessynth.idl
diff --git a/arts/modules/synth/artsmodulessynth.idl b/arts/modules/synth/artsmodulessynth.idl
index b9ac3d46..6ba4248b 100644
--- a/arts/modules/synth/artsmodulessynth.idl
+++ b/arts/modules/synth/artsmodulessynth.idl
@@ -25,7 +25,7 @@
*/
/*
-* DISCLAIMER: The interfaces in artsmodules.idl (and the derived .cc/.h files)
+* DISCLAIMER: The interfaces in artsmodules.idl (and the derived .cpp/.h files)
* DO NOT GUARANTEE BINARY COMPATIBILITY YET.
*
* They are intended for developers. You shouldn't expect that applications in
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
diff --git a/arts/modules/synth/objectcache_impl.cc b/arts/modules/synth/objectcache_impl.cpp
index d4d833a3..d4d833a3 100644
--- a/arts/modules/synth/objectcache_impl.cc
+++ b/arts/modules/synth/objectcache_impl.cpp
diff --git a/arts/modules/synth/synth_atan_saturate_impl.cc b/arts/modules/synth/synth_atan_saturate_impl.cpp
index 7eb0b513..7eb0b513 100644
--- a/arts/modules/synth/synth_atan_saturate_impl.cc
+++ b/arts/modules/synth/synth_atan_saturate_impl.cpp
diff --git a/arts/modules/synth/synth_autopanner_impl.cc b/arts/modules/synth/synth_autopanner_impl.cpp
index 6e3526de..6e3526de 100644
--- a/arts/modules/synth/synth_autopanner_impl.cc
+++ b/arts/modules/synth/synth_autopanner_impl.cpp
diff --git a/arts/modules/synth/synth_brickwall_limiter_impl.cc b/arts/modules/synth/synth_brickwall_limiter_impl.cpp
index aea9d66e..aea9d66e 100644
--- a/arts/modules/synth/synth_brickwall_limiter_impl.cc
+++ b/arts/modules/synth/synth_brickwall_limiter_impl.cpp
diff --git a/arts/modules/synth/synth_capture_wav_impl.cc b/arts/modules/synth/synth_capture_wav_impl.cpp
index 84e91648..84e91648 100644
--- a/arts/modules/synth/synth_capture_wav_impl.cc
+++ b/arts/modules/synth/synth_capture_wav_impl.cpp
diff --git a/arts/modules/synth/synth_cdelay_impl.cc b/arts/modules/synth/synth_cdelay_impl.cpp
index 28f4d12f..0ab3255d 100644
--- a/arts/modules/synth/synth_cdelay_impl.cc
+++ b/arts/modules/synth/synth_cdelay_impl.cpp
@@ -119,7 +119,4 @@ public:
}
}
};
-
-// vim:sw=4:ts=4
-
REGISTER_IMPLEMENTATION(Synth_CDELAY_impl);
diff --git a/arts/modules/synth/synth_compressor_impl.cc b/arts/modules/synth/synth_compressor_impl.cpp
index b27b2be1..b27b2be1 100644
--- a/arts/modules/synth/synth_compressor_impl.cc
+++ b/arts/modules/synth/synth_compressor_impl.cpp
diff --git a/arts/modules/synth/synth_data_impl.cc b/arts/modules/synth/synth_data_impl.cpp
index 5b95d400..5b95d400 100644
--- a/arts/modules/synth/synth_data_impl.cc
+++ b/arts/modules/synth/synth_data_impl.cpp
diff --git a/arts/modules/synth/synth_debug_impl.cc b/arts/modules/synth/synth_debug_impl.cpp
index 456f4a6f..456f4a6f 100644
--- a/arts/modules/synth/synth_debug_impl.cc
+++ b/arts/modules/synth/synth_debug_impl.cpp
diff --git a/arts/modules/synth/synth_delay_impl.cc b/arts/modules/synth/synth_delay_impl.cpp
index 92c23fd1..92c23fd1 100644
--- a/arts/modules/synth/synth_delay_impl.cc
+++ b/arts/modules/synth/synth_delay_impl.cpp
diff --git a/arts/modules/synth/synth_div_impl.cc b/arts/modules/synth/synth_div_impl.cpp
index 90c19996..90c19996 100644
--- a/arts/modules/synth/synth_div_impl.cc
+++ b/arts/modules/synth/synth_div_impl.cpp
diff --git a/arts/modules/synth/synth_envelope_adsr_impl.cc b/arts/modules/synth/synth_envelope_adsr_impl.cpp
index e6f47220..e6f47220 100644
--- a/arts/modules/synth/synth_envelope_adsr_impl.cc
+++ b/arts/modules/synth/synth_envelope_adsr_impl.cpp
diff --git a/arts/modules/synth/synth_fm_source_impl.cc b/arts/modules/synth/synth_fm_source_impl.cpp
index 2c2bd0e8..2c2bd0e8 100644
--- a/arts/modules/synth/synth_fm_source_impl.cc
+++ b/arts/modules/synth/synth_fm_source_impl.cpp
diff --git a/arts/modules/synth/synth_fx_cflanger_impl.cc b/arts/modules/synth/synth_fx_cflanger_impl.cpp
index 3f67fd7a..3f67fd7a 100644
--- a/arts/modules/synth/synth_fx_cflanger_impl.cc
+++ b/arts/modules/synth/synth_fx_cflanger_impl.cpp
diff --git a/arts/modules/synth/synth_midi_debug_impl.cc b/arts/modules/synth/synth_midi_debug_impl.cpp
index 2c4cf711..2c4cf711 100644
--- a/arts/modules/synth/synth_midi_debug_impl.cc
+++ b/arts/modules/synth/synth_midi_debug_impl.cpp
diff --git a/arts/modules/synth/synth_midi_test_impl.cc b/arts/modules/synth/synth_midi_test_impl.cpp
index 91714cac..91714cac 100644
--- a/arts/modules/synth/synth_midi_test_impl.cc
+++ b/arts/modules/synth/synth_midi_test_impl.cpp
diff --git a/arts/modules/synth/synth_moog_vcf_impl.cc b/arts/modules/synth/synth_moog_vcf_impl.cpp
index 77bf5394..77bf5394 100644
--- a/arts/modules/synth/synth_moog_vcf_impl.cc
+++ b/arts/modules/synth/synth_moog_vcf_impl.cpp
diff --git a/arts/modules/synth/synth_nil_impl.cc b/arts/modules/synth/synth_nil_impl.cpp
index db7b1942..db7b1942 100644
--- a/arts/modules/synth/synth_nil_impl.cc
+++ b/arts/modules/synth/synth_nil_impl.cpp
diff --git a/arts/modules/synth/synth_noise_impl.cc b/arts/modules/synth/synth_noise_impl.cpp
index 474368e1..474368e1 100644
--- a/arts/modules/synth/synth_noise_impl.cc
+++ b/arts/modules/synth/synth_noise_impl.cpp
diff --git a/arts/modules/synth/synth_osc_impl.cc b/arts/modules/synth/synth_osc_impl.cpp
index 214c2a16..214c2a16 100644
--- a/arts/modules/synth/synth_osc_impl.cc
+++ b/arts/modules/synth/synth_osc_impl.cpp
diff --git a/arts/modules/synth/synth_pitch_shift_fft_impl.cc b/arts/modules/synth/synth_pitch_shift_fft_impl.cpp
index f356e1b8..f356e1b8 100644
--- a/arts/modules/synth/synth_pitch_shift_fft_impl.cc
+++ b/arts/modules/synth/synth_pitch_shift_fft_impl.cpp
diff --git a/arts/modules/synth/synth_pitch_shift_impl.cc b/arts/modules/synth/synth_pitch_shift_impl.cpp
index 37217c8a..37217c8a 100644
--- a/arts/modules/synth/synth_pitch_shift_impl.cc
+++ b/arts/modules/synth/synth_pitch_shift_impl.cpp
diff --git a/arts/modules/synth/synth_play_pat_impl.cc b/arts/modules/synth/synth_play_pat_impl.cpp
index 7c2699f7..7c2699f7 100644
--- a/arts/modules/synth/synth_play_pat_impl.cc
+++ b/arts/modules/synth/synth_play_pat_impl.cpp
diff --git a/arts/modules/synth/synth_pscale_impl.cc b/arts/modules/synth/synth_pscale_impl.cpp
index 72298397..72298397 100644
--- a/arts/modules/synth/synth_pscale_impl.cc
+++ b/arts/modules/synth/synth_pscale_impl.cpp
diff --git a/arts/modules/synth/synth_rc_impl.cc b/arts/modules/synth/synth_rc_impl.cpp
index 12b30260..ce0252ea 100644
--- a/arts/modules/synth/synth_rc_impl.cc
+++ b/arts/modules/synth/synth_rc_impl.cpp
@@ -60,7 +60,7 @@ public:
if (zero_lower < invalue[0] && invalue[0] < zero_upper)
{
- /* for comments see equalizer.cc/Synth_STD_EQUALIZER implementation */
+ /* for comments see equalizer.cpp/Synth_STD_EQUALIZER implementation */
/*
* This implementation differs from the implementation there,
diff --git a/arts/modules/synth/synth_sequence_freq_impl.cc b/arts/modules/synth/synth_sequence_freq_impl.cpp
index 0014d535..e3458d74 100644
--- a/arts/modules/synth/synth_sequence_freq_impl.cc
+++ b/arts/modules/synth/synth_sequence_freq_impl.cpp
@@ -128,4 +128,3 @@ public:
};
REGISTER_IMPLEMENTATION(Synth_SEQUENCE_FREQ_impl);
-// vim: sw=4 ts=4 noet
diff --git a/arts/modules/synth/synth_sequence_impl.cc b/arts/modules/synth/synth_sequence_impl.cpp
index 981f0bba..dc2588f5 100644
--- a/arts/modules/synth/synth_sequence_impl.cc
+++ b/arts/modules/synth/synth_sequence_impl.cpp
@@ -129,4 +129,3 @@ public:
};
REGISTER_IMPLEMENTATION(Synth_SEQUENCE_impl);
-// vim: sw=4 ts=4 noet
diff --git a/arts/modules/synth/synth_shelve_cutoff_impl.cc b/arts/modules/synth/synth_shelve_cutoff_impl.cpp
index 01880b6c..01880b6c 100644
--- a/arts/modules/synth/synth_shelve_cutoff_impl.cc
+++ b/arts/modules/synth/synth_shelve_cutoff_impl.cpp
diff --git a/arts/modules/synth/synth_std_equalizer_impl.cc b/arts/modules/synth/synth_std_equalizer_impl.cpp
index be88a708..be88a708 100644
--- a/arts/modules/synth/synth_std_equalizer_impl.cc
+++ b/arts/modules/synth/synth_std_equalizer_impl.cpp
diff --git a/arts/modules/synth/synth_tremolo_impl.cc b/arts/modules/synth/synth_tremolo_impl.cpp
index 37b42302..37b42302 100644
--- a/arts/modules/synth/synth_tremolo_impl.cc
+++ b/arts/modules/synth/synth_tremolo_impl.cpp
diff --git a/arts/modules/synth/synth_wave_pulse_impl.cc b/arts/modules/synth/synth_wave_pulse_impl.cpp
index f179b376..f179b376 100644
--- a/arts/modules/synth/synth_wave_pulse_impl.cc
+++ b/arts/modules/synth/synth_wave_pulse_impl.cpp
diff --git a/arts/modules/synth/synth_wave_softsaw_impl.cc b/arts/modules/synth/synth_wave_softsaw_impl.cpp
index 5765250d..5765250d 100644
--- a/arts/modules/synth/synth_wave_softsaw_impl.cc
+++ b/arts/modules/synth/synth_wave_softsaw_impl.cpp
diff --git a/arts/modules/synth/synth_wave_square_impl.cc b/arts/modules/synth/synth_wave_square_impl.cpp
index c5693b18..c5693b18 100644
--- a/arts/modules/synth/synth_wave_square_impl.cc
+++ b/arts/modules/synth/synth_wave_square_impl.cpp
diff --git a/arts/modules/synth/synth_wave_tri_impl.cc b/arts/modules/synth/synth_wave_tri_impl.cpp
index 2333d31c..2333d31c 100644
--- a/arts/modules/synth/synth_wave_tri_impl.cc
+++ b/arts/modules/synth/synth_wave_tri_impl.cpp
diff --git a/arts/modules/synth/synth_xfade_impl.cc b/arts/modules/synth/synth_xfade_impl.cpp
index dcbb2290..dcbb2290 100644
--- a/arts/modules/synth/synth_xfade_impl.cc
+++ b/arts/modules/synth/synth_xfade_impl.cpp