Custom Display For Sync Value Slider in Delay Plugin

I’m working on a fairly simple delay plugin which has capability to sync to the host’s bpm. I currently have the value of the synced delay time controlled by a slider, which works to create delays in, 32nd notes, 16th notes, etc… up to a full bar of delay (including triplets!).

The way I designed this was to calculate a minimumSyncValue equal to a 32nd note and then use the slider to factor in a multiplier appropriate to create the other note-value delay times. For example a quarter note delay time is 4.0*minSyncDelay.

My problem is that the slider DISPLAYS the multiplier, 1.0, 3.3, 4.0 etc… instead of something like “1/8th”, “1/16”, and so on. Is there any way of customizing the display of the slider to make the note value of the synced delay obvious to the user??

Thanks!!

depending on the way you’re using your parameters, you should have some method for valueToText, which takes your current value and converts it to string for the UI. I believe the state trees have these built in.

Sweet gonna check this out. Thanks!