// ============================================================================= // Extended Documentation - PCMCONV // Authors: Kevin Alexander // Last updated: 2023-11-16 // ============================================================================= PCMCONV (PCMCONV.X) is a WAV->PCM (ADPCM) converter. Convert your samples to ADPCM, then use mkpdx to package them into a PDX file. // ----------------------------------------------------------------------------- // Quick Guide / Reference // ----------------------------------------------------------------------------- Basic usage: > run68.exe [option(s)] PCMCONV.X {input}.wav {output}.pcm Translation / Quick Reference of Options -------------------------------------------------------------------------------- Option | Translation | Default Value -------------------------------------------------------------------------------- -ir | Input frequency. | 44100 -or | Output frequency. | 15625 -if | Input filetype. | 0 -of | Output filetype. | 8 -oh | Output file mode. | 1 -ob | Writing frequency. | Proper Val. -is | Input skip size. | 0 -st | Conversion start sample position. | 0 -sl | Conversion sample length. | 0 -lv/ | Volume level adjustment. | 1/1 -ld | Volume level adjustment. | 0 -vu | Pitch-raising vocoder processing. | N/A -vd | Pitch-lowering vocoder processing. | N/A -vn | Disable vocoder processing. | N/A -v | Show details. | N/A -q | Do not show progress. | N/A -sc | Leading silence cut. | 0 -ec | Trailing silence cut. | 0 -?,-h | Display detailed help. | N/A -c | Stereo conversion type. | 0 -z | ADPCM termination processing. | 0 -------------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // English Translation of Detailed Help Output // ----------------------------------------------------------------------------- -ir Input frequency (def. -ir44100) 1~ Frequency (hz) -or Output frequency (def. -or15625) 0 Same as input frequency 1~ Frequency (hz) -if Input filetype (def. -if0) 0 16bit PCM stereo LowHigh L+R(WAV) 1 16bit PCM stereo HighLow L+R(AIFF) 2 16bit PCM monaural LowHigh(WAV) 3 16bit PCM monaural HighLow(AIFF) 4 8bit PCM stereo unsigned L+R(WAV) 5 8bit PCM stereo signed L+R(AIFF) 6 8bit PCM monaural unsigned(WAV) 7 8bit PCM monaural signed(AIFF) 8 4bit ADPCM monaural 1st Low nibble(X68) 9 4bit ADPCM monaural 1st High nibble(PCE) 10 8bit PCM monaural SUN audio u-law(SUNau) 11 8bit PCM monaural FM-Towns sound(TOWNS) 12 4bit ADPCM monaural OPNA adpcm(86) -of Output filetype (def. -of8) 0 16bit PCM stereo LowHigh L+R(WAV) 1 16bit PCM stereo HighLow L+R(AIFF) 2 16bit PCM monaural LowHigh(WAV) 3 16bit PCM monaural HighLow(AIFF) 4 8bit PCM stereo unsigned L+R(WAV) 5 8bit PCM stereo signed L+R(AIFF) 6 8bit PCM monaural unsigned(WAV) 7 8bit PCM monaural signed(AIFF) 8 4bit ADPCM monaural 1st Low nibble(X68) 9 4bit ADPCM monaural 1st High nibble(PCE) 10 8bit PCM monaural SUN audio u-law(SUNau) 11 8bit PCM monaural FM-Towns sound(TOWNS) 12 4bit ADPCM monaural OPNA adpcm(86) -oh Output file mode (def. -oh1) 0 Data only output mode 1 Header + data output mode -ob Writing frequency (def. Appropriate value) 0 Automatically-calculated appropriate value 1~ Frequency -is Input skip size (def. -is0) 1~ Number of bytes to skip -st Conversion start sample position (def. -st0) 0 Start conversion from the beginning 1~ Start conversion from specified position -sl Conversion sample length (def. -sl0) 0 Convert to the end 1~ Convert specified number of samples -lv/ Volume level adjustment (def. -lv1/1) Level expressed as / (double, see notes) -ld Volume level adjustment (def. -ld0) -88~88 Level in decibels (dB) -vu Pitch-raising vocoder processing (def. processing disabled) 25~48 Raises the pitch to /24 48 is one octave up -vd Pitch-lowering vocoder processing (def. processing disabled) 24~47 Lowers the pitch to /48 24 is one octave down -vn Disable vocoder processing (def. processing disabled) -v Show details (def. disabled) -q Do not show progress (def. disabled) -sc Leading silence cut (def. -sc0) -88~-1 Cut sound below dB 1~ Cut sound below amplitude 0 Do not cut sound -ec Trailing silence cut (def. -ec0) -88~-1 Cut sound below dB 1~ Cut sound below amplitude 0 Do not cut sound -?,-h Display detailed help The following switch works only when input is stereo and output is specified as monoaural: -c Stereo conversion type(def. -c0) 0 Mix left and right 1 Output only left 2 Output only right 3 Subtract left and right The following switch works only when output is specified as 4bit ADPCM: -z ADPCM termination processing(def. -z0) 0 Preserve ADPCM 1 Terminate ADPCM // ----------------------------------------------------------------------------- // Notes and Findings Regarding Each Option // ----------------------------------------------------------------------------- This research was based on a series of brief tests. If I'm incorrect about anything, or you have more information, please contact me, and I'll update this guide. - -ir (Input frequency) - Honestly doesn't seem to do much of anything. - -or (Output frequency) - Effects the resulting pitch/speed of the sample. Higher frequency yields slower, lower-pitched sound. I thought it would be the other way around, but I guess I don't know much about this stuff. - -if (Input filetype) - Didn't bother playing with this. Probably best to match against your filetype. -of (Output filetype) - If you're doing X68k stuff you can safely ignore this. If you're doing anything else, like PC-Engine, this is probably important. -oh (Output file mode) - Significance unknown. -ob (Writing frequency) - Significance unknown. I think the default is actually just 0. -is (Input skip size) - Appears to only read data starting at the specified position. So if you do -is512, it'll skip the first 512 bytes of data. -st (Conversion start sample position) - Same as -is, but measured in audio samples. -sl (Conversion sample length) - How long the output sample should be, basically. Starts from the position specified via -st and -is. Useful for truncating samples with long, trailing silence (space saver). -lv/ (Volume level adjustment) - Fractional value. 2/1 is twice the volume; 1/2 is half the volume. By double, they mean the datatype, not that the value is doubled. -ld (Volume level adjustment) - Same as -lv but in dB. Every 10 dB or so should double/halve the volume (approximate, not exact). If you need exact, use -lv. -ld should be better for coarser, less technical adjustments. More like adjusting a fader, y'know? -vu (Pitch-raising vocoder processing) - Fractional value. Raises the pitch of the sample without affecting the speed. -vd (Pitch-lowering vocoder processing) - Fractional value. Lowers the pitch of the sample without affecting the speed. -vn (Disable vocoder processing) - Adding this flag appears to disable any vocoder processing you've specified via the -vu and -vd options. -v (Show details (verbose)) - Shows additional details in the console, specifically the input/output sample rate, filetype, start position and target sample length. -q (Do not show progress (quiet)) - Doesn't show conversion progress or any details at all. -sc (Leading silence cut) - Cuts silence starting at beginning of sample. Use a negative value to cut silence below a certain dB level (-sc-44 would mute everything under -44 db). Use a positive value to cut silence below a certain amplitude (-sc44 would mute everything under amplitude of 44). -ec (Trailing silence cut) - Logically should work the same as -sc, but in reverse. However, I can't seem to get it to work. It's like it's detecting something at the end of my files that isn't there, and therefore is ignoring the preceding silence. I tried ensuring that my inputs/outputs were correct. Please contact me if you have any insight. -?,-h (Display help (detailed)) - It's what's translated up there. -c (Stereo conversion type) - This is just how stereo samples get converted into monoaural, unless you're outputting stereo samples. Does not apply if input is mono. -z (ADPCM termination processing) - Significance unknown. File size was identical with and without. // ============================================================================= https://www.studioaquacube.com