Log In  

I might answer my own question here, but I want to take music from one cart and add it to my cart.

From what I've read, I need to copy the sfx and music sections of Cart A and paste it into Cart B. Easy enough, however, I've already made sound effects for Cart B. Am I correct in expecting that my sounds will get overwritten when I paste in Cart A effects?

Any nice way to import music without clobbering my own sound effects so I don't have to remake them? They're not great or anything, but making sounds is easily the most tedious thing in Pico8 and I'd hate to spend all the time to try and churn them out again.

Or maybe my game just won't have music...always an option...

P#25473 2016-07-17 21:12 ( Edited 2016-07-18 16:32)

To open the cart folder type "folder" inside the pico8 shell, and it'll bring up an explorer window. You can open a p8 in an editor like Notepad++ / Sublime Text / Atom. If you open a .p8 file, you'll see a bunch of data split up into sections.

for sfx:

__sfx__
010800000c6250c2050060530605306150060030615006000c7730c6000c6000c5003062500200306250050030615005000060500200306150020030615005000c7730c6000c6000050330615002053061530604
010800000c2500c2000c2000c200132501320013200132000c2500c2000c2000c200132502350518300235050c2501f5021f5021f502132501f50213200134000c2500c2002150221502132500c200132000c200
010800001357013570135601355013542135321352213512115701157011560115501154211532115221151210570105701057010570105721057210572105721057210572105721057213572135721357213572
01080000115701157011560115501154211532115221151210570105701056010550105421053210522105120e5700e5700e5700e5700e5720e5720e5720e5720e5720e5720e5720e57211542115421154211542
010800000a2500f5000f5000f500112500f5000f5000f5000a2500e5000e5000e500112500c5020c5020c5020a2500c5020c5020c502112500a5000a5000a500072500c5000c5000c5000a2500c5020c5020c502
010800001557015570155601555015542155321552215512115701157011560115501154211532115221151213570135701356013550115701157011560115501057010570105601055011550115401153011520
01080000082500000000000000000f250000000000000000082500000000000000000f250002000000000000082500000000000000000f2500000000000000000825000000000000000003250000000000000000
[... MORE]

and for music:

__music__
00 00014344
00 00044344
01 00010209
00 0004030a
00 00010209
00 0004050b
[... MORE]

in both of those, each line of the file is one sfx or one music pattern, in the order they're shown in the pico8 editor.

It's a bit manual, and you gotta be careful to not add extra lines, but you can copy individual lines for sfx / music into another cart. Just copy a line from the original cart, and paste them into the new cart you want the sound in, by pasting over and replacing a line that looks like this in the sfx:

001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

or in music:

00 41424344

Before you do this, I recommend saving backup copies of the carts. But hopefully that helps!

P#25474 2016-07-17 23:16 ( Edited 2016-07-18 03:51)

Cool...I wondered if they were in order, good to know. I only have 10 sfx so I should be able to move those lower in the order after pasting in music.

Thanks for the tip...works like how I had hoped, just gotta be careful.

P#25500 2016-07-18 12:32 ( Edited 2016-07-18 16:32)

[Please log in to post a comment]