Note value slider that triggers note values

I've been trying to create a slider that as you hold a key down on midi keyboard... the slider as you move vertically will trigger notes in values from whole notes up to 64th notes. I've even tried to see if chapt gpt could help me but no luck.. Has anyone been able to create this?

I'm not quite sure to understand what you are trying to do, could you try explaining it in details or maybe rephrase it ?