Thanks for using this and developing it. I tried out your version and I like the keyboard addition that you made.
I'm not able to recreate the issues that you describe and that inspired some of the changes you describe. For me, 'Play Once' works as it should. I'm also unable to make it crash by making the loop duration zero - the line:
kPlayPhasFrq divz gkSpeed, kLoopLen, 0.00001
should be preventing this anyway.
portk lines are intended to smooth changes made to the 'start' and 'end' loop times so that interim values, that pixel resolution makes inaccessible, are explored. Of course it'd debatable how effective and necessary this is in practice. It might be more useful with longer loops.
The addition of this line:
kPlayOnceNdx line 0,1,1
is not needed because the
else is follows is not in the same conditional level as the initial 'if'. What this means is that the second
kPlayOnceNdx line 0,1,1, if accessed, is simply overwriting the first one, which will already be being accessed.
Do you think that the envelope attack and release times are too long? Maybe they should be user-adjustable.
I think the metallic quality you describe when looping repeats is a glitch in the pvs implementation. mis-alignment between freq and amp bins? I'm not really sure what's causing it but modifying the FFT attributes given to
pvsanal should alter its character.
I'd like to be able to recreate the problems you describe though. Are you on Windows? On Mac it seems fine with the latest version of Cabbage.