├── examples ├── white.wav ├── carrier22.wav ├── example1.wav ├── example2.wav ├── example3.wav ├── white512.wav └── modulator22.wav ├── win32 ├── gui │ ├── hlp │ │ ├── VocoderGUI.cnt │ │ ├── VocoderGUI.hpj │ │ └── AfxDlg.rtf │ ├── res │ │ ├── VocoderGUI.ico │ │ └── VocoderGUI.rc2 │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── VocoderGUI.h │ ├── MakeHelp.bat │ ├── resource.h │ ├── VocoderGUI.cpp │ ├── vocoder.nsi │ ├── VocoderGUIDlg.h │ ├── ReadMe.txt │ ├── VocoderGUI.rc │ ├── VocoderGUI.dsp │ └── VocoderGUIDlg.cpp ├── Vocoder.dsw └── cli │ └── VocoderCLI.dsp ├── extended.h ├── Makefile ├── aiff.h ├── riff.h ├── error.h ├── config.h ├── vocode.h ├── spt.h ├── error.c ├── CHANGES.txt ├── fft.h ├── fftaux.c ├── wave.h ├── riff.c ├── aiff.c ├── extended.c ├── wave.c ├── README.txt ├── main.c ├── vocode.c └── fftn.c /examples/white.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/white.wav -------------------------------------------------------------------------------- /examples/carrier22.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/carrier22.wav -------------------------------------------------------------------------------- /examples/example1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/example1.wav -------------------------------------------------------------------------------- /examples/example2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/example2.wav -------------------------------------------------------------------------------- /examples/example3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/example3.wav -------------------------------------------------------------------------------- /examples/white512.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/white512.wav -------------------------------------------------------------------------------- /examples/modulator22.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/examples/modulator22.wav -------------------------------------------------------------------------------- /win32/gui/hlp/VocoderGUI.cnt: -------------------------------------------------------------------------------- 1 | :Base VocoderGUI.hlp 2 | 1 Zerius Vocoder Help=HIDD_VOCODERGUI_DIALOG 3 | -------------------------------------------------------------------------------- /win32/gui/res/VocoderGUI.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/borsboom/vocoder/HEAD/win32/gui/res/VocoderGUI.ico -------------------------------------------------------------------------------- /win32/gui/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // VocoderGUI.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /extended.h: -------------------------------------------------------------------------------- 1 | /* $Id: extended.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ */ 2 | 3 | #ifndef EXTENDED_H_INCLUDED 4 | #define EXTENDED_H_INCLUDED 5 | 6 | void ConvertToIeeeExtended(double num, unsigned char *bytes); 7 | double ConvertFromIeeeExtended(unsigned char *bytes); 8 | 9 | #endif /* EXTENDED_H_INCLUDED */ 10 | -------------------------------------------------------------------------------- /win32/gui/res/VocoderGUI.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // VOCODERGUI.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # $Id: Makefile,v 1.4 2002/09/19 15:48:28 emanuel Exp $ 2 | 3 | CFLAGS = -O 4 | LDFLAGS = 5 | LIBS = -lm 6 | 7 | SRCS = main.c vocode.c error.c \ 8 | wave.c aiff.c riff.c extended.c \ 9 | fftn.c fftaux.c 10 | OBJS = main.o vocode.o error.o \ 11 | wave.o aiff.o riff.o extended.o \ 12 | fftn.o fftaux.o 13 | OUT = vocoder 14 | 15 | $(OUT): $(OBJS) 16 | $(CC) $(LDFLAGS) -o $(OUT) $(OBJS) $(LIBS) 17 | 18 | depend: 19 | makedepend -- $(CFLAGS) -- $(SRCS) 20 | 21 | clean: 22 | rm -f $(OUT) *.o *~ *.bak *.aif *.aiff *.wav *core 23 | -------------------------------------------------------------------------------- /aiff.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: aiff.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #ifndef AIFF_H_INCLUDED 10 | #define AIFF_H_INCLUDED 11 | 12 | #include "wave.h" 13 | 14 | WAVE_FILE *aiff_open(FILE *fp, WAVE_INFO *info); 15 | WAVE_FILE *aiff_create(FILE *fp, WAVE_INFO *info); 16 | void aiff_close(WAVE_FILE *file); 17 | 18 | #endif /* AIFF_H_INCLUDED */ 19 | -------------------------------------------------------------------------------- /riff.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: riff.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1996-1998 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #ifndef RIFF_H_INCLUDED 10 | #define RIFF_H_INCLUDED 11 | 12 | #include "wave.h" 13 | 14 | WAVE_FILE *riff_open(FILE *fp, WAVE_INFO *info); 15 | WAVE_FILE *riff_create(FILE *fp, WAVE_INFO *info); 16 | void riff_close(WAVE_FILE *file); 17 | 18 | #endif /* RIFF_H_INCLUDED */ 19 | -------------------------------------------------------------------------------- /error.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: error.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #ifndef ERROR_H_INCLUDED 10 | #define ERROR_H_INCLUDED 11 | 12 | typedef void (*ERROR_DISPLAY_CB)(char *msg); 13 | extern ERROR_DISPLAY_CB error_display_cb; 14 | 15 | void error_display(char *fmt, ...); 16 | void *error_malloc(size_t size); 17 | void *error_calloc(size_t number, size_t size); 18 | FILE *error_fopen(char *path, char *mode); 19 | 20 | #endif /* ERROR_H_INCLUDED */ 21 | -------------------------------------------------------------------------------- /win32/Vocoder.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "VocoderCLI"=".\cli\VocoderCLI.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "VocoderGUI"=".\gui\VocoderGUI.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Global: 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<3> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | -------------------------------------------------------------------------------- /config.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: config.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #ifndef CONFIG_H_INCLUDED 10 | #define CONFIG_H_INCLUDED 11 | 12 | typedef int VBOOL; 13 | #define FALSE 0 14 | #define TRUE 1 15 | 16 | typedef unsigned long U32; 17 | typedef signed long S32; 18 | typedef unsigned short U16; 19 | typedef signed short S16; 20 | typedef unsigned char U8; 21 | typedef signed char S8; 22 | 23 | typedef S32 VINT; 24 | typedef S16 VSHORT; 25 | typedef S8 VBYTE; 26 | typedef U32 VUINT; 27 | typedef U16 VUSHORT; 28 | typedef U8 VUBYTE; 29 | 30 | typedef double VREAL; 31 | 32 | #endif /* CONFIG_H_INCLUDED */ 33 | 34 | -------------------------------------------------------------------------------- /vocode.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: vocode.h,v 1.2 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1996-1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include "config.h" 10 | 11 | extern char *vocode_modulator_filename, *vocode_carrier_filename, *vocode_output_filename; 12 | extern size_t vocode_window_length, vocode_window_overlap; 13 | extern int vocode_band_count; 14 | extern VREAL vocode_volume; 15 | extern VBOOL vocode_normalize; 16 | 17 | extern VINT vocode_modulator_rate; 18 | 19 | extern void (*vocode_start_status_cb)(VINT num_frames); 20 | extern VBOOL (*vocode_update_status_cb)(VINT frame_no); 21 | extern void (*vocode_finish_status_cb)(void); 22 | 23 | void vocode_open_files(void); 24 | void vocode_cleanup(void); 25 | void vocode(void); 26 | -------------------------------------------------------------------------------- /win32/gui/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__E2B25587_7B12_45A3_8212_CA512CC281E2__INCLUDED_) 7 | #define AFX_STDAFX_H__E2B25587_7B12_45A3_8212_CA512CC281E2__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #include // MFC core and standard components 16 | #include // MFC extensions 17 | #include // MFC Automation classes 18 | #include // MFC support for Internet Explorer 4 Common Controls 19 | #ifndef _AFX_NO_AFXCMN_SUPPORT 20 | #include // MFC support for Windows Common Controls 21 | #endif // _AFX_NO_AFXCMN_SUPPORT 22 | 23 | #include 24 | 25 | //{{AFX_INSERT_LOCATION}} 26 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 27 | 28 | #endif // !defined(AFX_STDAFX_H__E2B25587_7B12_45A3_8212_CA512CC281E2__INCLUDED_) 29 | -------------------------------------------------------------------------------- /spt.h: -------------------------------------------------------------------------------- 1 | /* $Id: spt.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ */ 2 | 3 | #ifndef _SPT_ 4 | #define _SPT_ 5 | 6 | #include 7 | 8 | #define MAXLEN 80 /* Usual input line length for prompts */ 9 | #define ESC 0x1b 10 | #define ERROR -1 11 | #define EPSILON 1e-15 12 | #ifndef FALSE 13 | #define FALSE (1==2) 14 | #endif /* FALSE */ 15 | #ifndef TRUE 16 | #define TRUE (1==1) 17 | #endif /* TRUE */ 18 | #define SUCCESS TRUE 19 | #define FAILURE FALSE 20 | #ifndef NULL 21 | #define NULL ((void *)0) 22 | #endif /* NULL */ 23 | #ifndef MAXINT 24 | #define MAXINT ((unsigned)(-1)) 25 | #endif /* MAXINT */ 26 | #ifndef MAXLONG 27 | #define MAXLONG ((unsigned long)(-1L)) 28 | #endif /* MAXLONG */ 29 | #ifndef PI 30 | #define PI 3.14159265358978323846 31 | #endif /* PI */ 32 | #define ZERO_C 273.15 33 | 34 | #ifndef max //EKB 35 | #define max(a, b) (((a) > (b)) ? (a) : (b)) 36 | #endif 37 | #ifndef min //EKB 38 | #define min(a, b) (((a) > (b)) ? (b) : (a)) 39 | #endif 40 | #define abs(a) (((a) < 0) ? (-(a)) : (a)) 41 | #define sgn(x) (((x) < 0) ? (-1) : (1)) 42 | #define round(x) (sgn(x)*(int)abs((x) + .5)) 43 | #define sqr(x) ((x)*(x)) 44 | #define ln(x) log(x) 45 | #define power(x, y) (exp((y)*log(x))) 46 | #define delcrlf(str) (str[strlen(str)-1] = '\0') 47 | 48 | /* Used to signify a pointer which is intended to cast into several different 49 | * types. 50 | */ 51 | #define anyptr void 52 | 53 | #define forever for(;;) 54 | 55 | #endif /* _SPT */ 56 | -------------------------------------------------------------------------------- /error.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: error.c,v 1.5 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "error.h" 15 | 16 | #define ERROR_BUF_SIZE 256 17 | 18 | ERROR_DISPLAY_CB error_display_cb; 19 | 20 | static char _error_buf[ERROR_BUF_SIZE]; 21 | 22 | void error_display(char *fmt, ...) 23 | { 24 | va_list ap; 25 | va_start(ap, fmt); 26 | vsprintf(_error_buf, fmt, ap); 27 | strcat(_error_buf, "\n"); 28 | va_end(ap); 29 | error_display_cb(_error_buf); 30 | } 31 | 32 | void *error_malloc(size_t size) 33 | { 34 | void *p = malloc(size); 35 | if (p == NULL) error_display("malloc: out of memory"); 36 | return p; 37 | } 38 | 39 | void *error_calloc(size_t number, size_t size) 40 | { 41 | void *p = calloc(number, size); 42 | if (p == NULL) error_display("calloc: out of memory"); 43 | return p; 44 | } 45 | 46 | FILE *error_fopen(char *path, char *mode) 47 | { 48 | FILE *f = fopen(path, mode); 49 | if (f == NULL) error_display("fopen %s: %s", path, strerror(errno)); 50 | return f; 51 | } 52 | -------------------------------------------------------------------------------- /CHANGES.txt: -------------------------------------------------------------------------------- 1 | $Id: CHANGES.txt,v 1.6 2002/09/20 02:30:51 emanuel Exp $ 2 | 3 | ------------------- 4 | 1.0 (December 1996) 5 | ------------------- 6 | 7 | Official release. Works flawlessly (yeah, right). 8 | 9 | -------------------- 10 | 1.0.1 (January 1997) 11 | -------------------- 12 | 13 | Minor changes to fft/error.c to allow to make definitions of emalloc() and 14 | ecalloc() agree with the prototyes. 15 | 16 | Updated the README to reflect the existance of a MacOS version (which is 17 | a bit different from the others). 18 | 19 | ---------------- 20 | 1.1b1 (July 1998) 21 | ---------------- 22 | 23 | Mostly re-written. 24 | 25 | Support for AIFF files. 26 | 27 | Dramatic reduction in memory use. Amount of memory used is now proportional 28 | to the window length instead of the size of the input files. 29 | 30 | Improved quality. S's and T's come out much more clearly. 31 | Chanks to Tero Karras for the tip! 32 | 33 | Intelligent defaults for most of the command-line arguments. 34 | 35 | The Java version has been discontinued. 36 | 37 | ------------------- 38 | 1.2 (March 1999) 39 | ------------------- 40 | 41 | If no command-line arguments are passed, it will ask the user for the 42 | values of all the parameters. 43 | 44 | A small off-by-one error has been fixed. Thanks to Matthew Frank Toews 45 | for pointing it out to me. 46 | 47 | ------------------- 48 | 1.3 (September 2002) 49 | ------------------- 50 | 51 | Added GUI version for Win32. 52 | -------------------------------------------------------------------------------- /win32/gui/VocoderGUI.h: -------------------------------------------------------------------------------- 1 | // VocoderGUI.h : main header file for the VOCODERGUI application 2 | // 3 | 4 | #if !defined(AFX_VOCODERGUI_H__B2E4805C_F3FF_401D_91BF_4874C34BF245__INCLUDED_) 5 | #define AFX_VOCODERGUI_H__B2E4805C_F3FF_401D_91BF_4874C34BF245__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CVocoderGUIApp: 19 | // See VocoderGUI.cpp for the implementation of this class 20 | // 21 | 22 | class CVocoderGUIApp : public CWinApp 23 | { 24 | public: 25 | CVocoderGUIApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CVocoderGUIApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CVocoderGUIApp) 37 | // NOTE - the ClassWizard will add and remove member functions here. 38 | // DO NOT EDIT what you see in these blocks of generated code ! 39 | //}}AFX_MSG 40 | DECLARE_MESSAGE_MAP() 41 | }; 42 | 43 | 44 | ///////////////////////////////////////////////////////////////////////////// 45 | 46 | //{{AFX_INSERT_LOCATION}} 47 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 48 | 49 | #endif // !defined(AFX_VOCODERGUI_H__B2E4805C_F3FF_401D_91BF_4874C34BF245__INCLUDED_) 50 | -------------------------------------------------------------------------------- /win32/gui/MakeHelp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM -- First make map file from Microsoft Visual C++ generated resource.h 3 | echo // MAKEHELP.BAT generated Help Map file. Used by VOCODERGUI.HPJ. >"hlp\VocoderGUI.hm" 4 | echo. >>"hlp\VocoderGUI.hm" 5 | echo // Commands (ID_* and IDM_*) >>"hlp\VocoderGUI.hm" 6 | makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\VocoderGUI.hm" 7 | echo. >>"hlp\VocoderGUI.hm" 8 | echo // Prompts (IDP_*) >>"hlp\VocoderGUI.hm" 9 | makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\VocoderGUI.hm" 10 | echo. >>"hlp\VocoderGUI.hm" 11 | echo // Resources (IDR_*) >>"hlp\VocoderGUI.hm" 12 | makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\VocoderGUI.hm" 13 | echo. >>"hlp\VocoderGUI.hm" 14 | echo // Dialogs (IDD_*) >>"hlp\VocoderGUI.hm" 15 | makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\VocoderGUI.hm" 16 | echo. >>"hlp\VocoderGUI.hm" 17 | echo // Frame Controls (IDW_*) >>"hlp\VocoderGUI.hm" 18 | makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\VocoderGUI.hm" 19 | REM -- Make help for Project VOCODERGUI 20 | 21 | 22 | echo Building Win32 Help files 23 | start /wait hcw /C /E /M "hlp\VocoderGUI.hpj" 24 | if errorlevel 1 goto :Error 25 | if not exist "hlp\VocoderGUI.hlp" goto :Error 26 | if not exist "hlp\VocoderGUI.cnt" goto :Error 27 | echo. 28 | if exist Debug\nul copy "hlp\VocoderGUI.hlp" Debug 29 | if exist Debug\nul copy "hlp\VocoderGUI.cnt" Debug 30 | if exist Release\nul copy "hlp\VocoderGUI.hlp" Release 31 | if exist Release\nul copy "hlp\VocoderGUI.cnt" Release 32 | echo. 33 | goto :done 34 | 35 | :Error 36 | echo hlp\VocoderGUI.hpj(1) : error: Problem encountered creating help file 37 | 38 | :done 39 | echo. 40 | -------------------------------------------------------------------------------- /fft.h: -------------------------------------------------------------------------------- 1 | /* $Id: fft.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ */ 2 | 3 | /* (C) Copyright 1993 by Steven Trainoff. Permission is granted to make 4 | * any use of this code subject to the condition that all copies contain 5 | * this notice and an indication of what has been changed. 6 | */ 7 | #ifndef _FFT_ 8 | #define _FFT_ 9 | 10 | #include "spt.h" 11 | 12 | #ifndef REAL 13 | #define REAL double /* Precision of data */ 14 | #endif 15 | 16 | /* Really ugly hack needed since #if only works on ints */ 17 | #define double 1 18 | #define float 2 19 | 20 | #if REAL==float 21 | #define fft_create_arrays f_fft_create_arrays 22 | #define getx f_getx 23 | #define fft f_fft 24 | #define invfft f_invfft 25 | #define normalize_fft f_normalize_fft 26 | #define fft1n f_fft1n 27 | #define fftn f_fftn 28 | #define invfftn f_invfftn 29 | #define realfftmag f_realfftmag 30 | #define normalize_fftn f_normalize_fftn 31 | #endif 32 | 33 | #undef double 34 | #undef float 35 | 36 | void fft_create_arrays(REAL **c, REAL **s, int **rev, int n); 37 | REAL *getx(REAL (*)[2], int, int, int, int *); 38 | void fft(REAL (*x)[2], int n, REAL*c, REAL*s, int *rev); 39 | void invfft(REAL (*x)[2], int n, REAL*c, REAL*s, int *rev); 40 | void normalize_fft(REAL (*x)[2], int n); 41 | void fft1n(REAL (*x)[2], int nu, int offset, int separation, REAL *c, REAL *s, int *rev); 42 | void fftn(REAL (*x)[2], int n, int *dim); 43 | void invfftn(REAL (*x)[2], int n, int *dim); 44 | void realfftmag(REAL *data, int n); 45 | void normalize_fftn(REAL (*x)[2], int ndim, int *dim); 46 | 47 | unsigned bitrev(unsigned, int); /* Bit reversal routine */ 48 | int getindex(int, int, int, int *); 49 | int ipow(int, int); 50 | int ilog2(int); 51 | 52 | 53 | 54 | #endif /* _FFT_ */ 55 | -------------------------------------------------------------------------------- /fftaux.c: -------------------------------------------------------------------------------- 1 | /* $Id: fftaux.c,v 1.4 2002/09/20 02:30:51 emanuel Exp $ */ 2 | 3 | #include "fft.h" 4 | 5 | /* Here are the integer based support routines for the fftlib */ 6 | 7 | /* This routine reverses the bits in integer */ 8 | unsigned bitrev(unsigned int k, int nu) 9 | /* register unsigned k; * Number to reverse the bits of */ 10 | /* int nu; * Number of bits k is represented by */ 11 | { 12 | register int i; 13 | register unsigned out = 0; 14 | 15 | for (i = 0; i < nu; i++) { 16 | out <<= 1; 17 | out |= k & 1; 18 | k >>= 1; 19 | } 20 | return(out); 21 | } 22 | 23 | 24 | /* Computes a^b where a and b are integers */ 25 | int ipow(int a, int b) 26 | { 27 | register int i; 28 | int sum = 1; 29 | 30 | for (i = 0; i < b; i++) 31 | sum *= a; 32 | return (sum); 33 | } 34 | 35 | /* Computes log2(n). Returns -1 if n == 0*/ 36 | int ilog2(int n) 37 | { 38 | register int i; 39 | 40 | for (i = -1; n != 0; i++, n>>=1) 41 | ; 42 | return(i); 43 | } 44 | 45 | /* getindex - gets one real, imag pair from the square multidimensional array */ 46 | int getindex(int ndim, int dim, int n, int elem[]) 47 | /* int ndim; * Number of dimensions */ 48 | /* int dim; * Dim to extract point from */ 49 | /* int n; * Number of points in each dim */ 50 | /* int elem[]; * Which element to extract (array by ndim) */ 51 | { 52 | register int i; 53 | int pos=0; /* Position in array when considered 1d */ 54 | 55 | for (i = 0; i < ndim && (pos *= n); i++) /* Loop over dimensions */ 56 | pos += elem[i]; 57 | 58 | return(pos); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /win32/gui/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by VocoderGUI.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_VOCODERGUI_DIALOG 102 9 | #define IDR_MAINFRAME 128 10 | #define IDC_MODULATOR_FILE_EDIT 1006 11 | #define IDC_MODULATOR_BROWSE_BUTTON 1007 12 | #define IDC_CARRIER_FILE_EDIT 1008 13 | #define IDC_CARRIER_BROWSE_BUTTON 1009 14 | #define IDC_WINDOW_LENGTH_SLIDER 1010 15 | #define IDC_WINDOW_OVERLAP_SLIDER 1011 16 | #define IDC_BAND_COUNT_SLIDER 1012 17 | #define IDC_OUTPUT_VOLUME_SLIDER 1013 18 | #define IDC_OUTPUT_FILE_EDIT 1014 19 | #define IDC_OUTPUT_BROWSE_BUTTON 1015 20 | #define IDC_NORMALIZE_CHECK 1016 21 | #define IDC_WINDOW_LENGTH_VALUE_LABEL 1017 22 | #define IDC_WINDOW_OVERLAP_VALUE_LABEL 1018 23 | #define IDC_BAND_COUNT_VALUE_LABEL 1019 24 | #define IDC_OUTPUT_VOLUME_VALUE_LABEL 1020 25 | #define IDC_VOCODE_PROGRESS 1021 26 | #define IDC_STOP_BUTTON 1022 27 | #define IDC_OUTPUT_PLAY_BUTTON 1023 28 | #define IDC_MODULATOR_PLAY_BUTTON 1024 29 | #define IDC_CARRIER_PLAY_BUTTON 1025 30 | #define IDC_RESTORE_DEFAULTS_BUTTON 1026 31 | #define IDC_VOCODE_LISTEN_BUTTON 1027 32 | 33 | // Next default values for new objects 34 | // 35 | #ifdef APSTUDIO_INVOKED 36 | #ifndef APSTUDIO_READONLY_SYMBOLS 37 | #define _APS_NEXT_RESOURCE_VALUE 129 38 | #define _APS_NEXT_COMMAND_VALUE 32771 39 | #define _APS_NEXT_CONTROL_VALUE 1000 40 | #define _APS_NEXT_SYMED_VALUE 101 41 | #endif 42 | #endif 43 | -------------------------------------------------------------------------------- /wave.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: wave.h,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #ifndef WAVE_H_INCLUDED 10 | #define WAVE_H_INCLUDED 11 | 12 | #include 13 | #include "config.h" 14 | 15 | typedef enum {AIFF_FORMAT, RIFF_FORMAT, 16 | WAVE_NUM_FORMATS} WAVE_FORMAT; 17 | 18 | typedef enum {WAVE_READ_MODE, WAVE_WRITE_MODE} WAVE_OPEN_MODE; 19 | 20 | typedef VSHORT SAMPLE; 21 | 22 | struct tag_WAVE_FILE 23 | { 24 | FILE *fp; 25 | VBYTE bits; 26 | VBOOL is_big_endian; 27 | SAMPLE sample_offset; 28 | VINT length, position; 29 | WAVE_OPEN_MODE open_mode; 30 | WAVE_FORMAT format; 31 | long data_offset; 32 | }; 33 | typedef struct tag_WAVE_FILE WAVE_FILE; 34 | 35 | struct tag_WAVE_INFO 36 | { 37 | VINT rate; 38 | VBYTE bits; 39 | VBYTE channels; 40 | VINT length; 41 | WAVE_FORMAT format; 42 | }; 43 | typedef struct tag_WAVE_INFO WAVE_INFO; 44 | 45 | WAVE_FILE *wave_open(char *filename, WAVE_INFO *info); 46 | WAVE_FILE *wave_open_specific(char *filename, WAVE_INFO *info); 47 | WAVE_FILE *wave_create(char *filename, WAVE_INFO *info); 48 | void wave_close(WAVE_FILE *file); 49 | size_t wave_read(WAVE_FILE *file, SAMPLE *buffer, size_t length); 50 | void wave_write(WAVE_FILE *file, SAMPLE *buffer, size_t length); 51 | void wave_seek(WAVE_FILE *file, VINT position); 52 | 53 | VINT wave_read_int_big(FILE *fp); 54 | void wave_write_int_big(VINT i, FILE *fp); 55 | VINT wave_read_int_little(FILE *fp); 56 | void wave_write_int_little(VINT i, FILE *fp); 57 | VSHORT wave_read_short_big(FILE *fp); 58 | void wave_write_short_big(VSHORT i, FILE *fp); 59 | VSHORT wave_read_short_little(FILE *fp); 60 | void wave_write_short_little(VSHORT i, FILE *fp); 61 | VREAL wave_read_extended(FILE *fp); 62 | void wave_write_extended(VREAL e, FILE *fp); 63 | 64 | #endif /* WAVE_H_INCLUDED */ 65 | -------------------------------------------------------------------------------- /win32/gui/VocoderGUI.cpp: -------------------------------------------------------------------------------- 1 | // VocoderGUI.cpp : Defines the class behaviors for the application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "VocoderGUI.h" 6 | #include "VocoderGUIDlg.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CVocoderGUIApp 16 | 17 | BEGIN_MESSAGE_MAP(CVocoderGUIApp, CWinApp) 18 | //{{AFX_MSG_MAP(CVocoderGUIApp) 19 | // NOTE - the ClassWizard will add and remove mapping macros here. 20 | // DO NOT EDIT what you see in these blocks of generated code! 21 | //}}AFX_MSG 22 | ON_COMMAND(ID_HELP, CWinApp::OnHelp) 23 | END_MESSAGE_MAP() 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CVocoderGUIApp construction 27 | 28 | CVocoderGUIApp::CVocoderGUIApp() 29 | { 30 | // TODO: add construction code here, 31 | // Place all significant initialization in InitInstance 32 | } 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // The one and only CVocoderGUIApp object 36 | 37 | CVocoderGUIApp theApp; 38 | 39 | ///////////////////////////////////////////////////////////////////////////// 40 | // CVocoderGUIApp initialization 41 | 42 | BOOL CVocoderGUIApp::InitInstance() 43 | { 44 | AfxEnableControlContainer(); 45 | 46 | // Standard initialization 47 | // If you are not using these features and wish to reduce the size 48 | // of your final executable, you should remove from the following 49 | // the specific initialization routines you do not need. 50 | 51 | #ifdef _AFXDLL 52 | Enable3dControls(); // Call this when using MFC in a shared DLL 53 | #else 54 | Enable3dControlsStatic(); // Call this when linking to MFC statically 55 | #endif 56 | 57 | SetRegistryKey("Zerius"); 58 | 59 | CVocoderGUIDlg dlg; 60 | m_pMainWnd = &dlg; 61 | int nResponse = dlg.DoModal(); 62 | if (nResponse == IDOK) 63 | { 64 | // TODO: Place code here to handle when the dialog is 65 | // dismissed with OK 66 | } 67 | else if (nResponse == IDCANCEL) 68 | { 69 | // TODO: Place code here to handle when the dialog is 70 | // dismissed with Cancel 71 | } 72 | 73 | // Since the dialog has been closed, return FALSE so that we exit the 74 | // application, rather than start the application's message pump. 75 | return FALSE; 76 | } 77 | -------------------------------------------------------------------------------- /win32/gui/hlp/VocoderGUI.hpj: -------------------------------------------------------------------------------- 1 | [OPTIONS] 2 | LCID=0x409 0x0 0x0 ;English (U.S.) 3 | TITLE=VOCODERGUI Application Help 4 | COMPRESS=true 5 | WARNING=2 6 | BMROOT= ..,. 7 | ROOT= ..,. 8 | HLP=VocoderGUI.HLP 9 | ERRORLOG=VocoderGUI.LOG 10 | 11 | [FILES] 12 | afxdlg.rtf 13 | 14 | [ALIAS] 15 | HIDD_ABOUTBOX = HID_APP_ABOUT 16 | 17 | HID_HT_SIZE = HID_SC_SIZE 18 | HID_HT_HSCROLL = scrollbars 19 | HID_HT_VSCROLL = scrollbars 20 | HID_HT_MINBUTTON = HID_SC_MINIMIZE 21 | HID_HT_MAXBUTTON = HID_SC_MAXIMIZE 22 | AFX_HIDP_INVALID_FILENAME = AFX_HIDP_default 23 | AFX_HIDP_FAILED_TO_OPEN_DOC = AFX_HIDP_default 24 | AFX_HIDP_FAILED_TO_SAVE_DOC = AFX_HIDP_default 25 | AFX_HIDP_ASK_TO_SAVE = AFX_HIDP_default 26 | AFX_HIDP_FAILED_TO_CREATE_DOC = AFX_HIDP_default 27 | AFX_HIDP_FILE_TOO_LARGE = AFX_HIDP_default 28 | AFX_HIDP_FAILED_TO_START_PRINT = AFX_HIDP_default 29 | AFX_HIDP_FAILED_TO_LAUNCH_HELP = AFX_HIDP_default 30 | AFX_HIDP_INTERNAL_FAILURE = AFX_HIDP_default 31 | AFX_HIDP_COMMAND_FAILURE = AFX_HIDP_default 32 | AFX_HIDP_PARSE_INT = AFX_HIDP_default 33 | AFX_HIDP_PARSE_REAL = AFX_HIDP_default 34 | AFX_HIDP_PARSE_INT_RANGE = AFX_HIDP_default 35 | AFX_HIDP_PARSE_REAL_RANGE = AFX_HIDP_default 36 | AFX_HIDP_PARSE_STRING_SIZE = AFX_HIDP_default 37 | AFX_HIDP_FAILED_INVALID_FORMAT = AFX_HIDP_default 38 | AFX_HIDP_FAILED_INVALID_PATH = AFX_HIDP_default 39 | AFX_HIDP_FAILED_DISK_FULL = AFX_HIDP_default 40 | AFX_HIDP_FAILED_ACCESS_READ = AFX_HIDP_default 41 | AFX_HIDP_FAILED_ACCESS_WRITE = AFX_HIDP_default 42 | AFX_HIDP_FAILED_IO_ERROR_READ = AFX_HIDP_default 43 | AFX_HIDP_FAILED_IO_ERROR_WRITE = AFX_HIDP_default 44 | AFX_HIDP_STATIC_OBJECT = AFX_HIDP_default 45 | AFX_HIDP_FAILED_TO_CONNECT = AFX_HIDP_default 46 | AFX_HIDP_SERVER_BUSY = AFX_HIDP_default 47 | AFX_HIDP_BAD_VERB = AFX_HIDP_default 48 | AFX_HIDP_FAILED_MEMORY_ALLOC = AFX_HIDP_default 49 | AFX_HIDP_FAILED_TO_NOTIFY = AFX_HIDP_default 50 | AFX_HIDP_FAILED_TO_LAUNCH = AFX_HIDP_default 51 | AFX_HIDP_ASK_TO_UPDATE = AFX_HIDP_default 52 | AFX_HIDP_FAILED_TO_UPDATE = AFX_HIDP_default 53 | AFX_HIDP_FAILED_TO_REGISTER = AFX_HIDP_default 54 | AFX_HIDP_FAILED_TO_AUTO_REGISTER = AFX_HIDP_default 55 | 56 | [MAP] 57 | #include 58 | #include 59 | -------------------------------------------------------------------------------- /win32/gui/vocoder.nsi: -------------------------------------------------------------------------------- 1 | ; Generated NSIS script file (generated by makensitemplate.phtml 0.21) 2 | ; by 207.102.108.37 on Sep 18 02 @ 21:06 3 | 4 | ; NOTE: this .NSI script is designed for NSIS v1.8+ 5 | 6 | Name "Zerius Vocoder" 7 | OutFile "InstallZeriusVocoder.exe" 8 | 9 | ; Some default compiler settings (uncomment and change at will): 10 | ; SetCompress auto ; (can be off or force) 11 | ; SetDatablockOptimize on ; (can be off) 12 | ; CRCCheck on ; (can be off) 13 | ; AutoCloseWindow false ; (can be true for the window go away automatically at end) 14 | ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable) 15 | ; SetDateSave off ; (can be on to have files restored to their orginal date) 16 | 17 | InstallDir "$PROGRAMFILES\VocoderGUI" 18 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Zerius\VocoderGUI" "" 19 | DirShow show ; (make this hide to not let the user change it) 20 | DirText "Select the directory to install Zerius Vocoder in:" 21 | 22 | Section "" ; (default section) 23 | SetOutPath "$INSTDIR" 24 | ; add files / whatever that need to be installed here. 25 | File Release\VocoderGUI.exe 26 | File Release\VocoderGUI.hlp 27 | File ..\..\examples\modulator22.wav 28 | File ..\..\examples\carrier22.wav 29 | File ..\..\examples\white.wav 30 | File ..\..\examples\white512.wav 31 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Zerius\VocoderGUI" "" "$INSTDIR" 32 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\VocoderGUI" "DisplayName" "Zerius Vocoder (remove only)" 33 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\VocoderGUI" "UninstallString" '"$INSTDIR\uninst.exe"' 34 | ; write out uninstaller 35 | WriteUninstaller "$INSTDIR\uninst.exe" 36 | CreateShortCut "$SMPROGRAMS\Zerius Vocoder.lnk" "$INSTDIR\VocoderGUI.exe" 37 | CreateShortCut "$DESKTOP\Zerius Vocoder.lnk" "$INSTDIR\VocoderGUI.exe" 38 | SectionEnd ; end of default section 39 | 40 | 41 | ; begin uninstall settings/section 42 | UninstallText "This will uninstall Zerius Vocoder from your system" 43 | 44 | Section Uninstall 45 | ; add delete commands to delete whatever files/registry keys/etc you installed here. 46 | Delete "$INSTDIR\VocoderGUI.exe" 47 | Delete "$INSTDIR\VocoderGUI.hlp" 48 | Delete "$INSTDIR\modulator22.wav" 49 | Delete "$INSTDIR\carrier22.wav" 50 | Delete "$INSTDIR\white.wav" 51 | Delete "$INSTDIR\white512.wav" 52 | Delete "$SMPROGRAMS\Zerius Vocoder.lnk" 53 | Delete "$DESKTOP\Zerius Vocoder.lnk" 54 | Delete "$INSTDIR\uninst.exe" 55 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Zerius\VocoderGUI" 56 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VocoderGUI" 57 | RMDir "$INSTDIR" 58 | SectionEnd ; end of uninstall section 59 | 60 | ; eof 61 | -------------------------------------------------------------------------------- /win32/gui/VocoderGUIDlg.h: -------------------------------------------------------------------------------- 1 | // VocoderGUIDlg.h : header file 2 | // 3 | 4 | #if !defined(AFX_VOCODERGUIDLG_H__F93F4248_5661_4180_B396_5929D14B0369__INCLUDED_) 5 | #define AFX_VOCODERGUIDLG_H__F93F4248_5661_4180_B396_5929D14B0369__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CVocoderGUIDlg dialog 13 | 14 | class CVocoderGUIDlg : public CDialog 15 | { 16 | // Construction 17 | public: 18 | void VocodeFinished(); 19 | BOOL UpdateStatus(int frame_no); 20 | void StartStatus(int num_frames); 21 | CVocoderGUIDlg(CWnd* pParent = NULL); // standard constructor 22 | 23 | // Dialog Data 24 | //{{AFX_DATA(CVocoderGUIDlg) 25 | enum { IDD = IDD_VOCODERGUI_DIALOG }; 26 | CString m_modulatorFile; 27 | CString m_carrierFile; 28 | CString m_outputFile; 29 | int m_bandCount; 30 | BOOL m_normalize; 31 | int m_outputVolume; 32 | int m_windowLength; 33 | int m_windowOverlap; 34 | //}}AFX_DATA 35 | 36 | // ClassWizard generated virtual function overrides 37 | //{{AFX_VIRTUAL(CVocoderGUIDlg) 38 | protected: 39 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 40 | //}}AFX_VIRTUAL 41 | 42 | // Implementation 43 | protected: 44 | HICON m_hIcon; 45 | 46 | // Generated message map functions 47 | //{{AFX_MSG(CVocoderGUIDlg) 48 | virtual BOOL OnInitDialog(); 49 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 50 | afx_msg void OnDestroy(); 51 | afx_msg void OnPaint(); 52 | afx_msg HCURSOR OnQueryDragIcon(); 53 | afx_msg void OnModulatorBrowseButton(); 54 | afx_msg void OnCarrierBrowseButton(); 55 | afx_msg void OnOutputBrowseButton(); 56 | virtual void OnOK(); 57 | afx_msg void OnCustomdrawWindowLengthSlider(NMHDR* pNMHDR, LRESULT* pResult); 58 | afx_msg void OnCustomdrawWindowOverlapSlider(NMHDR* pNMHDR, LRESULT* pResult); 59 | afx_msg void OnCustomdrawBandCountSlider(NMHDR* pNMHDR, LRESULT* pResult); 60 | afx_msg void OnCustomdrawOutputVolumeSlider(NMHDR* pNMHDR, LRESULT* pResult); 61 | afx_msg void OnStopButton(); 62 | afx_msg void OnModulatorPlayButton(); 63 | afx_msg void OnCarrierPlayButton(); 64 | afx_msg void OnOutputPlayButton(); 65 | afx_msg void OnChangeModulatorFileEdit(); 66 | afx_msg void OnChangeCarrierFileEdit(); 67 | afx_msg void OnChangeOutputFileEdit(); 68 | afx_msg void OnRestoreDefaultsButton(); 69 | afx_msg void OnVocodeListenButton(); 70 | //}}AFX_MSG 71 | DECLARE_MESSAGE_MAP() 72 | private: 73 | void UpdateSliderValueLabel(int nSliderId, int nLabelId, int nOneValue = 1, char* pszUnits = NULL, int nOffset = 0); 74 | BOOL m_listenAfterVocode; 75 | void UpdateSliderLabels(); 76 | void UpdatePlayButtonEnabled(int nEditCntl, int nPlayCntl); 77 | BOOL m_stopVocode; 78 | void DoVocode(); 79 | void BrowseFile(BOOL bOpenFileDialog, CWnd* editCtl); 80 | void UpdatePlayButtonsEnabled(); 81 | }; 82 | 83 | //{{AFX_INSERT_LOCATION}} 84 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 85 | 86 | #endif // !defined(AFX_VOCODERGUIDLG_H__F93F4248_5661_4180_B396_5929D14B0369__INCLUDED_) 87 | -------------------------------------------------------------------------------- /win32/gui/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | MICROSOFT FOUNDATION CLASS LIBRARY : VocoderGUI 3 | ======================================================================== 4 | 5 | 6 | AppWizard has created this VocoderGUI application for you. This application 7 | not only demonstrates the basics of using the Microsoft Foundation classes 8 | but is also a starting point for writing your application. 9 | 10 | This file contains a summary of what you will find in each of the files that 11 | make up your VocoderGUI application. 12 | 13 | VocoderGUI.dsp 14 | This file (the project file) contains information at the project level and 15 | is used to build a single project or subproject. Other users can share the 16 | project (.dsp) file, but they should export the makefiles locally. 17 | 18 | VocoderGUI.h 19 | This is the main header file for the application. It includes other 20 | project specific headers (including Resource.h) and declares the 21 | CVocoderGUIApp application class. 22 | 23 | VocoderGUI.cpp 24 | This is the main application source file that contains the application 25 | class CVocoderGUIApp. 26 | 27 | VocoderGUI.rc 28 | This is a listing of all of the Microsoft Windows resources that the 29 | program uses. It includes the icons, bitmaps, and cursors that are stored 30 | in the RES subdirectory. This file can be directly edited in Microsoft 31 | Visual C++. 32 | 33 | VocoderGUI.clw 34 | This file contains information used by ClassWizard to edit existing 35 | classes or add new classes. ClassWizard also uses this file to store 36 | information needed to create and edit message maps and dialog data 37 | maps and to create prototype member functions. 38 | 39 | res\VocoderGUI.ico 40 | This is an icon file, which is used as the application's icon. This 41 | icon is included by the main resource file VocoderGUI.rc. 42 | 43 | res\VocoderGUI.rc2 44 | This file contains resources that are not edited by Microsoft 45 | Visual C++. You should place all resources not editable by 46 | the resource editor in this file. 47 | 48 | 49 | 50 | 51 | ///////////////////////////////////////////////////////////////////////////// 52 | 53 | AppWizard creates one dialog class: 54 | 55 | VocoderGUIDlg.h, VocoderGUIDlg.cpp - the dialog 56 | These files contain your CVocoderGUIDlg class. This class defines 57 | the behavior of your application's main dialog. The dialog's 58 | template is in VocoderGUI.rc, which can be edited in Microsoft 59 | Visual C++. 60 | 61 | ///////////////////////////////////////////////////////////////////////////// 62 | 63 | Help Support: 64 | 65 | hlp\VocoderGUI.hpj 66 | This file is the Help Project file used by the Help compiler to create 67 | your application's Help file. 68 | 69 | hlp\*.bmp 70 | These are bitmap files required by the standard Help file topics for 71 | Microsoft Foundation Class Library standard commands. 72 | 73 | hlp\*.rtf 74 | This file contains the standard help topics for standard MFC 75 | commands and screen objects. 76 | 77 | ///////////////////////////////////////////////////////////////////////////// 78 | Other standard files: 79 | 80 | StdAfx.h, StdAfx.cpp 81 | These files are used to build a precompiled header (PCH) file 82 | named VocoderGUI.pch and a precompiled types file named StdAfx.obj. 83 | 84 | Resource.h 85 | This is the standard header file, which defines new resource IDs. 86 | Microsoft Visual C++ reads and updates this file. 87 | 88 | ///////////////////////////////////////////////////////////////////////////// 89 | Other notes: 90 | 91 | AppWizard uses "TODO:" to indicate parts of the source code you 92 | should add to or customize. 93 | 94 | If your application uses MFC in a shared DLL, and your application is 95 | in a language other than the operating system's current language, you 96 | will need to copy the corresponding localized resources MFC42XXX.DLL 97 | from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, 98 | and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. 99 | For example, MFC42DEU.DLL contains resources translated to German.) If you 100 | don't do this, some of the UI elements of your application will remain in the 101 | language of the operating system. 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | -------------------------------------------------------------------------------- /riff.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: riff.c,v 1.5 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1996-1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "config.h" 14 | #include "error.h" 15 | #include "wave.h" 16 | #include "riff.h" 17 | 18 | WAVE_FILE *riff_open(FILE *fp, WAVE_INFO *info) 19 | { 20 | char file_id[5], form_type[5]; 21 | VINT file_data_size, file_position; 22 | VSHORT format_tag = 0, channels = 0, block_align, bits_per_sample = 0; 23 | VINT samples_per_sec = 0, avg_bytes_per_sec; 24 | VINT data_size = 0, length; 25 | long data_offset = 0; 26 | VBOOL got_format_chunk = FALSE, got_data_chunk = FALSE; 27 | WAVE_FILE *file; 28 | 29 | fread(file_id, 4, 1, fp); 30 | file_id[4] = '\0'; 31 | if (strcmp(file_id, "RIFF") != 0) 32 | return NULL; 33 | 34 | file_data_size = wave_read_int_little(fp) + 8; 35 | 36 | fread(form_type, 4, 1, fp); 37 | form_type[4] = '\0'; 38 | if (strcmp(form_type, "WAVE") != 0) 39 | return NULL; 40 | 41 | file_position = 12; 42 | while (file_position < file_data_size) 43 | { 44 | char chunk_id[5]; 45 | VINT chunk_data_size; 46 | 47 | if (fread(chunk_id, 4, 1, fp) < 1) 48 | { 49 | if (feof(fp)) 50 | error_display("riff_open: bad format: EOF encountered where chunk expected"); 51 | else if (ferror(fp)) 52 | error_display("riff_open: bad format: error encountered where chunk expected: %s", 53 | strerror(errno)); 54 | } 55 | chunk_id[4] = '\0'; 56 | 57 | chunk_data_size = wave_read_int_little(fp); 58 | 59 | if (strcmp(chunk_id, "fmt ") == 0) 60 | /* Common chunk */ 61 | { 62 | format_tag = wave_read_short_little(fp); 63 | channels = wave_read_short_little(fp); 64 | samples_per_sec = wave_read_int_little(fp); 65 | avg_bytes_per_sec = wave_read_int_little(fp); 66 | block_align = wave_read_short_little(fp); 67 | if (format_tag == 1) 68 | { 69 | bits_per_sample = wave_read_short_little(fp); 70 | } 71 | got_format_chunk = TRUE; 72 | } 73 | else if (strcmp(chunk_id, "data") == 0) 74 | /* Sound Data chunk */ 75 | { 76 | data_size = chunk_data_size; 77 | data_offset = ftell(fp); 78 | got_data_chunk = TRUE; 79 | } 80 | 81 | file_position += chunk_data_size + 8; 82 | fseek(fp, file_position, SEEK_SET); 83 | } 84 | 85 | if (!got_format_chunk) 86 | error_display("riff_open: bad format: format chunk not found"); 87 | if (!got_data_chunk) 88 | error_display("riff_open: bad format: data chunk not found"); 89 | if (format_tag != 1) 90 | error_display("riff_open: bad format: only PCM data is supported"); 91 | 92 | length = data_size / ((bits_per_sample + 7) / 8); 93 | 94 | fseek(fp, data_offset, SEEK_SET); 95 | 96 | file = error_malloc(sizeof(WAVE_FILE)); 97 | file->is_big_endian = FALSE; 98 | file->sample_offset = (bits_per_sample <= 8) ? 128 : 0; 99 | 100 | info->rate = samples_per_sec; 101 | info->bits = (VBYTE)bits_per_sample; 102 | info->channels = (VBYTE)channels; 103 | info->length = length; 104 | 105 | return file; 106 | } 107 | 108 | WAVE_FILE *riff_create(FILE *fp, WAVE_INFO *info) 109 | { 110 | WAVE_FILE *file; 111 | 112 | fwrite("RIFF", 4, 1, fp); 113 | wave_write_int_little(0xDEADBEEF, fp); 114 | fwrite("WAVE", 4, 1, fp); 115 | 116 | fwrite("fmt ", 4, 1, fp); 117 | wave_write_int_little(16, fp); 118 | wave_write_short_little(1, fp); 119 | wave_write_short_little(info->channels, fp); 120 | wave_write_int_little(info->rate, fp); 121 | wave_write_int_little(info->channels * info->rate * ((info->bits + 7) / 8), fp); 122 | wave_write_short_little(info->channels * ((info->bits + 7) / 8), fp); 123 | wave_write_short_little(info->bits, fp); 124 | 125 | fwrite("data", 4, 1, fp); 126 | wave_write_int_little(0xDEADBEEF, fp); 127 | 128 | file = error_malloc(sizeof(WAVE_FILE)); 129 | file->is_big_endian = FALSE; 130 | file->sample_offset = (info->bits <= 8) ? 128 : 0; 131 | return file; 132 | } 133 | 134 | void riff_close(WAVE_FILE *file) 135 | { 136 | if (file->open_mode == WAVE_WRITE_MODE) 137 | { 138 | fseek(file->fp, 4, SEEK_SET); 139 | wave_write_int_little(file->length * ((file->bits + 7) / 8) + 4 + 8 + 16 + 8, file->fp); 140 | fseek(file->fp, 12 + 8 + 16 + 4, SEEK_SET); 141 | wave_write_int_little(file->length * ((file->bits + 7) / 8), file->fp); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /win32/cli/VocoderCLI.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="VocoderCLI" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 60000 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=VocoderCLI - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "VocoderCLI.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "VocoderCLI.mak" CFG="VocoderCLI - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "VocoderCLI - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "VocoderCLI - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cwcl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "VocoderCLI - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "Release" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Target_Dir "" 43 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 44 | # ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D PATH_MAX=2048 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 46 | # ADD RSC /l 0x409 /d "NDEBUG" 47 | BSC32=bscmake.exe 48 | # ADD BASE BSC32 /nologo 49 | # ADD BSC32 /nologo 50 | LINK32=cwlink.exe 51 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 52 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | 54 | !ELSEIF "$(CFG)" == "VocoderCLI - Win32 Debug" 55 | 56 | # PROP BASE Use_MFC 0 57 | # PROP BASE Use_Debug_Libraries 1 58 | # PROP BASE Output_Dir "Debug" 59 | # PROP BASE Intermediate_Dir "Debug" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 0 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Ignore_Export_Lib 0 66 | # PROP Target_Dir "" 67 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 68 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D PATH_MAX=2048 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 69 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 70 | # ADD RSC /l 0x409 /d "_DEBUG" 71 | BSC32=bscmake.exe 72 | # ADD BASE BSC32 /nologo 73 | # ADD BSC32 /nologo 74 | LINK32=cwlink.exe 75 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 76 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 | 78 | !ENDIF 79 | 80 | # Begin Target 81 | 82 | # Name "VocoderCLI - Win32 Release" 83 | # Name "VocoderCLI - Win32 Debug" 84 | # Begin Group "Source Files" 85 | 86 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 87 | # Begin Source File 88 | 89 | SOURCE=..\..\aiff.c 90 | # End Source File 91 | # Begin Source File 92 | 93 | SOURCE=..\..\error.c 94 | # End Source File 95 | # Begin Source File 96 | 97 | SOURCE=..\..\extended.c 98 | # End Source File 99 | # Begin Source File 100 | 101 | SOURCE=..\..\fftaux.c 102 | # End Source File 103 | # Begin Source File 104 | 105 | SOURCE=..\..\fftn.c 106 | # End Source File 107 | # Begin Source File 108 | 109 | SOURCE=..\..\main.c 110 | # End Source File 111 | # Begin Source File 112 | 113 | SOURCE=..\..\riff.c 114 | # End Source File 115 | # Begin Source File 116 | 117 | SOURCE=..\..\vocode.c 118 | # End Source File 119 | # Begin Source File 120 | 121 | SOURCE=..\..\wave.c 122 | # End Source File 123 | # End Group 124 | # Begin Group "Header Files" 125 | 126 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 127 | # Begin Source File 128 | 129 | SOURCE=..\..\aiff.h 130 | # End Source File 131 | # Begin Source File 132 | 133 | SOURCE=..\..\config.h 134 | # End Source File 135 | # Begin Source File 136 | 137 | SOURCE=..\..\error.h 138 | # End Source File 139 | # Begin Source File 140 | 141 | SOURCE=..\..\extended.h 142 | # End Source File 143 | # Begin Source File 144 | 145 | SOURCE=..\..\fft.h 146 | # End Source File 147 | # Begin Source File 148 | 149 | SOURCE=..\..\riff.h 150 | # End Source File 151 | # Begin Source File 152 | 153 | SOURCE=..\..\spt.h 154 | # End Source File 155 | # Begin Source File 156 | 157 | SOURCE=..\..\vocode.h 158 | # End Source File 159 | # Begin Source File 160 | 161 | SOURCE=..\..\wave.h 162 | # End Source File 163 | # End Group 164 | # Begin Group "Resource Files" 165 | 166 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 167 | # End Group 168 | # End Target 169 | # End Project 170 | -------------------------------------------------------------------------------- /aiff.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: aiff.c,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include 11 | #include 12 | #include "config.h" 13 | #include "error.h" 14 | #include "aiff.h" 15 | 16 | WAVE_FILE *aiff_open(FILE *fp, WAVE_INFO *info) 17 | { 18 | char file_id[5], form_type[5]; 19 | VINT file_data_size, file_position; 20 | WAVE_FILE *file; 21 | VBOOL is_aifc; 22 | 23 | /* common chunk */ 24 | VBOOL got_common_chunk = FALSE; 25 | VSHORT num_channels = 0, sample_size = 0; 26 | char compression_type[5]; 27 | VUINT num_sample_frames = 0; 28 | VREAL sample_rate = 0; 29 | 30 | /* sound data chunk */ 31 | VUINT offset, block_size; 32 | VBOOL got_sound_data_chunk = FALSE; 33 | long sound_data_offset = 0; 34 | 35 | fread(file_id, 4, 1, fp); 36 | file_id[4] = '\0'; 37 | if (strcmp(file_id, "FORM") != 0) 38 | return NULL; 39 | 40 | file_data_size = wave_read_int_big(fp) + 8; 41 | 42 | fread(form_type, 4, 1, fp); 43 | form_type[4] = '\0'; 44 | if (strcmp(form_type, "AIFF") != 0 && strcmp(form_type, "AIFC") != 0) 45 | return NULL; 46 | is_aifc = strcmp(form_type, "AIFC") == 0; 47 | 48 | file_position = 12; 49 | while (file_position < file_data_size) 50 | { 51 | char chunk_id[5]; 52 | VINT chunk_data_size; 53 | 54 | if (fread(chunk_id, 4, 1, fp) < 1) { 55 | if (feof(fp)) 56 | error_display("aiff_open: bad format: EOF encountered where chunk expected"); 57 | else if (ferror(fp)) 58 | error_display("aiff_open: bad format: error encountered where chunk expected: %s", 59 | strerror(errno)); 60 | } 61 | chunk_id[4] = '\0'; 62 | 63 | chunk_data_size = wave_read_int_big(fp); 64 | 65 | if (strcmp(chunk_id, "COMM") == 0) 66 | /* Common chunk */ 67 | { 68 | num_channels = wave_read_short_big(fp); 69 | num_sample_frames = wave_read_int_big(fp); 70 | sample_size = wave_read_short_big(fp); 71 | sample_rate = wave_read_extended(fp); 72 | if (is_aifc) { 73 | fread(compression_type, 4, 1, fp); 74 | if (feof(fp)) 75 | error_display("aiff_open: bad format: EOF encountered in common chunk"); 76 | compression_type[4] = '\0'; 77 | } else { 78 | strcpy(compression_type, "NONE"); 79 | } 80 | got_common_chunk = TRUE; 81 | } 82 | else if (strcmp(chunk_id, "SSND") == 0) 83 | /* Sound Data chunk */ 84 | { 85 | offset = wave_read_int_big(fp); 86 | block_size = wave_read_int_big(fp); 87 | sound_data_offset = ftell(fp) + offset; 88 | got_sound_data_chunk = TRUE; 89 | } 90 | 91 | file_position += chunk_data_size + 8; 92 | fseek(fp, file_position, SEEK_SET); 93 | } 94 | 95 | if (!got_common_chunk) 96 | error_display("aiff_open: bad format: did not find common chunk"); 97 | 98 | if (!got_sound_data_chunk) 99 | error_display("aiff_open: bad format: did not find sound data chunk"); 100 | 101 | if (strcmp(compression_type, "NONE") != 0) 102 | error_display("aiff_open: bad format: compressed AIFF-C files not supported"); 103 | 104 | fseek(fp, sound_data_offset, SEEK_SET); 105 | 106 | file = error_malloc(sizeof(WAVE_FILE)); 107 | file->is_big_endian = 1; 108 | file->sample_offset = 0; 109 | 110 | info->rate = (VINT)sample_rate; 111 | info->bits = (VBYTE)sample_size; 112 | info->channels = (VBYTE)num_channels; 113 | info->length = num_sample_frames; 114 | 115 | return file; 116 | } 117 | 118 | WAVE_FILE *aiff_create(FILE *fp, WAVE_INFO *info) 119 | { 120 | VBYTE bytes_per_sample; 121 | WAVE_FILE *file; 122 | 123 | bytes_per_sample = (info->bits + 7) / 8; 124 | 125 | fwrite("FORM", 4, 1, fp); 126 | wave_write_int_big(0xDEADBEAF, fp); 127 | fwrite("AIFF", 4, 1, fp); 128 | 129 | fwrite("COMM", 4, 1, fp); 130 | wave_write_int_big(18, fp); /* ckDataSize */ 131 | wave_write_short_big(info->channels, fp); /* numChannels */ 132 | wave_write_int_big(0xDEADBEAF, fp); /* numSampleFrames */ 133 | wave_write_short_big(info->bits, fp); /* sampleSize */ 134 | wave_write_extended(info->rate, fp); /* sampleRate */ 135 | 136 | fwrite("SSND", 4, 1, fp); 137 | wave_write_int_big(0xDEADBEAF, fp); 138 | wave_write_int_big(0, fp); 139 | wave_write_int_big(0, fp); 140 | 141 | file = error_malloc(sizeof(WAVE_FILE)); 142 | file->is_big_endian = TRUE; 143 | file->sample_offset = 0; 144 | return file; 145 | } 146 | 147 | void aiff_close(WAVE_FILE *file) 148 | { 149 | if (file->open_mode == WAVE_WRITE_MODE) 150 | { 151 | if (file->length % 2 == 1) 152 | putc(0, file->fp); 153 | 154 | fseek(file->fp, 4, SEEK_SET); 155 | wave_write_int_big(4 + 8 + 18 + 8 + 8 + 156 | file->length * ((file->bits + 7) / 8), file->fp); 157 | fseek(file->fp, 12 + 10, SEEK_SET); 158 | wave_write_int_big(file->length, file->fp); 159 | fseek(file->fp, 12 + 18 + 8 + 4, SEEK_SET); 160 | wave_write_int_big(file->length * ((file->bits + 7) / 8) + 8, file->fp); 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /extended.c: -------------------------------------------------------------------------------- 1 | /* $Id: extended.c,v 1.4 2002/09/20 02:30:51 emanuel Exp $ */ 2 | 3 | #include 4 | #include "extended.h" 5 | 6 | /* 7 | * C O N V E R T T O I E E E E X T E N D E D 8 | */ 9 | 10 | /* Copyright (C) 1988-1991 Apple Computer, Inc. 11 | * All rights reserved. 12 | * 13 | * Machine-independent I/O routines for IEEE floating-point numbers. 14 | * 15 | * NaN's and infinities are converted to HUGE_VAL or HUGE, which 16 | * happens to be infinity on IEEE machines. Unfortunately, it is 17 | * impossible to preserve NaN's in a machine-independent way. 18 | * Infinities are, however, preserved on IEEE machines. 19 | * 20 | * These routines have been tested on the following machines: 21 | * Apple Macintosh, MPW 3.1 C compiler 22 | * Apple Macintosh, THINK C compiler 23 | * Silicon Graphics IRIS, MIPS compiler 24 | * Cray X/MP and Y/MP 25 | * Digital Equipment VAX 26 | * 27 | * 28 | * Implemented by Malcolm Slaney and Ken Turkowski. 29 | * 30 | * Malcolm Slaney contributions during 1988-1990 include big- and little- 31 | * endian file I/O, conversion to and from Motorola's extended 80-bit 32 | * floating-point format, and conversions to and from IEEE single- 33 | * precision floating-point format. 34 | * 35 | * In 1991, Ken Turkowski implemented the conversions to and from 36 | * IEEE double-precision format, added more precision to the extended 37 | * conversions, and accommodated conversions involving +/- infinity, 38 | * NaN's, and denormalized numbers. 39 | */ 40 | 41 | #ifndef HUGE_VAL 42 | # define HUGE_VAL HUGE 43 | #endif /*HUGE_VAL*/ 44 | 45 | # define FloatToUnsigned(f) ((unsigned long)(((long)(f - 2147483648.0)) + 2147483647L) + 1) 46 | 47 | void ConvertToIeeeExtended(double num, unsigned char *bytes) 48 | { 49 | int sign; 50 | int expon; 51 | double fMant, fsMant; 52 | unsigned long hiMant, loMant; 53 | 54 | if (num < 0) { 55 | sign = 0x8000; 56 | num *= -1; 57 | } else { 58 | sign = 0; 59 | } 60 | 61 | if (num == 0) { 62 | expon = 0; hiMant = 0; loMant = 0; 63 | } 64 | else { 65 | fMant = frexp(num, &expon); 66 | if ((expon > 16384) || !(fMant < 1)) { /* Infinity or NaN */ 67 | expon = sign|0x7FFF; hiMant = 0; loMant = 0; /* infinity */ 68 | } 69 | else { /* Finite */ 70 | expon += 16382; 71 | if (expon < 0) { /* denormalized */ 72 | fMant = ldexp(fMant, expon); 73 | expon = 0; 74 | } 75 | expon |= sign; 76 | fMant = ldexp(fMant, 32); 77 | fsMant = floor(fMant); 78 | hiMant = FloatToUnsigned(fsMant); 79 | fMant = ldexp(fMant - fsMant, 32); 80 | fsMant = floor(fMant); 81 | loMant = FloatToUnsigned(fsMant); 82 | } 83 | } 84 | 85 | bytes[0] = expon >> 8; 86 | bytes[1] = expon; 87 | bytes[2] = hiMant >> 24; 88 | bytes[3] = hiMant >> 16; 89 | bytes[4] = hiMant >> 8; 90 | bytes[5] = hiMant; 91 | bytes[6] = loMant >> 24; 92 | bytes[7] = loMant >> 16; 93 | bytes[8] = loMant >> 8; 94 | bytes[9] = loMant; 95 | } 96 | 97 | 98 | /* 99 | * C O N V E R T F R O M I E E E E X T E N D E D 100 | */ 101 | 102 | /* 103 | * Copyright (C) 1988-1991 Apple Computer, Inc. 104 | * All rights reserved. 105 | * 106 | * Machine-independent I/O routines for IEEE floating-point numbers. 107 | * 108 | * NaN's and infinities are converted to HUGE_VAL or HUGE, which 109 | * happens to be infinity on IEEE machines. Unfortunately, it is 110 | * impossible to preserve NaN's in a machine-independent way. 111 | * Infinities are, however, preserved on IEEE machines. 112 | * 113 | * These routines have been tested on the following machines: 114 | * Apple Macintosh, MPW 3.1 C compiler 115 | * Apple Macintosh, THINK C compiler 116 | * Silicon Graphics IRIS, MIPS compiler 117 | * Cray X/MP and Y/MP 118 | * Digital Equipment VAX 119 | * 120 | * 121 | * Implemented by Malcolm Slaney and Ken Turkowski. 122 | * 123 | * Malcolm Slaney contributions during 1988-1990 include big- and little- 124 | * endian file I/O, conversion to and from Motorola's extended 80-bit 125 | * floating-point format, and conversions to and from IEEE single- 126 | * precision floating-point format. 127 | * 128 | * In 1991, Ken Turkowski implemented the conversions to and from 129 | * IEEE double-precision format, added more precision to the extended 130 | * conversions, and accommodated conversions involving +/- infinity, 131 | * NaN's, and denormalized numbers. 132 | */ 133 | 134 | #ifndef HUGE_VAL 135 | # define HUGE_VAL HUGE 136 | #endif /*HUGE_VAL*/ 137 | 138 | # define UnsignedToFloat(u) (((double)((long)(u - 2147483647L - 1))) + 2147483648.0) 139 | 140 | /**************************************************************** 141 | * Extended precision IEEE floating-point conversion routine. 142 | ****************************************************************/ 143 | 144 | double ConvertFromIeeeExtended(unsigned char *bytes) 145 | { 146 | double f; 147 | int expon; 148 | unsigned long hiMant, loMant; 149 | 150 | expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF); 151 | hiMant = ((unsigned long)(bytes[2] & 0xFF) << 24) 152 | | ((unsigned long)(bytes[3] & 0xFF) << 16) 153 | | ((unsigned long)(bytes[4] & 0xFF) << 8) 154 | | ((unsigned long)(bytes[5] & 0xFF)); 155 | loMant = ((unsigned long)(bytes[6] & 0xFF) << 24) 156 | | ((unsigned long)(bytes[7] & 0xFF) << 16) 157 | | ((unsigned long)(bytes[8] & 0xFF) << 8) 158 | | ((unsigned long)(bytes[9] & 0xFF)); 159 | 160 | if (expon == 0 && hiMant == 0 && loMant == 0) { 161 | f = 0; 162 | } 163 | else { 164 | if (expon == 0x7FFF) { /* Infinity or NaN */ 165 | f = HUGE_VAL; 166 | } 167 | else { 168 | expon -= 16383; 169 | f = ldexp(UnsignedToFloat(hiMant), expon-=31); 170 | f += ldexp(UnsignedToFloat(loMant), expon-=32); 171 | } 172 | } 173 | 174 | if (bytes[0] & 0x80) 175 | return -f; 176 | else 177 | return f; 178 | } 179 | 180 | -------------------------------------------------------------------------------- /wave.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: wave.c,v 1.4 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1998,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "config.h" 14 | #include "wave.h" 15 | #include "extended.h" 16 | #include "error.h" 17 | 18 | #include "aiff.h" 19 | #include "riff.h" 20 | 21 | static struct { 22 | WAVE_FILE *(*open_func)(FILE *fp, WAVE_INFO *info); 23 | WAVE_FILE *(*create_func)(FILE *fp, WAVE_INFO *info); 24 | void (*close_func)(WAVE_FILE *file); 25 | } wave_formats[] = 26 | { 27 | {aiff_open, aiff_create, aiff_close}, 28 | {riff_open, riff_create, riff_close} 29 | }; 30 | 31 | WAVE_FILE *wave_open(char *filename, WAVE_INFO *info) 32 | { 33 | FILE *fp; 34 | int i; 35 | 36 | fp = error_fopen(filename, "rb"); 37 | 38 | for (i = 0; i < WAVE_NUM_FORMATS; ++i) { 39 | if (wave_formats[i].open_func != NULL) 40 | { 41 | WAVE_FILE *file; 42 | info->format = (WAVE_FORMAT) i; 43 | file = wave_formats[i].open_func(fp, info); 44 | if (file != NULL) 45 | { 46 | file->bits = info->bits; 47 | file->format = info->format; 48 | file->length = info->length; 49 | file->position = 0; 50 | file->open_mode = WAVE_READ_MODE; 51 | file->fp = fp; 52 | file->data_offset = ftell(fp); 53 | return file; 54 | } 55 | fseek(fp, 0, SEEK_SET); 56 | } 57 | } 58 | 59 | fclose(fp); 60 | error_display("wave_open %s: unknown format", filename); 61 | return NULL; 62 | } 63 | 64 | WAVE_FILE *wave_open_specific(char *filename, WAVE_INFO *info) 65 | { 66 | FILE *fp; 67 | WAVE_FILE *file; 68 | 69 | fp = error_fopen(filename, "rb"); 70 | 71 | file = wave_formats[info->format].open_func(fp, info); 72 | if (file == NULL) return NULL; 73 | file->bits = info->bits; 74 | file->format = info->format; 75 | file->length = info->length; 76 | file->position = 0; 77 | file->open_mode = WAVE_READ_MODE; 78 | file->fp = fp; 79 | file->data_offset = ftell(fp); 80 | return file; 81 | } 82 | 83 | WAVE_FILE *wave_create(char *filename, WAVE_INFO *info) 84 | { 85 | FILE *fp; 86 | WAVE_FILE *file; 87 | 88 | fp = error_fopen(filename, "wb"); 89 | 90 | file = wave_formats[info->format].create_func(fp, info); 91 | if (file == NULL) return NULL; 92 | file->bits = info->bits; 93 | file->format = info->format; 94 | file->open_mode = WAVE_WRITE_MODE; 95 | file->length = 0; 96 | file->position = 0; 97 | file->fp = fp; 98 | file->data_offset = ftell(fp); 99 | return file; 100 | } 101 | 102 | void wave_seek(WAVE_FILE *file, VINT position) 103 | { 104 | if (file->open_mode == WAVE_WRITE_MODE) 105 | error_display("wave_seek: seek only supported for files opened in read mode"); 106 | 107 | if (position > file->length) 108 | error_display("wave_seek: attempting to position out of file"); 109 | 110 | fseek(file->fp, file->data_offset + position * ((file->bits + 7) / 8), 111 | SEEK_SET); 112 | file->position = position; 113 | } 114 | 115 | void wave_close(WAVE_FILE *file) 116 | { 117 | if (wave_formats[file->format].close_func != NULL) 118 | wave_formats[file->format].close_func(file); 119 | fclose(file->fp); 120 | free(file); 121 | } 122 | 123 | size_t wave_read(WAVE_FILE *file, SAMPLE *buffer, size_t length) 124 | { 125 | size_t count = 0; 126 | 127 | if (feof(file->fp)) 128 | return 0; 129 | 130 | if ((size_t)(file->length - file->position) < length) 131 | length = file->length - file->position; 132 | 133 | if (file->bits == 8) 134 | { 135 | for (count = 0; count < length; ++count) 136 | buffer[count] = (VBYTE)(getc(file->fp) - file->sample_offset); 137 | } 138 | else if (file->bits == 16) 139 | { 140 | if (file->is_big_endian) 141 | { 142 | for (count = 0; count < length; ++count) 143 | buffer[count] = (VSHORT)(wave_read_short_big(file->fp) 144 | - file->sample_offset); 145 | } 146 | else 147 | { 148 | for (count = 0; count < length; ++count) 149 | buffer[count] = (VSHORT)(wave_read_short_little(file->fp) 150 | - file->sample_offset); 151 | } 152 | } 153 | else 154 | { 155 | error_display("wave_read: only 8-bit and 16-bit audio supported"); 156 | } 157 | 158 | if (ferror(file->fp)) 159 | error_display("wave_read: read error: %s", strerror(errno)); 160 | 161 | file->position += count; 162 | return count; 163 | } 164 | 165 | void wave_write(WAVE_FILE *file, SAMPLE *buffer, size_t length) 166 | { 167 | size_t count = 0; 168 | 169 | if (file->bits == 8) 170 | { 171 | for (count = 0; count < length; ++count) 172 | putc(buffer[count] + file->sample_offset, file->fp); 173 | } 174 | else if (file->bits == 16) 175 | { 176 | if (file->is_big_endian) 177 | { 178 | for (count = 0; count < length; ++count) 179 | wave_write_short_big(buffer[count] + file->sample_offset, file->fp); 180 | } 181 | else 182 | { 183 | for (count = 0; count < length; ++count) 184 | wave_write_short_little(buffer[count] + file->sample_offset, file->fp); 185 | } 186 | } 187 | else 188 | { 189 | error_display("wave_write: only 8-bit and 16-bit audio supported"); 190 | } 191 | 192 | if (ferror(file->fp)) 193 | error_display("wave_write: write error: %s", strerror(errno)); 194 | 195 | file->length += count; 196 | file->position += count; 197 | } 198 | 199 | VINT wave_read_int_big(FILE *fp) 200 | { 201 | int a, b, c, d; 202 | a = getc(fp); b = getc(fp); c = getc(fp); d = getc(fp); 203 | return (a << 24) | (b << 16) | (c << 8) | d; 204 | } 205 | 206 | void wave_write_int_big(VINT i, FILE *fp) 207 | { 208 | int a, b, c, d; 209 | a = (i >> 24) & 0xff; 210 | b = (i >> 16) & 0xff; 211 | c = (i >> 8) & 0xff; 212 | d = i & 0xff; 213 | putc(a, fp); putc(b, fp); putc(c, fp); putc(d, fp); 214 | } 215 | 216 | VINT wave_read_int_little(FILE *fp) 217 | { 218 | int a, b, c, d; 219 | a = getc(fp); b = getc(fp); c = getc(fp); d = getc(fp); 220 | return (d << 24) | (c << 16) | (b << 8) | a; 221 | } 222 | 223 | void wave_write_int_little(VINT i, FILE *fp) 224 | { 225 | int a, b, c, d; 226 | a = (i >> 24) & 0xff; 227 | b = (i >> 16) & 0xff; 228 | c = (i >> 8) & 0xff; 229 | d = i & 0xff; 230 | putc(d, fp); putc(c, fp); putc(b, fp); putc(a, fp); 231 | } 232 | 233 | VSHORT wave_read_short_big(FILE *fp) 234 | { 235 | int a, b; 236 | a = getc(fp); b = getc(fp); 237 | return (a << 8) | b; 238 | } 239 | 240 | void wave_write_short_big(VSHORT i, FILE *fp) 241 | { 242 | int a, b; 243 | a = (i >> 8) & 0xff; 244 | b = i & 0xff; 245 | putc(a, fp); putc(b, fp); 246 | } 247 | 248 | VSHORT wave_read_short_little(FILE *fp) 249 | { 250 | int a, b; 251 | a = getc(fp); b = getc(fp); 252 | return (b << 8) | a; 253 | } 254 | 255 | void wave_write_short_little(VSHORT i, FILE *fp) 256 | { 257 | int a, b; 258 | a = (i >> 8) & 0xff; 259 | b = i & 0xff; 260 | putc(b, fp); putc(a, fp); 261 | } 262 | 263 | VREAL wave_read_extended(FILE *fp) 264 | { 265 | unsigned char bytes[10]; 266 | fread(bytes, 10, 1, fp); 267 | return ConvertFromIeeeExtended(bytes); 268 | } 269 | 270 | void wave_write_extended(VREAL e, FILE *fp) 271 | { 272 | unsigned char bytes[10]; 273 | ConvertToIeeeExtended(e, bytes); 274 | fwrite(bytes, 10, 1, fp); 275 | } 276 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | $Id: README.txt,v 1.8 2002/09/20 02:30:51 emanuel Exp $ 2 | 3 | ======================================================================== 4 | Zerius Vocoder 1.3 README 5 | ------------------------------------------------------------------------ 6 | Emanuel Borsboom September 2002 7 | ======================================================================== 8 | 9 | This program is used to make speech sound cool. It imposes the vocal 10 | effects of speech onto another sound. This technique has been made 11 | popular by artists such as Kraftwerk and Laurie Anderson. 12 | 13 | Note: This manual applies only to the command-line version. If you are 14 | using the GUI version, see the help file that is included with it. 15 | 16 | ------------ 17 | Installation 18 | ------------ 19 | 20 | If you are using the C source distribution, the first step is to 21 | compile the vocoder. Uncompress the archive and glance over the 22 | Makefile, making sure the variables are all right. The defaults 23 | should work for most UNIX environments. Also check config.h and make 24 | sure that S32, U32, S16, and U16 are defined appropriately as signed 25 | and unsigned 32-bit and 16-bit integers, respectively. The defaults 26 | should be fine for most 32-bit platforms. Once finished, run 'make' 27 | to compile the vocoder. 28 | 29 | Once you have the executable (or if you have downloaded a binary), you 30 | can copy it to the directory where you keep your binaries, or just run 31 | it where it is. 32 | 33 | ----- 34 | Usage 35 | ----- 36 | 37 | There are two ways to run the vocoder. If it is run without any 38 | command-line arguments (by clicking on its icon in Windows, for example) 39 | it will ask you for the values of the parameters. The meanings of the 40 | parameters follow in the next section. 41 | 42 | To specify tho parameters on the command-line, use the following syntax: 43 | 44 | vocoder [-q] [-N] [-b ] [-w ] [-v ] 46 | 47 | 48 | (Note: this version also supports the version 1.0 syntax in order 49 | to be compatible with already existing front ends). 50 | 51 | ---------- 52 | Parameters 53 | ---------- 54 | 55 | A detailed explanation of what these parameters mean is in the next 56 | section. 57 | 58 | Modulator filename () 59 | the path to a sound file that contains the modulator waveform 60 | (required). 61 | 62 | Carrier filename () 63 | the path to a sound file that contains the carrier waveform 64 | (required). 65 | 66 | Window length (-w ) 67 | the number of samples that will be analyzed at a time, and must 68 | be a power of two (defaults to about 1/15th of a second worth of 69 | samples). 70 | 71 | Window overlap (-o ) 72 | the number of samples that the windows will be overlapped 73 | (defaults to one half of the window-length). 74 | 75 | Band count (-b ) 76 | the number of frequency bands that the carrier will be modulated 77 | with (defaults to 16). 78 | 79 | Output volume (-v ) 80 | the volume the output will be scaled by (defaults to 1.0). 81 | 82 | Output filename (output-file) 83 | is the path to the output sound file (required). 84 | 85 | These options are only available on the command-line: 86 | 87 | -N turns off normalizing the output with respect to the carrier. 88 | 89 | -q turns off any displays. 90 | 91 | The input sound files must be mono, 8- or 16-bit linear, uncompressed 92 | AIFF or WAVE files. The output sound file will have the same format 93 | as the modulator (regardless of the file extension you give it). 94 | 95 | ----------- 96 | Explanation 97 | ----------- 98 | 99 | This channel vocoder works by analyzing the frequencies in the 100 | modulator, splitting them into bands, finding the magnitude of each 101 | band, and then amplifying the corresponding bands of the carrier by 102 | that magnitude. 103 | 104 | The modulator should simply be speech. It works best of you speak 105 | very clearly and more slowly than usual. 106 | 107 | The carrier should be some kind of frequency rich waveform. White 108 | noise works well. Periodic white noise (i.e. a very short sample of 109 | white noise) gives a "robot-like" sound. Another one that sounds good 110 | is a synthesized string chord. This waveform will automatically be 111 | looped. You can get interesting results by having the waveform change 112 | over time. 113 | 114 | Since what you pronounce changes over time, it would be pointless to 115 | analyze the entire modulator waveform and excite those frequencies in 116 | the carrier at once. Instead, the program splits the modulator into 117 | "windows", which it processes one-at-a-time. The window-length 118 | specifies how many samples are in each window. You will want at least 119 | a few windows for every syllable. If this number is too large, the 120 | output will be not be very understandable. If it is too small, you 121 | will have other problems. Around 1/15th of a second (or the sampling 122 | rate of the sound file divided by 15) tends to sound good, but 123 | experiment to find the right value. To give you an example, anywhere 124 | from 512 to 2048 is okay for a modulator with a sampling rate of 44.1 125 | khz. If you half the sampling rate, you should half the 126 | window-length, etc. The window-length must be a power of two due to 127 | the technique that us used to analyze the frequencies. 128 | 129 | For those of you who are unfamiliar with the term "power of two," it 130 | means a number that can be created by multiplying some number of two's 131 | together. For example, the following numbers are the powers of two up 132 | to 4096: 133 | 134 | 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096 135 | 136 | You get the next power of two by doubling the previous one. 137 | 138 | Since the sound is processed in discrete windows, the output can 139 | change very abruptly where it goes from one chunk to the next. This 140 | is audible as a click. To remedy this, the program can have the 141 | windows overlap and cross-fade between them. The window-overlap 142 | specifies how many samples of overlap there are between windows. 143 | 1/8th of the window-length tends to be a good starting point, but 144 | in many cases, one half of the window-length gives the best results. 145 | This may not exceed half of the window-length. 146 | 147 | In order to excite the frequencies in the carrier, the frequencies of 148 | the modulator are split into bands. The larger your band-count, the 149 | more the output will sound like the modulator. This number should 150 | evenly divide the chunk-length for the best results. Somewhere 151 | between 8 and 64 usually sounds best. The band-count may not exceed 152 | half of the window-length. 153 | 154 | If you find that the output is clipped (distorted) or is too quiet, 155 | you can specify a value for the volume. Anything less than one will 156 | reduce the volume, and anything greater than one will increase it. 157 | 158 | While the defaults for the parameters generally produce decent 159 | results, the best results will be achieved by changing their values. 160 | The best way figure out all the numbers and what the best waveforms 161 | are is to experiment. Have fun! 162 | 163 | ---------------- 164 | Closing Comments 165 | ---------------- 166 | 167 | Please see the web site at 168 | 169 | http://www.nuel.ca/Vocoder 170 | 171 | for the latest information. The latest version will always be 172 | available from there. 173 | 174 | If you have any problems, don't hesitate to contact me. I am always 175 | pleased to help. Also, drop me a line if like this program, or have 176 | any suggestions. I am especially eager to hear your creations. If 177 | you release some music utilizing the vocoder, please tell me so I can 178 | try to find it (freebies are always accepted)! My e-mail address is 179 | em@nuel.ca. 180 | 181 | Chanks to Cody Jones for porting to MacOS. 182 | 183 | I appreciate any bug reports. 184 | 185 | --------- 186 | Copyright 187 | --------- 188 | 189 | The Zerius Vocoder is Copyright (C) 1996-1999, 2002 Emanuel Borsboom. 190 | 191 | The FFT code (contained in fftn.c, fftaux.c, fft.h, and spt.h) is 192 | Copyright (C) 1993 Steven Trainoff. 193 | 194 | The code for converting to and from IEEE floating-point numbers is 195 | Copyright (C) 1988-1991 Apple Computer Inc. 196 | 197 | You are free to do whatever you like with the vocoder, as long as the 198 | copyright notice stays intact and you note any changes. 199 | 200 | There is no warranty. 201 | 202 | -------------------------------------------------------------------------------- /win32/gui/VocoderGUI.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (U.S.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | #ifdef _WIN32 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | #pragma code_page(1252) 22 | #endif //_WIN32 23 | 24 | #ifdef APSTUDIO_INVOKED 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // 27 | // TEXTINCLUDE 28 | // 29 | 30 | 1 TEXTINCLUDE DISCARDABLE 31 | BEGIN 32 | "resource.h\0" 33 | END 34 | 35 | 2 TEXTINCLUDE DISCARDABLE 36 | BEGIN 37 | "#include ""afxres.h""\r\n" 38 | "\0" 39 | END 40 | 41 | 3 TEXTINCLUDE DISCARDABLE 42 | BEGIN 43 | "#define _AFX_NO_SPLITTER_RESOURCES\r\n" 44 | "#define _AFX_NO_OLE_RESOURCES\r\n" 45 | "#define _AFX_NO_TRACKER_RESOURCES\r\n" 46 | "#define _AFX_NO_PROPERTY_RESOURCES\r\n" 47 | "\r\n" 48 | "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" 49 | "#ifdef _WIN32\r\n" 50 | "LANGUAGE 9, 1\r\n" 51 | "#pragma code_page(1252)\r\n" 52 | "#endif //_WIN32\r\n" 53 | "#include ""res\\VocoderGUI.rc2"" // non-Microsoft Visual C++ edited resources\r\n" 54 | "#include ""afxres.rc"" // Standard components\r\n" 55 | "#endif\r\n" 56 | "\0" 57 | END 58 | 59 | #endif // APSTUDIO_INVOKED 60 | 61 | 62 | ///////////////////////////////////////////////////////////////////////////// 63 | // 64 | // Icon 65 | // 66 | 67 | // Icon with lowest ID value placed first to ensure application icon 68 | // remains consistent on all systems. 69 | IDR_MAINFRAME ICON DISCARDABLE "res\\VocoderGUI.ico" 70 | 71 | ///////////////////////////////////////////////////////////////////////////// 72 | // 73 | // Dialog 74 | // 75 | 76 | IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 77 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 78 | CAPTION "About Zerius Vocoder" 79 | FONT 8, "MS Sans Serif" 80 | BEGIN 81 | ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 82 | LTEXT "Zerius Vocoder version 1.3",IDC_STATIC,40,10,119,8, 83 | SS_NOPREFIX 84 | LTEXT "Copyright (C) 1996-1999, 2002 Emanuel Borsboom", 85 | IDC_STATIC,40,25,160,8 86 | DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP 87 | LTEXT "E-mail: em@nuel.ca",IDC_STATIC,40,40,64,8 88 | LTEXT "Web: http://www.nuel.ca/Vocoder",IDC_STATIC,120,40,112, 89 | 8 90 | END 91 | 92 | IDD_VOCODERGUI_DIALOG DIALOGEX 0, 0, 252, 201 93 | STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | 94 | WS_SYSMENU 95 | EXSTYLE WS_EX_APPWINDOW 96 | CAPTION "Zerius Vocoder" 97 | FONT 8, "MS Sans Serif" 98 | BEGIN 99 | DEFPUSHBUTTON "&Vocode",IDOK,0,185,50,14 100 | PUSHBUTTON "&Close",IDCANCEL,200,185,50,14 101 | PUSHBUTTON "&Help",ID_HELP,145,185,50,14 102 | LTEXT "Carrier File:",IDC_STATIC,5,23,36,8 103 | LTEXT "Modulator File:",IDC_STATIC,5,8,47,8 104 | EDITTEXT IDC_MODULATOR_FILE_EDIT,55,5,130,14,ES_AUTOHSCROLL 105 | PUSHBUTTON "Browse...",IDC_MODULATOR_BROWSE_BUTTON,185,5,35,14 106 | EDITTEXT IDC_CARRIER_FILE_EDIT,55,20,130,14,ES_AUTOHSCROLL 107 | PUSHBUTTON "Browse...",IDC_CARRIER_BROWSE_BUTTON,185,20,35,14 108 | CONTROL "Slider2",IDC_WINDOW_LENGTH_SLIDER,"msctls_trackbar32", 109 | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,70,75,150,10 110 | LTEXT "Window Length:",IDC_STATIC,15,75,53,8 111 | LTEXT "Window Overlap:",IDC_STATIC,15,90,56,8 112 | CONTROL "Slider2",IDC_WINDOW_OVERLAP_SLIDER,"msctls_trackbar32", 113 | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,70,90,150,10 114 | LTEXT "Band Count:",IDC_STATIC,15,105,40,8 115 | CONTROL "Slider2",IDC_BAND_COUNT_SLIDER,"msctls_trackbar32", 116 | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,70,105,150,10 117 | LTEXT "Output Volume:",IDC_STATIC,15,120,50,8 118 | CONTROL "Slider2",IDC_OUTPUT_VOLUME_SLIDER,"msctls_trackbar32", 119 | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,70,120,150,10 120 | LTEXT "Output File:",IDC_STATIC,5,38,37,8 121 | EDITTEXT IDC_OUTPUT_FILE_EDIT,55,35,130,14,ES_AUTOHSCROLL 122 | PUSHBUTTON "Browse...",IDC_OUTPUT_BROWSE_BUTTON,185,35,35,14 123 | CONTROL "Normalize",IDC_NORMALIZE_CHECK,"Button",BS_AUTOCHECKBOX | 124 | WS_TABSTOP,15,135,47,10 125 | GROUPBOX "Parameters",IDC_STATIC,5,60,245,95 126 | LTEXT "Static",IDC_WINDOW_LENGTH_VALUE_LABEL,220,75,25,8 127 | LTEXT "Static",IDC_WINDOW_OVERLAP_VALUE_LABEL,220,90,25,8 128 | LTEXT "Static",IDC_BAND_COUNT_VALUE_LABEL,220,105,25,8 129 | LTEXT "Static",IDC_OUTPUT_VOLUME_VALUE_LABEL,220,120,25,8 130 | CONTROL "Progress1",IDC_VOCODE_PROGRESS,"msctls_progress32", 131 | PBS_SMOOTH | WS_BORDER,65,165,130,14 132 | LTEXT "Vocode Progress:",IDC_STATIC,5,168,57,8 133 | PUSHBUTTON "Stop",IDC_STOP_BUTTON,200,165,50,14,WS_DISABLED 134 | PUSHBUTTON "Play",IDC_OUTPUT_PLAY_BUTTON,225,35,25,14,WS_DISABLED 135 | PUSHBUTTON "Play",IDC_MODULATOR_PLAY_BUTTON,225,5,25,14,WS_DISABLED 136 | PUSHBUTTON "Play",IDC_CARRIER_PLAY_BUTTON,225,20,25,14,WS_DISABLED 137 | PUSHBUTTON "Restore Defaults",IDC_RESTORE_DEFAULTS_BUTTON,180,135, 138 | 65,14 139 | PUSHBUTTON "Vocode and &Listen",IDC_VOCODE_LISTEN_BUTTON,55,185,70, 140 | 14 141 | END 142 | 143 | 144 | #ifndef _MAC 145 | ///////////////////////////////////////////////////////////////////////////// 146 | // 147 | // Version 148 | // 149 | 150 | VS_VERSION_INFO VERSIONINFO 151 | FILEVERSION 1,0,0,1 152 | PRODUCTVERSION 1,0,0,1 153 | FILEFLAGSMASK 0x3fL 154 | #ifdef _DEBUG 155 | FILEFLAGS 0x1L 156 | #else 157 | FILEFLAGS 0x0L 158 | #endif 159 | FILEOS 0x4L 160 | FILETYPE 0x1L 161 | FILESUBTYPE 0x0L 162 | BEGIN 163 | BLOCK "StringFileInfo" 164 | BEGIN 165 | BLOCK "040904B0" 166 | BEGIN 167 | VALUE "CompanyName", "\0" 168 | VALUE "FileDescription", "VocoderGUI MFC Application\0" 169 | VALUE "FileVersion", "1, 0, 0, 1\0" 170 | VALUE "InternalName", "VocoderGUI\0" 171 | VALUE "LegalCopyright", "Copyright (C) 2002\0" 172 | VALUE "LegalTrademarks", "\0" 173 | VALUE "OriginalFilename", "VocoderGUI.EXE\0" 174 | VALUE "ProductName", "VocoderGUI Application\0" 175 | VALUE "ProductVersion", "1, 0, 0, 1\0" 176 | END 177 | END 178 | BLOCK "VarFileInfo" 179 | BEGIN 180 | VALUE "Translation", 0x409, 1200 181 | END 182 | END 183 | 184 | #endif // !_MAC 185 | 186 | 187 | ///////////////////////////////////////////////////////////////////////////// 188 | // 189 | // DESIGNINFO 190 | // 191 | 192 | #ifdef APSTUDIO_INVOKED 193 | GUIDELINES DESIGNINFO DISCARDABLE 194 | BEGIN 195 | IDD_ABOUTBOX, DIALOG 196 | BEGIN 197 | LEFTMARGIN, 7 198 | RIGHTMARGIN, 228 199 | TOPMARGIN, 7 200 | BOTTOMMARGIN, 48 201 | END 202 | 203 | IDD_VOCODERGUI_DIALOG, DIALOG 204 | BEGIN 205 | LEFTMARGIN, 7 206 | RIGHTMARGIN, 245 207 | TOPMARGIN, 7 208 | BOTTOMMARGIN, 194 209 | END 210 | END 211 | #endif // APSTUDIO_INVOKED 212 | 213 | 214 | ///////////////////////////////////////////////////////////////////////////// 215 | // 216 | // String Table 217 | // 218 | 219 | STRINGTABLE DISCARDABLE 220 | BEGIN 221 | IDS_ABOUTBOX "&About Zerius Vocoder..." 222 | END 223 | 224 | #endif // English (U.S.) resources 225 | ///////////////////////////////////////////////////////////////////////////// 226 | 227 | 228 | 229 | #ifndef APSTUDIO_INVOKED 230 | ///////////////////////////////////////////////////////////////////////////// 231 | // 232 | // Generated from the TEXTINCLUDE 3 resource. 233 | // 234 | #define _AFX_NO_SPLITTER_RESOURCES 235 | #define _AFX_NO_OLE_RESOURCES 236 | #define _AFX_NO_TRACKER_RESOURCES 237 | #define _AFX_NO_PROPERTY_RESOURCES 238 | 239 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 240 | #ifdef _WIN32 241 | LANGUAGE 9, 1 242 | #pragma code_page(1252) 243 | #endif //_WIN32 244 | #include "res\VocoderGUI.rc2" // non-Microsoft Visual C++ edited resources 245 | #include "afxres.rc" // Standard components 246 | #endif 247 | 248 | ///////////////////////////////////////////////////////////////////////////// 249 | #endif // not APSTUDIO_INVOKED 250 | 251 | -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: main.c,v 1.9 2002/09/20 02:24:14 emanuel Exp $ 3 | * Copyright (C) 1996-1999,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include "error.h" 18 | #include "vocode.h" 19 | #include "fft.h" 20 | 21 | #define COPYRIGHT \ 22 | "Zerius Vocoder 1.3 Copyright (C) 1996-1999, 2002 Emanuel Borsboom\n" \ 23 | "email: em@nuel.ca / web: http://www.nuel.ca/Vocoder\n" 24 | 25 | #define DEFAULT_WINDOW_TIME 15 /* 1/15th of a second */ 26 | 27 | char *prog_name; 28 | 29 | static VBOOL got_window_length, got_window_overlap; 30 | static VBOOL quiet; 31 | 32 | static void usage() 33 | { 34 | printf("%s\n", COPYRIGHT); 35 | printf("usage: %s [-q] [-N] [-b ] [-w ] [-v ] " 37 | " \n", prog_name); 38 | exit(1); 39 | } 40 | 41 | static void prompt_user(const char *prompt, char *buffer, size_t length) 42 | { 43 | printf("%s? ", prompt); 44 | fgets(buffer, length, stdin); 45 | } 46 | 47 | static void message_user(const char *fmt, ...) 48 | { 49 | va_list ap; 50 | va_start(ap, fmt); 51 | vprintf(fmt, ap); 52 | va_end(ap); 53 | printf("\n"); 54 | } 55 | 56 | static void alert_user(const char *fmt, ...) 57 | { 58 | va_list ap; 59 | printf("! "); 60 | va_start(ap, fmt); 61 | vprintf(fmt, ap); 62 | va_end(ap); 63 | printf("\n"); 64 | } 65 | 66 | static void ask_user(const char *prompt, char *buffer, size_t length, 67 | VBOOL require_non_empty, VBOOL require_number) 68 | { 69 | char *p; 70 | VBOOL okay; 71 | do 72 | { 73 | prompt_user(prompt, buffer, length); 74 | okay = TRUE; 75 | if (require_non_empty) 76 | { 77 | okay = FALSE; 78 | p = buffer; 79 | while (*p && *p != '\n') 80 | if (!isspace(*p++)) 81 | { 82 | okay = TRUE; 83 | break; 84 | } 85 | if (!okay) alert_user("You must enter a value."); 86 | } 87 | if (require_number) 88 | { 89 | p = buffer; 90 | while (*p && *p != '\n') 91 | { 92 | if (!isdigit(*p) && *p != '.') 93 | { 94 | alert_user("You may only enter digits."); 95 | okay = FALSE; 96 | break; 97 | } 98 | p++; 99 | } 100 | } 101 | } 102 | while (!okay); 103 | p = strchr(buffer, '\n'); 104 | if (p) *p = '\0'; 105 | } 106 | 107 | static void ask_user_filename(const char *prompt, char *buffer, size_t length, 108 | VBOOL require_existance) 109 | { 110 | ask_user(prompt, buffer, length, TRUE, FALSE); 111 | if (require_existance) 112 | { 113 | FILE *fp; 114 | fp = fopen(buffer, "rb"); 115 | while (fp == NULL) 116 | { 117 | alert_user("Cannot open %s: %s", buffer, strerror(errno)); 118 | ask_user(prompt, buffer, length, TRUE, FALSE); 119 | fp = fopen(buffer, "rb"); 120 | } 121 | fclose(fp); 122 | } 123 | } 124 | 125 | static void parse_args(int argc, char *argv[]) 126 | { 127 | int i; 128 | 129 | prog_name = argv[0]; 130 | 131 | got_window_length = FALSE; 132 | got_window_overlap = FALSE; 133 | quiet = FALSE; 134 | vocode_normalize = TRUE; 135 | vocode_volume = 1.0; 136 | vocode_band_count = 16; 137 | 138 | if (argc <= 1) 139 | { 140 | char buf[16]; 141 | vocode_modulator_filename = error_malloc(PATH_MAX); 142 | vocode_carrier_filename = error_malloc(PATH_MAX); 143 | vocode_output_filename = error_malloc(PATH_MAX); 144 | 145 | ask_user_filename("Modulator filename (required)", vocode_modulator_filename, 146 | PATH_MAX, TRUE); 147 | 148 | ask_user_filename("Carrier filename (required)", vocode_carrier_filename, 149 | PATH_MAX, TRUE); 150 | 151 | ask_user("Window length (empty for default)", buf, sizeof(buf), 152 | FALSE, TRUE); 153 | if (buf[0]) 154 | { 155 | vocode_window_length = atoi(buf); 156 | got_window_length = TRUE; 157 | } 158 | 159 | ask_user("Window overlap (empty for default)", buf, sizeof(buf), 160 | FALSE, TRUE); 161 | if (buf[0]) 162 | { 163 | vocode_window_overlap = atoi(buf); 164 | got_window_overlap = TRUE; 165 | } 166 | 167 | ask_user("Band count (empty for default)", buf, sizeof(buf), 168 | FALSE, TRUE); 169 | if (buf[0]) vocode_band_count = atoi(buf); 170 | 171 | ask_user("Output volume (empty for default)", buf, sizeof(buf), 172 | FALSE, TRUE); 173 | if (buf[0]) vocode_volume = atof(buf); 174 | ask_user_filename("Output filename (required)", vocode_output_filename, 175 | PATH_MAX, FALSE); 176 | } 177 | else if (argc == 7 && 178 | argv[1][0] != '-' && argv[2][0] != '-' && 179 | atoi(argv[3]) != 0 && atoi(argv[4]) != 0 && atoi(argv[5]) != 0 && 180 | argv[6][0] != '-') 181 | { 182 | vocode_modulator_filename = argv[1]; 183 | vocode_carrier_filename = argv[2]; 184 | vocode_window_length = atoi(argv[3]); 185 | got_window_length = TRUE; 186 | vocode_window_overlap = atoi(argv[4]); 187 | got_window_overlap = TRUE; 188 | vocode_band_count = atoi(argv[5]); 189 | vocode_output_filename = argv[6]; 190 | } 191 | else 192 | { 193 | for (i = 1; i < argc && argv[i][0] == '-'; ++i) 194 | { 195 | if (argv[i][1] == 'v' && i < argc - 1) 196 | vocode_volume = atof(argv[++i]); 197 | else if (argv[i][1] == 'b' && i < argc - 1) 198 | vocode_band_count = atoi(argv[++i]); 199 | else if (argv[i][1] == 'q') 200 | quiet = TRUE; 201 | else if (argv[i][1] == 'N') 202 | vocode_normalize = FALSE; 203 | else if (argv[i][1] == 'w' && i < argc - 1) { 204 | vocode_window_length = atoi(argv[++i]); 205 | got_window_length = TRUE; 206 | } 207 | else if (argv[i][1] == 'o' && i < argc - 1) { 208 | vocode_window_overlap = atoi(argv[++i]); 209 | got_window_overlap = TRUE; 210 | } 211 | else 212 | usage(); 213 | } 214 | 215 | if (argc != i + 3) 216 | usage(); 217 | 218 | vocode_modulator_filename = argv[i++]; 219 | vocode_carrier_filename = argv[i++]; 220 | vocode_output_filename = argv[i++]; 221 | } 222 | } 223 | 224 | static void check_args(void) 225 | { 226 | if (!got_window_length) 227 | vocode_window_length = ipow(2, ilog2(vocode_modulator_rate / DEFAULT_WINDOW_TIME)); 228 | if (!got_window_overlap) 229 | vocode_window_overlap = vocode_window_length / 2; 230 | 231 | if (vocode_window_length < 2 || (size_t)ipow(2, ilog2(vocode_window_length)) != vocode_window_length) 232 | error_display("window-length must be > 1 and a power of two\n" 233 | "(the closest power of two to the number you entered is %d)", 234 | ipow(2, ilog2(vocode_window_length))); 235 | if (vocode_window_overlap < 0 || (size_t)vocode_window_overlap > vocode_window_length / 2) 236 | error_display("window-overlap must be >= 0 and <= window-length/2"); 237 | if (vocode_band_count < 1 || (size_t)vocode_band_count > vocode_window_length / 2) 238 | error_display("band-count must be > 0 and <= window-length/2"); 239 | 240 | if (!quiet) 241 | message_user("%s\nwindow-length: %d window-overlap: %d band-count: %d " 242 | "volume: %.2f", COPYRIGHT, 243 | vocode_window_length, vocode_window_overlap, vocode_band_count, vocode_volume); 244 | } 245 | 246 | static VINT _num_frames; 247 | 248 | static void start_status(VINT num_frames) 249 | { 250 | _num_frames = num_frames; 251 | } 252 | 253 | static int update_status(VINT frame_no) { 254 | int i, count = (frame_no + 1) * 56 / _num_frames; 255 | if (quiet) return 0; 256 | printf("\r%3d%% |", (int)((frame_no + 1) * 100 / _num_frames)); 257 | for (i = 0; i < count; ++i) 258 | putchar('*'); 259 | for (; i < 56; ++i) 260 | putchar(' '); 261 | printf("| %ld/%ld", frame_no + 1, _num_frames); 262 | fflush(stdout); 263 | return 0; /* Return true to quit */ 264 | } 265 | 266 | static void finish_status(void) { 267 | if (!quiet) 268 | printf("\n"); 269 | } 270 | 271 | static void display_error(char *msg) 272 | { 273 | fprintf(stderr, "%s: %s\n", prog_name, msg); 274 | exit(1); 275 | } 276 | 277 | int main(int argc, char *argv[]) 278 | { 279 | vocode_start_status_cb = start_status; 280 | vocode_update_status_cb = update_status; 281 | vocode_finish_status_cb = finish_status; 282 | error_display_cb = display_error; 283 | parse_args(argc, argv); 284 | vocode_open_files(); 285 | check_args(); 286 | vocode(); 287 | vocode_cleanup(); 288 | return 0; 289 | } 290 | -------------------------------------------------------------------------------- /win32/gui/VocoderGUI.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="VocoderGUI" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 60000 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=VocoderGUI - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "VocoderGUI.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "VocoderGUI.mak" CFG="VocoderGUI - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "VocoderGUI - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "VocoderGUI - Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cwcl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "VocoderGUI - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 6 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 5 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "Release" 42 | # PROP Intermediate_Dir "Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /c 46 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" 50 | # ADD RSC /l 0x409 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=cwlink.exe 55 | # ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 56 | # ADD LINK32 winmm.lib /nologo /subsystem:windows /machine:I386 57 | 58 | !ELSEIF "$(CFG)" == "VocoderGUI - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 6 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 5 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "Debug" 68 | # PROP Intermediate_Dir "Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" 76 | # ADD RSC /l 0x409 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=cwlink.exe 81 | # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "VocoderGUI - Win32 Release" 89 | # Name "VocoderGUI - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE=.\StdAfx.cpp 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=.\VocoderGUI.cpp 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=.\hlp\VocoderGUI.hpj 104 | 105 | !IF "$(CFG)" == "VocoderGUI - Win32 Release" 106 | 107 | # PROP Ignore_Default_Tool 1 108 | # Begin Custom Build - Making help file... 109 | OutDir=.\Release 110 | InputPath=.\hlp\VocoderGUI.hpj 111 | InputName=VocoderGUI 112 | 113 | "$(OutDir)\$(InputName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" 114 | start /wait hcw /C /E /M "hlp\$(InputName).hpj" 115 | if errorlevel 1 goto :Error 116 | if not exist "hlp\$(InputName).hlp" goto :Error 117 | copy "hlp\$(InputName).hlp" $(OutDir) 118 | goto :done 119 | :Error 120 | echo hlp\$(InputName).hpj(1) : error: 121 | type "hlp\$(InputName).log" 122 | :done 123 | 124 | # End Custom Build 125 | 126 | !ELSEIF "$(CFG)" == "VocoderGUI - Win32 Debug" 127 | 128 | # PROP Ignore_Default_Tool 1 129 | # Begin Custom Build - Making help file... 130 | OutDir=.\Debug 131 | InputPath=.\hlp\VocoderGUI.hpj 132 | InputName=VocoderGUI 133 | 134 | "$(OutDir)\$(InputName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" 135 | start /wait hcw /C /E /M "hlp\$(InputName).hpj" 136 | if errorlevel 1 goto :Error 137 | if not exist "hlp\$(InputName).hlp" goto :Error 138 | copy "hlp\$(InputName).hlp" $(OutDir) 139 | goto :done 140 | :Error 141 | echo hlp\$(InputName).hpj(1) : error: 142 | type "hlp\$(InputName).log" 143 | :done 144 | 145 | # End Custom Build 146 | 147 | !ENDIF 148 | 149 | # End Source File 150 | # Begin Source File 151 | 152 | SOURCE=.\VocoderGUI.rc 153 | # End Source File 154 | # Begin Source File 155 | 156 | SOURCE=.\VocoderGUIDlg.cpp 157 | # End Source File 158 | # End Group 159 | # Begin Group "Header Files" 160 | 161 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 162 | # Begin Source File 163 | 164 | SOURCE=.\Resource.h 165 | 166 | !IF "$(CFG)" == "VocoderGUI - Win32 Release" 167 | 168 | # PROP Ignore_Default_Tool 1 169 | # Begin Custom Build - Making help include file... 170 | TargetName=VocoderGUI 171 | InputPath=.\Resource.h 172 | 173 | "hlp\$(TargetName).hm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" 174 | echo. >"hlp\$(TargetName).hm" 175 | echo // Commands (ID_* and IDM_*) >>"hlp\$(TargetName).hm" 176 | makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\$(TargetName).hm" 177 | echo. >>"hlp\$(TargetName).hm" 178 | echo // Prompts (IDP_*) >>"hlp\$(TargetName).hm" 179 | makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\$(TargetName).hm" 180 | echo. >>"hlp\$(TargetName).hm" 181 | echo // Resources (IDR_*) >>"hlp\$(TargetName).hm" 182 | makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\$(TargetName).hm" 183 | echo. >>"hlp\$(TargetName).hm" 184 | echo // Dialogs (IDD_*) >>"hlp\$(TargetName).hm" 185 | makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\$(TargetName).hm" 186 | echo. >>"hlp\$(TargetName).hm" 187 | echo // Frame Controls (IDW_*) >>"hlp\$(TargetName).hm" 188 | makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\$(TargetName).hm" 189 | 190 | # End Custom Build 191 | 192 | !ELSEIF "$(CFG)" == "VocoderGUI - Win32 Debug" 193 | 194 | # PROP Ignore_Default_Tool 1 195 | # Begin Custom Build - Making help include file... 196 | TargetName=VocoderGUI 197 | InputPath=.\Resource.h 198 | 199 | "hlp\$(TargetName).hm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" 200 | echo. >"hlp\$(TargetName).hm" 201 | echo // Commands (ID_* and IDM_*) >>"hlp\$(TargetName).hm" 202 | makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\$(TargetName).hm" 203 | echo. >>"hlp\$(TargetName).hm" 204 | echo // Prompts (IDP_*) >>"hlp\$(TargetName).hm" 205 | makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\$(TargetName).hm" 206 | echo. >>"hlp\$(TargetName).hm" 207 | echo // Resources (IDR_*) >>"hlp\$(TargetName).hm" 208 | makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\$(TargetName).hm" 209 | echo. >>"hlp\$(TargetName).hm" 210 | echo // Dialogs (IDD_*) >>"hlp\$(TargetName).hm" 211 | makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\$(TargetName).hm" 212 | echo. >>"hlp\$(TargetName).hm" 213 | echo // Frame Controls (IDW_*) >>"hlp\$(TargetName).hm" 214 | makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\$(TargetName).hm" 215 | 216 | # End Custom Build 217 | 218 | !ENDIF 219 | 220 | # End Source File 221 | # Begin Source File 222 | 223 | SOURCE=.\StdAfx.h 224 | # End Source File 225 | # Begin Source File 226 | 227 | SOURCE=.\VocoderGUI.h 228 | # End Source File 229 | # Begin Source File 230 | 231 | SOURCE=.\VocoderGUIDlg.h 232 | # End Source File 233 | # End Group 234 | # Begin Group "Resource Files" 235 | 236 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 237 | # Begin Source File 238 | 239 | SOURCE=.\res\VocoderGUI.ico 240 | # End Source File 241 | # Begin Source File 242 | 243 | SOURCE=.\res\VocoderGUI.rc2 244 | # End Source File 245 | # End Group 246 | # Begin Group "Help Files" 247 | 248 | # PROP Default_Filter "cnt;rtf" 249 | # Begin Source File 250 | 251 | SOURCE=.\hlp\AfxDlg.rtf 252 | # End Source File 253 | # Begin Source File 254 | 255 | SOURCE=.\hlp\VocoderGUI.cnt 256 | 257 | !IF "$(CFG)" == "VocoderGUI - Win32 Release" 258 | 259 | # PROP Ignore_Default_Tool 1 260 | # Begin Custom Build - Copying contents file... 261 | OutDir=.\Release 262 | InputPath=.\hlp\VocoderGUI.cnt 263 | InputName=VocoderGUI 264 | 265 | "$(OutDir)\$(InputName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" 266 | copy "hlp\$(InputName).cnt" $(OutDir) 267 | 268 | # End Custom Build 269 | 270 | !ELSEIF "$(CFG)" == "VocoderGUI - Win32 Debug" 271 | 272 | # PROP Ignore_Default_Tool 1 273 | # Begin Custom Build - Copying contents file... 274 | OutDir=.\Debug 275 | InputPath=.\hlp\VocoderGUI.cnt 276 | InputName=VocoderGUI 277 | 278 | "$(OutDir)\$(InputName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" 279 | copy "hlp\$(InputName).cnt" $(OutDir) 280 | 281 | # End Custom Build 282 | 283 | !ENDIF 284 | 285 | # End Source File 286 | # End Group 287 | # Begin Group "Vocoder Files" 288 | 289 | # PROP Default_Filter "" 290 | # Begin Source File 291 | 292 | SOURCE=..\..\aiff.c 293 | # End Source File 294 | # Begin Source File 295 | 296 | SOURCE=..\..\aiff.h 297 | # End Source File 298 | # Begin Source File 299 | 300 | SOURCE=..\..\config.h 301 | # End Source File 302 | # Begin Source File 303 | 304 | SOURCE=..\..\error.c 305 | # End Source File 306 | # Begin Source File 307 | 308 | SOURCE=..\..\error.h 309 | # End Source File 310 | # Begin Source File 311 | 312 | SOURCE=..\..\extended.c 313 | # End Source File 314 | # Begin Source File 315 | 316 | SOURCE=..\..\extended.h 317 | # End Source File 318 | # Begin Source File 319 | 320 | SOURCE=..\..\fft.h 321 | # End Source File 322 | # Begin Source File 323 | 324 | SOURCE=..\..\fftaux.c 325 | # End Source File 326 | # Begin Source File 327 | 328 | SOURCE=..\..\fftn.c 329 | # End Source File 330 | # Begin Source File 331 | 332 | SOURCE=..\..\riff.c 333 | # End Source File 334 | # Begin Source File 335 | 336 | SOURCE=..\..\riff.h 337 | # End Source File 338 | # Begin Source File 339 | 340 | SOURCE=..\..\spt.h 341 | # End Source File 342 | # Begin Source File 343 | 344 | SOURCE=..\..\vocode.c 345 | # End Source File 346 | # Begin Source File 347 | 348 | SOURCE=..\..\vocode.h 349 | # End Source File 350 | # Begin Source File 351 | 352 | SOURCE=..\..\wave.c 353 | # End Source File 354 | # Begin Source File 355 | 356 | SOURCE=..\..\wave.h 357 | # End Source File 358 | # End Group 359 | # Begin Source File 360 | 361 | SOURCE=.\ReadMe.txt 362 | # End Source File 363 | # Begin Source File 364 | 365 | SOURCE=.\vocoder.nsi 366 | # End Source File 367 | # End Target 368 | # End Project 369 | -------------------------------------------------------------------------------- /vocode.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * $Id: vocode.c,v 1.2 2002/09/20 02:30:51 emanuel Exp $ 3 | * Copyright (C) 1996-1999,2002 Emanuel Borsboom 4 | * Permission is granted to make any use of this code subject to the condition 5 | * that all copies contain this notice and an indication of what has been 6 | * changed. 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include 11 | #include "config.h" 12 | #include "error.h" 13 | #include "wave.h" 14 | #include "fft.h" 15 | #include "vocode.h" 16 | 17 | typedef VREAL (*COMPLEX_ARRAY)[2]; 18 | 19 | static void vocode_window(VREAL *modulator, COMPLEX_ARRAY carrier, 20 | COMPLEX_ARRAY output); 21 | static void vocoder(void); 22 | static void loop(WAVE_FILE *source, SAMPLE *dest, size_t length); 23 | static size_t read_zero(WAVE_FILE *source, SAMPLE *dest, size_t length); 24 | static void sample_to_complex_array(SAMPLE *sample_array, 25 | COMPLEX_ARRAY complex_array, 26 | size_t length, SAMPLE max_magnitude); 27 | static void sample_to_real_array(SAMPLE *sample_array, VREAL *real_array, 28 | size_t length, SAMPLE max_magnitude); 29 | static void complex_to_sample_array(COMPLEX_ARRAY complex_array, 30 | SAMPLE *sample_array, size_t length, 31 | SAMPLE max_magnitude, VREAL vocode_volume); 32 | static void allocate_memory(void); 33 | static void free_memory(void); 34 | 35 | char *vocode_modulator_filename, *vocode_carrier_filename, *vocode_output_filename; 36 | size_t vocode_window_length, vocode_window_overlap; 37 | int vocode_band_count; 38 | VREAL vocode_volume; 39 | VBOOL vocode_normalize; 40 | 41 | static WAVE_FILE *modulator_file = NULL, *carrier_file = NULL, *output_file = NULL; 42 | static SAMPLE modulator_max_magnitude, carrier_max_magnitude, 43 | output_max_magnitude; 44 | static VINT modulator_length; 45 | VINT vocode_modulator_rate; 46 | 47 | static SAMPLE *modulator_sample_buffer = NULL, *carrier_sample_buffer = NULL, 48 | *output_sample_buffer1 = NULL, *output_sample_buffer2 = NULL; 49 | static VREAL *modulator = NULL; 50 | static COMPLEX_ARRAY looped_carrier = NULL, output = NULL; 51 | 52 | static double *fft_c, *fft_s; 53 | static int *fft_rev; 54 | 55 | void (*vocode_start_status_cb)(VINT num_frames); 56 | VBOOL (*vocode_update_status_cb)(VINT frame_no); 57 | void (*vocode_finish_status_cb)(void); 58 | 59 | static void vocode_window(VREAL *modulator, COMPLEX_ARRAY carrier, 60 | COMPLEX_ARRAY output) 61 | { 62 | int band_no, band_length, extra_band_length; 63 | 64 | band_length = vocode_window_length / (vocode_band_count * 2); 65 | extra_band_length = vocode_window_length / 2 - band_length * (vocode_band_count - 1); 66 | 67 | realfftmag(modulator, vocode_window_length); 68 | fft(carrier, vocode_window_length, fft_c, fft_s, fft_rev); 69 | normalize_fft(carrier, vocode_window_length); 70 | 71 | for (band_no = 0; band_no < vocode_band_count; band_no++) { 72 | int i, j, k, l; 73 | VREAL m, c; 74 | 75 | l = (band_no == vocode_band_count - 1) ? extra_band_length : band_length; 76 | 77 | m = 0; c = 0; 78 | for (i = 0, j = band_no * band_length, k = vocode_window_length - j - 1; 79 | i < l; i++, j++, k--) 80 | { 81 | if (vocode_normalize) { 82 | VREAL c1 = carrier[j][0]*carrier[j][0] + carrier[j][1]*carrier[j][1], 83 | c2 = carrier[k][0]*carrier[k][0] + carrier[k][1]*carrier[k][1]; 84 | c += sqrt(c1) + sqrt(c2); 85 | } 86 | m += modulator[j]; 87 | } 88 | 89 | if (!vocode_normalize) c = 1.0; 90 | if (c == 0) c = 0.0001; 91 | 92 | for (i = 0, j = band_no * band_length, k = vocode_window_length - j - 1; 93 | i < l; i++, j++, k--) { 94 | output[j][0] = carrier[j][0] * m / c; 95 | output[j][1] = carrier[j][1] * m / c; 96 | output[k][0] = carrier[k][0] * m / c; 97 | output[k][1] = carrier[k][1] * m / c; 98 | } 99 | } 100 | 101 | invfft (output, vocode_window_length, fft_c, fft_s, fft_rev); 102 | } 103 | 104 | static void vocoder(void) 105 | { 106 | size_t i; 107 | SAMPLE *output_old = output_sample_buffer1, 108 | *output_new = output_sample_buffer2, *output_temp; 109 | VINT num_frames, frame_no; 110 | 111 | num_frames = (modulator_length - vocode_window_overlap) / 112 | (vocode_window_length - vocode_window_overlap); 113 | frame_no = 0; 114 | 115 | read_zero(modulator_file, modulator_sample_buffer, vocode_window_length); 116 | loop(carrier_file, carrier_sample_buffer, vocode_window_length); 117 | 118 | sample_to_real_array(modulator_sample_buffer, modulator, vocode_window_length, 119 | modulator_max_magnitude); 120 | sample_to_complex_array(carrier_sample_buffer, looped_carrier, 121 | vocode_window_length, carrier_max_magnitude); 122 | 123 | vocode_window(modulator, looped_carrier, output); 124 | 125 | complex_to_sample_array(output, output_old, vocode_window_length, 126 | output_max_magnitude, vocode_volume); 127 | wave_write(output_file, output_old, vocode_window_length - vocode_window_overlap); 128 | 129 | for (i = 0; i < vocode_window_overlap; ++i) 130 | { 131 | modulator_sample_buffer[i] = 132 | modulator_sample_buffer[vocode_window_length - vocode_window_overlap + i]; 133 | carrier_sample_buffer[i] = 134 | carrier_sample_buffer[vocode_window_length - vocode_window_overlap + i]; 135 | } 136 | 137 | vocode_start_status_cb(num_frames); 138 | 139 | while (read_zero(modulator_file, modulator_sample_buffer + 140 | vocode_window_overlap, vocode_window_length - vocode_window_overlap)) 141 | { 142 | if (vocode_update_status_cb(frame_no)) break; 143 | 144 | loop(carrier_file, carrier_sample_buffer + vocode_window_overlap, 145 | vocode_window_length - vocode_window_overlap); 146 | 147 | sample_to_real_array(modulator_sample_buffer, modulator, vocode_window_length, 148 | modulator_max_magnitude); 149 | sample_to_complex_array(carrier_sample_buffer, looped_carrier, 150 | vocode_window_length, carrier_max_magnitude); 151 | 152 | vocode_window(modulator, looped_carrier, output); 153 | 154 | complex_to_sample_array(output, output_new, vocode_window_length, 155 | output_max_magnitude, vocode_volume); 156 | 157 | for (i = 0; i < vocode_window_overlap; ++i) 158 | { 159 | output_new[i] = (SAMPLE)((output_new[i] * (i / (double)vocode_window_overlap)) + 160 | (output_old[vocode_window_length - vocode_window_overlap + i] * 161 | ((vocode_window_overlap - i) / (double)vocode_window_overlap))); 162 | } 163 | 164 | wave_write(output_file, output_new, vocode_window_length - vocode_window_overlap); 165 | 166 | for (i = 0; i < vocode_window_overlap; ++i) 167 | { 168 | modulator_sample_buffer[i] = 169 | modulator_sample_buffer[vocode_window_length - vocode_window_overlap + i]; 170 | carrier_sample_buffer[i] = 171 | carrier_sample_buffer[vocode_window_length - vocode_window_overlap + i]; 172 | } 173 | 174 | output_temp = output_new; 175 | output_new = output_old; 176 | output_old = output_temp; 177 | 178 | ++frame_no; 179 | } 180 | 181 | wave_write(output_file, output_old + vocode_window_length - vocode_window_overlap, 182 | vocode_window_overlap); 183 | 184 | vocode_update_status_cb(frame_no - 1); 185 | vocode_finish_status_cb(); 186 | } 187 | 188 | static void loop(WAVE_FILE *source, SAMPLE *dest, size_t length) 189 | { 190 | while (length > 0) 191 | { 192 | size_t n; 193 | 194 | n = wave_read(source, dest, length); 195 | if (n < length) 196 | wave_seek(source, 0); 197 | 198 | dest += n; 199 | length -= n; 200 | } 201 | } 202 | 203 | static size_t read_zero(WAVE_FILE *source, SAMPLE *dest, size_t length) 204 | { 205 | size_t i, n = wave_read(source, dest, length); 206 | for (i = n; i < length; ++i) 207 | dest[i] = 0; 208 | return n; 209 | } 210 | 211 | static void sample_to_complex_array(SAMPLE *sample_array, 212 | COMPLEX_ARRAY complex_array, 213 | size_t length, SAMPLE max_magnitude) 214 | { 215 | size_t i; 216 | for (i = 0; i < length; ++i) 217 | { 218 | complex_array[i][0] = sample_array[i] / (VREAL)max_magnitude; 219 | complex_array[i][1] = 0; 220 | } 221 | } 222 | 223 | static void sample_to_real_array(SAMPLE *sample_array, VREAL *real_array, 224 | size_t length, SAMPLE max_magnitude) 225 | { 226 | size_t i; 227 | for (i = 0; i < length; ++i) 228 | { 229 | *real_array++ = *sample_array++ / (VREAL)max_magnitude; 230 | } 231 | } 232 | 233 | static void complex_to_sample_array(COMPLEX_ARRAY complex_array, 234 | SAMPLE *sample_array, 235 | size_t length, SAMPLE max_magnitude, 236 | VREAL vocode_volume) 237 | { 238 | size_t i; 239 | for (i = 0; i < length; ++i) 240 | { 241 | VREAL sample = complex_array[i][0] * vocode_volume; 242 | if (sample < -1.0) sample = -1.0; 243 | else if (sample > 1.0) sample = 1.0; 244 | sample_array[i] = (SAMPLE)(sample * max_magnitude); 245 | } 246 | } 247 | 248 | void vocode_open_files(void) 249 | { 250 | WAVE_INFO wave_info; 251 | carrier_file = wave_open(vocode_carrier_filename, &wave_info); 252 | if (wave_info.channels != 1) 253 | error_display("carrier must be mono (1 channel)"); 254 | carrier_max_magnitude = (1 << (wave_info.bits - 1)) - 1; 255 | 256 | modulator_file = wave_open(vocode_modulator_filename, &wave_info); 257 | if (wave_info.channels != 1) 258 | error_display("modulator must be mono (1 channel)"); 259 | modulator_max_magnitude = (1 << (wave_info.bits - 1)) - 1; 260 | modulator_length = wave_info.length; 261 | vocode_modulator_rate = wave_info.rate; 262 | 263 | output_file = wave_create(vocode_output_filename, &wave_info); 264 | output_max_magnitude = (1 << (wave_info.bits - 1)) - 1; 265 | } 266 | 267 | static void wave_close_if_open(WAVE_FILE **pp) 268 | { 269 | if (*pp != NULL) 270 | { 271 | wave_close(*pp); 272 | *pp = NULL; 273 | } 274 | } 275 | 276 | static void close_files(void) 277 | { 278 | wave_close_if_open(&output_file); 279 | wave_close_if_open(&modulator_file); 280 | wave_close_if_open(&carrier_file); 281 | } 282 | 283 | static void allocate_memory(void) 284 | { 285 | modulator_sample_buffer = error_malloc(sizeof(SAMPLE) * vocode_window_length); 286 | carrier_sample_buffer = error_malloc(sizeof(SAMPLE) * vocode_window_length); 287 | output_sample_buffer1 = error_malloc(sizeof(SAMPLE) * vocode_window_length); 288 | output_sample_buffer2 = error_malloc(sizeof(SAMPLE) * vocode_window_length); 289 | modulator = error_malloc(sizeof(VREAL) * vocode_window_length); 290 | looped_carrier = error_malloc(sizeof(VREAL) * 2 * vocode_window_length); 291 | output = error_malloc(sizeof(VREAL) * 2 * vocode_window_length); 292 | } 293 | 294 | static void free_if_not_null(void **pp) 295 | { 296 | if (*pp != NULL) 297 | { 298 | free(*pp); 299 | *pp = NULL; 300 | } 301 | } 302 | 303 | static void free_memory(void) 304 | { 305 | free_if_not_null((void **)&output); 306 | free_if_not_null((void **)&looped_carrier); 307 | free_if_not_null((void **)&modulator); 308 | free_if_not_null((void **)&output_sample_buffer1); 309 | free_if_not_null((void **)&output_sample_buffer2); 310 | free_if_not_null((void **)&carrier_sample_buffer); 311 | free_if_not_null((void **)&modulator_sample_buffer); 312 | } 313 | 314 | void vocode_cleanup() 315 | { 316 | free_memory(); 317 | close_files(); 318 | } 319 | 320 | void vocode(void) 321 | { 322 | allocate_memory(); 323 | fft_create_arrays (&fft_c, &fft_s, &fft_rev, vocode_window_length); 324 | vocoder(); 325 | vocode_cleanup(); 326 | } 327 | -------------------------------------------------------------------------------- /win32/gui/VocoderGUIDlg.cpp: -------------------------------------------------------------------------------- 1 | // VocoderGUIDlg.cpp : implementation file 2 | // 3 | 4 | #include 5 | #include 6 | #include "stdafx.h" 7 | #include "VocoderGUI.h" 8 | #include "VocoderGUIDlg.h" 9 | 10 | extern "C" 11 | { 12 | #include "vocode.h" 13 | #include "error.h" 14 | extern int ipow(int, int); 15 | extern int ilog2(int); 16 | } 17 | 18 | using namespace std; 19 | 20 | #ifdef _DEBUG 21 | #define new DEBUG_NEW 22 | #undef THIS_FILE 23 | static char THIS_FILE[] = __FILE__; 24 | #endif 25 | 26 | static const int MAX_OUTPUT_VOLUME = 200; 27 | static const int DEFAULT_OUTPUT_VOLUME = 100; 28 | static const int ONE_OUTPUT_VOLUME = 100; 29 | static const int DEFAULT_BAND_COUNT = 16; 30 | static const int MAX_BAND_COUNT = 64; 31 | static const int MAX_WINDOW_OVERLAP = 50; 32 | static const int DEFAULT_WINDOW_OVERLAP = 50; 33 | static const int WHOLE_WINDOW_OVERLAP = 100; 34 | static const int MAX_WINDOW_LENGTH = 500; 35 | static const int DEFAULT_WINDOW_LENGTH = 67; 36 | static const int ONE_SECOND_WINDOW_LENGTH = 1000; 37 | static const BOOL DEFAULT_NORMALIZE = TRUE; 38 | 39 | static const char* PROFILE_SECTION = "Settings"; 40 | static const char* MODULATOR_FILE_PROFILE_ENTRY = "ModulatorFile"; 41 | static const char* CARRIER_FILE_PROFILE_ENTRY = "CarrierFile"; 42 | static const char* OUTPUT_FILE_PROFILE_ENTRY = "OutputFile"; 43 | static const char* WINDOW_LENGTH_PROFILE_ENTRY = "WindowLength"; 44 | static const char* WINDOW_OVERLAP_PROFILE_ENTRY = "WindowOverlap"; 45 | static const char* BAND_COUNT_PROFILE_ENTRY = "BandCount"; 46 | static const char* OUTPUT_VOLUME_PROFILE_ENTRY = "OutputVolume"; 47 | static const char* NORMALIZE_PROFILE_ENTRY = "Normalize"; 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | // CAboutDlg dialog used for App About 51 | 52 | class CAboutDlg : public CDialog 53 | { 54 | public: 55 | CAboutDlg(); 56 | 57 | // Dialog Data 58 | //{{AFX_DATA(CAboutDlg) 59 | enum { IDD = IDD_ABOUTBOX }; 60 | //}}AFX_DATA 61 | 62 | // ClassWizard generated virtual function overrides 63 | //{{AFX_VIRTUAL(CAboutDlg) 64 | protected: 65 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 66 | //}}AFX_VIRTUAL 67 | 68 | // Implementation 69 | protected: 70 | //{{AFX_MSG(CAboutDlg) 71 | //}}AFX_MSG 72 | DECLARE_MESSAGE_MAP() 73 | }; 74 | 75 | CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) 76 | { 77 | //{{AFX_DATA_INIT(CAboutDlg) 78 | //}}AFX_DATA_INIT 79 | } 80 | 81 | void CAboutDlg::DoDataExchange(CDataExchange* pDX) 82 | { 83 | CDialog::DoDataExchange(pDX); 84 | //{{AFX_DATA_MAP(CAboutDlg) 85 | //}}AFX_DATA_MAP 86 | } 87 | 88 | BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) 89 | //{{AFX_MSG_MAP(CAboutDlg) 90 | // No message handlers 91 | //}}AFX_MSG_MAP 92 | END_MESSAGE_MAP() 93 | 94 | ///////////////////////////////////////////////////////////////////////////// 95 | // CVocoderGUIDlg dialog 96 | 97 | CVocoderGUIDlg::CVocoderGUIDlg(CWnd* pParent /*=NULL*/) 98 | : CDialog(CVocoderGUIDlg::IDD, pParent) 99 | { 100 | //{{AFX_DATA_INIT(CVocoderGUIDlg) 101 | m_modulatorFile = _T(""); 102 | m_carrierFile = _T(""); 103 | m_outputFile = _T(""); 104 | m_bandCount = 0; 105 | m_normalize = FALSE; 106 | m_outputVolume = 0; 107 | m_windowLength = 0; 108 | m_windowOverlap = 0; 109 | //}}AFX_DATA_INIT 110 | // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 111 | m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); 112 | } 113 | 114 | void CVocoderGUIDlg::DoDataExchange(CDataExchange* pDX) 115 | { 116 | CDialog::DoDataExchange(pDX); 117 | //{{AFX_DATA_MAP(CVocoderGUIDlg) 118 | DDX_Text(pDX, IDC_MODULATOR_FILE_EDIT, m_modulatorFile); 119 | DDX_Text(pDX, IDC_CARRIER_FILE_EDIT, m_carrierFile); 120 | DDX_Text(pDX, IDC_OUTPUT_FILE_EDIT, m_outputFile); 121 | DDX_Slider(pDX, IDC_BAND_COUNT_SLIDER, m_bandCount); 122 | DDX_Check(pDX, IDC_NORMALIZE_CHECK, m_normalize); 123 | DDX_Slider(pDX, IDC_OUTPUT_VOLUME_SLIDER, m_outputVolume); 124 | DDX_Slider(pDX, IDC_WINDOW_LENGTH_SLIDER, m_windowLength); 125 | DDX_Slider(pDX, IDC_WINDOW_OVERLAP_SLIDER, m_windowOverlap); 126 | //}}AFX_DATA_MAP 127 | } 128 | 129 | BEGIN_MESSAGE_MAP(CVocoderGUIDlg, CDialog) 130 | //{{AFX_MSG_MAP(CVocoderGUIDlg) 131 | ON_WM_SYSCOMMAND() 132 | ON_WM_DESTROY() 133 | ON_WM_PAINT() 134 | ON_WM_QUERYDRAGICON() 135 | ON_BN_CLICKED(IDC_MODULATOR_BROWSE_BUTTON, OnModulatorBrowseButton) 136 | ON_BN_CLICKED(IDC_CARRIER_BROWSE_BUTTON, OnCarrierBrowseButton) 137 | ON_BN_CLICKED(IDC_OUTPUT_BROWSE_BUTTON, OnOutputBrowseButton) 138 | ON_NOTIFY(NM_CUSTOMDRAW, IDC_WINDOW_LENGTH_SLIDER, OnCustomdrawWindowLengthSlider) 139 | ON_NOTIFY(NM_CUSTOMDRAW, IDC_WINDOW_OVERLAP_SLIDER, OnCustomdrawWindowOverlapSlider) 140 | ON_NOTIFY(NM_CUSTOMDRAW, IDC_BAND_COUNT_SLIDER, OnCustomdrawBandCountSlider) 141 | ON_NOTIFY(NM_CUSTOMDRAW, IDC_OUTPUT_VOLUME_SLIDER, OnCustomdrawOutputVolumeSlider) 142 | ON_BN_CLICKED(IDC_STOP_BUTTON, OnStopButton) 143 | ON_BN_CLICKED(IDC_MODULATOR_PLAY_BUTTON, OnModulatorPlayButton) 144 | ON_BN_CLICKED(IDC_CARRIER_PLAY_BUTTON, OnCarrierPlayButton) 145 | ON_BN_CLICKED(IDC_OUTPUT_PLAY_BUTTON, OnOutputPlayButton) 146 | ON_EN_CHANGE(IDC_MODULATOR_FILE_EDIT, OnChangeModulatorFileEdit) 147 | ON_EN_CHANGE(IDC_CARRIER_FILE_EDIT, OnChangeCarrierFileEdit) 148 | ON_EN_CHANGE(IDC_OUTPUT_FILE_EDIT, OnChangeOutputFileEdit) 149 | ON_BN_CLICKED(IDC_RESTORE_DEFAULTS_BUTTON, OnRestoreDefaultsButton) 150 | ON_BN_CLICKED(IDC_VOCODE_LISTEN_BUTTON, OnVocodeListenButton) 151 | //}}AFX_MSG_MAP 152 | END_MESSAGE_MAP() 153 | 154 | ///////////////////////////////////////////////////////////////////////////// 155 | // CVocoderGUIDlg message handlers 156 | 157 | BOOL CVocoderGUIDlg::OnInitDialog() 158 | { 159 | CDialog::OnInitDialog(); 160 | 161 | // Add "About..." menu item to system menu. 162 | 163 | // IDM_ABOUTBOX must be in the system command range. 164 | ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); 165 | ASSERT(IDM_ABOUTBOX < 0xF000); 166 | 167 | CMenu* pSysMenu = GetSystemMenu(FALSE); 168 | if (pSysMenu != NULL) 169 | { 170 | CString strAboutMenu; 171 | strAboutMenu.LoadString(IDS_ABOUTBOX); 172 | if (!strAboutMenu.IsEmpty()) 173 | { 174 | pSysMenu->AppendMenu(MF_SEPARATOR); 175 | pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); 176 | } 177 | } 178 | 179 | // Set the icon for this dialog. The framework does this automatically 180 | // when the application's main window is not a dialog 181 | SetIcon(m_hIcon, TRUE); // Set big icon 182 | SetIcon(m_hIcon, FALSE); // Set small icon 183 | 184 | CSliderCtrl* pSlider = (CSliderCtrl*)GetDlgItem(IDC_WINDOW_LENGTH_SLIDER); 185 | pSlider->SetRange(1, MAX_WINDOW_LENGTH); 186 | 187 | pSlider = (CSliderCtrl*)GetDlgItem(IDC_WINDOW_OVERLAP_SLIDER); 188 | pSlider->SetRange(0, MAX_WINDOW_OVERLAP); 189 | 190 | pSlider = (CSliderCtrl*)GetDlgItem(IDC_BAND_COUNT_SLIDER); 191 | pSlider->SetRange(1, MAX_BAND_COUNT); 192 | 193 | pSlider = (CSliderCtrl*)GetDlgItem(IDC_OUTPUT_VOLUME_SLIDER); 194 | pSlider->SetRange(0, MAX_OUTPUT_VOLUME); 195 | 196 | CWinApp* app = AfxGetApp(); 197 | m_modulatorFile = CString(app->GetProfileString(PROFILE_SECTION, MODULATOR_FILE_PROFILE_ENTRY, "")); 198 | m_carrierFile = CString(app->GetProfileString(PROFILE_SECTION, CARRIER_FILE_PROFILE_ENTRY, "")); 199 | m_outputFile = CString(app->GetProfileString(PROFILE_SECTION, OUTPUT_FILE_PROFILE_ENTRY, "")); 200 | m_windowLength = app->GetProfileInt(PROFILE_SECTION, WINDOW_LENGTH_PROFILE_ENTRY, DEFAULT_WINDOW_LENGTH); 201 | m_windowOverlap = app->GetProfileInt(PROFILE_SECTION, WINDOW_OVERLAP_PROFILE_ENTRY, DEFAULT_WINDOW_OVERLAP); 202 | m_bandCount = app->GetProfileInt(PROFILE_SECTION, BAND_COUNT_PROFILE_ENTRY, DEFAULT_BAND_COUNT); 203 | m_outputVolume = app->GetProfileInt(PROFILE_SECTION, OUTPUT_VOLUME_PROFILE_ENTRY, DEFAULT_OUTPUT_VOLUME); 204 | m_normalize = app->GetProfileInt(PROFILE_SECTION, NORMALIZE_PROFILE_ENTRY, DEFAULT_NORMALIZE); 205 | 206 | UpdateData(FALSE); 207 | 208 | UpdatePlayButtonsEnabled(); 209 | 210 | return TRUE; // return TRUE unless you set the focus to a control 211 | 212 | return TRUE; // return TRUE unless you set the focus to a control 213 | } 214 | 215 | void CVocoderGUIDlg::OnSysCommand(UINT nID, LPARAM lParam) 216 | { 217 | if ((nID & 0xFFF0) == IDM_ABOUTBOX) 218 | { 219 | CAboutDlg dlgAbout; 220 | dlgAbout.DoModal(); 221 | } 222 | else 223 | { 224 | CDialog::OnSysCommand(nID, lParam); 225 | } 226 | } 227 | 228 | void CVocoderGUIDlg::OnDestroy() 229 | { 230 | WinHelp(0L, HELP_QUIT); 231 | CDialog::OnDestroy(); 232 | } 233 | 234 | // If you add a minimize button to your dialog, you will need the code below 235 | // to draw the icon. For MFC applications using the document/view model, 236 | // this is automatically done for you by the framework. 237 | 238 | void CVocoderGUIDlg::OnPaint() 239 | { 240 | if (IsIconic()) 241 | { 242 | CPaintDC dc(this); // device context for painting 243 | 244 | SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); 245 | 246 | // Center icon in client rectangle 247 | int cxIcon = GetSystemMetrics(SM_CXICON); 248 | int cyIcon = GetSystemMetrics(SM_CYICON); 249 | CRect rect; 250 | GetClientRect(&rect); 251 | int x = (rect.Width() - cxIcon + 1) / 2; 252 | int y = (rect.Height() - cyIcon + 1) / 2; 253 | 254 | // Draw the icon 255 | dc.DrawIcon(x, y, m_hIcon); 256 | } 257 | else 258 | { 259 | CDialog::OnPaint(); 260 | } 261 | } 262 | 263 | // The system calls this to obtain the cursor to display while the user drags 264 | // the minimized window. 265 | HCURSOR CVocoderGUIDlg::OnQueryDragIcon() 266 | { 267 | return (HCURSOR) m_hIcon; 268 | } 269 | 270 | void CVocoderGUIDlg::UpdatePlayButtonsEnabled() 271 | { 272 | UpdatePlayButtonEnabled(IDC_MODULATOR_FILE_EDIT, IDC_MODULATOR_PLAY_BUTTON); 273 | UpdatePlayButtonEnabled(IDC_CARRIER_FILE_EDIT, IDC_CARRIER_PLAY_BUTTON); 274 | UpdatePlayButtonEnabled(IDC_OUTPUT_FILE_EDIT, IDC_OUTPUT_PLAY_BUTTON); 275 | } 276 | 277 | void CVocoderGUIDlg::OnModulatorBrowseButton() 278 | { 279 | BrowseFile(TRUE, GetDlgItem(IDC_MODULATOR_FILE_EDIT)); 280 | } 281 | 282 | void CVocoderGUIDlg::BrowseFile(BOOL bOpenFileDialog, CWnd *editCtl) 283 | { 284 | CFileDialog fileDlg(bOpenFileDialog, ".wav", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "Sound Files (*.wav)|*.wav|All Files (*.*)|*.*||", this); 285 | int iRV = fileDlg.DoModal(); 286 | if (iRV == IDOK) 287 | { 288 | editCtl->SetWindowText(fileDlg.GetPathName()); 289 | } 290 | } 291 | 292 | void CVocoderGUIDlg::OnCarrierBrowseButton() 293 | { 294 | BrowseFile(TRUE, GetDlgItem(IDC_CARRIER_FILE_EDIT)); 295 | } 296 | 297 | void CVocoderGUIDlg::OnOutputBrowseButton() 298 | { 299 | BrowseFile(FALSE, GetDlgItem(IDC_OUTPUT_FILE_EDIT)); 300 | } 301 | 302 | static jmp_buf _vocodeErrorJmpBuf; 303 | static CVocoderGUIDlg* _vocoderDlg; 304 | 305 | static void _StartStatusCB(VINT num_frames) 306 | { 307 | _vocoderDlg->StartStatus(num_frames); 308 | } 309 | 310 | static void _FinishStatusCB() 311 | { 312 | } 313 | 314 | static VBOOL _UpdateStatusCB(VINT frame_no) 315 | { 316 | return _vocoderDlg->UpdateStatus(frame_no); 317 | } 318 | 319 | static void _ErrorDisplayCB(char* message) 320 | { 321 | AfxMessageBox(message); 322 | longjmp(_vocodeErrorJmpBuf, 1); 323 | } 324 | 325 | static UINT _VocodeThread(LPVOID pParam) 326 | { 327 | if (setjmp(_vocodeErrorJmpBuf) == 0) 328 | { 329 | vocode(); 330 | } 331 | vocode_cleanup(); 332 | _vocoderDlg->VocodeFinished(); 333 | return 0; 334 | } 335 | 336 | 337 | void CVocoderGUIDlg::OnOK() 338 | { 339 | m_listenAfterVocode = FALSE; 340 | DoVocode(); 341 | } 342 | 343 | void CVocoderGUIDlg::DoVocode() 344 | { 345 | UpdateData(); 346 | 347 | CWinApp* app = AfxGetApp(); 348 | app->WriteProfileString(PROFILE_SECTION, MODULATOR_FILE_PROFILE_ENTRY, m_modulatorFile); 349 | app->WriteProfileString(PROFILE_SECTION, CARRIER_FILE_PROFILE_ENTRY, m_carrierFile); 350 | app->WriteProfileString(PROFILE_SECTION, OUTPUT_FILE_PROFILE_ENTRY, m_outputFile); 351 | app->WriteProfileInt(PROFILE_SECTION, WINDOW_LENGTH_PROFILE_ENTRY, m_windowLength); 352 | app->WriteProfileInt(PROFILE_SECTION, WINDOW_OVERLAP_PROFILE_ENTRY, m_windowOverlap); 353 | app->WriteProfileInt(PROFILE_SECTION, BAND_COUNT_PROFILE_ENTRY, m_bandCount); 354 | app->WriteProfileInt(PROFILE_SECTION, OUTPUT_VOLUME_PROFILE_ENTRY, m_outputVolume); 355 | app->WriteProfileInt(PROFILE_SECTION, NORMALIZE_PROFILE_ENTRY, m_normalize); 356 | 357 | char* error = NULL; 358 | if (m_modulatorFile.IsEmpty()) 359 | { 360 | error = "Modulator file not specified."; 361 | } 362 | else if (m_carrierFile.IsEmpty()) 363 | { 364 | error = "Carrier file not specified."; 365 | } 366 | else if (m_outputFile.IsEmpty()) 367 | { 368 | error = "Output file not specified."; 369 | } 370 | if (error != NULL) 371 | { 372 | AfxMessageBox(error); 373 | } 374 | else 375 | { 376 | _vocoderDlg = this; 377 | if (setjmp(_vocodeErrorJmpBuf) == 0) 378 | { 379 | vocode_start_status_cb = _StartStatusCB; 380 | vocode_update_status_cb = _UpdateStatusCB; 381 | vocode_finish_status_cb = _FinishStatusCB; 382 | error_display_cb = _ErrorDisplayCB; 383 | vocode_modulator_filename = m_modulatorFile.GetBuffer(0); 384 | vocode_carrier_filename = m_carrierFile.GetBuffer(0); 385 | vocode_output_filename = m_outputFile.GetBuffer(0); 386 | vocode_normalize = m_normalize; 387 | vocode_volume = m_outputVolume / (float)ONE_OUTPUT_VOLUME; 388 | vocode_band_count = m_bandCount; 389 | vocode_open_files(); 390 | vocode_window_length = ipow(2, ilog2(vocode_modulator_rate * m_windowLength / ONE_SECOND_WINDOW_LENGTH)); 391 | if (vocode_window_length < 2) 392 | { 393 | vocode_window_length = 2; 394 | } 395 | vocode_window_overlap = vocode_window_length * m_windowOverlap / WHOLE_WINDOW_OVERLAP; 396 | if (vocode_band_count > vocode_window_length / 2) 397 | { 398 | vocode_band_count = vocode_window_length / 2; 399 | } 400 | CWnd* pButton = GetDlgItem(IDOK); 401 | pButton->ModifyStyle(0, WS_DISABLED); 402 | pButton->Invalidate(); 403 | pButton = GetDlgItem(IDC_VOCODE_LISTEN_BUTTON); 404 | pButton->ModifyStyle(0, WS_DISABLED); 405 | pButton->Invalidate(); 406 | pButton = GetDlgItem(IDC_STOP_BUTTON); 407 | pButton->ModifyStyle(WS_DISABLED, 0); 408 | pButton->Invalidate(); 409 | m_stopVocode = FALSE; 410 | AfxBeginThread(_VocodeThread, NULL); 411 | } 412 | else 413 | { 414 | vocode_cleanup(); 415 | } 416 | } 417 | } 418 | 419 | void CVocoderGUIDlg::OnCustomdrawWindowLengthSlider(NMHDR* pNMHDR, LRESULT* pResult) 420 | { 421 | UpdateSliderLabels(); 422 | *pResult = 0; 423 | } 424 | 425 | void CVocoderGUIDlg::OnCustomdrawWindowOverlapSlider(NMHDR* pNMHDR, LRESULT* pResult) 426 | { 427 | UpdateSliderLabels(); 428 | *pResult = 0; 429 | } 430 | 431 | void CVocoderGUIDlg::OnCustomdrawBandCountSlider(NMHDR* pNMHDR, LRESULT* pResult) 432 | { 433 | UpdateSliderLabels(); 434 | *pResult = 0; 435 | } 436 | 437 | void CVocoderGUIDlg::OnCustomdrawOutputVolumeSlider(NMHDR* pNMHDR, LRESULT* pResult) 438 | { 439 | UpdateSliderLabels(); 440 | *pResult = 0; 441 | } 442 | 443 | void CVocoderGUIDlg::StartStatus(int num_frames) 444 | { 445 | CProgressCtrl* pProgress = (CProgressCtrl*)GetDlgItem(IDC_VOCODE_PROGRESS); 446 | pProgress->SetRange32(0, num_frames - 1); 447 | pProgress->SetPos(0); 448 | } 449 | 450 | BOOL CVocoderGUIDlg::UpdateStatus(int frame_no) 451 | { 452 | CProgressCtrl* pProgress = (CProgressCtrl*)GetDlgItem(IDC_VOCODE_PROGRESS); 453 | pProgress->SetPos(frame_no); 454 | return m_stopVocode; 455 | } 456 | 457 | void CVocoderGUIDlg::VocodeFinished() 458 | { 459 | CWnd* pButton = GetDlgItem(IDOK); 460 | pButton->ModifyStyle(WS_DISABLED, 0); 461 | pButton->Invalidate(); 462 | pButton = GetDlgItem(IDC_VOCODE_LISTEN_BUTTON); 463 | pButton->ModifyStyle(WS_DISABLED, 0); 464 | pButton->Invalidate(); 465 | pButton = GetDlgItem(IDC_STOP_BUTTON); 466 | pButton->ModifyStyle(0, WS_DISABLED); 467 | pButton->Invalidate(); 468 | UpdatePlayButtonsEnabled(); 469 | if (m_listenAfterVocode && !m_stopVocode) 470 | { 471 | PlaySound(m_outputFile, NULL, SND_ASYNC); 472 | } 473 | } 474 | 475 | void CVocoderGUIDlg::OnStopButton() 476 | { 477 | m_stopVocode = TRUE; 478 | } 479 | 480 | void CVocoderGUIDlg::OnModulatorPlayButton() 481 | { 482 | UpdateData(); 483 | PlaySound(m_modulatorFile, NULL, SND_ASYNC); 484 | } 485 | 486 | void CVocoderGUIDlg::OnCarrierPlayButton() 487 | { 488 | UpdateData(); 489 | PlaySound(m_carrierFile, NULL, SND_ASYNC); 490 | } 491 | 492 | void CVocoderGUIDlg::OnOutputPlayButton() 493 | { 494 | UpdateData(); 495 | PlaySound(m_outputFile, NULL, SND_ASYNC); 496 | } 497 | 498 | void CVocoderGUIDlg::OnChangeModulatorFileEdit() 499 | { 500 | UpdatePlayButtonsEnabled(); 501 | } 502 | 503 | void CVocoderGUIDlg::OnChangeCarrierFileEdit() 504 | { 505 | UpdatePlayButtonsEnabled(); 506 | } 507 | 508 | void CVocoderGUIDlg::OnChangeOutputFileEdit() 509 | { 510 | UpdatePlayButtonsEnabled(); 511 | } 512 | 513 | void CVocoderGUIDlg::UpdatePlayButtonEnabled(int nEditCntl, int nPlayCntl) 514 | { 515 | CString fileName; 516 | GetDlgItem(nEditCntl)->GetWindowText(fileName); 517 | CButton* pButton = (CButton*)GetDlgItem(nPlayCntl); 518 | TRY 519 | { 520 | CFile file(fileName, CFile::modeRead); 521 | pButton->ModifyStyle(WS_DISABLED, 0); 522 | } 523 | CATCH (CFileException, e) 524 | { 525 | pButton->ModifyStyle(0, WS_DISABLED); 526 | } 527 | END_CATCH 528 | pButton->Invalidate(); 529 | } 530 | 531 | void CVocoderGUIDlg::OnRestoreDefaultsButton() 532 | { 533 | UpdateData(); 534 | m_windowLength = DEFAULT_WINDOW_LENGTH; 535 | m_windowOverlap = DEFAULT_WINDOW_OVERLAP; 536 | m_bandCount = DEFAULT_BAND_COUNT; 537 | m_outputVolume = DEFAULT_OUTPUT_VOLUME; 538 | m_normalize = DEFAULT_NORMALIZE; 539 | UpdateData(FALSE); 540 | UpdateSliderLabels(); 541 | } 542 | 543 | void CVocoderGUIDlg::OnVocodeListenButton() 544 | { 545 | m_listenAfterVocode = TRUE; 546 | DoVocode(); 547 | } 548 | 549 | void CVocoderGUIDlg::UpdateSliderLabels() 550 | { 551 | UpdateSliderValueLabel(IDC_WINDOW_LENGTH_SLIDER, IDC_WINDOW_LENGTH_VALUE_LABEL, 552 | ONE_SECOND_WINDOW_LENGTH, "s"); 553 | UpdateSliderValueLabel(IDC_WINDOW_OVERLAP_SLIDER, IDC_WINDOW_OVERLAP_VALUE_LABEL, 554 | WHOLE_WINDOW_OVERLAP / 100, "%"); 555 | UpdateSliderValueLabel(IDC_BAND_COUNT_SLIDER, IDC_BAND_COUNT_VALUE_LABEL); 556 | UpdateSliderValueLabel(IDC_OUTPUT_VOLUME_SLIDER, IDC_OUTPUT_VOLUME_VALUE_LABEL, 557 | ONE_OUTPUT_VOLUME / 100, "%", -ONE_OUTPUT_VOLUME); 558 | } 559 | 560 | void CVocoderGUIDlg::UpdateSliderValueLabel(int nSliderId, int nLabelId, int nOneValue, char *pszUnits, int nOffset) 561 | { 562 | CSliderCtrl* pSlider = (CSliderCtrl*)GetDlgItem(nSliderId); 563 | CStatic* pLabel = (CStatic*)GetDlgItem(nLabelId); 564 | ostringstream ss; 565 | ss << (pSlider->GetPos() + nOffset) / (float)nOneValue; 566 | if (pszUnits != NULL) 567 | { 568 | ss << pszUnits; 569 | } 570 | pLabel->SetWindowText(ss.str().c_str()); 571 | } 572 | -------------------------------------------------------------------------------- /fftn.c: -------------------------------------------------------------------------------- 1 | /* $Id: fftn.c,v 1.4 2002/09/20 02:30:51 emanuel Exp $ */ 2 | 3 | /* (C) Copyright 1993 by Steven Trainoff. Permission is granted to make 4 | * any use of this code subject to the condition that all copies contain 5 | * this notice and an indication of what has been changed. 6 | */ 7 | #include 8 | #include 9 | #include "error.h" 10 | #include "spt.h" 11 | 12 | #ifndef REAL 13 | #define REAL double 14 | #endif 15 | 16 | #include "fft.h" 17 | 18 | #ifndef PI 19 | #define PI 3.14159265358979324 20 | #endif 21 | 22 | #define emalloc error_malloc 23 | 24 | /* This routine performs a complex fft. It takes two arrays holding 25 | * the real and imaginary parts of the the complex numbers. It performs 26 | * the fft and returns the result in the original arrays. It destroys 27 | * the orginal data in the process. Note the array returned is NOT 28 | * normalized. Each element must be divided by n to get dimensionally 29 | * correct results. This routine takes optional arrays for the sines, cosine 30 | * and bitreversal. If any of these pointers are null, all of the arrays are 31 | * regenerated. 32 | */ 33 | 34 | void fft(x, n, c, s, rev) 35 | REAL x[][2]; /* Input data points */ 36 | int n; /* Number of points, n = 2**nu */ 37 | REAL *c, *s; /* Arrays of cosine, sine */ 38 | int *rev; /* Array of bit reversals*/ 39 | { 40 | char temparray=FALSE; /* Are we using internal c and s arrays? */ 41 | int nu = ilog2(n); /* Number of data points */ 42 | int dual_space = n; /* Spacing between dual nodes */ 43 | int nu1 = nu; /* = nu-1 right shift needed when finding p */ 44 | int k; /* Iteration of factor array */ 45 | register int i; /* Number of dual node pairs considered */ 46 | register int j; /* Index into factor array */ 47 | 48 | if (c == NULL || s == NULL || rev == NULL) { 49 | temparray = TRUE; 50 | fft_create_arrays(&c, &s, &rev, n); 51 | } 52 | 53 | /* For each iteration of factor matrix */ 54 | for (k = 0; k < nu; k++) { 55 | /* Initialize */ 56 | dual_space /= 2; /* Fewer elements in each set of duals */ 57 | nu1--; /* nu1 = nu - 1 */ 58 | 59 | /* For each set of duals */ 60 | for(j = 0; j < n; j += dual_space) { 61 | /* For each dual node pair */ 62 | for (i = 0; i < dual_space; i++, j++) { 63 | REAL treal, timag; /* Temp of w**p */ 64 | register int p = rev[j >> nu1]; 65 | 66 | treal = x[j+dual_space][0]*c[p] + x[j+dual_space][1]*s[p]; 67 | timag = x[j+dual_space][1]*c[p] - x[j+dual_space][0]*s[p]; 68 | 69 | x[j+dual_space][0] = x[j][0] - treal; 70 | x[j+dual_space][1] = x[j][1] - timag; 71 | 72 | x[j][0] += treal; 73 | x[j][1] += timag; 74 | } 75 | } 76 | } 77 | 78 | /* We are done with the transform, now unscamble results */ 79 | for (j = 0; j < n; j++) { 80 | if ((i = rev[j]) > j) { 81 | REAL treal, timag; 82 | 83 | /* Swap */ 84 | treal = x[j][0]; 85 | timag = x[j][1]; 86 | 87 | x[j][0] = x[i][0]; 88 | x[j][1] = x[i][1]; 89 | 90 | x[i][0] = treal; 91 | x[i][1] = timag; 92 | } 93 | } 94 | 95 | /* Give back the temp storage */ 96 | if (temparray) { 97 | free(c); 98 | free(s); 99 | free(rev); 100 | } 101 | } 102 | 103 | /* invfft performs an inverse fft */ 104 | void invfft(REAL (*x)[2], int n, REAL*c, REAL*s, int *rev) 105 | { 106 | char temparray = FALSE; 107 | int i; 108 | 109 | if (c == NULL || s == NULL || rev == NULL) { 110 | temparray = TRUE; 111 | fft_create_arrays(&c, &s, &rev, n); 112 | } 113 | 114 | /* Negate the sin array to do the inverse transform */ 115 | for (i = 0; i < n; i++) 116 | s[i] = -s[i]; 117 | 118 | fft(x, n, c, s, rev); 119 | 120 | if (temparray) { 121 | free(c); 122 | free(s); 123 | free(rev); 124 | } else { /* Put the sin array back */ 125 | for (i = 0; i < n; i++) 126 | s[i] = - s[i]; 127 | } 128 | } 129 | 130 | 131 | 132 | /* fft_create_arrays generates the sine and cosine arrays needed in the 133 | * forward complex fft. It allocates storaged and return pointers 134 | * to the initialized arrays 135 | */ 136 | 137 | void fft_create_arrays(c, s, rev, n) 138 | REAL **c, **s; /* Sin and Cos arrays (to be returned) */ 139 | int n; /* Number of points */ 140 | int **rev; /* Array of reversed bits */ 141 | { 142 | register int i; 143 | int nu = ilog2(n); 144 | 145 | /* Compute temp array of sins and cosines */ 146 | *c = (REAL *)emalloc(n * sizeof(REAL)); 147 | *s = (REAL *)emalloc(n * sizeof(REAL)); 148 | *rev = (int *)emalloc(n * sizeof(int)); 149 | 150 | for (i = 0; i < n; i++) { 151 | REAL arg = 2 * PI * i/n; 152 | (*c)[i] = cos(arg); 153 | (*s)[i] = sin(arg); 154 | (*rev)[i] = bitrev(i, nu); 155 | } 156 | } 157 | 158 | #if (1==2) /* Not needed now */ 159 | /* getx - gets one real, imag pair from the square multidimensional array */ 160 | REAL *getx(x, ndim, dim, n, elem) 161 | REAL x[][2]; /* Input data points */ 162 | int ndim; /* Number of dimensions */ 163 | int dim; /* Dim to extract point from */ 164 | int n; /* Number of points in each dim */ 165 | int elem[]; /* Which element to extract (array by ndim) */ 166 | { 167 | register int i; 168 | int pos=0; /* Position in array when considered 1d */ 169 | 170 | for (i = 0; i < ndim && (pos *= n); i++) /* Loop over dimensions */ 171 | pos += elem[i]; 172 | 173 | return(x+pos); 174 | } 175 | #endif 176 | 177 | /* This routine performs a multiple complex fft on a square 178 | * multidimensional array. Each element is an array by two holding the 179 | * real and imaginary parts of the the complex numbers. It performs the 180 | * fft and returns the result in the original arrays. It destroys the 181 | * orginal data in the process. Note the array returned is NOT 182 | * normalized. Each element must be divided by n to get dimensionally 183 | * correct results. The cosine and sine arrays are optional. If null is 184 | * passed, a temp array will be allocated and filled, otherwise the 185 | * passed arrays are assumed to have the correct data in them. 186 | * 187 | * Note: if the sin array is negated, the routine performs the inverse 188 | * transform. 189 | */ 190 | 191 | void fftn(x, ndim, dim) 192 | REAL x[][2]; /* Input data points */ 193 | int ndim; /* Number of dimensions */ 194 | int dim[]; /* Number of points in each dim = 2**nu */ 195 | { 196 | int nel; /* Number of elements */ 197 | int separation = 1; /* Distance between elements (which "column") */ 198 | int offset = 0; /* 1st element in fft (which "row") */ 199 | register int i; /* Which dim we are performing the fft */ 200 | register int j; /* Which indices we are NOT performing the fft */ 201 | register int k; /* Loop over index j */ 202 | REAL *c, *s; /* Sine and Cosine arrays */ 203 | int *rev; /* Array of bitreversed numbers */ 204 | 205 | /* Compute number of elements in array */ 206 | for (i = 0, nel = 1; i < ndim; i++) 207 | nel *= dim[i]; 208 | 209 | for (i = ndim-1; i >= 0; i--) { /* Loop over dim on which we are doing the fft */ 210 | int logi = ilog2(dim[i]); 211 | int nextseparation = separation * dim[i]; 212 | 213 | /* Create Sin and Cos arrays */ 214 | fft_create_arrays(&c, &s, &rev, dim[i]); 215 | 216 | /* Loop over other indices. First do indicies bigger than i */ 217 | for (j =0; j < nel; j += nextseparation) { 218 | for (k = 0; k < separation; k++) { 219 | offset = j+k; 220 | fft1n(x, logi, offset, separation, c, s, rev); 221 | } 222 | } 223 | /* Give back old sin and cos arrays */ 224 | free(c); free(s);free(rev); 225 | separation = nextseparation; 226 | } 227 | } 228 | 229 | /* This routine is identical to fftn but negates the sin array to do an inverse transform */ 230 | 231 | void invfftn(x, ndim, dim) 232 | REAL x[][2]; /* Input data points */ 233 | int ndim; /* Number of dimensions */ 234 | int dim[]; /* Number of points in each dim = 2**nu */ 235 | { 236 | int nel; /* Number of elements */ 237 | int separation = 1; /* Distance between elements (which "column") */ 238 | int offset = 0; /* 1st element in fft (which "row") */ 239 | register int i; /* Which dim we are performing the fft */ 240 | register int j; /* Which indices we are NOT performing the fft */ 241 | register int k; /* Loop over index j */ 242 | REAL *c, *s; /* Sine and Cosine arrays */ 243 | int *rev; /* Array of bitreversed numbers */ 244 | 245 | /* Compute number of elements in array */ 246 | for (i = 0, nel = 1; i < ndim; i++) 247 | nel *= dim[i]; 248 | 249 | for (i = ndim-1; i >= 0; i--) { /* Loop over dim on which we are doing the fft */ 250 | int logi = ilog2(dim[i]); 251 | int nextseparation = separation * dim[i]; 252 | 253 | /* Create Sin and Cos arrays */ 254 | fft_create_arrays(&c, &s, &rev, dim[i]); 255 | 256 | /* Negate the sin array */ 257 | for (j = 0; j < dim[i]; j++) 258 | s[j] = -s[j]; 259 | 260 | /* Loop over other indices. First do indicies bigger than i */ 261 | for (j =0; j < nel; j += nextseparation) { 262 | for (k = 0; k < separation; k++) { 263 | offset = j+k; 264 | fft1n(x, logi, offset, separation, c, s, rev); 265 | } 266 | } 267 | /* Give back old sin and cos arrays */ 268 | free(c); free(s);free(rev); 269 | separation = nextseparation; 270 | } 271 | } 272 | 273 | /* This normalizes the elements of a multidimensional fft so that the forward transform 274 | * followed by the inverse transform is an identity 275 | */ 276 | void normalize_fftn(x, ndim, dim) 277 | REAL x[][2]; /* Input data points */ 278 | int ndim; /* Number of dimensions */ 279 | int dim[]; /* Number of points in each dim = 2**nu */ 280 | { 281 | int nel; /* Number of elements */ 282 | int i; 283 | 284 | /* Compute number of elements in array */ 285 | for (i = 0, nel = 1; i < ndim; i++) 286 | nel *= dim[i]; 287 | 288 | for (i = 0; i < nel; i++) { 289 | x[i][0] /= nel; 290 | x[i][1] /= nel; 291 | } 292 | } 293 | 294 | /* This routine normalized the elements of a 1d fft by dividing by the number of elements 295 | * so that fft, inversefft, normalizefft is an identity 296 | */ 297 | void normalize_fft(REAL (*x)[2], int n) 298 | { 299 | register int i; 300 | 301 | for (i = 0; i < n; i++) { 302 | x[i][0] /= n; 303 | x[i][1] /= n; 304 | } 305 | } 306 | 307 | 308 | /* This routine performs a complex fft on a single index of a 309 | * multidimensional array. This routine is intended to be used 310 | * internally in a full multidimensional fft (on all indicies). It will 311 | * be called repeatedly for each of the 1D fft's needed. This routine is 312 | * designed primarily to optimize the memory fetches needed for the 1D 313 | * ffts. Each element is an array by two holding the real and imaginary 314 | * parts of the the complex numbers. Which index on which the fft is to 315 | * be performed is specified in a somewhat roundabout fashion. What is 316 | * passed it an offset and the number of values between elements in the 317 | * array as if it were considered to be a big 1D array with dimension 318 | * equal to the product of the linear dimensions. If the 319 | * multidimensional array is considered It performs the fft and returns 320 | * the result in the original arrays. It destroys the orginal data in 321 | * the process. Note the array returned is NOT normalized. Each element 322 | * must be divided by n to get dimensionally correct results. The cosine 323 | * and sine arrays are optional. If null is passed, a temp array will be 324 | * allocated and filled, otherwise the passed arrays are assumed to have 325 | * the correct data in them. 326 | * 327 | * Note: if the sin array is negated, the routine performs the inverse 328 | * transform. 329 | */ 330 | 331 | void fft1n(x, nu, offset, separation, c, s, rev) 332 | REAL x[][2]; /* Input data points */ 333 | int nu; /* Number of elements in fft n = 2**nu */ 334 | int offset; /* Offset of 1st element */ 335 | int separation; /* Separation between elements */ 336 | REAL c[], s[]; /* Cosine and Sine arrays (array by n) */ 337 | int rev[]; /* Array of bitreversed numbers */ 338 | { 339 | char temparray=FALSE; /* Are we using internal c and s arrays? */ 340 | int n = (1 << nu); /* Number of data points */ 341 | int dual_space = n; /* Spacing between dual nodes */ 342 | int nu1 = nu; /* = nu-1 right shift needed when finding p */ 343 | int k; /* Iteration of factor array */ 344 | register int i; /* Number of dual node pairs considered */ 345 | register int j; /* Index into factor array */ 346 | 347 | if (c == NULL || s == NULL || rev == NULL) { 348 | temparray = TRUE; 349 | fft_create_arrays(&c, &s, &rev, n); 350 | } 351 | 352 | x += offset; /* Move to the correct offset */ 353 | 354 | /* For each iteration of factor matrix */ 355 | for (k = 0; k < nu; k++) { 356 | /* Initialize */ 357 | dual_space /= 2; /* Fewer elements in each set of duals */ 358 | nu1--; /* nu1 = nu - 1 */ 359 | 360 | /* For each set of duals */ 361 | for(j = 0; j < n; j += dual_space) { 362 | 363 | /* For each dual node pair */ 364 | for (i = 0; i < dual_space; i++, j++) { 365 | REAL *pt1, *pt2; 366 | REAL treal, timag; /* Temp of w**p */ 367 | register int p = rev[j >> nu1]; 368 | 369 | pt1 = x[separation * j]; 370 | pt2 = x[separation * (j+dual_space)]; 371 | 372 | treal = pt2[0]*c[p] + pt2[1]*s[p]; 373 | timag = pt2[1]*c[p] - pt2[0]*s[p]; 374 | 375 | pt2[0] = pt1[0] - treal; 376 | pt2[1] = pt1[1] - timag; 377 | 378 | pt1[0] += treal; 379 | pt1[1] += timag; 380 | } 381 | } 382 | } 383 | 384 | 385 | /* We are done with the transform, now unscamble results */ 386 | for (j = 0; j < n; j++) { 387 | if ((i = rev[j]) > j) { 388 | REAL *pt1, *pt2; 389 | REAL treal, timag; 390 | 391 | pt1 = x[j*separation]; 392 | pt2 = x[i*separation]; 393 | /* Swap */ 394 | treal = pt1[0]; 395 | timag = pt1[1]; 396 | 397 | pt1[0] = pt2[0]; 398 | pt1[1] = pt2[1]; 399 | 400 | pt2[0] = treal; 401 | pt2[1] = timag; 402 | } 403 | } 404 | 405 | /* Give back the temp storage */ 406 | if (temparray) { 407 | free(c); 408 | free(s); 409 | free(rev); 410 | } 411 | } 412 | 413 | /* This routine takes an array of real numbers and performs a fft. It 414 | * returns the magnitude of the fft in the original array. This routine 415 | * uses an order n/2 complex ft and disentangles the results. This is 416 | * much more efficient than using an order n complex fft with the 417 | * imaginary component set to zero. We return the mean in data[0] 418 | * and the Nyquist frequency in data[n/w]. The rest of data is 419 | * left untouched. The results are normalized. 420 | */ 421 | 422 | void realfftmag(data, n) 423 | REAL *data; 424 | int n; 425 | { 426 | REAL (*x)[2]; /* Temp array used perform fft */ 427 | REAL *dataptr, *xptr; /* Temp pointer into data array */ 428 | int i; 429 | 430 | x = (REAL (*)[2])emalloc(n * sizeof(REAL)); 431 | 432 | /* Load data into temp array 433 | * even terms end up in x[n][0] odd terms in x[n][1] 434 | */ 435 | for (i = 0, dataptr = data, xptr = (REAL *)x; i < n; i++) 436 | *xptr++ = *dataptr++; 437 | 438 | fft(x, n/2, NULL, NULL, NULL); 439 | 440 | /* Load results into output array */ 441 | 442 | /* i = 0 needs to be treated separately */ 443 | data[0] = (x[0][0] + x[0][1])/n; 444 | 445 | for (i = 1; i < n/2; i++) { 446 | double xr, xi; 447 | double arg, ti, tr; 448 | double c, s; /* Cosine and sin */ 449 | 450 | arg = 2 * PI * i / n; 451 | c = cos(arg); /* These are different c,s than used in fft */ 452 | s = sin(arg); 453 | 454 | ti = (x[i][1] + x[n/2-i][1]) / 2; 455 | tr = (x[i][0] - x[n/2-i][0]) / 2; 456 | 457 | xr = (x[i][0] + x[n/2-i][0])/2 + c * ti - s * tr; 458 | xi = (x[i][1] - x[n/2-i][1])/2 - s * ti - c * tr; 459 | 460 | xr /= n/2; 461 | xi /= n/2; 462 | 463 | data[i] = sqrt(sqr(xr) + sqr(xi)); 464 | } 465 | 466 | /* Nyquist frequency is returned in data[0] */ 467 | data[n/2] = (x[0][0] - x[0][1])/n; 468 | 469 | free(x); 470 | } 471 | 472 | 473 | 474 | 475 | -------------------------------------------------------------------------------- /win32/gui/hlp/AfxDlg.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} 2 | {\f4\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Helvetica;}{\f7\fswiss\fcharset0\fprq2{\*\panose 020b0604020202030204}Helv;}{\f36\fswiss\fcharset0\fprq0{\*\panose 00000000000000000000}MS Sans Serif;} 3 | {\f37\froman\fcharset238\fprq2 Times New Roman CE;}{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;} 4 | {\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);} 5 | {\f77\fswiss\fcharset238\fprq2 Helvetica CE;}{\f78\fswiss\fcharset204\fprq2 Helvetica Cyr;}{\f80\fswiss\fcharset161\fprq2 Helvetica Greek;}{\f81\fswiss\fcharset162\fprq2 Helvetica Tur;}{\f82\fswiss\fcharset177\fprq2 Helvetica (Hebrew);} 6 | {\f83\fswiss\fcharset178\fprq2 Helvetica (Arabic);}{\f84\fswiss\fcharset186\fprq2 Helvetica Baltic;}{\f85\fswiss\fcharset163\fprq2 Helvetica (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; 7 | \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; 8 | \red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\nowidctlpar\faauto\outlinelevel0\rin0\lin0\itap0 9 | \b\f7\fs24\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb120\nowidctlpar\faauto\outlinelevel1\rin0\lin0\itap0 \b\f7\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 10 | heading 2;}{\s3\ql \li360\ri0\nowidctlpar\faauto\outlinelevel2\rin0\lin360\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 3;}{\s4\ql \li360\ri0\nowidctlpar\faauto\outlinelevel3\rin0\lin360\itap0 11 | \fs24\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 4;}{\s5\ql \li720\ri0\nowidctlpar\faauto\outlinelevel4\rin0\lin720\itap0 \b\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 5;}{ 12 | \s6\ql \li720\ri0\nowidctlpar\faauto\outlinelevel5\rin0\lin720\itap0 \fs20\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 6;}{\s7\ql \li720\ri0\nowidctlpar\faauto\outlinelevel6\rin0\lin720\itap0 13 | \i\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 7;}{\s8\ql \li720\ri0\nowidctlpar\faauto\outlinelevel7\rin0\lin720\itap0 \i\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 8;}{ 14 | \s9\ql \li720\ri0\nowidctlpar\faauto\outlinelevel8\rin0\lin720\itap0 \i\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 heading 9;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* 15 | \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv 16 | \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\*\cs15 \additive \fs16\up6 \sbasedon10 \ssemihidden footnote reference;}{ 17 | \s16\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext16 \ssemihidden footnote text;}{\s17\ql \li720\ri0\nowidctlpar\faauto\rin0\lin720\itap0 18 | \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 Normal Indent;}{\s18\ql \fi-240\li480\ri0\sb80\nowidctlpar\tx480\faauto\rin0\lin480\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 nscba;}{ 19 | \s19\ql \fi-240\li240\ri0\sa20\nowidctlpar\faauto\rin0\lin240\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext19 j;}{\s20\ql \li480\ri0\sa20\nowidctlpar\faauto\rin0\lin480\itap0 20 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext20 ij;}{\s21\ql \li0\ri0\sb80\sa20\nowidctlpar\faauto\rin0\lin0\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext21 btb;}{ 21 | \s22\ql \fi-240\li2400\ri0\sb20\sa20\nowidctlpar\faauto\rin0\lin2400\itap0 \f4\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext22 ctcb;}{\s23\ql \fi-240\li480\ri0\sa40\nowidctlpar\tx480\faauto\rin0\lin480\itap0 22 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext23 ns;}{\s24\ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f4\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext24 TT;}{ 23 | \s25\ql \fi-240\li2400\ri0\sa20\nowidctlpar\faauto\rin0\lin2400\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext25 crtj;}{\s26\ql \fi-240\li480\ri0\nowidctlpar\tx480\faauto\rin0\lin480\itap0 24 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext26 nsca;}{\s27\ql \li0\ri0\sa20\nowidctlpar\faauto\rin0\lin0\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext27 bt;}{ 25 | \s28\ql \li240\ri0\sb120\sa40\nowidctlpar\faauto\rin0\lin240\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext28 Hf;}{\s29\ql \li240\ri0\sb120\sa40\nowidctlpar\faauto\rin0\lin240\itap0 26 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext29 Hs;}{\s30\ql \li480\ri0\sb120\sa40\nowidctlpar\faauto\rin0\lin480\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext30 RT;}{ 27 | \s31\ql \fi-2160\li2160\ri0\sb240\sa80\nowidctlpar\tx2160\faauto\rin0\lin2160\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext31 c;}{\s32\ql \li2160\ri0\sa20\nowidctlpar\faauto\rin0\lin2160\itap0 28 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext32 ct;}{\s33\ql \li240\ri0\sa20\nowidctlpar\faauto\rin0\lin240\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext33 it;}{ 29 | \s34\ql \li480\ri0\nowidctlpar\faauto\rin0\lin480\itap0 \f4\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext34 nsct;}{\s35\ql \fi-160\li400\ri0\sb80\sa40\nowidctlpar\faauto\rin0\lin400\itap0 30 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext35 nscb;}{\s36\ql \fi-2640\li2880\ri0\sb120\sa40\nowidctlpar\brdrb\brdrs\brdrw15 \brdrbtw\brdrs\brdrw15 \tx2880\faauto\rin0\lin2880\itap0 31 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext36 HC2;}{\s37\ql \fi-2640\li2880\ri0\sb120\sa20\nowidctlpar\tx2880\faauto\rin0\lin2880\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext37 C2;}{ 32 | \s38\ql \fi-240\li2400\ri0\sa20\nowidctlpar\faauto\rin0\lin2400\itap0 \f4\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext38 ctc;}{\s39\ql \li2160\ri0\sb160\nowidctlpar\faauto\rin0\lin2160\itap0 33 | \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext39 crt;}{\s40\ql \li480\ri0\sb20\sa40\nowidctlpar\faauto\rin0\lin480\itap0 \f4\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext40 or;}{ 34 | \s41\ql \fi-259\li360\ri0\sb40\sa40\nowidctlpar\tx360\faauto\rin0\lin360\itap0 \f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext41 Ln1;}{\s42\ql \li115\ri0\sb80\sa80\nowidctlpar\faauto\rin0\lin115\itap0 35 | \f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 *Intro;}{\s43\ql \li115\ri0\sb80\sa80\keepn\nowidctlpar\faauto\rin0\lin115\itap0 \b\f36\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon3 \snext42 *Title;}{ 36 | \s44\ql \fi-245\li360\ri0\sb80\nowidctlpar\faauto\rin0\lin360\itap0 \f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext44 *Jl;}{\s45\ql \li360\ri0\sb40\sa40\nowidctlpar\faauto\rin0\lin360\itap0 37 | \f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Lp1;}{\s46\ql \fi-1800\li1915\ri0\sb60\sl-240\slmult0\nowidctlpar\tx1915\faauto\rin0\lin1915\itap0 \f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext46 Tph;}{ 38 | \s47\ql \li115\ri0\sb120\sa80\nowidctlpar\faauto\rin0\lin115\itap0 \b\f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext41 Proch;}{\*\cs48 \additive \super \sbasedon10 \ssemihidden \styrsid2388245 endnote reference;}{\*\ts49\tsrowd\trbrdrt 39 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 40 | \trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 41 | \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \sbasedon11 \snext49 \styrsid10226465 Table Grid;}}{\*\rsidtbl \rsid206949\rsid1777430\rsid2299193\rsid2388245\rsid2569830\rsid2626385\rsid2718765\rsid3698896\rsid5717100\rsid6251161\rsid6708985 42 | \rsid6832146\rsid6972838\rsid7096557\rsid7170858\rsid7305175\rsid7427241\rsid7545484\rsid7752749\rsid8459186\rsid8730685\rsid9705255\rsid10114284\rsid10226465\rsid11434804\rsid11566958\rsid14630110\rsid15284074\rsid15676911\rsid15937185\rsid16324984} 43 | {\*\generator Microsoft Word 10.0.2627;}{\info{\title # <> Help Index}{\author David Broman}{\operator Emanuel Borsboom}{\creatim\yr2002\mo9\dy18\hr15\min48}{\revtim\yr2002\mo9\dy19\hr19\min18}{\version27}{\edmins76}{\nofpages2}{\nofwords626} 44 | {\nofchars3569}{\*\company Exile Interactive Inc.}{\nofcharsws4187}{\vern16437}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 45 | \jcompress\viewkind4\viewscale75\htmautsp\nolnhtadjtbl\rsidroot2388245 \fet0\sectd \linex0\endnhere\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}} 46 | {\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (} 47 | {\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain 48 | \ql \li0\ri0\sl240\slmult0\widctlpar\faauto\rin0\lin0\itap0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\cs15\fs16\up6\insrsid2388245\charrsid2388245 #{\footnote \pard\plain \ql \li0\ri0\sl240\slmult0\widctlpar\faauto\rin0\lin0\itap0 49 | \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\cs15\fs16\up6\insrsid15284074\charrsid2388245 #}{\insrsid15284074 HIDD_VOCODERGUI_DIALOG}}}{\fs16\up6\insrsid2388245 }{\b\f7\fs24\up6\insrsid7305175 Zerius Vocoder Help}{\b\f7\insrsid2388245 50 | 51 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid15284074 {\f7\insrsid15284074\charrsid15284074 52 | \par This program is used to make speech sound cool. It imposes the vocal}{\f7\insrsid15284074 }{\f7\insrsid15284074\charrsid15284074 effects of speech onto another sound. This technique }{\f7\insrsid15284074 was}{\f7\insrsid15284074\charrsid15284074 53 | been made}{\f7\insrsid15284074 }{\f7\insrsid15284074\charrsid15284074 popular by artists such as Kraftwerk and Laurie Anderson.}{\f7\insrsid10226465 54 | \par 55 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid14630110 {\f7\insrsid14630110\charrsid14630110 This channel vocoder works by a}{\f7\insrsid14630110 nalyzing the frequencies in the }{\f7\insrsid14630110\charrsid14630110 56 | modulator, splitting them into bands, finding the magnitude of each}{\f7\insrsid14630110 }{\f7\insrsid14630110\charrsid14630110 band, and then amplifying the corresponding bands of the carrier by}{\f7\insrsid14630110 }{ 57 | \f7\insrsid14630110\charrsid14630110 that magnitude.}{\f7\insrsid14630110 58 | \par 59 | \par }{\f7\insrsid10226465 This table describes the controls on the form: 60 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid15284074 {\f7\insrsid10226465 61 | \par }\trowd \irow0\irowband0\ts49\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 62 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 63 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\pard\plain 64 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid10226465\charrsid14630110 Modulator File\cell }{\f7\insrsid10226465 Click }{\f7\insrsid7096557 [}{ 65 | \f7\insrsid10226465 Browse}{\f7\insrsid7752749 ]}{\f7\insrsid10226465 to select a sound file of your voice speaking. It works best if you speak very clearly and more slowly than usual. 66 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid10226465 \trowd \irow0\irowband0\ts49\trgaph108\trleft-108\trbrdrt 67 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 68 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 69 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 70 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid10226465\charrsid14630110 Carrier File\cell }{\f7\insrsid10226465 Click }{\f7\insrsid7096557 [}{\f7\insrsid10226465 71 | Browse}{\f7\insrsid7096557 ]}{\f7\insrsid10226465 to select a sound file of the sound that will be \'93saying\'94 what you said in the modulator. The carrier should be 72 | some kind of frequency-rich waveform. White noise works well. Periodic white noise (i.e. a very short sample of white noise) gives a robot-like sound. Another one that sounds good is a synthesized string-chord. This waveform will automatically be loop 73 | ed. 74 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid10226465 \trowd \irow1\irowband1\ts49\trgaph108\trleft-108\trbrdrt 75 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 76 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 77 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 78 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid10226465\charrsid14630110 Output File\cell }{\f7\insrsid10226465 Click }{\f7\insrsid7096557 [}{\f7\insrsid10226465 79 | Browse}{\f7\insrsid7096557 ]}{\f7\insrsid10226465 to select the file that the results of vocoding will be written to. This file does not need to exist, it will be created. 80 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid10226465 \trowd \irow2\irowband2\ts49\trgaph108\trleft-108\trbrdrt 81 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 82 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 83 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 84 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid10226465\charrsid14630110 Window Length\cell }{\f7\insrsid10226465 85 | Move the slider to choose how long a processing window is, in seconds. The inp 86 | ut audio is split into windows of this length and each window is processed on its own. The best window length is one that will give you around two windows per spoken syllable in the modulator. }{\f7\insrsid6972838 87 | If the window length is too large, it will be hard to understand the results. If it is too small, the result won\rquote t sound very good.}{\f7\insrsid10226465 88 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid10226465 \trowd \irow3\irowband3\ts49\trgaph108\trleft-108\trbrdrt 89 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 90 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 91 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 92 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid6972838\charrsid14630110 Window Overlap\cell }\pard 93 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid6972838\yts49 {\f7\insrsid6972838 Move the slider to choose how much the processing windows should overlap, in per cent of window length. }{\f7\insrsid6972838\charrsid15284074 94 | Since the sound is processed in d}{\f7\insrsid6972838 iscrete windows, the output can }{\f7\insrsid6972838\charrsid15284074 change very abruptly where it goes from one }{\f7\insrsid6972838 window}{\f7\insrsid6972838\charrsid15284074 to the next. This}{ 95 | \f7\insrsid6972838 }{\f7\insrsid6972838\charrsid15284074 is audible as a click. To remedy this, the program can have the}{\f7\insrsid6251161 }{\f7\insrsid6972838\charrsid15284074 windows overlap and cross-fade between them. }{\f7\insrsid6972838 96 | This parameter controls how much overlap there is. 97 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid6972838 \trowd \irow4\irowband4\ts49\trgaph108\trleft-108\trbrdrt 98 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 99 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 100 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 101 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid14630110\charrsid14630110 Band Count\cell }\pard 102 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid14630110\yts49 {\f7\insrsid14630110 Move the slider to choose with how many frequency bands the carrier will be modulated. }{\f7\insrsid14630110\charrsid14630110 103 | In order to excite the frequencies in the carrier, the frequencies of}{\f7\insrsid14630110 }{\f7\insrsid14630110\charrsid14630110 the modulator are split into bands. The larger your band-count, the}{\f7\insrsid14630110 }{ 104 | \f7\insrsid14630110\charrsid14630110 more the output will sound like the modulator. Somewhere}{\f7\insrsid14630110 }{\f7\insrsid14630110\charrsid14630110 between 8 and 64 usually sounds best.}{\f7\insrsid14630110 105 | \par }{\f7\insrsid6251161\charrsid14630110 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid14630110 \trowd \irow5\irowband5 106 | \ts49\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 107 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 108 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 109 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7427241 Output Volume}{\b\f7\insrsid7427241\charrsid14630110 \cell }\pard 110 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 {\f7\insrsid7427241 Move the slider to choose how much the output will be amplified, in per cent. }{\f7\insrsid7427241\charrsid7427241 111 | If you find that the output is clipped (distorted) or is too quiet,}{\f7\insrsid7427241 }{\f7\insrsid7427241\charrsid7427241 you can }{\f7\insrsid7545484 change}{\f7\insrsid7427241\charrsid7427241 the volume. Anything less than }{\f7\insrsid7545484 112 | zero}{\f7\insrsid7427241\charrsid7427241 will}{\f7\insrsid7427241 }{\f7\insrsid7427241\charrsid7427241 reduce the volum}{\f7\insrsid7545484 e, and anything greater than zero}{\f7\insrsid7427241\charrsid7427241 will increase it.}{\f7\insrsid7427241 113 | 114 | \par }{\f7\insrsid6251161\charrsid7427241 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7427241 \trowd \irow6\irowband6\ts49\trgaph108\trleft-108 115 | \trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 116 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 117 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 118 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid2718765 Normalize\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 { 119 | \f7\insrsid2718765 When checked, the output is normalized with respect to the carrier. Turning it off will result in less clear results. 120 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid2718765 \trowd \irow7\irowband7\ts49\trgaph108\trleft-108\trbrdrt 121 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 122 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 123 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 124 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid2718765 Restore Defaults\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 { 125 | \f7\insrsid2718765 Will reset all parameters to their original values. 126 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid2718765 \trowd \irow8\irowband8\ts49\trgaph108\trleft-108\trbrdrt 127 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 128 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 129 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 130 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7305175 Vocode Progress\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 { 131 | \f7\insrsid7305175 Displays how complete the vocoding is, if it is in progress. 132 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7305175 \trowd \irow9\irowband9\ts49\trgaph108\trleft-108\trbrdrt 133 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 134 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 135 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 136 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7305175 Stop\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 {\f7\insrsid7305175 137 | Stops the vocoding that is in progress. 138 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7305175 \trowd \irow10\irowband10\ts49\trgaph108\trleft-108\trbrdrt 139 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 140 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 141 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 142 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7305175 Vocode\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 {\f7\insrsid7305175 143 | Starts vocoding. 144 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7305175 \trowd \irow11\irowband11\ts49\trgaph108\trleft-108\trbrdrt 145 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 146 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 147 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 148 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7305175 Vocode and Listen\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 { 149 | \f7\insrsid7305175 Starts vocoding and will play the result when complete. 150 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7305175 \trowd \irow12\irowband12\ts49\trgaph108\trleft-108\trbrdrt 151 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 152 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 153 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 154 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7305175 Help\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 {\f7\insrsid7305175 155 | Displays this help. 156 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7305175 \trowd \irow13\irowband13\ts49\trgaph108\trleft-108\trbrdrt 157 | \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 158 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 159 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard\plain 160 | \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid15284074\yts49 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f7\insrsid7305175 Close\cell }\pard \ql \li0\ri0\widctlpar\intbl\faauto\rin0\lin0\pararsid7427241\yts49 {\f7\insrsid7305175 161 | Closes the vocoder. 162 | \par }{\f7\insrsid6251161 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f7\insrsid7305175 \trowd \irow14\irowband14\lastrow \ts49\trgaph108\trleft-108 163 | \trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 164 | \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr 165 | \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1998\clshdrawnil \cellx1890\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth6858\clshdrawnil \cellx8748\row }\pard 166 | \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid15284074 {\f7\insrsid2388245 167 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid11566958 {\b\f7\fs24\insrsid11566958 168 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid1777430 {\b\f7\fs24\insrsid8459186 Contact}{\b\f7\fs24\insrsid1777430 169 | \par }{\f7\insrsid1777430\charrsid1777430 170 | \par Please see the web site at 171 | \par 172 | \par }{\f7\insrsid1777430 http://www.nuel.ca/Vocoder}{\f7\insrsid1777430\charrsid1777430 173 | \par 174 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid2299193 {\f7\insrsid2299193\charrsid2299193 for the latest information. The}{\f7\insrsid2299193 latest version will always be }{\f7\insrsid2299193\charrsid2299193 available from there.}{ 175 | \f7\insrsid1777430 176 | \par }{\f7\insrsid11434804\charrsid2299193 177 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid1777430 {\f7\insrsid1777430\charrsid1777430 If you have any problems, don't hesitate to contact me. I am always}{\f7\insrsid1777430 }{\f7\insrsid1777430\charrsid1777430 178 | pleased to help. Also, drop me a line if like this program, or have}{\f7\insrsid1777430 }{\f7\insrsid1777430\charrsid1777430 any suggestions. I am especially eager to hear your creations. If}{\f7\insrsid1777430 }{\f7\insrsid1777430\charrsid1777430 179 | you release some music utilizing the vocoder, please tell me so I can 180 | \par try to find it (freebies are always a}{\f7\insrsid1777430 ccepted)! My e-mail address is em@nuel.ca}{\f7\insrsid1777430\charrsid1777430 181 | \par 182 | \par Chanks to Cody Jones for porting to MacOS. 183 | \par 184 | \par I appreciate any bug reports. 185 | \par 186 | \par }{\b\f7\fs24\insrsid11566958\charrsid11566958 Copyright 187 | \par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0\pararsid11566958 {\f7\insrsid11566958\charrsid11566958 188 | \par The Zerius Vo}{\f7\insrsid8730685 coder is Copyright (C) 1996-1999}{\f7\insrsid11566958 , 2002}{\f7\insrsid11566958\charrsid11566958 Emanuel Borsboom. 189 | \par 190 | \par The FFT code (contained in fftn.c,}{\f7\insrsid6708985 fftaux.c, fft.h, and spt.h) is }{\f7\insrsid11566958\charrsid11566958 Copyright (C) 1993 Steven Trainoff. 191 | \par 192 | \par The code for converting to and from}{\f7\insrsid6708985 IEEE floating-point numbers is }{\f7\insrsid11566958\charrsid11566958 Copyright (C) 1988-1991 Apple Computer Inc. 193 | \par 194 | \par You are free to do whatever you like w}{\f7\insrsid6708985 ith the vocoder, as long as the }{\f7\insrsid11566958\charrsid11566958 copyright notice stays intact and you note any changes. 195 | \par 196 | \par There is no warranty. 197 | \par 198 | \par }} 199 | --------------------------------------------------------------------------------