c64tapwav
3 years agoMerge branch 'master' of /srv/git.sesse.net/www/c64tapwav
Steinar H. Gunderson [Thu, 17 Mar 2016 23:36:28 +0000 (00:36 +0100)]
Merge branch 'master' of /srv/git.sesse.net/www/c64tapwav

4 years agoAdd missing long option --train.
Steinar H. Gunderson [Sun, 15 Mar 2015 22:45:34 +0000 (23:45 +0100)]
Add missing long option --train.

4 years agoCompile in native by default, since AVX helps so much.
Steinar H. Gunderson [Sun, 15 Mar 2015 22:45:01 +0000 (23:45 +0100)]
Compile in native by default, since AVX helps so much.

4 years agoWhen training, use much faster interpolation.
Steinar H. Gunderson [Sun, 15 Mar 2015 22:39:10 +0000 (23:39 +0100)]
When training, use much faster interpolation.

4 years agoSupport AVX to speed up the FIR filters.
Steinar H. Gunderson [Sun, 15 Mar 2015 22:34:34 +0000 (23:34 +0100)]
Support AVX to speed up the FIR filters.

4 years agoMore output to stderr.
Steinar H. Gunderson [Sat, 14 Mar 2015 17:23:44 +0000 (18:23 +0100)]
More output to stderr.

4 years agoTrain hysteresis limits as part of SPSA.
Steinar H. Gunderson [Sat, 14 Mar 2015 17:23:03 +0000 (18:23 +0100)]
Train hysteresis limits as part of SPSA.

4 years agoSpecify levels in terms of 0..1 and not 0..32768.
Steinar H. Gunderson [Sat, 14 Mar 2015 17:11:15 +0000 (18:11 +0100)]
Specify levels in terms of 0..1 and not 0..32768.

4 years agoMake the compressor filter frequency configurable, and up the default to a more aggre...
Steinar H. Gunderson [Sat, 14 Mar 2015 13:49:01 +0000 (14:49 +0100)]
Make the compressor filter frequency configurable, and up the default to a more aggressive 200 Hz.

4 years agoAdd missing --min-level long option.
Steinar H. Gunderson [Sat, 14 Mar 2015 13:45:37 +0000 (14:45 +0100)]
Add missing --min-level long option.

4 years agoChange hysteresis so that it is a bit more like a traditional Schmitt trigger; the...
Steinar H. Gunderson [Sat, 14 Mar 2015 13:45:27 +0000 (14:45 +0100)]
Change hysteresis so that it is a bit more like a traditional Schmitt trigger; the old system was more or less equivalent to locking lower_limit at 0.

4 years agoOutput training messages to stderr instead of stdout.
Steinar H. Gunderson [Sat, 14 Mar 2015 01:03:19 +0000 (02:03 +0100)]
Output training messages to stderr instead of stdout.

4 years agoMake the RC filter single-pole instead of biquad.
Steinar H. Gunderson [Sat, 14 Mar 2015 01:02:55 +0000 (02:02 +0100)]
Make the RC filter single-pole instead of biquad.

4 years agoFix an off-by-two in the filter cutoff.
Steinar H. Gunderson [Fri, 13 Mar 2015 21:47:17 +0000 (22:47 +0100)]
Fix an off-by-two in the filter cutoff.

4 years agoAdd a missing .o to OBJS.
Steinar H. Gunderson [Thu, 12 Mar 2015 23:36:23 +0000 (00:36 +0100)]
Add a missing .o to OBJS.

4 years agoYet more fixes for old ffmpeg.
Steinar H. Gunderson [Thu, 12 Mar 2015 23:09:08 +0000 (00:09 +0100)]
Yet more fixes for old ffmpeg.

4 years agoYet more fixes for old ffmpeg.
Steinar H. Gunderson [Thu, 12 Mar 2015 23:07:49 +0000 (00:07 +0100)]
Yet more fixes for old ffmpeg.

4 years agoMore compatibility fixes for older ffmpeg.
Steinar H. Gunderson [Thu, 12 Mar 2015 22:56:59 +0000 (23:56 +0100)]
More compatibility fixes for older ffmpeg.

