Wykres commitów

192 Commity (master)

Autor SHA1 Wiadomość Data
nyanpasu64 ca01b8c422 Always draw vertical midline between <0 and >0 samples (#243)
- Add comments on Wave.get_around() even/odd conventions
2019-03-26 16:17:08 -07:00
nyanpasu64 030e769413 Mark Channel.render_samp, *_stride as private 2019-03-25 04:37:17 -07:00
nyanpasu64 1ce1e77fb7 Add Channel.get_render_around(trigger_sample) 2019-03-25 04:37:17 -07:00
nyanpasu64 0ed61ff7a4 Add custom stereo downmixing and GUI 2019-03-25 02:16:55 -07:00
nyanpasu64 407454a126 Add slope-detection triggering (#228) 2019-03-14 05:26:41 -07:00
nyanpasu64 e2144f3689 Fix trigger bugs, fix post trigger width, add tests (#231)
- Fix CorrelationTrigger off-by-one on odd buffer widths
- Fix bug where `post_radius` was *2 to become diameter, then treated as radius
- Fix errors in ZeroCrossingTrigger
- Cleanup test_trigger.py
2019-03-13 02:07:45 -07:00
nyanpasu64 adaa629828 Rename MainTriggerConfig.post to post_trigger (#223) 2019-03-08 23:58:59 -08:00
nyanpasu64 c3bebf6f14 Add basic test to ensure initializing GUI doesn't crash (#220) 2019-03-08 05:43:50 -08:00
nyanpasu64 3ff37355e3 Rename files to model/view/etc. 2019-03-08 05:24:25 -08:00
nyanpasu64 37a289f38d Improve post triggers so they're useful, add separate edge_direction (#214) 2019-03-06 21:39:17 -08:00
nyanpasu64 1d6b309017 Make DumpableAttrs's subclasses inherit/merge always_dump (#216) 2019-03-05 22:35:53 -08:00
nyanpasu64 e21aeef072 Improve handling of init=False or _fields, fix crashes
- Don't dump init=False fields
- Don't crash when loading init=False fields
- Pass field to __init__(field), if internally named _field

Fixes crash when playing PostTriggerConfig from GUI.
2019-03-05 21:10:00 -08:00
nyanpasu64 7e73737ee0 Rename "pitch invariance" to "pitch tracking" 2019-03-02 23:57:44 -08:00
nyanpasu64 3260104df2 Add pitch invariant trigger, set trigger_diameter=None (improves bass) 2019-03-02 23:57:44 -08:00
nyanpasu64 15617b8123 Prevent YAML dump from line-breaking long paths (#207)
Add test to ensure YAML-dumping long paths does not line-break.
2019-02-24 12:59:46 -08:00
nyanpasu64 0dbba8ac09 Add backend for stereo rendering (#196)
GUI support will be added in a separate PR.
2019-02-18 02:10:17 -08:00
nyanpasu64 d1bdf0cb34 Run test_output.py on CI, even if ffmpeg missing (#203) 2019-02-17 20:17:15 -08:00
nyanpasu64 3e21dd4c0e disable antialiasing for tests 2019-02-16 08:06:03 -08:00
nyanpasu64 2aaf1452ac Fix pytest working dir in Pycharm (#199)
My unit tests assume cwd = /, in order to locate wav files.
But Pycharm uses the wrong working dir whenever you "rerun failed tests" or "run tests in file".
This runs `chdir(correct dir)`.
2019-02-16 03:09:56 -08:00
nyanpasu64 3835421a09 Add unit suffix metadata to config classes 2019-02-10 23:31:07 -08:00
nyanpasu64 73912f74fd Factor out flatten_attr() 2019-02-09 21:40:53 -08:00
nyanpasu64 144f159f41 Fix rgetattr() with default 2019-02-09 21:36:41 -08:00
nyanpasu64 e865e1c803 [renderer] Treat line_width as pixels, not points (#186)
Convert line_width from pixels to points (96dpi)

- Why not switch to 72dpi, where 1pt = 1px?
  - Gridlines become too thin, and change from white to gray.
    This is bad for users, and causes unit tests to fail.

Fixes #178.
2019-02-05 21:57:22 -08:00
nyanpasu64 c9e2585604 Add test for per-channel amplification 2019-02-01 21:14:25 -08:00
nyanpasu64 e90ccd853a Make unrecognized fields yield warning, not exception (#160) 2019-01-27 20:38:23 -08:00
nyanpasu64 e3cddd7e69 Move scipy-imported files to scipy/ subdir (#153)
So I can exclude it from mypy.
2019-01-25 19:27:46 -08:00
nyanpasu64 dbd1f7c4ec [gui] Document broken rgetattr(default) behavior 2019-01-24 22:47:09 -08:00
nyanpasu64 de285317f8 Remove unneeded Wave validation, switch from Flag to Enum 2019-01-24 22:27:36 -08:00
nyanpasu64 d5a1479751 Improve stereo unit test 2019-01-24 22:15:57 -08:00
nyanpasu64 d8eb93ef07 Remove Flatten modes: "sum/diff without averaging" 2019-01-23 23:55:17 -08:00
nyanpasu64 c9a62e12bb Add test to ensure `end_time: null` is not dumped 2019-01-23 23:46:11 -08:00
nyanpasu64 40b2b31d76 Split CorrScope.waves into trigger/render_waves 2019-01-23 23:46:11 -08:00
nyanpasu64 269f9b2acc Remove class _WaveConfig, replace with kwargs 2019-01-23 23:46:10 -08:00
nyanpasu64 15252948b3 Add stereo flatten tests [wip] 2019-01-23 23:44:48 -08:00
nyanpasu64 67653ee6b3 Appease mypy, create empty __init__.py 2019-01-21 21:07:43 -08:00
nyanpasu64 1082be3b97 Speed up rendering tests using smaller image dimensions 2019-01-20 16:47:59 -08:00
nyanpasu64 7d2fe9eace Reorganize output tests and remove duplicate 2019-01-20 16:47:57 -08:00
nyanpasu64 80ec450dc9 Add test for cfg round-trip dump+load 2019-01-20 16:21:36 -08:00
nyanpasu64 b0da03cc47 Refactor config system to use inheritance, not decorator
Validate DumpableAttrs always_dump strings
2019-01-20 16:21:36 -08:00
nyanpasu64 2e316d46d1 Add test to ensure FFplayOutput returns Stop if window closed 2019-01-18 15:42:43 -08:00
nyanpasu64 d059cf4303 Add test to ensure corrscope closes output using context manager 2019-01-18 15:42:43 -08:00
nyanpasu64 e2218f29b4 Remove mysterious TODO 2019-01-18 15:40:42 -08:00
nyanpasu64 c86cd8dc03 Add tests for output-specific performance tweaks 2019-01-13 14:59:51 -08:00
nyanpasu64 1f727ce53d Add test for launching corrscope with master audio disabled 2019-01-13 14:55:33 -08:00
nyanpasu64 61be820ab2 Add test for layout.EdgeFinder class 2019-01-12 04:12:27 -08:00
nyanpasu64 25ae1c803d Add tests for Renderer grid lines 2019-01-12 04:12:27 -08:00
nyanpasu64 80741ccebb Simplify channel config (#128)
Breaks compatibility with pre-0.1.0 configs.
2019-01-08 14:06:06 -08:00
nyanpasu64 fbb6bf0883 Improve Wave.get_around() parameter naming
return_nsamp is unambiguous. region_nsamp was ambiguous.
2019-01-08 13:22:58 -08:00
nyanpasu64 70d6cfc1a2 Run black on code 2019-01-03 13:00:18 -08:00
nyanpasu64 89f534c4d6 Add test to accept .wav with header metadata larger than filesize 2019-01-03 00:39:25 -08:00
nyanpasu64 91a570d960 Wave: Enable stereo mmap, disable mmap for intermediate computations (#21)
Eliminate stereo startup delay, speed up mono Wave[].
2018-12-29 18:43:11 -05:00
nyanpasu64 222426d0df Skip output (ffmpeg) tests if ffmpeg missing
Prevents failures from showing on CI, until I add ffmpeg downloader
2018-12-23 13:19:20 -08:00
nyanpasu64 063f677e80 [pytest] Cleanup fixture-related warnings in test_cli.py 2018-12-23 00:33:12 -08:00
nyanpasu64 5c47c293cb Rename ovgenpy to corrscope 2018-12-22 18:39:03 -08:00
nyanpasu64 9aceabb2b7 Delete unused tests/images/ 2018-12-20 22:30:40 -08:00
nyanpasu64 021e157894 Update ruamel.yaml to 0.15.70, add behavior tests 2018-12-18 20:53:23 -08:00
nyanpasu64 027ba504bd When loading invalid config, wrap exceptions with OvgenError
Fix unit test (switching to OvgenError)
2018-12-18 20:53:23 -08:00
nyanpasu64 1b63f66d47 Add Ovgen progress callbacks, switch to Arguments parameter 2018-12-18 20:53:23 -08:00
nyanpasu64 baad00a938 Squash branch "qt-gui" 2018-12-18 20:53:23 -08:00
nyanpasu64 89cec1e6b4 Improve yaml_sink description 2018-12-06 12:45:01 -08:00
nyanpasu64 2aa919b7b7 Fix test_trigger by adding CorrelationTriggerConfig template
This template is *very different* from the previous
CorrelationTriggerConfig optional-defaults.
The tests pass anyway.
2018-12-06 12:36:13 -08:00
nyanpasu64 ffd92f4622 Split trigger/render_ms (#79)
Keep Config.trigger/render_width, but raise warning if encountered.
2018-12-06 12:11:39 -08:00
nyanpasu64 a78c3712c9 Switch from keyword_dataclasses to attrs, fix Python 3.7
keyword_dataclasses works on 3.6 and 3.6 only. attrs works everywhere.

Validators and converters are not used yet.
2018-11-26 18:00:30 -08:00
nyanpasu64 7da8de91a7 Add Config.render_subfps parameter to reduce CPU usage (#77)
- All frames are triggered, but only 1 in `render_subfps` frames are rendered.
- When subsampling FPS, render frames from the future to alleviate lag.
- Reorder Config, move `fps` and `render_subfps` closer to
  `render_subsampling` (easier to use for me).
- Simplify output-related test code.
2018-11-25 04:43:43 -08:00
nyanpasu64 30a59c8e07 Add delayed_assert, to stereo overflow test 2018-11-17 22:01:00 -08:00
nyanpasu64 3bbb30d97e Add test for loud stereo overflowing 2018-11-17 21:49:41 -08:00
nyanpasu64 fade930f64 Rename trigger subsampling to stride 2018-11-17 16:10:00 -08:00
nyanpasu64 dcc705f0c2 Rename Wave.get_around() subsampling to stride 2018-11-17 16:10:00 -08:00
nyanpasu64 0acea45908 Add separate trigger and render_subsampling configs 2018-11-17 16:10:00 -08:00
nyanpasu64 7ce15a7f89 Merge branch 'render-refactor' 2018-11-16 17:11:52 -08:00
nyanpasu64 f794728a99 Update comments and TODO 2018-11-12 00:46:56 -08:00
nyanpasu64 88a79a97e8 Remove Renderer.set_colors(), move into constructor
Makes it simpler to create an impl which constructs all canvases
within __init__, not on first frame.
2018-11-05 15:45:38 -08:00
nyanpasu64 5c7db27862 Improve error message of test_renderer
If the foreground color is 136 instead of the right color,
this corresponds to the global foreground color #888888,
which means the per-channel foreground color wasn't applied.
2018-11-05 15:30:06 -08:00
nyanpasu64 342752febf Move LayoutConfig and RendererLayout to new file 2018-11-03 22:53:47 -07:00
nyanpasu64 62e8c800f4 Fix passing tuples/lists into RendererLayout 2018-11-03 22:51:42 -07:00
nyanpasu64 bc042c29d7 Choose between playback and encode via CLI, not config 2018-10-31 00:32:43 -07:00
nyanpasu64 3beaee923c [wip] Add PostTrigger and LocalPostTrigger
A post-processing trigger should have subsampling=1,
and no more post triggers.

LocalPostTrigger uses a parabolic cost function for shifting to find
edges. It doesn't work well and needs tweaking.
2018-10-30 18:01:38 -07:00
nyanpasu64 cc7b9b35ac Add ITriggerConfig.post and Trigger.post for trigger chaining
One would think `use_edge_trigger` should be an InitVar.
But it breaks test_trigger_subsampling() which is parameterized on
`cfg.use_edge_trigger` (and I want to keep it that way, not peek at
`cfg.post`).

I also copied test_trigger_subsampling to test_post_trigger_subsampling,
to test `cfg.post`.
2018-10-30 18:01:38 -07:00
nyanpasu64 6c4e128031 Add PerFrameCache class to cache period over multiple triggers 2018-10-30 18:01:38 -07:00
nyanpasu64 3fd37133da Fix test on Windows 2018-09-05 17:41:42 -07:00
nyanpasu64 355071d7c8 Add output test, ensure Ovgen closes pipe to ffmpeg 2018-08-29 01:08:05 -07:00
nyanpasu64 a62f1561cf Fix output pipeline tests (unique Popen mocks) 2018-08-29 00:57:08 -07:00
nyanpasu64 8f521529c2 Disable unit test (creates a popup window) 2018-08-28 03:21:57 -07:00
nyanpasu64 aae4646157 Properly terminate output processes (including exceptions) 2018-08-28 03:21:49 -07:00
nyanpasu64 f917c3bdc6 Fix bug where test_output writes to ./- instead of stdout
Also remove gibberish from test_output
2018-08-27 14:57:40 -07:00
nyanpasu64 ba17f64618 [wip] Fix loading YAML config from another directory
Bugs: FFmpeg writes to file named "-"
2018-08-27 04:48:35 -07:00
nyanpasu64 590aad12ba Add test for loading YAML config from another directory 2018-08-27 04:31:37 -07:00
nyanpasu64 e1c4bdbbdb Fix CLI YAML output path (should write to current dir) 2018-08-27 01:47:39 -07:00
nyanpasu64 74f260711c Add test for command-line write paths
Fails at the moment
2018-08-26 23:50:21 -07:00
nyanpasu64 7e93c60f9a Fix tests (CLI sink fixtures) 2018-08-26 23:48:36 -07:00
nyanpasu64 29798e7343 Increase trigger performance, cache and reuse data window
Reuses data window if period is within 1 semitone of saved window.
2018-08-26 19:33:34 -07:00
nyanpasu64 e42d235343 Rename trigger/render_width_ratio to trigger/render_width
trigger/render_width multiplies how wide the window is, in milliseconds.
2018-08-26 01:24:26 -07:00
nyanpasu64 494ce2bf69 Add ability to load legacy YAML files
Add Ignored and Alias fields to Config and CorrelationTriggerConfig.
2018-08-25 22:44:42 -07:00
nyanpasu64 98a13e9c5b Add Ignored object, for discarding config fields 2018-08-25 22:25:09 -07:00
nyanpasu64 56438bed5c Add Alias class, for config field aliasing 2018-08-25 22:19:09 -07:00
nyanpasu64 acffc1a55e Fix unit tests 2018-08-25 18:51:01 -07:00
nyanpasu64 cf0f716593 Add data padding/truncation functions (and unit tests) 2018-08-25 17:06:13 -07:00
nyanpasu64 ae9aa862e2 Fix unit tests 2018-08-25 16:35:09 -07:00
nyanpasu64 aa3e4fb8e1 Rename RENDER_PROFILING to PRINT_TIMESTAMP 2018-08-25 15:46:39 -07:00
nyanpasu64 d355fa728e Restrict test_channel_subsampling inputs to <= 100
Considerably speeds up Hypothesis test-case minimization when failures
occur.
2018-08-24 21:39:59 -07:00