music.profile

music.profile(adict)[source]

Notes

Should return a dictionary with the following structure:

d[‘type’][‘scalar’] should return all the names of scalar variables as strings. scalar: all names in numeric, string, float, integer, collections: all names in dict, list, set, ndarray

d[‘analyses’][‘ndarray’] should return a general analysis of the ndarrays, including size in seconds of each considering fs. Mean and mean square values to have an idea of what is there. RMS values in different scales and the overal RMS standard deviation on a scale is helpful in grasping disconttinuities. The overal RMS mean of a scale is a hint of whether the variable is meant to be used (or usable as) PCM samples or parametrization. E.g.

  • Large arrays, i.e. with many elements, are usable as PCM samples. If the mean is zero, and they are bound to [-1,1] or to some power of 2, specially [-2**15, 2**15-1], it is probably PCM samples synthesized or sampled or derivatives. If it has more than one or two dimensions where the many samples are, it might be a collection of audio samples with the sample size

  • Arrays with an offset (abs(mean) << 0) and small number of elements are good candidates for parametrization. They might be used for repetition, yielding a clear rhythm. They might also be used to derive more ellaborate patterns, such as by using the values of more then one arrays, and using them simultaneously, often creating patterns because of the different sizes of each array.

  • Values in the order of hundreds and thousands are candidates for frequency. Values within zero and 150 are candidates for decibels, and for absolute pitch or pitch interval through MIDI notes and semitones count, respectively. If the values are integers of very close to them, or have many consecutive values deviating less then 10, it is more likely to be related to pitches. If the consecutive values deviate by tens to about a hundred, it is kin to decibels notation.