Download Jar. Uses 11806K of libraries. Click here for Pure Java version (11926L/85K).
!7 replace MarkedImage with BWImageAndRange. static L<MarkedImage> markedImages; p-exp { L<File> files = audioRecordingsWithSingleClip(); pnl(files); markedImages = map_printProgress(f audioFileToBWImageAndRange, files); showOriginalClips(); showYAveragedOnDifferentBands(); } svoid showYAveragedOnDifferentBands { // Select a band, y-average, auto-contrast repeat with sleep 1 { int h = first(markedImages).image.getHeight(); double a = random()*0.9, b = a+0.1; final int y1 = iround(a*h), y2 = iround(b*h); final new Scorer scorer; quickShowZoomedImage(mergeBWImagesVertically(map(markedImages, func(MarkedImage img) -> BWImage { new Var<BWImage> processedImage; L<Int> entryPoints = audio_entryPointsUsingBand_v1(img.image, intRange(y1, y2), +processedImage); audio_scoreEntryPoints(scorer, img, entryPoints); ret markIntRangesOnTopOfBWImage( markIntRangesOnTopOfBWImage(squishBWImage(processedImage!, 20), intsToSize2Ranges(entryPoints), 5), ll(intRange(img.start, img.end)), 5); }))); print(scorer + " / Band: " + y1 + " to " + y2 + " of " + h); } } svoid showOriginalClips { showImage(mergeBWImagesVertically(map renderBWImageAndRange(markedImages))); }
Began life as a copy of #1018774
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: | #1018782 |
Snippet name: | Grow auto-clip algorithm for audio recordings Prelude 2 [OK] |
Eternal ID of this version: | #1018782/22 |
Text MD5: | 11e101abf0ae355e79cb0274bf77f392 |
Transpilation MD5: | bb493684126b9629d663d5216be78434 |
Author: | stefan |
Category: | javax / audio |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-13 19:43:14 |
Source code size: | 1333 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 455 / 1052 |
Version history: | 21 change(s) |
Referenced in: | [show references] |