@@ -0,0 +1,1491 @@
+package com.haxademic.sketch.test;%0A%0Aimport com.haxademic.core.app.PAppletHax;%0Aimport com.haxademic.core.system.FileUtil;%0A%0Aimport ddf.minim.AudioPlayer;%0A%0A@SuppressWarnings(%22serial%22)%0Apublic class MinimLoopTest %0Aextends PAppletHax %7B%0A%0A%09protected AudioPlayer _sound;%0A%09int loopBegin;%0A%09int loopEnd;%0A%0A%0A%09protected void overridePropsFile() %7B%0A%09%09_appConfig.setProperty( %22width%22, %22400%22 );%0A%09%09_appConfig.setProperty( %22height%22, %22400%22 );%0A%09%7D%0A%0A%09public void setup() %7B%0A%09%09super.setup();%09%0A%09%09_sound = minim.loadFile( FileUtil.getHaxademicDataPath() + %22audio/test-loop.wav%22, 512 );%0A%09%09_sound.loop();%0A%09%7D%0A%0A%0A%09public void drawApp() %7B%0A%09%09p.background(0);%0A%09%09fill(255);  %0A%09%09text(%22Loop Count: %22 + _sound.loopCount(), 5, 20);%0A%09%09text(%22Looping: %22 + _sound.isLooping(), 5, 40);%0A%09%09text(%22Playing: %22 + _sound.isPlaying(), 5, 60);%0A%09%09int p = _sound.position();%0A%09%09int l = _sound.length();%0A%09%09text(%22Position: %22 + p, 5, 80);%0A%09%09text(%22Length: %22 + l, 5, 100);%0A%09%09float x = map(p, 0, l, 0, width);%0A%09%09stroke(255);%0A%09%09line(x, height/2 - 50, x, height/2 + 50);%0A%09%09float lbx = map(loopBegin, 0, _sound.length(), 0, width);%0A%09%09float lex = map(loopEnd, 0, _sound.length(), 0, width);%0A%09%09stroke(0, 255, 0);%0A%09%09line(lbx, 0, lbx, height);%0A%09%09stroke(255, 0, 0);%0A%09%09line(lex, 0, lex, height);%0A%0A%09%7D%0A%0A%09public void mousePressed()%0A%09%7B%0A%09%09int ms = (int)map(mouseX, 0, width, 0, _sound.length());%0A%09%09if ( mouseButton == RIGHT )%0A%09%09%7B%0A%09%09%09_sound.setLoopPoints(loopBegin, ms);%0A%09%09%09loopEnd = ms;%0A%09%09%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09_sound.setLoopPoints(ms, loopEnd);%0A%09%09%09loopBegin = ms;%0A%09%09%7D%0A%09%7D%0A%0A%0A%7D%0A

Test Minim loop points