Mercurial > hg > may
changeset 104:4e57dd686674
Return matrix from structureGrid (and therefore from postprocess with grid data)
author | Chris Cannam |
---|---|
date | Wed, 27 Mar 2013 09:14:59 +0000 |
parents | 1ff7bc742ec5 |
children | 1ec604ec535d |
files | yetilab/vamp/vamppost.yeti |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/yetilab/vamp/vamppost.yeti Tue Mar 26 22:41:06 2013 +0000 +++ b/yetilab/vamp/vamppost.yeti Wed Mar 27 09:14:59 2013 +0000 @@ -1,6 +1,6 @@ module yetilab.vamp.vamppost; -fmat = load yetilab.block.fmatrix; +mat = load yetilab.matrix.matrix; bl = load yetilab.block.block; fillOneSamplePerStep config features = @@ -47,13 +47,10 @@ structureGrid binCount features = if empty? features then - fmat.constMatrix binCount 0 0; + mat.zeroMatrix { rows = binCount, columns = 0 }; else - fmat.generate - do row col: - v = bl.data features[col].values; - v[row]; - done binCount (length features); + mat.newMatrix (ColumnMajor ()) + (map do f: list (bl.data f.values) done features); fi; structure data = @@ -72,7 +69,7 @@ Curve (): // No duration, one value Curve features; Grid (): // No duration, >1 value, not variable rate - Grid (structureGrid binCount (array features)); + Grid (structureGrid binCount features); Instants (): // Zero-valued features Instants features; Notes (): // Duration, at least one value (pitch or freq)