Project

wav2cas

0.0
No commit activity in last 3 years
No release in over 3 years
Converts TRS-80 (Model I/III) computer audio records in WAV format to CAS file for use by TRS-80 emulators.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.1
 Project Readme

wav2cas

This utility can be used to convert audio records (in WAV format) saved with TRS-80 (Model I/III) to a CAS file for use by TRS-80 emulators.

It was created as a result of an attempt to understand what format of data stored on some old tapes found on my bookshelf :-)

It's HIGHLY experimental, so if you got here, please use other well-known utility for conversion: http://knut.one/wav2cas.htm

If you can't restore records in mentioned utility (as I did) so you can try this one. It contains some options which allow you to restore data even without lead tone.

It accepts WAV files with any sample rate (11025 / 22050 / 44100) and format (float / 8-bit / 16-bit / stereo / mono), uses auto-detection mechanism to get clock frequency which depends on baud rate (model I level2 500baud, level1 250baud or model III highspeed 1500 baud).

Installation

You should have Ruby >= 2.3.0 prior installed. Then type command to install wav2cas:

gem install wav2cas

Usage

Usage: wav2cas [options] <input.wav>
    -o, --output FILENAME            Output file
    -s, --skip N                     Skip N seconds from the beginning of file
    -l, --no-lead-tone               Audio doesn't start from lead tone (use to recover corrupted records)
    -a, --auto-align                 Try to auto align (could fix some records)
    -t, --threshold THRESHOLD        Peak detection threshold (5-15). Default: 10

Examples

All samples except of sample4 and sample6 are processed successfully without additional options.

wav2cas samples/graph_it.wav
wav2cas samples/sample1.wav
wav2cas samples/sample2.wav
wav2cas samples/sample3.wav
wav2cas -a -t 20 samples/sample4.wav
wav2cas samples/sample5.wav
wav2cas -a -t 20 samples/sample6.wav

Contributing

If you have audio records which can not be recognized with this utility, send it to anton.argirov@gmail.com, I will try to improve.

Bug reports and pull requests are welcome on GitHub at https://github.com/anteo/wav2cas.