I am making a song in pico-8 that has a section with 3/4 time. How do I do that with the pico-8 tracker? I think you would do it in Milkytracker by changing the length of the pattern. I could just have each pattern contain three beats of one measure and one beat from the next measure, but that's kind of messy and would cause a lot of redundant notes. Could I use Lua programming and the sfx api to hack around the tracker? Is there a chance we could have a feature to change the length of patterns (or at least to make them shorter)?
I'm new here, but I think I know a way to do it in the existing system. stat(n) can access the currently played track on channels 1-4 (n 16..19) and the currently played note index on channels 1-4 (n 20..24). The music editor can play tracks with different speeds simultaneously, but it won't move to the next pattern of four until the slowest track finishes.
So first, set the speed of all tracks in the 3/4 time segment to 3/4 the normal speed (if delay is normally 12, then a delay of 16 means the tracks run three measures in four normal measures time). Then, code the track as if every three notes is a full measure, and completely ignore the last column.
Finally, you'll need to add some lua code in the update to make sure when the note index is >= 24 in the 3/4 time section, you play the next pattern immediately with music(pattern+1). This will skip that last empty column in the tracks and start right at the next measure. And this works even if only 1 of the four tracks is in 3/4 time, playing dissonantly with the rest of them. XD
@Connorses: yes, the web player is still a little laggy on music, it works better when downloaded. zep mentioned somewhere that the 0.1.2 web player would be better at this. See below for a new method I'm hoping works better.
@xordspar0: it's pretty hacky, but thanks! Actually, I've found a better way in my travels: you can set the speed of the track after it starts playing and avoid that little gap! It's more code management, but a better 3/4 time hack for now.
I've changed the way playback works for 0.1.2, and it will allow unusual time signatures without messing with playback in realtime.
0.1.1 took the length of the longest channel in each pattern as the length of the pattern
0.1.2 takes the length of the first non-looping channel from left to right
So, if you set the first channel to play at speed 12, and channels 1..3 at speed 16, only the first 24 rows get played of 1..3. So you can have 8 (24/3) bars.
Unfortunately, it means wasting the last 1/4 of each pattern, and the channel 0 has extremely syncopated timing.
(by the way, old cartridges will still load and play as they used -- 0.1.2 swaps channels around if needed to get the old behaviour)
[Please log in to post a comment]