@@ -0,0 +1,1375 @@
+package com.haxademic.demo.media.audio.playback;%0A%0Aimport com.haxademic.core.app.P;%0Aimport com.haxademic.core.app.PAppletHax;%0Aimport com.haxademic.core.media.audio.analysis.AudioInputBeads;%0Aimport com.haxademic.core.media.audio.playback.WavPlayer;%0A%0Apublic class Demo_WavPlayer_Playlist%0Aextends PAppletHax %7B%0A%09public static void main(String args%5B%5D) %7B PAppletHax.main(Thread.currentThread().getStackTrace()%5B1%5D.getClassName()); %7D%0A%0A%09protected WavPlayer player;%0A%09protected String%5B%5D playlist = new String%5B%5D %7B%0A%09%09%22data/audio/kit808/tom.wav%22,%09%0A%09%09%22data/audio/kit808/bass.wav%22,%09%0A%09%09%22data/audio/kit808/clap.wav%22,%09%0A%09%09%22data/audio/kit808/hi-hat.wav%22,%09%0A%09%09%22data/audio/kit808/hi-hat-open.wav%22,%09%0A%09%09%22data/audio/kit808/kick.wav%22,%09%0A%09%09%22data/audio/kit808/snare.wav%22,%0A%09%7D;%0A%09protected int playlistIndex = 0;%0A%09%0A%09public void setupFirstFrame() %7B%0A%09%09player = new WavPlayer();%0A%09%09P.p.setAudioInput(new AudioInputBeads(player.context()));%0A%09%09playNextSound();%0A%09%7D%0A%09%0A%09public void drawApp() %7B%0A%09%09p.background(0);%0A%09%09checkPlayerComplete();%0A%09%7D%0A%09%0A%09protected void playNextSound() %7B%0A%09%09playlistIndex++;%0A%09%09playlistIndex = playlistIndex %25 playlist.length;%0A%09%09player.playWav(playlist%5BplaylistIndex%5D);%0A%09%7D%0A%0A%09protected void checkPlayerComplete() %7B%0A%09%09float playerProgress = player.progress(playlist%5BplaylistIndex%5D);%0A%09%09p.debugView.setValue(%22playerProgress%22, playerProgress);%0A%09%09if(playerProgress %3E= 1f) %7B%0A%09%09%09playNextSound();%0A%09%09%7D%0A%09%7D%0A%09%0A%7D%0A

Build playlist demo for WavPlayer