[PD] writing to cyclone/coll takes a long time

Jakob Laue jakkesprinter at web.de
Sat Nov 30 14:00:50 CET 2019


Dear list, 
For a university project we are building a melody generator based on markov chains. This includes generating a big matrix of probabilities for playing a certain note. The number of rows in the matrix depends on the markov order and the pitch range that our patch works with. We have a pitch range of 9, hence markov order 3 means writing 9^3 rows = 729.
We want to work with the fifth order which means writing 9^5 = 59049 rows into the matrix. We use the coll object from the cyclone library to generate our matrix because it has the handy gui for looking at your matrix after you generated it.
Our problem is that it takes more than 3 minutes to write 60000 rows into the coll object and we don't understand why.
Attached we have a test patch that simulates our matrix generation. Writing 700 rows into coll takes less than a second, writing 6000 rows takes round about 1.5 seconds (simulating fourth order/9^4), writing 60000 rows takes 3 minutes and 45 seconds.
Do you have any hint why it takes that long to write 60000 rows into coll? Maybe we do something wrong or have missed some smarter way to write our rows into the coll matrix.

We are on: 
MacBook Pro 13" early 2011, macOS Sierra 10.12.6
Pd 0.48-0


Thanks, Hajar and Jakob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coll_time_problem.pd
Type: application/octet-stream
Size: 572 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20191130/351b8dfc/attachment.obj>


More information about the Pd-list mailing list