Log In  

Cart #op8_add-16 | 2022-05-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

4OP-8 is a tool for creating sound patches with four operators. This instrument editor features additive, AM, ring modulation and orbit (bitwise or) synthesis. This effect is achieved by mixing four sine waves and playing them through the PCM channel.


Controls and layout:

Just like PixEditor, this tool only uses the mouse for its controls, which also makes it mobile compatible (except for saving and loading). The patch editor has several parameters which can be changed to obtain unique sounds:

  • Global parameters
    • Master Volume: set the global patch volume (x1 or x2).
    • Operator: select the operator currently being edited.
    • Octave: set the keyboard's octave (0-3).
    • Synth Type (located between the octave parameter and the save/load buttons): swithes the synthesis between additive, AM, ring modulation and orbit.
  • Operator parameters
    • Volume: set the operator's volume (0-10)
    • Multi: set the operator's frequency multiplication (1-15).
    • ADSR: set the operator's attack (A), decay (D), sustain (S) and release (R).

Patches can be played with the on-screen keyboard, which features an entire octave that can be selected with the Octave variable.


Saving:

The 4OP-8 save format is an array with 26 items. The first item is always "4op-8_patch" and it's used for format checking. The second item stores the instrument's synth type. The other 24 items store the paramenters of all the operators.
To save a patch on the BBS, press the key combination ctrl+c after clicking the save button to complete the copying process. For a string copied outside of PICO-8 to be loaded on the BBS, the keys ctrl+v must be pressed before clicking the load button.


Thanks to the PICO-8 discord server for all of the help and feedback!
Thanks to Bikibird and Luchak for helping with and providing code for PCM playback!

P#110980 2022-04-28 02:41 ( Edited 2022-05-03 14:06)

:: IMLXH

oh, this rules. really well-documented code too, thanks so much for that!

...would it be at all possible to drive the engine with pico-8's sequencer somehow? i can't remember whether pcm silences all other voices or not.

P#115249 2022-08-04 20:59

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-08-13 20:35:31 | 0.006s | Q:13