Processors that only process events?

in case of an event processor that doesn’t need to run at audio rate, and only outputs events immediately after receiving some (i.e. inside of an event callback), what should the run() method be doing?

void run()
{
  advance();
}

or

void run()
{
  loop { advance(); }
}

is there a way to avoid writing the run-method altogether in a case like this? or have i misunderstood something and is using this type of a processor not recommended?

full example:

processor Example
{
  input event float somethingIn;
  output event float somethingOut;

  event somethingIn(float something)
  {
    somethingOut << somethingIn * 2;
  }

  void run()
  {
    ???
  }
}
1 Like

The rules were relaxed recently around such processors. If you only have event endpoints, you don’t need a run loop, so you can just not specify it.

I’ll be updating our examples to reflect this, and also adding documentation.

1 Like

awesome, this clears things up! :slight_smile: