1 | // threshold = 0 to 1 |
2 | static L<Float> audio_changePoints1(BWImage img, float threshold) { |
3 | int w = img.getWidth(); |
4 | float[] f = bwImageColumnBrightnesses(img); |
5 | |
6 | new L<Float> points; |
7 | float value = f[0]; |
8 | for (int i = 1; i < l(f); i++) |
9 | if (abs(f[i]-value) >= threshold) { |
10 | points.add(i-0.5f); |
11 | value = f[i]; |
12 | } |
13 | ret points; |
14 | } |
Began life as a copy of #1018617
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018686 |
Snippet name: | audio_changePoints1 - find points where spectrum changes |
Eternal ID of this version: | #1018686/1 |
Text MD5: | a8c679e634331cbde84db3dc3df5a0f3 |
Author: | stefan |
Category: | javax / audio analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-10 14:59:20 |
Source code size: | 363 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 350 / 371 |
Referenced in: | [show references] |