nyanpasu64
7923812407
Update PyCharm config: add Git commit message limits
2018-08-26 23:47:44 -07:00
nyanpasu64
2042061633
Update .gitignore to exclude .orig merge files
2018-08-26 23:47:28 -07:00
nyanpasu64
de22e277f0
Make Config.subsampling optional ( #38 )
2018-08-26 22:10:38 -07:00
nyanpasu64
49640e60fb
Merge pull request #45 from nyanpasu64/improve-bass
...
Revamp support for long windows
2018-08-26 19:34:02 -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
3af6af7b99
Fix trigger crash bug
...
If get_period returns np.int64, `round(period * x)` (x=float) produces
np.float64 instead of int.
The previous commit changes (for x in cfg.trigger_falloff) from int to
float.
2018-08-26 18:44:55 -07:00
nyanpasu64
4c9b8f96ce
Reorganize CorrelationTriggerConfig
...
use_edge_trigger and edge_strength serve the same purpose.
trigger_falloff and lag_prevention both control input data windowing.
2018-08-26 18:31:16 -07:00
nyanpasu64
d8c3ef48ef
Increase trigger performance, don't calculate period twice per frame
2018-08-26 17:00:55 -07:00
nyanpasu64
cd0dbc5de6
Save CProfile snapshots to useful filenames
2018-08-26 16:10:02 -07:00
nyanpasu64
95895d8a07
Reorganize Config, add global trigger_width and render_width
...
`trigger/render_width` are grouped with `width_ms`, because they modify
`width_ms`.
`trigger/render_width/trigger` are grouped together, since `channels`
can override them.
2018-08-26 01:47:23 -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
e491afce60
Add CorrelationTriggerConfig parameter validation
2018-08-26 01:19:47 -07:00
nyanpasu64
979c16d9c2
Add configurable lag_prevention parameter to trigger
...
lag_prevention ranges from 0 to 1. Lower values have a narrower fadeout
for old data, leaving more data untouched for the correlation process.
2018-08-26 01:19:33 -07:00
nyanpasu64
9b76cc1731
Remove unused broken function
2018-08-26 00:16:47 -07:00
nyanpasu64
93af9a9a58
Add `show_internals` option to show 'window' or 'buffer'
2018-08-26 00:16:47 -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
a7b1c06114
Rename Channel.nsamp to window_samp
2018-08-25 18:50:57 -07:00
nyanpasu64
2f08ca9ad8
Rename Trigger(nsamp=) to tsamp
2018-08-25 18:50:20 -07:00
nyanpasu64
a8e91f0a1b
Replace Trigger(nsamp_frame) parameter with fps
2018-08-25 18:18:47 -07:00
nyanpasu64
878d03517d
Remove debug prints, render buffer (not window).
2018-08-25 17:48:24 -07:00
nyanpasu64
88355f5cb0
Reorganize Config class.
...
Reasoning: subsampling does not affect trigger duration. Only width_ms
and channels[].width_ratio are involved.
2018-08-25 17:44:41 -07:00
nyanpasu64
5d0155fab3
Properly subsample 1-frame windows of CorrelationTrigger
2018-08-25 17:38:46 -07:00
nyanpasu64
b2ebc2189d
Fix trigger falloff windowing
2018-08-25 17:06:25 -07:00
nyanpasu64
cf0f716593
Add data padding/truncation functions (and unit tests)
2018-08-25 17:06:13 -07:00
nyanpasu64
a2051cc988
[wip] Add trigger_falloff parameter
2018-08-25 16:35:15 -07:00
nyanpasu64
ae9aa862e2
Fix unit tests
2018-08-25 16:35:09 -07:00
nyanpasu64
55de73ebd7
Don't shrink data_window due to subsampling (erroneous assumptions)
...
If subsampling doubles, halfN *2 and _subsampling *2. data_window should
/2, but would previously / 2√2.
(Note: data_window(std=) is in units of samples, whose size is
proportional to _subsampling.)
2018-08-25 16:10:31 -07:00
nyanpasu64
9ddef6d20c
Add trigger_diameter parameter (distance to shift data)
2018-08-25 16:10:31 -07:00
nyanpasu64
f2f873707d
Fix lag when using long input windows
...
Prevent CorrelationTrigger from looking backwards >= 1 frame in time.
Left half of data window is min()-tapered by a padded half-Hann window.
Primarily useful for bass.
2018-08-25 16:10:31 -07:00
nyanpasu64
2f2f33440e
Merge branch 'visualize-buffer'
2018-08-25 16:09:48 -07:00
nyanpasu64
f62b3ce471
Add debugging option to show buffers (Config.show_buffer)
2018-08-25 15:59:24 -07:00
nyanpasu64
aa3e4fb8e1
Rename RENDER_PROFILING to PRINT_TIMESTAMP
2018-08-25 15:46:39 -07:00
nyanpasu64
dbebff7439
Remove unused local variable
2018-08-25 03:16:40 -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
nyanpasu64
763e1d3533
Merge pull request #43 from nyanpasu64/fix-subsampling
...
Fix subsampling
2018-08-24 18:21:45 -07:00
nyanpasu64
effc60d064
Delete benchmark_trigger.py (outdated)
...
It's nice to have, but it calls CorrelationTriggerConfig incorrectly and
doesn't work.
2018-08-24 01:47:23 -07:00
nyanpasu64
75e68e6e0f
Add tests_require to setup.py
...
Document test dependencies. pytest-pycharm is optional, but I like it.
2018-08-24 01:47:23 -07:00
nyanpasu64
162cb453fd
Fix nsamp used for rendering, when render_subsampling > 1
2018-08-24 01:47:23 -07:00
nyanpasu64
a172fc33a9
Add test for nsamp and render_subsampling used for rendering
2018-08-24 01:47:23 -07:00
nyanpasu64
a2237e09d6
Cleanup unit-test files
2018-08-24 01:46:33 -07:00
nyanpasu64
ce3849cd54
Rename Wave.get_around(region_len) to region_nsamp
2018-08-24 01:05:46 -07:00
nyanpasu64
8a781c9d3a
Disable Ovgenpy print(time) when RENDER_PROFILING=False
2018-08-24 01:04:42 -07:00
nyanpasu64
3c97c0dbcf
Raise error when constructing Ovgen with 0 channels
2018-08-24 01:03:17 -07:00
nyanpasu64
5c38445d56
Move Ovgen renderer construction to private method
2018-08-24 01:02:13 -07:00
nyanpasu64
1dc071a7de
Raise error when calling Ovgen.play() more than once
2018-08-24 00:27:06 -07:00
nyanpasu64
6d028c1dc5
Fix FPS calculation when begin_time is not 0
2018-08-24 00:25:58 -07:00
nyanpasu64
2a23dedc55
Fix subsampling
2018-08-24 00:05:57 -07:00