For example, in a song with the tempo BPM = 120 the duration of one beat is TPB = 60000 / 120 = 500 ms. If you need a longer release, use a multiple of it (1000 ms, 1500 ms, and so on), for a shorter release divide it by any natural number (500 ms / 2 = 250 ms, 500