[L2Ork-dev] 40 hours

Albert Graef aggraef at gmail.com
Fri Sep 25 15:38:29 EDT 2020


Nice! :) I'm pulling this over into my testing branch now and if it works
for me, I will include it in the next OBS preview build!

Thanks,
Albert


On Fri, Sep 25, 2020 at 8:51 PM Ivica Ico Bukvic <ico at vt.edu> wrote:

> That feeling when you spend 40 work hours trying to resuscitate and old,
> broken, and horribly coded Pd-L2Ork GUI knob external, spend a majority
> of that time on producing the following snippet, and then finally get it
> done right...
>
> On a side-note, if you ever have any questions about logarithms, I now
> likely know the answers by heart... And yes, the new flatgui/knob is
> going to kick some serious butt...
>
> if (x->x_lin0_log1)
> {
>      t_float norm_val = (x->x_pos - x->x_min) / (x->x_max - x->x_min);
>      if (x->x_gui.x_reverse)
>      {
>          x->x_val = x->x_max - (exp((1 - norm_val) *
> log(100))/exp(log(100)) - 0.01) / 0.99 * (x->x_max-x->x_min);
>      }
>      else
>      {
>          x->x_val = (exp(norm_val * log(100))/exp(log(100)) - 0.01) /
> 0.99 * (abs(x->x_max-x->x_min)) + x->x_min;
>      }
> }
> ...
> t_float norm_val = (x->x_val - x->x_min) / (x->x_max - x->x_min);
> if (x->x_gui.x_reverse)
> {
>      t_float log_norm_val = log(100 - (norm_val * 99))/(log(100));
>      x->x_pos = log_norm_val * (abs(x->x_max-x->x_min)) + x->x_max;
> }
> else
> {
>      t_float log_norm_val = log(1 + (norm_val * 99))/(log(100));
>      x->x_pos = log_norm_val * (abs(x->x_max-x->x_min)) + x->x_min;
> }
>
> --
> Ivica Ico Bukvic, D.M.A.
> Director, Creativity + Innovation
> Co-Director, Human Centered Design iPhD
> Institute for Creativity, Arts, and Technology
>
> Virginia Tech
> Creative Technologies in Music
> School of Performing Arts – 0141
> Blacksburg, VA 24061
> (540) 231-6139
> ico at vt.edu
>
> www.icat.vt.edu
> www.performingarts.vt.edu
> l2ork.icat.vt.edu
> ico.bukvic.net
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev



-- 
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email: aggraef at gmail.com, web: https://agraef.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20200925/01a36ffb/attachment.html>


More information about the L2Ork-dev mailing list