static Pair<L<IntRange>, File> autoClipRecording(S name) { ret autoClipRecording(recordingsDir(name)); } static Pair<L<IntRange>, File> autoClipRecording(File f) { Clip clip = spectro_clipFromFile(f); BWImage img = clipToFrequencyImage(clip); L<IntRange> parts = audioSplit3(img); File clipFile = fileInSubDir(f, "clipped"); File imgFile = replaceExtension(clipFile, ".png"); if (empty(parts)) deleteFiles(clipFile, imgFile); else { spectro_intRangesToWAV(clip, parts, clipFile); savePNG(imgFile, mergeBWImagesHorizontally(horizontalIntRangesToImages(img, parts), spaceColor := 0).getBufferedImage()); } ret pair(parts, clipFile); }
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: | #1018640 |
Snippet name: | autoClipRecording (old) |
Eternal ID of this version: | #1018640/9 |
Text MD5: | 0697a78ed123fae39bd37f10ef6f60ef |
Author: | stefan |
Category: | javax / audio recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-14 13:34:25 |
Source code size: | 691 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 400 / 450 |
Version history: | 8 change(s) |
Referenced in: | [show references] |