kotobuki / funnel

Automatically exported from code.google.com/p/funnel
Other
2 stars 2 forks source link

A service interval for an Osc is doubled? #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
以下のコードを実行すると、Oscのサービス間隔がプリント��
�れるが、その数字を見
ている限りではOsc.serviceIntervalで指定した間隔の倍(例:30��
�指定すると60)
になっているように思われる。

import processing.funnel.*;

Gainer gainer;
Osc osc;

float last;

void setup()
{
  size(200, 200);
  frameRate(30);

  gainer= new Gainer(this, Gainer.MODE1);
  gainer.autoUpdate = true;

  osc = new Osc(this, Osc.SIN, 1.0, 0);
  osc.serviceInterval = 30;
  osc.addEventListener(Osc.UPDATE, "oscUpdated");
  osc.reset();
  osc.start();

  last = millis();
}

void draw()
{
  background(100);
}

void oscUpdated(Osc osc)
{
  float now = millis();
  gainer.analogOutput(0).value = osc.value;
  println("interval: " + (now - last));
  last = now;
}

Original issue reported on code.google.com by kotob...@gmail.com on 8 Jul 2008 at 7:40

GoogleCodeExporter commented 8 years ago
fixed in r373

Original comment by kotob...@gmail.com on 9 Jul 2008 at 1:05