calculate length of a pattern in seconds.
if you are working in weird numbers and loads of time changes, a good way to figure out the actual length in seconds of a pattern as it is placed in the song layout is to put a 30 (stop song) command at the bottom and sample it in 16bit mono with the start and stop options enabled. once you have the sample of the pattern you can edit the sample and see at the bottom "base C5; 16bit; 44100 Hz; 592kb; 6.87s" if you need more detail than that you can hit the burger menu... misc... resample (new length) and it will display the number of samples of that 16bit 44k mono file... now you can divide by 44100 and get the real seconds... 6.8750113378684805 and you see that sunvox does not lie. remember to remove the 30 command
i put this here as a pep talk to newbies and oldtimers because i catch myself clearing out the whole tune from the start of the sequence to negative time just to get the time estimation of a simple pattern. don't like... u know you do it. would be cool if the devs made an option to calculate the time in decimal of second and samples in the Pattern Properties, like a shortcut
calculate length of a pattern in seconds
- AutumnCheney
- Posts: 507
- Joined: Sun Dec 29, 2019 8:16 am
- Location: tahlequah, ok, usa
- Contact:
Re: calculate length of a pattern in seconds
actually, there's a simpler way than resampling
from the manual:
(2.5 comes from 60000/(24 * 1000))
for example, if the bpm is 120, the tpl is 6 and the pattern is 32 lines, the formula works out to 4 seconds, which you can confirm by creating said project + pattern
from the manual:
so we can use the formulaTPL (Speed) - Ticks Per Line. Tick is the smallest time interval in SunVox. Tick length in milliseconds = 60000 / BPM / 24.
Code: Select all
( 2.5 / bpm ) * tpl * pattern length in lines = length in seconds
for example, if the bpm is 120, the tpl is 6 and the pattern is 32 lines, the formula works out to 4 seconds, which you can confirm by creating said project + pattern
Re: calculate length of a pattern in seconds
That is IF you are using a steady tempo. what if every line has a random BPM?
- AutumnCheney
- Posts: 507
- Joined: Sun Dec 29, 2019 8:16 am
- Location: tahlequah, ok, usa
- Contact:
Re: calculate length of a pattern in seconds
that's true, but theoretically you could calculate the length of every bpm change and add them together
i think a bpm change every line would sound like a mess, the most i go is once every measure (prove me wrong!)
i think a bpm change every line would sound like a mess, the most i go is once every measure (prove me wrong!)
Re: calculate length of a pattern in seconds
yeah, you are right... i'm prolly just making an oldschool sounding washed up mess.
- Attachments
-
- o9_37.sunvox.zip
- (16.4 KiB) Downloaded 124 times
- AutumnCheney
- Posts: 507
- Joined: Sun Dec 29, 2019 8:16 am
- Location: tahlequah, ok, usa
- Contact:
Re: calculate length of a pattern in seconds
actually kind of cool, throw a randomly modulated loop module onto this and you'll have gantz graf