1 2Things that could/should be done (random order) - but not by me: I've got 3other things to do at the moment :( 4 5 - Find and correct all bugs 6 - Better error handling (malloc, file ops) 7 - Support (user interface) for cdrecord, cdda2wav/cdparanoia 8 - More / better filters - pops/ticks/scratches 9 - hiss, broadband noise 10 - fade in/out at track start/end (see below) 11 - volume normalizing to put tracks from 12 various sources on one CD 13 - dynamic-range decompression (Keith Refson's idea) 14 - Possibility for application of frequency domain filters (probably 15 difficult to do in streaming processing) 16 - Remember filter/track location settings within a single invocation 17 (Also see patch from James Tappin on the webpage) 18 - Make .wav reading/writing 64-bit clean (i.e. don't depend on sizeof's) 19 (temporary workaround: change every `long' into `int', see README) 20 - Compute average/maximal signal volume/power for info-screen after 21 recording (sum of 1G shorts in a float) (see bplaysrc/shmbuf.c, 22 shmrec()) 23 - Show number of nearly-clipped samples also _during_ recording, for 24 easier adjustments of sound source (idea of Juergen Lock) 25 - Copying, moving, deleting files; creating, deleting dirs from 26 within user interface (?) 27 - Automatic detection which of xmixer, xmix, aumix, ???mix to use 28 (e.g. $DISPLAY ? or $MIXER ?) 29 - Auto screensize (not always 80x24) 30 - X user interface 31 - Manpage 32 - Support for non-CD-quality and non-.wav sound files; 33 (for mono files, also see patch from James Tappin on the webpage) 34 - Command line options (or via a options file) 35 - Porting to other *UXes, Windows? First only Signproc/Tracksplit 36 (IRIX and possibly others should work already. If you try, please mail 37 me your experiences) 38 - For webpage: example .wavs, example graph files (track location), 39 screenshots of (un)processed .wavs 40 41 42Fade in/out: 43 44Paul Martin <pm@nowster.zetnet.co.uk> sent me the following: 45 46-----quote----- 47[...] 48Here's a fragment of code that does a mono fade out. It's very 49sub-optimal, but it does work. It implements a (1-x^2) fade (x = 0 -> 1). 50By changing the exponent you can change the type of fade from linear (x^1) 51to highly logarithmic. 52[...] 53 54#include <math.h> 55#include <stdlib.h> 56#include <stdio.h> 57#include <sys/types.h> 58#include <sys/stat.h> 59#include <fcntl.h> 60#include <unistd.h> 61 62const char inname[]="input.sw"; 63const char outname[]="output.sw"; 64 65signed short buff[441000]; 66 67main () { 68 double frac,scaler; 69 long i,size,max; 70 int inp,oup; 71 signed short tmp; 72 73 if ((inp=open(inname,O_RDONLY))==-1) { 74 perror("open('input.sw')"); 75 exit(1); 76 } 77 size = read(inp, buff, sizeof(buff)); 78 close(inp); 79 max = (size/2); 80 81 for (i=0; i<max; i++) { 82 frac=(double) i / (double) max; 83 scaler = 1.0 - (frac)*(frac); /* this is the important bit */ 84/* scaler = 1.0 - (1.0-frac)*(1.0-frac); /* fade in */ 85 86 tmp = (signed short) ( ( (double) buff[i]) * scaler); 87/* printf("%d %f %d %d\n", i, scaler, buff[i], tmp ); */ 88 buff[i]=tmp; 89 } 90 91 oup=creat(outname,0644); 92 write(oup,buff,size); 93 close(oup); 94} 95-----end of quote----- 96 97Idea seems to be useable. Exponent may be settable in a Parameters screen 98(then scaler=pow(frac,log_factor)), as well as the length of fade in and 99fade out (in samples, or e.g. 1/100 sec?). But for correct implementation, 100a current_sample_position has to be added to param_t, that is updated 101every sample (in advance_current_pos() ?). Otherwise, the pre-reading of 102the buffers will make it go all wrong (note that the fade in/out must be 103placeable anywhere in the processing chain). Also, track_start/end 104(samples or bytes) or tracktimes[] must be global vars. 105 106