Begin3 Title: xpequ Version: 0.3.6 Entered-date: 2010-06-05 Description: xwindows based audio processor with TCP/IP based remote control capability, features a wav file player, 10 band equaliser, voice activated control, automatic level adjustment (AGC), and a FFT and oscilloscope display, uses xforms library and headers, libmath, and libpthreads. Equaliser and fft code taken from xine, slightly modified. xpequ can read from a input wave file, correct the frequency response, and write to an output wave file. For example you can use it to remove noise from old tapes. It can also read from one dsp device and write to an other dsp device. Or it can stream via sox. xpequ supports both the ALSA and OSS drivers. The voice level control that can be used to only output when audio exceeds some preset level. This can be used to record intermittent conversations or monitor lines, while keeping file sizes small. xpequ can play .wav file format, record in .wav file format, and can also stream audio from stdin, and to stdout. xpequ can also output color commands via a serial link to the col_pic LED driver program, for disco like light effects. To unpack: tar -zxvf xpequ-0.3.6.tgz cd xpequ-0.3.6 Then follow the instructions in INSTALL. Documentation is not complete yet. 0.1: First release. 0.1.1: Some code changes, should work better now. Set dsp_stereo in output_init(). Exits if ready in file - to - file mode. FFT and equalise now over full file length. Test info printing to stderr removed. Added wave file play example via /dev/dspX in xpequ -h. Changed input_init to output_init in output_init() reporting. Moved malloc() fft_x and fft_y to main, else idle_cb causes a crash if input device or output device could not be opened. 0.2: Added command line options: -a no GUI -d show progress -e filename equaliser settings filename, Added '-' for stdin in -i mode. Added mp3 play example in -h. Strange choice of option characters because it seems xforms does not allow some, those seem to be intercepted. Shifted FFT log display to left, and expanded it to full scale. 0.2.1: Improved math in FFT log display. Added x axis values for FFT display if log. Added logo. Added -x flag so one xpequ can run in no GUI mode, while the other in GUI mode controls the equaliser (only). Fixed buffer management in audio.c Added -y remote option, and associated hides / shows in GUI. Did read the OSS manual, and ignore GET_DSP_BLOCKSIZE. Many code changes, added flags to stop audio thread. Removed call to cancel audio thread (it stops by itself). Pre-allocate audio buffer, and no more free audio_buf. Should be more stable that way. Still no input from /dev/dsp1, but also not with cat, problem with alsa oss emulation? 0.2.2: Added sample_rate to output_init() from input_init() so audio plays at right speed. Added ALSA / OSS select button, changed colors of output select buttons to magenta for OSS, ALSA now default. Tested prototype ALSA play and record routines. Added command line options to select device. Added auto ALSA OSS select for command line specified devices. 0.2.3: Added scope display. Added triggered mode. Added speed modifier. Added level trigger mode. Some functions and variables renamed. Added timebase up down buttons and display. Added trigger level slider. Added plus/minux trigger mode button. Added auto trigger button. 0.2.4: Hide equaliser control if not equaliser. Cyan as color for scope controls. Added true auto trigger, previous one was just free run. Connected trigger level slider so it can change trigger level somewhat in auto trigger. 0.2.5: Moved trigger controls to form one unit. Reversed name sensitivity buttons. Reversed position timebase + and - buttons. Changed -o command line option to -o filename, this allows writing a wave header, so recording to a wave file. A seek is done after the Exit button is pressed and the modified header with the correct length is written to the beginning of the output wave file. Fixed read() for OSS to reloop if less then buffer_size bytes is read. Added AGC, and AGC button. BTW 'AGC' stands for 'automatic gain correction'. The gain will very slowly increase by up to 50x if the signal is weak, and be corrected almost immediately to -3dB if the signal exceeds -3dB. 0.2.6: Updated examples in -h. 0.2.7: Added 'filename' to -o in help in -h. Improved AGC start. Changed display field to FL_FRAME_BOX, so they look different from buttons. Added audio start/stop contol. Status indication colors in VOX AGC and audio button. AGC is red during run in, then orange when enabled. VOX is yellow when enabled, changing to green if output. Audio is green when running. Moved FFT init to main. Wrote manual. Added some defines for level indicator and AGC delays to xpequ.h Added -O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to Makefile.am 0.2.8: Fixed number of bytes written if VOX in waveheader in output file. Added xpequ_help.txt. Updated README. Fixed -8 bytes wave header size. Exit on EOF. Separate rewrite waveheader function with test for when to do this. Bug fixes. 0.2.9: Bug fixes. Moved channels display, added dsp_speed display. Counter in idle_cb to reduce processor load. Improved checking for command line -u and -t options. No longer hiding IO buttons if -u or -t specified. Moved command line parsing to front. Note to self, beware of xforms flipping on command line options, '-w' will kill the window manager... AGC run in speed decreased 10x. Now hides audio mode button in -y. 12 hour test completed from within xmpl player, using the following definitions for 'helper', and AGC on: mp3,mp2 mpg123 -w - -k $3 -n $4 $1 | xpequ -a -x -i - -t /dev/dsp0 wav xpequ -i $1 -a -x And then remote control with xpequ -y if needed. 0.3: Moved equaliser_gain to ~/.xpequ/equaliser_settings. This decreases processor load in idle_cb, and simplifies code. Set equaliser gain to 1.0 if no equaliser_settings file found. Added internet remote control and remote monitoring. Almost all functions except scope display and FFT display can be read from anywhere on the internet, even the peak audio level. Default port is 6668, default server for remote is localhost. Status is send back from server once per second. Button presses and slider movements are send from remote to server as fast as the TCP/IP connection allows. Added connect status indicator to client and server. Added 'ask client to disconnect' command if server has EOF or exit, to prevent long waits for the socket to be freed by the kernel. Client will retry automatically once per second until it sees a server. Server will retry once per second until the socket is free. Do we need password? No writing to files in ~/.xpequ... if internet client. Dropped control_flag, now uses internet_mode == INTERNET_CLIENT. Dropped monitor_equaliser_settings_flag, now uses internet_mode == INTERNET_SERVER. 0.3.1: Added filename display, also in client server, '-' if stdin, 'device' if a device. Added server name indicator, shows IP address of client in server, servername in client. Removed connect status indicator, moved its functions to name indicator. Updated manual. Updated pictures. Bugfixes. 0.3.2: Added serial output from equaliser for col_pic RGB LED driver. Red is peak value of the 125Hz filter, green of the 1kHz filter, and blue of the 8 kHz filter. Values are only calculated when the equaliser is active. Setting the equaliser sliders controls not only the sound, but also the lights. 0.3.3: Added separate thread for color out. Added color button and serial device select button. Saved color button status and serial device name. Changed from peak value to average value over timeslot, for color out. Timing is much better now. 0.3.4: Added delay so sending colors takes about 34.6 ms, so better average for lower frequencies. See colors.c for explanation text. This prevents flashing at irregular intervals. 0.3.5: Moved blue from 8 kHz to 4kHz band, as not so much 8 kHz in music. Removed error exits from colors.c, added error reports for serial device in idle_cb(), Doing a 'r' first now on the serial device before opening it for write to prevent files being created in /dev/. Hid serial device select - and color button in internet client mode. 0.3.6: Added support for ethernet color pic, UDP packets are send using netcat. Added color_audio_update delay slider, this controls how often UDP packets with new color values are send. Keywords: audio processing, equaliser, internet remote,FFT display, oscilloscope, voice control, AGC, audio recorder, audio player, wave file, LED disco lights, col_pic. Author: Jan Panteltje panteltje@yahoo.com Maintained-by: panteltje@yahoo.com Primary-site: ftp sunsite.unc.edu/pub/linux/apps/audio/ Alternate-site: http://panteltje.com/panteltje/xpequ/ (homepage) Platforms: LINUX, UNIX Copying-policy: GPL End