Mercurial > hg > constant-q-cpp
diff yeti/cqt.yeti @ 20:dad5d8a06a5d
Return only the actual results (i.e. space with zeros rather than duplicates)
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 30 Oct 2013 17:29:14 +0000 |
parents | 3b044c30cffc |
children | 5787785f4560 |
line wrap: on
line diff
--- a/yeti/cqt.yeti Wed Oct 30 16:31:25 2013 +0000 +++ b/yeti/cqt.yeti Wed Oct 30 17:29:14 2013 +0000 @@ -131,10 +131,15 @@ colsPerAtom = int (colsPerChunk / kdata.atomsPerFrame); chunkNo = int (col / colsPerChunk); atomNo = int ((col % colsPerChunk) / colsPerAtom); + atomOffset = ((col % colsPerChunk) % colsPerAtom); // eprintln "row \(row) of \(rows), col \(col) of \(columns): oct \(oct), bin \(binNo), chunk \(chunkNo) of \(chunks), atom \(atomNo) of \(kdata.atomsPerFrame)"; - cm.at bits[oct][chunkNo] (binNo * kdata.atomsPerFrame + atomNo) 0; + if atomOffset == 0 then + cm.at bits[oct][chunkNo] (binNo * kdata.atomsPerFrame + atomNo) 0; + else + cplx.zero + fi; done { rows, columns }; );