add interval when sound in loop

19 views
Skip to first unread message

yinya...@gmail.com

unread,
May 7, 2019, 12:39:56 AM5/7/19
to beadsproject
When playing an audio loop, I want to set an interval so that the audio loops through the interval for the next round and all loops have to go through that interval. What should I do?
My current code is implemented as follows:


void setup() {
  size(300,300);
  ac = new AudioContext();
  fileSelected();
}

void fileSelected() {

  String audioFileName = "/sample/piano/1.wav";
  Sample sample = SampleManager.sample(audioFileName);
  SamplePlayer player = new SamplePlayer(ac, sample);
  player.setLoopType(SamplePlayer.LoopType.LOOP_BACKWARDS);
  Gain synthGain = new Gain(ac, 2, 0.2);
  synthGain.addInput(player);

  ac.out.addInput(synthGain);

  ac.start();
}

Ollie Bown

unread,
May 12, 2019, 12:05:40 AM5/12/19
to beadsp...@googlegroups.com

Hi there,

 

Can you explain this goal in a bit more detail? I couldn’t understand what you are trying to do.

Cheers,

 

Ollie

--
You received this message because you are subscribed to the Google Groups "beadsproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beadsproject...@googlegroups.com.
To post to this group, send email to beadsp...@googlegroups.com.
Visit this group at https://groups.google.com/group/beadsproject.
To view this discussion on the web visit https://groups.google.com/d/msgid/beadsproject/c8646afa-8a45-4e88-bd7d-b44f3e7cac5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages