tmhglnd / total-serialism

Toolbox full of Algorithmic Composition methods
MIT License
151 stars 11 forks source link

Expand with statistical methods #5

Closed tmhglnd closed 4 years ago

tmhglnd commented 4 years ago

This library should include methods like:

const Stat = require('total-serialism').Statistical;

Stat.max()
//=> return the highest value from an array (possibly also works with note-names)
Stat.min()
//=> return the lowest value from an array (possibly also works with note-names)
Stat.mean()
//=> return the avarage value from an array (possible also works with note-names)
Stat.median()
//=> return the median from an array (possible also works with note-names)
Stat.mode()
//=> return the mode from an array (possible also works with note-names)
tmhglnd commented 4 years ago

Included in commit b075a52353850b771cb2847c83a8db564cae705a and updated to version 1.7.0.

Eventual additions to the library are:

Stat.maximum()
Stat.minimum()
Stat.average()
Stat.center()
Stat.common()