Way back when dinosaurs roamed the earth and disco ruled the clubs, I played in a little wedding band. One of our tunes was "Spanish Eyes". I would do a guitar solo in the middle that was sixteenth-note double stops. Our keyboard player had a Hammond X-5 organ. I seem to recall that he had some kind of function on that thing called a "repeater". He could do something to that organ to make note(s) repeat as long as he held the key(s) down. I hated that thing then, but I could sure use that functionality now.
Some years ago, I had aggressively pursued building a MIDI bass pedal controller. I didn't finish it because 1) I lost interest 2) Our praise band got a good bass player and it was no longer necessary and 3) I got a bad case of "analysis paralysis" and could never decide on the feature set I wanted the thing to have. I have resurrected the project and have decided to investigate the possibility of putting a "repeater" function on it. This is what I would want the thing to do: I select the beats per minute the song is being played at. I then tell the controller that I want it to play half, quarter, eighth or sixteenth notes. Then, as long as I hold a pedal down, it plays the selected note pattern at the selected tempo until I release the pedal. This stuff I think I have figured out. It's just a matter of using the beats per minute and the number of notes per second the controller would have to play to figure out the duration of each note. That's probably not bad, although I haven't tried it yet. Note duration is only part of the equation. Duration of the silence between notes is probably at least as important.
I am at a loss to know how one would determine duration between notes. I doubt it is as simple as deriving a fixed value you could use for all note values at all tempos. Could it be, for example, 10 percent of the total time between when one note starts and the next note starts? For example, at 60 beats a minute, a quarter note lasts a second, or 1000 milliseconds. If the silence between notes is 10 % of the total time between N1 start and N2 start, that means the actual time the note lasts is 900 milliseconds, with 100 milliseconds of silence before the next note.
Does anyone who is more synth-savvy or MIDI-savvy than I am have any idea how this is done?