So, as demonstrated by my recent post, I have finished my Pico-8 album, noclip. Now I want to export all the music from the cartridges. However, the exporter for music only exports one pattern. If you select multiple, it will simply export the one you just clicked on. Are there any tools made by the community which can export all the music from a cart and reconstruct it? Cheers in advance.
From what I can tell, there are two built-in ways to turn PICO-8 audio into a .wav file. I believe both ways require audio to be not muted; the amplitude in the output file will be based on the current volume config setting.
If you move to a pattern (not select as in to copy+paste, scroll to as if you were about to start playing) and then hit Esc and type "export [filename].wav" at the command line, it will export music in the order it would be played until it hits a blank pattern, until it hits a stop flag, or until it hits 32768 music ticks (about 4:31), whichever comes first.
Edit: If the editor doesn't have the music editor open, I think it defaults to exporting an sfx instead - it will tell you what you did and you can course-correct if needed.
If you run code something like this:
pattern = 0 extcmd("audio_rec") music(pattern) repeat flip() until stat(24)==-1 or btnp(4) or btnp(5) extcmd("audio_end")
then PICO-8 will play your music starting at the specified pattern until it stops (at which point stat 24 = -1) or until you press a button. Then it will export everything that played, however long. This is slower, but you can use it to export arbitrarily long pieces of music, and [edit: use something similar to record] any kind of generative music if you make music programmatically.
Thanks @packbat, I didn't know about the hard 32k tick limit, that puts a slight damper in using PICO-8 as a chiptune DAW...
When I exported my music I assumed it was detecting that it exported the same looped section a couple times and intelligently stopped.
And thanks for the workaround using audio_rec, instead of seconds that will take several minutes, but it's OK.
Ah, it seems I have greatly misunderstood the way exporting audio works lol. I thought that it exports only the patterns selected and no further, which, as shown by @packbat's explanation of the command, is not the case. Thanks, I'm glad to be part of such a helpful community!
Here's an example with the first song in the album, SEEN. When I run the cart, it plays the music for the right amount of time, then stops, but the resulting audio is half a note.
[Please log in to post a comment]