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

10
LINES

< > BotCompany Repo | #1018722 // showAudioFileWithEditableMarkers

JavaX fragment (include)

1  
static ImageSurface showAudioFileWithEditableMarkers(final File audioFile) {
2  
  L<Float> markers = audioFileFloatMarkers(audioFile);
3  
  final ImageSurfaceWithXMarkers is = ImageSurfaceWithXMarkers(audioFileToFrequencyImage(audioFile).getBufferedImage(), markers);
4  
  is.onMarkersChanged = r { setOneLineFileInfoField(audioFile, markers := struct(is.markers)) };
5  
  is.setZoom(2);
6  
  showPackedFrame(fileName(audioFile), withCenteredButtons(is,
7  
    "Play full", rThread { playWAV(audioFile) },
8  
    "Play clipped", rThread { playWAV(clipWAVFromMarkers(audioFile, is.markers, javaxCachesDir("Audio/clip.wav"))) }));
9  
  ret is;
10  
}

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: #1018722
Snippet name: showAudioFileWithEditableMarkers
Eternal ID of this version: #1018722/8
Text MD5: 7819efad411145bf01542343e2f9d9fc
Author: stefan
Category: javax / gui / audio analysis
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-14 12:37:22
Source code size: 628 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 375
Version history: 7 change(s)
Referenced in: [show references]