static float showFrequencyImage2_maxValue = 0.3; static ImageSurface showFrequencyImage2(File audioFile) { if (audioFile == null) null; final BWImage img = audioFileToFrequencyImage(audioFile); ImageSurface is = showZoomedBWImage(audioFile.getName(), 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; }