Characterization of the amount of modulation in a signal
As far as the equivalent of an "envelope detector", consider using a moving average of the absolute value (as it would be simple to implement, if you like the approach more elaborate filters could be used). This is how you would do that in Matlab:

M = 10
out = filter(ones(M,1), 1, waveform)


Where M is the number of samples that you want to actually do the moving average over. Note that you will be making a distinction between what you consider the frequency components of your signal vs the frequency components of the envelope as this algorithm seeks to distinguish the two, with the envelope being a low frequency component. 

To determine gap duration, you can simply set a threshold on the envelope based on what you decide to be a gap or not and then create a bipolar two level signal (+1 or -1) to measure the duration of the gaps:

gapTest = abs(out- threshold)


As for setting the threshold itself, I would be tempted to use an "N-Sigma" appraoch, where the threshold is determined based on the standard deviation of the data (so would scale automatically and be consistent across sets).

And the following will report the length as "durations" and quantity of gaps as "count" (note that I did it such that leading and trailing gaps are ignored but you may decide to do that differently):

# find edges
x = diff(gapTest)

# ignore leading gaps (as they are partial)
fall = find(x == -1)
x2 = x(fall(1):end)

#find gaps and duration
rise = find(x2 == 1)
fall = find(x2 == -1)

#ignore trailing gaps (as they are partial)
len = min(length(rise), length(fall))
durations = rise(1:len) - fall(1:len)
count = length(durations)


You will need to test the above for all cases and modify accordingly. 

As far as the equivalent of a "mod depth" consider using the mean of the data above your threshold compared to the mean of the data below your threshold.