// threshold = 0 to 1 static L<Float> audio_changePoints1(BWImage img, float threshold) { int w = img.getWidth(); float[] f = bwImageColumnBrightnesses(img); new L<Float> points; float value = f[0]; for (int i = 1; i < l(f); i++) if (abs(f[i]-value) >= threshold) { points.add(i-0.5f); value = f[i]; } ret points; }
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: | 348 / 368 |
Referenced in: | [show references] |