Transpiled version (6650L) is out of date.
1 | sclass FindBest1DHaarFeature extends Best<HamburgerAudioHaarFeature> { |
2 | IAudioSample sample; |
3 | DoubleRange range; |
4 | |
5 | *(IAudioSample *sample) { |
6 | range = sample.bounds(); |
7 | } |
8 | |
9 | void tryIt(HamburgerAudioHaarFeature f) { |
10 | if (f == null) ret; |
11 | f.pinOuter(range); |
12 | if (!f.ok()) ret; |
13 | double score = score(f); |
14 | put(f, score); |
15 | put(f.inverted(), -score); |
16 | } |
17 | |
18 | double score(HamburgerAudioHaarFeature f) { |
19 | ret f.get(0); |
20 | } |
21 | |
22 | HamburgerAudioHaarFeature initial() { |
23 | HamburgerAudioHaarFeature feature = new(sample, spreadEvenly(4, range)); |
24 | tryIt(feature); |
25 | ret feature; |
26 | } |
27 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033051 |
Snippet name: | FindBest1DHaarFeature |
Eternal ID of this version: | #1033051/6 |
Text MD5: | c71fb22c5104dd611ef5ebf1012e749e |
Author: | stefan |
Category: | javax / audio analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-11 19:33:32 |
Source code size: | 637 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 152 / 257 |
Version history: | 5 change(s) |
Referenced in: | [show references] |