Log In  

Hey @zep!

Can you please add a feature to PICO-8's WAV export function, so that each of the four channels have one WAV file each? I've been wanting to do oscilloscope views of PICO-8 chiptune music, but the "oscilloscope view" format requires one WAV file for each channel (so that each channel is seen as a separate waveform).

I've already mentioned you on Twitter about this, but you never replied:
https://twitter.com/StinkerB06/status/1182348172548399104
https://twitter.com/StinkerB06/status/1174923908128002048

P#68824 2019-10-13 01:56

Sure! What else??

P#68959 2019-10-17 10:47

why not simply mute the channels?

P#68960 2019-10-17 11:30 ( Edited 2019-10-17 11:31)

That's what I want. Implementing it shouldn't be too hard.

P#68961 2019-10-17 11:34
1

I mean - you can do it.
There is no need to add this feature for that single use case!

P#68969 2019-10-17 17:56

@StinkerB06, how about this ?

Cart #rubaseruzi-0 | 2019-10-19 | Code ▽ | Embed ▽ | No License

This will play each of the first SFX tracks of demo music from @zep. It also saves them off as individual WAV files.

HOPE THIS HELPS !

P#69038 2019-10-19 01:52 ( Edited 2019-10-19 02:14)

@dw817 That seems to work, awesome! I'll perhaps modify your code to fit my needs.

However, the only problem is that this may not work with all songs made on the PICO-8, especially ones where different SFX SPD's are used on the same music-frame number.

P#69050 2019-10-19 05:27

Glad to help. And yeah, it may not work for everything. But enough to get you started so you can examine their wave tables in sync.

P#69064 2019-10-19 14:31 ( Edited 2019-10-19 15:56)
1

Apologies for this late reply. There's a workaround I found that requires up to 3 looping SFX (for muting up to 3 channels) that don't actually make any sound, and uses extcmd() calls to start and stop audio recording at the correct moments.

Doing this several times and combining the WAV files together in Audacity, I managed to create a full-soundtrack oscilloscope view of POOM.

P#87726 2021-02-16 04:50
1

There's a couple edge cases this can't handle, although I did my best, but:

Cart #packbat_exportstems-0 | 2021-07-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Download the cart, replace the music and SFX data with whatever you want to export, and run it. It will go through each channel, replace each SFX in every other channel with an equivalent blank SFX - the same SPD and looping if it loops, the same length in music ticks otherwise - and then save the results to the music and SFX ROM of [channel number].p8 (so, 0.p8, 1.p8, etc.). If it runs out of SFX to create blank SFX in, it'll disable the other channels, export it that way, and print a warning.

You will then need to open each one of those to export the music as a .WAV, but that should be faster than waiting while an extcmd("audio_rec") finishes playing. If you would rather have it record instead, you could replace

    local filename=channel..".p8"
    print("exporting to "..filename)
    cstore(0x3100,0x3100,0x1200,filename)

with something like

    print("recording audio starting at\n music "..liverecord)
    extcmd("audio_rec")
    music(liverecord)
    local t0=t()
    repeat flip() until stat(24)==-1 or t()-t0>tmax
    extcmd("audio_end")

where liverecord is the index of the first pattern of whatever music you want to export and tmax is the length you want to cap the recording to.

P#94760 2021-07-12 18:51

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 11:34:20 | 0.027s | Q:33