When using the "number of lines" entry box in pattern properties, the allowable range is 4-4096.
My suggestion is to allow entry of values 1 through 524288 (2**19).
This will allow for practical use of huge patterns (use cases described at bottom) while avoiding rendering and performance errors that would require additional changes to SunVox code beyond changing the min/max limits of the entry box.
When using the /2 button, the range can go as low as 1. Performance of such a pattern behaves as expected of a 1-row pattern, and saving and reloading the project is fine. However the "number of lines" shown in the pattern properties never goes below 4.
When using *2 button, the range can go far beyond 4096, but the entry box maxes out at 4096. Again, performance of super long patterns behaves as expected (tested by adding note near the end of the pattern, and playing back from just before that point in the timeline).
With super long patterns, they render correctly in pattern editor and timeline view up to length of 524288 (2**19). Once 1048576 (2**20) is reached, the pattern editor still displays correctly, but the pattern bar in the timeline begins to have rendering issues. Once 16777216 (2**24) is reached, the pattern editor no longer displays row numbers. Once length of 67108864 (2**26) is exceeded, an integer overflow/wraparound occurs and the timeline position that occurs after 67108863 is presented as -67108864. There is also noticeable UI rendering lag that begins to occur near these extremely long patterns (16GB RAM, 2.3GHz i7) which I would suspect could lead to audio performance issues (untested).
I have to say that I'm pretty happy to find out that >4096 line patterns appear to be cleanly supported by the playback engine. This means that really long live coding sessions that have ticks-per-line set to 1 have a good chance of being cleanly exported to a native .sunvox file.
Why are huge patterns desirable for this kind of use? When a pattern ends and a different one begins, note-offs occur for the tracks in the pattern that ended. Being able to avoid pattern endings altogether will be the simplest way of encoding a long stream of arbitrary events generated by code.
An example would be a 4-hour drum-n-bass session at 180 bpm. That equates to 4*60*180*6 or 259200 rows. One could even double the tempo to increase the effective resolution to 48 ticks per beat instead of the typical 24 (resulting in 518400 rows) and still handily fit within SunVox's practical limits!
Found a bug? Post it here.
2 posts • Page 1 of 1
- Site Admin
- Posts: 3118
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
Thank you! I will fix it. :)