Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1018776 // markerIntRangesForWAV

JavaX fragment (include)

1  
static L<IntRange> markerIntRangesForWAV(File f, BWImage freqImage) {
2  
  ret markerIntRangesForWAV(f);
3  
}
4  
5  
static L<IntRange> markerIntRangesForWAV(File f) {  
6  
  Clip clip = spectro_clipFromFile(f);
7  
  L<Int> intMarkers = sorted(allToInt(audioFileFloatMarkers(f)));
8  
  
9  
  // odd number of markers => clip to end
10  
  if (oddLength(intMarkers)) intMarkers.add(clip.getFrameCount());
11  
  
12  
  ret intsToIntRanges(intMarkers);
13  
}

Author comment

Began life as a copy of #1018740

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: #1018776
Snippet name: markerIntRangesForWAV
Eternal ID of this version: #1018776/5
Text MD5: 34ac7977a985ae4d3bd57b8199f701e3
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-28 00:28:18
Source code size: 426 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 276 / 321
Version history: 4 change(s)
Referenced in: [show references]