Log In  

Hello! I've recently been trying to learn as much as I can about audio manipulation in PICO-8 lately, and recently found out about the \a control code.

You denote it with \a and can optionally follow it up with i and 0-7 to choose which instrument will be used:

print("\ai5ceg") --plays a c major triad using instrument 5

What I'm wanting to do is play a custom SFX instrument using this control code, but from what I've tried so far, it doesn't seem to be possible.

The first thing I tried was putting unique patterns in the first 8 SFX slots and testing with i 8-f (8-15) in the control code to see if any of them play, but it just seems to loop back to the standard waveforms 0-7.
The second thing I tried was toggling SFX Instruments: ON in SFX slot 8 and then specifically have the control code play from SFX slot 8

print("\a8i5ceg") -- c major triad in SFX slot 8

I'm sure it's probably just a limitation of this particular method of playing audio, especially considering no documentation of this control code mentions custom SFX instruments, but If anyone has any insight on this, or other methods of adaptively playing custom SFX, it would be much appreciated.

(Long story short I'm trying to have a single custom SFX instrument that I can play adaptively in different pitches for a rising combo sound effect without using up a bunch of other SFX slots.)

P#106685 2022-02-11 05:11 ( Edited 2022-02-11 05:14)


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 05:26:21 | 0.008s | Q:9