Vector Objects with One Value Review

Issue #47 resolved
Alex Harker repo owner created an issue

Please see these objects:

fl.centroid~

fl.crest~

fl.flatness~

fl.geometricmean~

fl.kurtosis~

fl.length~

fl.mean~

fl.product~

fl.rms~

fl.skewness~

fl.spread~

fl.standarddeviation~

fl.sum~

fl.vmax~

fl.vmin~

1. Are there any objects missing here?

2. Are there any object features missing here?

3. Any issues with info documentation, either general, or specific to a given object?

4. Any issues with object names?

  • I'm unclear on the best way forward with fl.vmin~ / fl.vmax~ as there are already fl.min~ and fl.max~ binary objects - I'd like both to be clear and easy to remember, but I don't know how to achieve that.
  • Perhaps fl.geometricmean~ should be abbreviated (e.g. fl.geomean~) and possibly fl.standarddeviation~ (e.g. fl.standarddev~) - thoughts?

5. Any issues with object names?

What should happen when these objects receive a frame of zero length? The answer for the length~ object is obvious, but arguably none of the other values is truly defined. At the moment I output an empty frame in these cases. Any objections?

Comments (14)

  1. Former user Account Deleted
    1. Something I would find useful might be fl.mfcc~ and fl.rolloff~. I don't know if you wanted to keep the set to less specific descriptors though, but I would find these useful.

    2. I haven't tested enough to say.

    3. As above.
    4. Prepending v to min/max is clear to me. I think that fl.geomean~ and something like fl.stddev~ would be nicer imo. Stddev is pretty std abbreviation in other things (haha) and geometricmean seems like a lot to read each time you go over the object.

    5. I'm probably not minded enough to talk about the computational consequences of outputting an empty frame when a frame of 0 length is received, if there are any at all. Does it make sense in a situation where you are changing the frame length arbitrarily that something happens when that length is nothing? To me it seems like you would want a consequence of that frame length being 0 for debugging or just to make sure something is going on in a predictable behaviour. A total non programmers 2c

  2. Alex Harker reporter

    Thanks and yes stddev is a good idea.

    fl.mfcc~ would come somewhere else (under the spectral probably) and possibly rolloff also - for this thought it can be generalised as the point at which X percentile of a PDF is found, so I might be able to provide something that would do rolloff, most likely with a different name (and a parameter also).

    I should say that most likely I will make an object for identifying zero length frames at some point, and to clarify an "empty" frame is just a zero length frame, so there's still a frame happening - it just has nothing in it.

  3. Alex Harker reporter

    Actually doing nothing is not an option - some might argue that a default value is preferable (for an operation like sum/rms this makes some kind of sense). To my mind though it is probably best to treat these values as "undefined" for zero length frames and then provide a mechanism for detecting the empty frames and replacing them with something else for those who disagree.

  4. st kr

    4) i must admit the whole vmin / vmax had me very confused initialy. fl.vecmin~ etc instead? to be honest, is not fl.vmin~ just an fl.peak~ object? and fl.vmin fl.trough~? or is that too max specific?

    one more thing: when hacking on your descriptors granulator stuff, i found myself wanting a framelib 'descriptors~' object, where all these things are available in a single instance. am i being unreasonable / missing a point somewhere? i know that now i could make an abstraction with route and select, but would be a bit crazy maybe?

  5. Alex Harker reporter

    fl.vmin~ gives you the minimum value across a vector. I wouldn't call these throughs/peaks. fl.min~ gives you the minimums between each pairs of input values per sample.

    I'd be happy with fl.vecmin~ or fl.vectormin~ - just need a clear way of differentiating the two, and to choose the names so that you are more likely to get the right one.

    It is possible one day that there will be a catch-all descriptors object in frame lib, but it certainly won't be very soon...

  6. Alex Harker reporter

    So I propose these name changes for anyone paying attention:

    fl.vmin~ → fl.framemin~

    fl.vmax~ → fl.framemax~

    fl.argmin~ → fl.minpos~

    fl.argmax~ → fl.maxpos~

    fl.standarddeviation → fl.stddev~

    fl.geometricmean~ → fl.geomean~

    Any objections?

    @Owen Green - tagging you here as you made two of these.

  7. Alex Harker reporter

    OK - names done - now I just need to figure out what happens when the input is an empty frame.

    Right now empty input frames give empty output frames:

    All possibilities:

    1 - Empty frame

    2 - NaN

    3 - Pre-defined default

    4 - User-set default

    5 - User selects from (some of) the above

    This applies to all the below objects and I’ve added identity elements (the item that would not change the result of the calculation if you added more elements) where they exist as potential defaults, or suggested something that might be a sensible default.

    fl.sum~ [0.0]

    fl.product~ [1.0]

    fl.framemax~ [-inf]

    fl.framemin~ [+inf]

    fl.centroid~ [0.0]

    fl.spread~ [0.0]

    fl.skewness~ [0.0]

    fl.kurtosis~ [1.0]

    fl.flatness~ [1.0]

    fl.geomean~ [0.0]

    fl.mean~ [0.0]

    fl.stddev~ [0.0]

    fl.crest~ [1.0]

    fl.rms~ [0.0]

  8. Former user Account Deleted

    I prefer 1. Empty Frame. I don’t like idea of having the user specify what happens when you send an empty trigger frame - the only circumstance I think that you would send any of those objects empties is because you made an error? In that case, just sending an empty frame as the output is the clearest sign there is a problem that will be noticed downstream by the user. NaN is confusing - it would suggest to me I divided something by 0, or effed up the timemean~ object.

  9. Alex Harker reporter

    OK - I’ve decided to default to empty frames with the option to switch to a default value which is set to the above values, but is also user-settable. I think this is the most flexible but compact approch.

  10. Log in to comment