4 years agoAdd some missing #includes.
Steinar H. Gunderson [Thu, 12 Mar 2015 22:55:15 +0000 (23:55 +0100)]
Add some missing #includes.

4 years agoAdd a license.
Steinar H. Gunderson [Thu, 12 Mar 2015 20:58:55 +0000 (21:58 +0100)]
Add a license.

4 years agoAdd an RC highpass filter, which seemingly does a good job of emulating the one in...
Steinar H. Gunderson [Thu, 12 Mar 2015 19:04:27 +0000 (20:04 +0100)]
Add an RC highpass filter, which seemingly does a good job of emulating the one in the C64 player (in particular, the phase seems to matter).

4 years agoSplit the filter code into a class.
Steinar H. Gunderson [Thu, 12 Mar 2015 19:00:28 +0000 (20:00 +0100)]
Split the filter code into a class.

4 years agoWhen training, K-means to find the more-or-less ideal buckets. Not actually used...
Steinar H. Gunderson [Thu, 12 Mar 2015 00:59:50 +0000 (01:59 +0100)]
When training, K-means to find the more-or-less ideal buckets. Not actually used for anything but telling the user.

4 years agoRemove old comment.
Steinar H. Gunderson [Thu, 12 Mar 2015 00:42:46 +0000 (01:42 +0100)]
Remove old comment.

4 years agoMake leveler minimum level configurable, since it is connected to hysteresis limit.
Steinar H. Gunderson [Wed, 11 Mar 2015 23:54:30 +0000 (00:54 +0100)]
Make leveler minimum level configurable, since it is connected to hysteresis limit.

4 years agoFix long option for -A (--output-leveled).
Steinar H. Gunderson [Wed, 11 Mar 2015 23:49:55 +0000 (00:49 +0100)]
Fix long option for -A (--output-leveled).

4 years agoAdd SPSA-based automatic filter training.
Steinar H. Gunderson [Wed, 11 Mar 2015 23:48:23 +0000 (00:48 +0100)]
Add SPSA-based automatic filter training.

4 years agoIntegrate the leveler into decode.
Steinar H. Gunderson [Wed, 11 Mar 2015 23:36:19 +0000 (00:36 +0100)]
Integrate the leveler into decode.

4 years agoFactor out cycles.plot writing.
Steinar H. Gunderson [Wed, 11 Mar 2015 23:16:40 +0000 (00:16 +0100)]
Factor out cycles.plot writing.

4 years agoAdd support for decoding only parts of the sample.
Steinar H. Gunderson [Wed, 11 Mar 2015 23:06:31 +0000 (00:06 +0100)]
Add support for decoding only parts of the sample.

4 years agoAdd a --quiet option.
Steinar H. Gunderson [Wed, 11 Mar 2015 22:31:31 +0000 (23:31 +0100)]
Add a --quiet option.

4 years agoMove detect_pulses into its own function.
Steinar H. Gunderson [Wed, 11 Mar 2015 22:26:08 +0000 (23:26 +0100)]
Move detect_pulses into its own function.

4 years agoAdd support for filtering the waveform before detection.
Steinar H. Gunderson [Wed, 11 Mar 2015 22:20:06 +0000 (23:20 +0100)]
Add support for filtering the waveform before detection.

4 years agoAdd some quasi-useful options.
Steinar H. Gunderson [Wed, 11 Mar 2015 21:58:21 +0000 (22:58 +0100)]
Add some quasi-useful options.

4 years agoFix HYSTERESIS_LIMIT being on the wrong scale.
Steinar H. Gunderson [Wed, 11 Mar 2015 21:31:16 +0000 (22:31 +0100)]
Fix HYSTERESIS_LIMIT being on the wrong scale.

4 years agoFactor TAP writing out into its own file.
Steinar H. Gunderson [Wed, 11 Mar 2015 20:52:35 +0000 (21:52 +0100)]
Factor TAP writing out into its own file.

