I'm actually working on a step sequencer. The formula I came up with is:
240/(noteLength*tempo)
noteLength is the denominator of the note, so a 1/4 note would = 4, a 1/2 note would =2...
tempo is bpm
a beat is considered a 1/4 note
So, as per above, 240/(4*138) = 0.435 seconds between notes.
Put another way, to see how long 138 beats take, 138 * 0.0.435 = 60 seconds; that is 138 bpm take 60 seconds to play.
You can use the Timer behaviour to time the beats/notes.