print f

print object - prints frac on change, max 1/sec
Author: Mark Harris
License: GPL
Github: tb/disp/print f.axo

Inlets

frac32 v

Outlets

None

Attributes

table text

Declaration
int32_t last_;
int32_t updt_;
char buf[10];
Init
last_ = 0;
updt_ = 3001;
Control Rate
if (updt_ >= 3000) {
  if (last_ != inlet_v || updt_ > 3000) {
    double v = ((double)inlet_v) / (double)(1 << 21);
    int wi = v;
    float f = fabs(v - wi);
    int fi = f * 10000;

    LogTextMessage("attr_text %5d.%04d", wi, fi);
    last_ = inlet_v;
    updt_ = 0;
  }
} else {
  updt_++;
}

Privacy

© 2024 Zrna Research