4 years agoUse float samples internally.
Steinar H. Gunderson [Mon, 9 Mar 2015 23:18:56 +0000 (00:18 +0100)]
Use float samples internally.

4 years agoUse -fno-math-errno instead of -ffast-math, as the latter might give us less precise...
Steinar H. Gunderson [Fri, 6 Mar 2015 16:40:49 +0000 (17:40 +0100)]
Use -fno-math-errno instead of -ffast-math, as the latter might give us less precise sin/cos for filters.

4 years agoAdd some heuristics to deal with shorter initial sync periods.
Steinar H. Gunderson [Thu, 5 Mar 2015 20:01:53 +0000 (21:01 +0100)]
Add some heuristics to deal with shorter initial sync periods.

4 years agoSupport any sample rate, not only 44100 Hz.
Steinar H. Gunderson [Thu, 5 Mar 2015 18:38:08 +0000 (19:38 +0100)]
Support any sample rate, not only 44100 Hz.

4 years agoUse ffmpeg to read audio files, instead of assuming raw format.
Steinar H. Gunderson [Thu, 5 Mar 2015 18:28:48 +0000 (19:28 +0100)]
Use ffmpeg to read audio files, instead of assuming raw format.

4 years agoFix some compatibility issues in level.cpp, and possibly also a tiny accuracy improve...
Steinar H. Gunderson [Thu, 5 Mar 2015 18:27:52 +0000 (19:27 +0100)]
Fix some compatibility issues in level.cpp, and possibly also a tiny accuracy improvement.

4 years agoStore only the right-hand side of the Lanczos table, saving a branch.
Steinar H. Gunderson [Sun, 1 Mar 2015 15:19:57 +0000 (16:19 +0100)]
Store only the right-hand side of the Lanczos table, saving a branch.

6 years agoA ton of tweaks to the cleaner (too many to mention). Should work better in theory...
Steinar H. Gunderson [Fri, 10 May 2013 22:56:21 +0000 (00:56 +0200)]
A ton of tweaks to the cleaner (too many to mention). Should work better in theory; maybe does not in practice.

6 years agoAdd a Viterbi cleaner.
Steinar H. Gunderson [Wed, 8 May 2013 22:52:32 +0000 (00:52 +0200)]
Add a Viterbi cleaner.

6 years agoMove the tap_hdr definition into a separate header file.
Steinar H. Gunderson [Tue, 7 May 2013 20:47:18 +0000 (22:47 +0200)]
Move the tap_hdr definition into a separate header file.

6 years agoAdd a simple leveller/compressor.
Steinar H. Gunderson [Sun, 5 May 2013 23:24:55 +0000 (01:24 +0200)]
Add a simple leveller/compressor.

6 years agoMake the syncer slightly less memory-hungry.
Steinar H. Gunderson [Sun, 5 May 2013 15:46:38 +0000 (17:46 +0200)]
Make the syncer slightly less memory-hungry.

6 years agoPreallocate aligned_pcm and mono_pcm.
Steinar H. Gunderson [Sun, 5 May 2013 15:40:15 +0000 (17:40 +0200)]
Preallocate aligned_pcm and mono_pcm.

6 years agoRemove an unused #include.
Steinar H. Gunderson [Sat, 4 May 2013 23:58:01 +0000 (01:58 +0200)]
Remove an unused #include.

6 years agoFix interpolation (it was broken after inversion).
Steinar H. Gunderson [Sat, 4 May 2013 20:58:52 +0000 (22:58 +0200)]
Fix interpolation (it was broken after inversion).

6 years agoAdd table-based lookups for the Lanczos interpolation, and use that in the syncer.
Steinar H. Gunderson [Sat, 4 May 2013 20:44:22 +0000 (22:44 +0200)]
Add table-based lookups for the Lanczos interpolation, and use that in the syncer.

6 years agoMake a debug.raw with detected pulses.
Steinar H. Gunderson [Sat, 4 May 2013 20:16:58 +0000 (22:16 +0200)]
Make a debug.raw with detected pulses.

6 years agoTrigger on down-flanks instead of up-flanks.
Steinar H. Gunderson [Sat, 4 May 2013 19:53:16 +0000 (21:53 +0200)]
Trigger on down-flanks instead of up-flanks.

6 years agoSmall display fix.
Steinar H. Gunderson [Sat, 4 May 2013 19:00:55 +0000 (21:00 +0200)]
Small display fix.

6 years agoClean up interpolation a bit.
Steinar H. Gunderson [Sat, 4 May 2013 18:59:21 +0000 (20:59 +0200)]
Clean up interpolation a bit.

6 years agoFix sync pulse reference length.
Steinar H. Gunderson [Sat, 4 May 2013 18:40:22 +0000 (20:40 +0200)]
Fix sync pulse reference length.

6 years agoAdd a program to sync up two stereo channels.
Steinar H. Gunderson [Sat, 4 May 2013 17:03:12 +0000 (19:03 +0200)]
Add a program to sync up two stereo channels.

6 years agoMuch better hysteresis code.
Steinar H. Gunderson [Sat, 4 May 2013 13:50:31 +0000 (15:50 +0200)]
Much better hysteresis code.

6 years agoOutput a cycle plot, for debugging of errors.
Steinar H. Gunderson [Sat, 4 May 2013 12:37:10 +0000 (14:37 +0200)]
Output a cycle plot, for debugging of errors.

6 years agoFix some warnings.
Steinar H. Gunderson [Fri, 3 May 2013 21:34:51 +0000 (23:34 +0200)]
Fix some warnings.

6 years agoMakefile tweaks.
Steinar H. Gunderson [Fri, 3 May 2013 21:34:10 +0000 (23:34 +0200)]
Makefile tweaks.

6 years agoAdd a Makefile rule for decode.
Steinar H. Gunderson [Fri, 3 May 2013 21:33:38 +0000 (23:33 +0200)]
Add a Makefile rule for decode.

6 years agoSplit the synth part into a library, with a Makefile.
Steinar H. Gunderson [Fri, 3 May 2013 21:33:06 +0000 (23:33 +0200)]
Split the synth part into a library, with a Makefile.

6 years agoSwitch to linear interpolation by default.
Steinar H. Gunderson [Fri, 3 May 2013 19:15:03 +0000 (21:15 +0200)]
Switch to linear interpolation by default.

6 years agoRename decode.c to decode.cpp.
Steinar H. Gunderson [Fri, 3 May 2013 19:14:32 +0000 (21:14 +0200)]
Rename decode.c to decode.cpp.

6 years agoSome parametrization.
Steinar H. Gunderson [Fri, 3 May 2013 19:14:19 +0000 (21:14 +0200)]
Some parametrization.

6 years agoOutput TAP files, and do some more tests.
Steinar H. Gunderson [Thu, 2 May 2013 21:29:04 +0000 (23:29 +0200)]
Output TAP files, and do some more tests.

6 years agoAdd calibration support.
Steinar H. Gunderson [Thu, 2 May 2013 18:46:37 +0000 (20:46 +0200)]
Add calibration support.

6 years agoSupport arbitrary lengths when decoding.
Steinar H. Gunderson [Thu, 2 May 2013 18:20:36 +0000 (20:20 +0200)]
Support arbitrary lengths when decoding.

6 years agoAdd some hysteresis to get rid of the worst noise.
Steinar H. Gunderson [Thu, 2 May 2013 18:13:52 +0000 (20:13 +0200)]
Add some hysteresis to get rid of the worst noise.

7 years agoAdd a high-pass filter to get rid of the DC offset.
Steinar H. Gunderson [Mon, 17 Sep 2012 18:59:25 +0000 (20:59 +0200)]
Add a high-pass filter to get rid of the DC offset.

7 years agoSwitch the default LPF to 22 kHz.
Steinar H. Gunderson [Mon, 17 Sep 2012 18:59:00 +0000 (20:59 +0200)]
Switch the default LPF to 22 kHz.

7 years agoInitial checkin.
Steinar H. Gunderson [Mon, 17 Sep 2012 16:52:52 +0000 (18:52 +0200)]
Initial checkin.