We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › ESS loop from inpoint to outpoint
Page Index Toggle Pages: 1
ESS loop from inpoint to outpoint ? (Read 429 times)
ESS loop from inpoint to outpoint ?
Mar 1st, 2008, 6:39pm
 
hello,

i am trying to play only a short loop out of some sound, but when i set the loop in and out points, then the sound starts playing from the very beginning and only starts looping when it reaches the inpoint the first time...

any ideas how to solve this ? (or: is it possible ?)

lia.-



this is what i am doing so far:


import krister.Ess.*;
AudioChannel myChannel;

void setup() {
 size(200,200);
 Ess.start(this);
 myChannel=new AudioChannel("test_2sec.aif");

 myChannel.in(myChannel.frames(1000));
 myChannel.out(myChannel.frames(1500));
}

void mousePressed(){
 myChannel.play(20);
}

void draw() {
 background(255);
}

public void stop() {
 Ess.stop();
 super.stop();
}
Re: ESS loop from inpoint to outpoint ?
Reply #1 - Mar 2nd, 2008, 3:40pm
 
Hi Lia! I haven't tried Ess much, but if it works when it reaches the in point, why don't you just use cue() to move it to that point?

Like this:
myChannel.cue(myChannel.frames(1000));
Re: ESS loop from inpoint to outpoint ?
Reply #2 - Mar 8th, 2008, 7:40pm
 
hi marius,

thanks, it works if the sound will only be played later on (like on mousePressed), if i put all code into the setup, then there is a little hickup at the start...


lia.-
Page Index Toggle Pages: 1