Mercurial > hg > may
changeset 220:937f908cae52 matrix_opaque_immutable
More compile fixes
author | Chris Cannam |
---|---|
date | Sat, 11 May 2013 12:20:40 +0100 |
parents | ff97765b1d1b |
children | ddc8fa794880 |
files | yetilab/matrix/test/test_matrix.yeti yetilab/stream/filter.yeti yetilab/stream/playback.yeti yetilab/stream/test/test_channels.yeti yetilab/vamp/vamp.yeti yetilab/vamp/vamppost.yeti |
diffstat | 6 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/yetilab/matrix/test/test_matrix.yeti Sat May 11 12:07:21 2013 +0100 +++ b/yetilab/matrix/test/test_matrix.yeti Sat May 11 12:20:40 2013 +0100 @@ -4,6 +4,9 @@ mat = load yetilab.matrix.matrix; vec = load yetilab.block.vector; +load yetilab.block.vectortype; +load yetilab.matrix.matrixtype; + import yeti.lang: FailureException; { compare, compareUsing } = load yetilab.test.test; @@ -107,7 +110,7 @@ (map do col: mat.getAt row col m == generator row col done [0..2]) done [0..1]) ), - +/*!!! "setAt-\(name)": \( generator row col = row * 10 + col; m = generate generator { rows = 2, columns = 3 }; @@ -130,7 +133,7 @@ mat.setAt 0 0 6 m; compareMatrices m' m and not mat.equal m m''; ), - +*/ "transposedEmpty-\(name)": \( compare (mat.size (mat.transposed (constMatrix 2 { rows = 0, columns = 0 }))) { columns = 0, rows = 0 } and compare (mat.size (mat.transposed (constMatrix 2 { rows = 0, columns = 4 }))) { columns = 0, rows = 0 } and
--- a/yetilab/stream/filter.yeti Sat May 11 12:07:21 2013 +0100 +++ b/yetilab/stream/filter.yeti Sat May 11 12:20:40 2013 +0100 @@ -2,7 +2,6 @@ module yetilab.stream.filter; mat = load yetilab.matrix.matrix; -vec = load yetilab.block.vector; ch = load yetilab.stream.channels; load yetilab.stream.streamtype;
--- a/yetilab/stream/playback.yeti Sat May 11 12:07:21 2013 +0100 +++ b/yetilab/stream/playback.yeti Sat May 11 12:20:40 2013 +0100 @@ -2,7 +2,6 @@ module yetilab.stream.playback; vec = load yetilab.block.vector; -fr = load yetilab.stream.framer; af = load yetilab.stream.audiofile; ch = load yetilab.stream.channels; @@ -20,8 +19,7 @@ bb#order(ByteOrder#LITTLE_ENDIAN); sb = bb#asShortBuffer(); for [0..len-1] do i: sb#put(i, samples[i] * 32767.0); () done; - actual = line#write(bytes, 0, nb); - ()); + \() line#write(bytes, 0, nb)); play line blocks = for blocks (playBlock line);
--- a/yetilab/stream/test/test_channels.yeti Sat May 11 12:07:21 2013 +0100 +++ b/yetilab/stream/test/test_channels.yeti Sat May 11 12:20:40 2013 +0100 @@ -10,7 +10,7 @@ newMatrix data = mat.newMatrix (ColumnMajor ()) (map vec.fromList data); compareBlocks b1 b2 = - compare (vec.list b1) (bl.list b2); + compare (vec.list b1) (vec.list b2); [
--- a/yetilab/vamp/vamp.yeti Sat May 11 12:07:21 2013 +0100 +++ b/yetilab/vamp/vamp.yeti Sat May 11 12:20:40 2013 +0100 @@ -233,9 +233,9 @@ Error "Failed to load Vamp plugin with key \(key)" yrt; -//!!! bring block typedef into scope -- this shouldn't be necessary, +//!!! bring vector typedef into scope -- this shouldn't be necessary, //but see comment in processed below -load yetilab.block.blocktype; +load yetilab.block.vectortype; processed { p, sampleRate, hop } frames count // I don't know why this type declaration is necessary. Without @@ -247,7 +247,7 @@ list<{ timestamp is Time number | Untimed (), duration is Time number | Untimed (), label is string, - values is block + values is vector }>>> = case frames of frame::rest:
--- a/yetilab/vamp/vamppost.yeti Sat May 11 12:07:21 2013 +0100 +++ b/yetilab/vamp/vamppost.yeti Sat May 11 12:20:40 2013 +0100 @@ -76,14 +76,14 @@ { start = t0, step = t1 - t0, - values = map do f: (vec.data f.values)[0] done features; + values = map do f: vec.at 0 f.values done features; } fi; structureCurve features = map do f: { time = timeOf f, - value = (vec.data f.values)[0], + value = vec.at 0 f.values, label = f.label } done features; @@ -96,7 +96,7 @@ structureSegmentation features = map do f: { time = timeOf f, - type = (vec.data f.values)[0], + type = vec.at 0 f.values, label = f.label } done features; @@ -104,7 +104,7 @@ map do f: { time = timeOf f, duration = f.duration, - pitch = (vec.data f.values)[0], //!!! no, might be empty + pitch = vec.at 0 f.values, //!!! no, might be empty otherValues = array (tail (vec.list f.values)), //!!! no, might be empty label = f.label } done features;