static float showFrequencyImage2_maxValue = 0.3f; static ImageSurface showFrequencyImage2(File audioFile) { if (audioFile == null) null; ret showFrequencyImage2(audioFile.getName(), audioFileToFrequencyImage(audioFile)); } static ImageSurface showFrequencyImage2(S name, final BWImage img) { ImageSurface is = showZoomedBWImage(name, img); final ImageSurface is2 = jImageSurface(); is2.setZoom(2); final SimpleLiveValue lvThreshold = floatLiveValue(0.1f); Runnable update = runAndReturn(r { is2.setImage(bwImage_markColumnsWhite(img.getWidth(), 10, printStruct("change points: ", audio_changePoints1(img, lvThreshold!)))); }); lvThreshold.onChange(update); addToWindowAndPack(is, vstack(is2, jLiveValueSliderZeroToX(showFrequencyImage2_maxValue, lvThreshold))); ret is; }