Log In  
Follow
packbat

Mid-Atlantic USian. Fan of autobiographical games, unusual game experiences, and heavily stylized graphics. (Also deckbuilders and roguelikes.) Queer, disabled, plural, autistic.

[ :: Read More :: ]

The Packbats' 2-node Instrument Collection - on the BBS as #packbats_2node - came from the same place as our guide to Picotron's instrument designer: with PICO-8 you had loads of instant sounds that came with the fantasy console, but with Picotron you didn't. So: we wrote a guide, then we made some instant sounds.

The 2-node part (is it 2 nodes? does the output mixer count? if the output counts it's three) was for three reasons, only one of which makes us feel arrogant:

  1. By forcing us to make something simple, we get it done faster and easier, which means the community has it sooner.
  2. By leaving space for more nodes and leaving unused envelopes, we make it easier for musicians to modify our instruments to their needs.
  3. By refusing to use all the tools at our disposal, we refuse to make you as a sound designer feel like you can't compete. We're proud of what we made, don't get us wrong, but the joy of playing in Zep's playgrounds is futzing around with Zep's beautiful tools and getting inspired. If you're down to give it a try, to get over the hump and to the point where you can just have fun making cool sounds, you'll find all kinds of amazing stuff you can make. If you then type "[instrument] synth design" into DuckDuckGo and click on some links, you'll make even more cool sounds because you'll have way taller giants than us newbies to stand on.

    This pack? Is good. You can make cool music with it. But you can make cool music with just about anything, because you're a musician and that's what we all do. But also, it's called playing music for a reason, and we don't want to take any toys away from you. Even just by making you feel like you don't have any reason to try.

...anyway, boosting our self-esteem aside (thank you all who expressed enthusiasm for our instruments!), we thought it would be nice to make a designers' commentary on the collection. We're told looking at presets can be educational, but we had a hard time parsing what was going on in a preset the times we tried to, so ... here's our thought process for each sound, how it works, and some of the changes we think can work for it. If you've already read our first guide and are looking for more, we hope this - here or in Picotron text file form - helps.

(p.s. A good way to test changes which add nodes - new effects, modulators, or oscillators - is to use the mute button on the new item to compare.)

(p.p.s. In v0.1.0e, when this pack was made, SFX files supported a maximum of 25 instruments. We're not going back to add an extra seven now that v0.1.0f is out, though - our work is done.)

(p.p.p.s. At the very end of the document is an index listing off all the sound effects by what Picotron SFX tools we used, if you want to see how some particular one works.)

Drum Kit

The instrument pack is approximately sorted by what Hornbostel-Sachs numbers the instruments we've copied have, with one exception: we moved the membranophones to the top so that all the drum kit pieces would be in one place.

[00]="kick"

(HS-211.212.1. Originally [04].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGIAAABgAAAA8FF7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPKBABIAEgAfAAAhACDyAQASAPJQAPlgABMA9BkAEKEAQPzg9mEA-CIA9FIA82AA9g8KUPHPDHD-gKD-8PgA-3DQHwCH0=")

The classic 808-style synth kick drum sound is playing a waveform with its pitch starting high and rapidly falling. For economy's sake, we used the same envelope for pitch (TUNE) and volume, and also...

...I mean, it sounds better with a bit of distortion. And we weren't using our second node, so, use it for shape distortion. The parameters we have here - high GAIN, high ELBOW, moderate CUT - are pretty normal for giving a sound a bit more drive.

You could probably go way harder on the distortion, we just don't have any instinct for that.

Oh, little Picotron trick: by using the "/4" mode on the shape mix knob, we could dial in the volume more precisely to match the stock triangle sound. Which we did - all the instruments are volume-matched to aid with mixing.

Suggestions for playing with it:

  • Play with SHAPE parameters.
  • Remove SHAPE effect.
  • Change waveform.
  • Add another carrier oscillator to the main one to thicken the sound.

[01]="tom"

(HS-211.212.1. Originally [23].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGAAAABeAAAA8E97aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPGBABIAUAD_AAAfAAAhACDyAQASAPJQIP7xEgBA-FD66AAQgQBAAPjwHwsQ8XAATwBQfwrw-4Cg--D4AP9w0B8Ah9")

While wrapping the pack up, we decided we needed more percussion instruments, since those have a reputation for being hard to synthesize.

The big difference between a tom and a kick, as far as we understand, is where the bulk of the sound lies. With a tom, you have a higher pitch.

It's not actually pitched, though, so we wanted to make sure that it didn't just end with a static tone. That's where we got the stacked tone envelope thing: ENV-1 is an attack envelope, getting the sharp note of the initial sound, and then ENV-0 continues morphing the pitch as it fades out. But because the envelopes are so much shorter, the final pitch is much higher, giving it a mid-percussion sound.

Other than that? We chose a square wave, both for contrast with the triangle-wave kick and because it sounded cool, so we decided to also bring in a filter to round off those edges. The low-pass closes on the attack envelope, so there's a lot of high-frequency sound initially for an even more dramatic attack, but the body of the instrument sound is less harsh.

Suggestions for playing with it:

  • Add some high pass to the filter setting.
  • Change waveform and waveform envelope range.
  • Adjust tune envelope ranges.
  • Add shape effect for distortion.
  • Add new oscillator to the main one, possibly with ENV-1 attached to volume so it's just beefing the attack.

[02]="snare"

(HS-211.212.11. Originally [05].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGcAAABlAAAA8FZ7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPJxABIAEgAfAADxIQAg8gEAEgDyEgATAPn5ABCBAEDzAPmxAH8KcBYA8hEA8fCg8vCgUPFQUAChAF8LkP_AoP-w_AD-cNAfAIfQ==")

Making a perfect snare drum sound is really hard. But making a functional mid-percussion noise instrument that can fill in for a snare drum? That's very doable.

This one is dead simple: noise into low-pass filter, envelope to fade it out. For added shaping, we put the env on the filter, too - again, sharp attack, duller core sound - but really there's nothing else here.

Suggestions for playing with it:

  • Adjust envelope parameters.
  • Put an envelope on the high pass knob in the filter to take away low end after the initial attack.
  • Add a new envelope to the oscillator volume knob with a short decay, extend the decay on ENV-0.
  • Turn TUNE on the oscillator down substantially to get a different timbre to the noise.
  • Add a separate WT-0 oscillator to the instrument and set it up to make a kick-like sound.
  • Add an ECHO effect to imitate the technique where the stick impacts the drum head multiple times in quick succession when hitting it. (We stole this trick from Many - viscountexx on Twitch.)
  • Add a SHAPE effect for distortion.

[03]="hi hat"

(HS-111.142. Originally [06].)

--[[pod_type="instrument"]]unpod("b64:bHo0AF0AAABbAAAA8Ex7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPJRABIAEgAfAADxIQAg8gEAEgDyEgASAPEA--kAEIEAQPGA9OAAQPQg_l8K4NAATwxQ-4Cg--D4AP9w0B8Ah9")

Same story: making a real cymbal sound is hard, but making something to do the job is not so hard. Instead of focusing on the low-pass filter, we mostly used the high-pass. The envelope is quite short, imitating a closed hi hat.

The one hidden little trick is the R on the WAVE knob. This has very little effect because WT-1's sounds are quite similar (especially after filtering), but the R means every hit uses a random sound from the entire range ... and so is sliiiiightly different.

(Initially we were going to include a very obvious use of the random envelope in the collection - square wave with random pulse width and low-pass resonant filter - but we ran out of slots, so you'll have to try that one on your own.)

Suggestions for playing with the hi-hat:

  • Adjust various knobs - e.g. low pass and high pass, decay of the envelope, TUNE.
  • Add a tiny bit of RES to the filter. (This changes the sound drastically!)
  • Add an ECHO effect.
  • Add SHAPE distortion.
  • Add a second, similar FILTER effect to remove even more low and/or high end.

[04]="crash cymbal"

(HS-111.142. Originally [07].)

--[[pod_type="instrument"]]unpod("b64:bHo0AF0AAABbAAAA8Ex7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHhABIAEgAfAADxIQBg8gEAEgDyEgATAPLQSAAQgQBAAPdwAED0kPkfCuD0oADxHwxQ-4Cg--D4AP9w0B8Ah9")

This is basically the same as the hi hat, but with a few tweaks and a much longer envelope. There is also a subtlety in that the volume envelope is applied to both output and oscillator envelopes - this causes the sound to die off slightly quicker at first and slightly slower as it trails off - but it is deliberately quite similar to the hi hat sound so that you can interleave the two to get an open-hihat effect.

All the same suggestions for playing with the hi-hat apply to the crash cymbal.

Pitched Idiophones

You've already seen two idiophones - instruments with solid material that resonates to make the sound - but these are the ones that play notes.

[05]="marimba"

(HS-111.212. Originally [20].)

--[[pod_type="instrument"]]unpod("b64:bHo0AG4AAABsAAAA8F17aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPJRABIAEgAfAAAhAGDyMPHBEgDyEgBQ-TAAEED0EPJ4APEQIQBA8yDxIBMAIBEAEgBA9ADxoB8KEPHQ9AAfAFBvCvD-gKD-8PgA-3DQHwCH0=")

This one, we made out of pure vibes. Lots of choices we can't explain, I'm afraid.

FM synthesis was an obvious choice for this - it's easy to put an envelope on FM depth to make the sound change as the note plays, and it's easy to make hollow timbres like you get from idiophones. In order to make the initial hammer-strike stand out, we stacked two volume envelopes: a fast envelope for the initial attack and a slow envelope with sustain for the body of the sound. Because ENV-0 (the body-sound envelope) takes care of silencing the sound on release, we didn't need any sustain on ENV-1 - we could control the range directly on the knobs.

Suggestions for playing with it:

  • 4/1 ratio for FM modulation. The other ratios didn't sound like marimbas to us, but that one, maybe.
  • Adding an additional oscillator to the instrument.
  • Tweaking envelope parameters and ranges on knobs they control. (Unexpectedly interesting option: a tiny bit of attack on ENV-1.)
  • Detuning the BEND knob on the FM modulator osc.
  • Adding a SHAPE effect. (We had its gain drop after the initial attack using ENV-1, so the distortion mostly only affects that transient.)
  • Adding an ECHO effect. This one is really sweet.

[06]="celesta"

(HS-111.222. Originally [14].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGAAAABeAAAA8E97aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHRABIAEgAfAAAhACDyAQASAPISAFDx0P3wEEDzSQAQkgCiAPivCvDxcPYA8PsAGgDxDwrA-4Cg--D4AP9w0B8Ah9")

This one is, we fully admit, a JPEG of a JPEG. We made a celesta patch a while ago for PICO-8, and with that one, the echo and vibrato were big parts of that sound ... so we just kept those two things.

To our credit, though, another part of that effect was a detune, and we went about making that part in a pretty clever way. Normally, you make a detune effect with two oscillators that are out of tune with each other, but we don't have two oscillators because we used that space for an echo instead. ... so instead we set the vibrato - which is to say, the rate at which the tuning changed - to 16 and the echo - that is, the timing between when the note plays and is repeated - to 10. And so we do have two notes playing at a time out of tune with each other ... but the second one is just the echo of the first.

(We chose 10 and 16 because those are near the golden ratio, and that means multiple echos are relatively far from synchronizing.)

I think it sounds nice playing high-pitched celesta parts, however accurate it is or isn't. The waveform is quite mellow.

Suggestions for playing with it:

  • Give it a sharper attack with an ADSR envelope (new or not) acting on the oscillator volume with the range restricted.
  • Modify the timbre with FM or ring mod. This may be a bit tricky, but try things.
  • Double up the echo effect.

[07]="steelpan"

(HS-111.241.12. Originally [24].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGsAAABpAAAA8Fp7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPIBABIAEgAfAAAhAGDyUPEhEgDyEgAQ-9EAQPRAABcA8RAhAEDxBQAg8qEAEGEAQPIfCjD0EAC-AFDxQACfCtD-gKD-8PgA-3DQHwCH0=")

Looking at the list of Hornbostel-Sachs categories, we didn't like any of the pitched membranophones we saw, but we did think that one last pitched idiophone would be a good last instrument.

FM synthesis was basically necessary for this one. We didn't even try to get the sound any other way. It being an idiophone, we decided to go straight for the non-integer ratios, on the grounds that it would make a non-harmonic sound - that is, one with overtones that aren't multiples of the bass frequency - because that harmonic pattern is a function of the physics of strings and tubes of air, not sheets of metal. From there, it was just listening.

Oh, and we did that trick again where we have one fast envelope and one slow envelope.

Suggestions for playing with it:

  • Adjust decay on envelopes.
  • Adjust volume on FM mod.
  • Play with waveforms.
  • Change level of detune between carrier and FM BEND knobs.
  • Add echo.
  • Add a mod or oscillator to the FM modulator. This is tricky but there's a few possibilities to find.

[08]="glass pad"

(HS-...133.2? Originally [11].)

--[[pod_type="instrument"]]unpod("b64:bHo0AFkAAABXAAAA8Eh7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPERABIAEgAfAAAhACDyAQASAPISABIAQAD06AAQkgDyggD8Dwrh8oD4APKPDFD-gKD-8PgA-3DQHwCH0=")

This did not start as an imitation of any acoustic instrument, hence the nonspecific name and number. We thought it was a little reminiscent of the armonica - that instrument made up of a bunch of glass bowls and played by friction from the fingertips - but originally we just wanted a beautiful electronic pad sound. So including it here is a bit of a cheat, but not really a harmful one or anything.

The bulk of the effect is simply the volume envelope and the echo, but we did double the envelope onto the waveform dial to give it some more textural interest.

Also, an interesting note about the echo: normally, a delay of 40 makes a quite noticeable, rhythmic echo, but because the attack and decay are also 40, it is smoothed out to unnoticeability and just gives the instrument an even bigger reverb effect.

Suggestions for playing with it:

  • Adjust ADSR parameters.
  • Adjust echo parameters. (Recommend hitting Space to halt playback first, to avoid glitches.)
  • Change waveform.
  • FM or ring modulate waveform to get new timbres.

Chordophones

Because we moved all our membranophones up, the next category is chordophones - instruments where the note starts as a vibrating string. Extremely popular class with Hornbostel and Sachs, we suspect - some of these have very specific numbers.

[09]="piano"

(HS-314.122-4-8. Originally [01].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGMAAABhAAAA8FJ7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPIBABIAEgAfAAAhAGDywPGREgDyEgASAED14PQZACEBQAESAPJA8gD6kRMA8q8KMPX-AHDxnwrw-4Cg--D4AP9w0B8Ah9")

Again, we have a quick attack envelope and a slower body envelope. We also forgo much of the work we could have done on designing the best body sound in favor of (a) simplicity and (b) making a thump sound to represent the hammer hitting the strings.

We actually pulled a bit of a trick with that thump: 28 is quite a bit longer a thump than we'd prefer, so we set the pitch of our second (thump) oscillator to dive far into inaudibility before the time was up. You'll note also that said pitch is absolute, ignoring which note was played and its volume; this makes it more consistent, which feels better. With variable pitch, it gets chirpy as you move up the octaves.

Suggestions for playing with it:

  • Adjust envelope parameters.
  • FM modulate the attack phase of the body oscillator (ENV-1 on VOL of the new modulator).
  • Add a second carrier osc to the body oscillator with the same timbre (VOL = *64, WAVE = +0) and BEND it a lot to produce a jangly sound.
  • Add a light echo to the output.

[10]="shamisen"

(HS-321.312. Originally [17].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGoAAABoAAAA8Fl7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPKBABIAEgAfAAAhAGDyAPEBEgDyEgBQ_iAAEED44PGgGADxIQBggAESAPIA-uEAEwD6bwow8lDxwG8AUF8K8P_AoP-w_AD-cNAfAIfQ==")

The shamisen is an instrument we Packbats missed out on, but got mentioned when we asked what to include. So, we went to get reference to draw from.

Ki&Ki's song "Tokitsukaze" is (if we understand correctly) Tsugaru shamisen specifically. Most of the search results we saw on DDG were also Tsugaru shamisen, so Tsugaru shamisen it shall be. We don't know what else is out there.

The striking aspects of the sound to us were the prominent plucking sound, the variable pitch (which mostly has to come from tracker effects, but those weren't implemented yet), and the very short sustain. And the stylistic aspects of play, but we don't know those so we can't help there.

We created that aggressive pluck sound with four pieces: a hard sweep from sawtooth to sine-triangle, a big initial drop in volume, a big bend into the note, and noise, all on the A=5 attack envelope. We let the body envelope have a tiny bit of sustain - that felt closer to right - but the bulk of the sound design was in that pluck.

We shan't have many suggestions for playing with the timbre of this one, just because we don't know the instrument, but a couple possibilities:

  • Change the timbre of the WT-0 oscillator with some FM modulation, either on the whole sound or just attack.
  • Change parameters (e.g. TONE of noise pluck, ENV values, volume ranges, etc.)
  • Add an echo effect.

[11]="guitar"

(HS-321.322. Originally [12].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGsAAABpAAAA8Fp7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPGhABIAEgAfAAAhAGDxwPIBEgDyEgBQ93AAEED3wPWwFwDxECEAQPIlASEAEgBA9VDywB8KEPJg8oA-AFBPCvD-gKD-8PgA-3DQHwCH0=")

Don't have an explanation for reaching for FM on this one. Seems to work, though.

For the attack envelope, we modulated both oscillator waveforms, carrier and modulator. And we attached the body-of-sound envelope to the FM mod amount to get that slow mellowing of tone you hear with instruments like this.

Suggestions for playing with it:

  • SHAPE distortion. For the best effect, you may need to increase the volume in the Instrument box so the shape distortion has more to bite on to.
  • Detune the BEND knob in the FM modulation.
  • Add echo.
  • Add an extra carrier oscillator to thicken the sound.
  • Play with other parameters.
  • Add other modifications (e.g. stack another FM mod).

[12]="e guitar"

(HS-321.322. Originally [16].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGoAAABoAAAA8Fl7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPIBABIAEgAfAAAhAGD0APOxEgDyEgBQ8_AAEED3IPXwFwAQoQBA_BD0cPQAAPhCAPPyAH8KcPgQAH8AUD8K8P_AoP-w_AD-cNAfAIfQ==")

For this one, we concentrated on overdrive to shape the sound. We, again, have an attack envelope to make the initial buzz, but the bulk of the sound is a tilted sawtooth wave being slowly less and less overdriven.

Does it sound like a guitar? I don't know, but we were trying to make a guitar and it'll do for purpose.

(Also, secret #packbats_2node cart lore: there's a third, hidden SFX file that wasn't open in the editor when we did the final export. Pattern 02 from that is this e guitar patch playing chords, and we really like how those chords sound.)

Suggestions for playing with it:

  • Change the envelope parameters and/or tweak knobs.
  • Modify the body sound more fundamentally (e.g. with FM or ring modulation).
  • Add another oscillator to harmonize (e.g. in fifths).
  • Add an echo effect.

[13]="violin"

(HS-321.322-71. Originally [00].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGIAAABgAAAA8FF7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHhABIAEgAfAAAhACDyAQASAPISAFDA-xAQAPiQ_bgAEIEAQPHw9p8LEHDyQPtAuwAcAPP-CqD-gKD-8PgA-3DQHwCH0=")

We started with this one because violins are the most pad-like acoustic instrument we could think of, so we wanted it so there would be at least one good pad.

It's mostly simple - basically a low-passed sawtooth wave - but there's one technical detail in the FREQ=0 setting on the vibrato. With this specific value, the frequency of the tone variation will sync to the SFX.

Suggestions for playing with it:

  • Change the waveform to a different shape.
  • Modulate the waveform with FM or ring mod to change it more.
  • Alter envelope settings and/or filter range.
  • Stack a new ADSR volume envelope on the oscillator volume knob to give it a more complex contour.
  • Add resonance to the filter. It won't sound like a violin any more, but it can sound cool.
  • Attach ENV-1 to the oscillator volume knob and adjust it to create a little tremolo.
  • Add a little bit of echo.

[14]="harp"

(HS-322. Originally [21].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGIAAABgAAAA8FF7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHxABIAEgAfAAAhAGDx4PIhEgDyEgBQ8cAAEED4MPPwFwAQgQBA88D48B8LEPKg8nCfAFCfCvD-gKD-8PgA-3DQHwCH0=")

Another relatively simple patch - the bulk of our attention went into making the attack sound right. In this case, we went with oscillator and low-pass filter - it seems to work fine. It does sound more harp-like if successive notes are spread out across multiple channels so they can overlap.

Suggestions for playing with it:

  • A general note: for this one especially, you might want to test with a music pattern instead of or in addition to the keyboard - that way, you can hear the notes overlap.
  • Add echo - it sounds dreamy.
  • Play with envelope values.
  • Modify the core sound by changing waveform and its range and/or with FM or ring modulation.

Aerophones

Where many of the chordophones used struck strings that mellow during the body of the note, aerophones operate by sustained flow of air, making the general contour of the sound very different.

[15]="pipe"

(HS-421.?. Originally [02].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGwAAABqAAAA8Ft7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPIxABIAEgAfAAAhAGDyQPHBEgDyEMDycAAQ-9EAQPWQ86gA8hAiAPQFACDxIQAQMgB-CiCA8YD98KsAGgDyjwrA-4Cg--D4AP9w0B8Ah9")

This one, like the glass pad, started as a patch and was interpreted as a physical instrument later. We haven't played with ring modulation much, so it was nice finding such a sweet, gentle tone with it. You'll see that it's a non-integer ratio and that the TUNE of the oscillator is up an octave; mathematically, ring modulation creates waveforms at the difference and sum of the input frequencies, so a ratio of 3/2 gives us 1/2 and 5/2. (And then the tilted saw overtones bring in 7/2, 3/2 and 9/2, 11/2, and so on.) Ring mod isn't as prominent in 2024 as FM modulation, but as you can hear, you can find some nice tones.

If you look at ENV-0, you'll see a very typical ADSR for horns and such: instead of being loud and sharp at the start and mellowing, it swells into its sharpest timbre and stays near it until the note ends.

Suggestions for playing with it:

  • Add some echo.
  • Modify envelope parameters.
  • Modify waveforms.
  • Increase detune with the ring mod DETUNE knob.
  • Apply a low-pass filter to dull the sound a little.
  • Apply a gentle FM modulation to the ring mod.

[16]="flute"

(HS-421.121.12. Originally [15].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGQAAABiAAAA8Dd7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHRABIAEgAfAAAhACDyAQASAPISABIAQPLw9agA8RAhAEDxMAD0AwAgEQFgDwCSHwogYMD_oK8MUP_AoP-w_AD-cNAfAIfQ==")

Thank you, flute, for landing between the "pipe" and "organ" patches so the list doesn't say "pipe organ".

Again, just kinda reached for FM - if you have two nodes to work with, it's one of the most versatile options. Also, the note of a flute is bright and clear, which you can get with FM.

Interesting mix of envelope assignments going every which way - that's what we get when our focus is on imitating a sound by ear, I think. We also used the 4x option on FM mod 'volume' to get an attack that's just a little stronger, especially for the attack.

We focused on the treble notes, but the results are interesting in the bass register.

Suggestions for playing with it:

  • Adjust various parameters - waveform, envelope, FM VOL, maybe even TUNE although that can make the sound stop sounding like a flute.
  • Add a new oscillator to emphasize part of the sound.
  • Add an LFO to the oscillator volume for tremolo or the BEND knob for vibrato.
  • Add an echo effect.

[17]="organ"

(HS-421.222.11. Originally [03].)

--[[pod_type="instrument"]]unpod("b64:bHo0AHEAAABwAAAA8C97aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPGhABIAEgBQ8QD-EBwAIQAg8gEAEgDyEgAQIQBA82DxqAARUAEBsVAPAaIgMQAQ-8EAQPVw888KEFDygP-wewAaAPE-CsD-gKD-8PgA-3DQHwCH0=")

The classic way to make an organ sound is to stack lots of oscillators in different octaves, maybe with some on the fifths too.

With only two oscillators ... well, we tried a few variations, and putting the bass oscillator in the sine-triangle range (where overtones die off fast) and the treble two octaves up with a tilted saw (much more overtone-heavy) seemed to get us somewhere. It has a little of that effect where only some harmonics are emphasized.

And we detuned the two oscillators a touch, because that's nice.

Suggestions for playing with it:

  • More oscillators! 2/1 ratio! 8/1 ratio! 16/1 ratio! Heck, 6/1 and 12/1 ratios! And detune all of them!
  • Echo effect! A lot of the sound of a church organ is the sound of the room - adding space to an organ really, really works.
  • Attach the LFO to the volumes of oscillators to get a tremolo effect - Leslie speakers are another famous tool used to enhance an organ sound. (We set the knobs so volume started high on one and low on the other, and that made a pretty rad effect!)
  • Change volume, waveform, and envelope parameters.

[18]="oboe"

(HS-422.112. Originally [22].)

--[[pod_type="instrument"]]unpod("b64:bHo0AHMAAABxAAAA8GJ7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHxABIAEgAfAAAhAGDyIPGxEgDyEMEAUPDw-wAQQPQZAPEQIQBA8WDyVAAg8QEAEwDvCiAw8oD6EGsAIBAAMFIC9-D--wrQ-4Cg--D4AP9w8NAfAIfQ==")

This should look mostly familiar - very like the flute, in fact - except for the data envelope.

So, here's how we did that. We dialed in a nice amount of vibrato and tremolo, then adjusted the knob values and range on the vibrato with a temporary oscillator to get it dialed in to be in tune during the initial part. Because that's what it's for: the note starts steady, and then when it has settled in it starts to warble at the SPD of the SFX (that's what the SPD 0 setting does).

Suggestions for playing with it:

  • Play with envelope parameters, waveforms, amount of FM modulation.
  • Add an echo effect.
  • Try a low pass filter with resonance. We ended up aiming the range arc above the marker and putting ENV-0 on it, which makes the filter opens up at the start of the note.
  • FM mod the FM mod, maybe? You can definitely change the timbre that way, especially if you use envelopes to shape it.

[19]="trumpet"

(HS-423.233. Originally [13].)

--[[pod_type="instrument"]]unpod("b64:bHo0AFoAAABYAAAA8El7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHhABIAEgAfAAAhACDyAQASAPISABIAQPfg9PgAEIEAQPJQ9w8LEIDxkPvwrwxQ-4Cg--D4AP9w0B8Ah9")

Very simple wavetable-plus-filter design. The changing waveshape creates the trumpet-like attack, and that's tempered and mellowed by the filter. We ended up only wanting the one envelope to take care of all of it - it did the job.

Suggestions for playing with it:

  • Play with envelope parameters, waveform, filter.
  • Add an extra volume envelope for more shaping.
  • Possibly, add a little resonance to the filter.
  • FM modulation on the oscillator can work, especially with ENV-0 on its volume.
  • Add a vibrato LFO to the oscillator bend knob.
  • Shape effect distortion, maybe? That could be fun.

Electrophones

Electrophones - instruments whose vibrations originate in electronic circuitry, rather than air, chords, or other physical oscillators - are the most flagrantly underbaked part of the original Hornbostel-Sachs typology. The MIMO (Musical Instrument Museums Online) made a new revision which improved this tremendously, but we didn't see it when we were doing our Wikipedia research so we haven't actually used it. (Hence us placing electric guitar in chordophones, not here.)

Instead, we just kinda yoloed it. The basses we put first, as they are based (heh) on a string instrument, at least conceptually, and they are all related; then the two Commodore-64-inspired designs went to the end as pure electrophones to finish it out.

[20]="synth bass"

(HS-53 (/321). Originally [08].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGEAAABfAAAA8FB7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPGRABIAEgAfAAAhAGDyAPFxEgDyEgASAED8wPvYABCBAED1MPvgFACvCrD3wADxDwBQ8a8K8P_AoP-w_AD-cNAfAIfQ==")

The original and indispensable subtractive-synthesis bass patch: simple (square-ish, here) waveform into a resonant low pass filter which quickly closes. It'd be a travesty to leave this out.

We did add a few fun details - stacking the volume envelopes, a slow shift in pulse width on the tone as the note fades - but this is straight-up just the classic subtractive bass synth. You just gotta.

Suggestions for playing with it:

  • Play with envelope parameters, filter parameters, waveform (triangles and sines don't work great but sawtooths do)
  • Double up the filter, with more-or-less similar parameters and the same envelope.
  • Add a second oscillator in WAVE +0 mode and recreate the filter after it so it filters both. Play with relative pitch in TUNE knob.
  • Add a shape overdrive.
  • Add an echo effect.

[21]="fm bass"

(HS-53. Originally [09].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGUAAABjAAAA8FR7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPHRABIAEgAfAAAhACDyAQASAPISABD-4QBA9WDzGADxECEAQPQA8oQAIgAQQQBA8g8KMPKA_eAvDFD-gKD-8PgA-3DQHwCH0=")

There's a YouTube channel, currently @carpathia808, which does oscilloscope deconstructions of classic VGM tracks. The Sonic 2 "Chemical Plant Zone" episode lives in our head rent-free. It's such a good track and the deconstruction is immaculately good.

Anyway, while looking at the oscilloscope traces on our tenth or twentieth rewatch, we started noticing a kind of pattern, where you start with relatively strong modulation and ease it off as the note plays. Which, like, most FM synth knowers surely knew, but we figured it out from here.

...so, when we needed an FM bass, that's what we did. And it turned out to be a really aggressive sound, so we leaned into that aggression.

Suggestions for playing with it:

  • Try other waveforms.
  • Change envelope parameters, FM mod amount, FM mod ratios. This is such a simple and artificial patch, you can change it a lot and keep its vibe.
  • A weird one: switch FM mod VOL knob to mode. You will likely need to activate 4x on the knob to get a similar effect, but FM mod VOL mode means that changing volume with the bar at the top changes the timbre of the sound, and that's neat.
  • Add shape distortion.
  • Add echo.
  • Add LFO tremolo or vibrato. We went really hard on these and thought that still sounded rad.

[22]="acid bass"

(HS-53. Originally [10].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGgAAABmAAAA8Fd7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPFhABIAEgBQ8VD7DQAhACDyAQASAPIRABBQ86D-EBBA_ID_kBcAEIEAQPOA-CAUAPvvCrBA-lBvAFCfCvD-gKD-8PgA-3DQHwCH0=")

A lot of these instruments were requests, and an acid bass was one of the first requests, and we were not confident at all.

Fortunately, YouTube came through with @IhorMedia's video "Techno Sound Design / 3 Analog Synth Bassline Techniques", which (pleasingly) encouraged the viewer to follow along with their own (other) synthesizers.

Clearly, there's a lot we can't do within our two-node and two-envelope limit, but the heart of the sound seems to be the massive resonance doing a massive cutoff sweep, so we gave it as much spice on top of that as we could. Not sure how to do the variations in timbre that are characteristic of the acid house style but it is at least a basic version of the sound.

Suggestions for playing with it:

  • Stylistically, an acid bassline is typically played with rapid short repeated notes. There will be a way to do this in the tracker - setting a retriggering interval is in the roadmap - but for now, let's talk about looping envelopes.

    If you hit the "..." line at the bottom of an ADSR envelope, four boxes will appear: SPD, LP0, LP1, and T0. SPD=0 is a special value which loops at the SFX SPD. If you leave SPD and LP0 at 0 and set LP1 on ENV-1 to 1, it'll do the filter sweep every step. You can also have effects that happen less often by setting LP1 to a larger value. Finally, if you right- click on one of the white ears with an envelope number, you can make that repeat on the SFX clock instead of based on when you play the note.

    You can do some cool stuff with looping any kind of envelope, ADSR, LFO, or DATA. And it really fits this style of instrument and house music generally.

  • As usual, it's worth playing with knob values - in particular, the low-pass range start and end and ENV-1 attack have a lot of effect.
  • A little bit of echo can be quite nice.
  • Adding a sine wave oscillator outside the filter can thicken the sound.

[23]="64ish pulse"

(HS-53. Originally [18].)

--[[pod_type="instrument"]]unpod("b64:bHo0AGEAAABfAAAA8FB7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPGBABIAEgBQ8ZD_IBwAIQAg8gEAEgDyEgARABBA-gD8CAAQgQBAgPVPCyDy0PiQSwAaAK8KwP_AoP-w_AD-cNAfAIfQ==")

Back in 2017, Tomislav Zlatic sampled some Commodore 64s to produce some sample packs and described "the most famous SID lead sound" as using pulse width modulation and fast vibrato. So, when we were asked to make some SID-ish sounds and found this post, that plus some low-pass (the SID had low-pass filters) was our core concept for our first SID-inspired patch. We improvised some melodies as we tweaked values until we thought it hit right and then we added it.

Suggestions for playing with it:

  • Mess around with envelope parameters.
  • Mess around with waveform.
  • Possibly add echo? It sounds all right here.
  • Add tremolo using an LFO on the oscillator VOL knob.

[24]="bleepbloop"

(HS-53. Originally [19].)

--[[pod_type="instrument"]]unpod("b64:bHo0AFcAAABVAAAA8EZ7aW5zdHJ1bWVudD1weHUAAygAAgAABAABEAYPIBABIAEgAfAAAhAGDg8qESAPJQwAETAPQQ8o8MIPLAADsAIAA0AP--CwD-gKD-8PgA-3Dw0B8Ah9")

The same musician who asked about SID stuff shared a video of someone using a different SID-based plugin, so we poked around in that one and found this very simple patch fit in. It is literally just a triangle with a data envelope so it starts up an octave before it jumps down to the main note. A basic patch to end on, but it is unquestionably a chiptune sound if you like chiptune sounds.

Suggestions for playing with it:

  • Change waveform.
  • Change envelope values.
  • Set LP1 on the DATA envelope to something to make the blooping repeat in an octave arp pattern.
  • Apply LP1 to the waveform to make the octave-up part a different timbre.
  • Modify the waveform, e.g. with FM.

Index

Oscillators

One Oscillator, Bare:

  • [24]="bleepbloop"

One With Filter:

  • [01]="tom"
  • [02]="snare"
  • [03]="hi hat"
  • [04]="crash cymbal"
  • [13]="violin"
  • [14]="harp"
  • [19]="trumpet"
  • [20]="synth bass"
  • [22]="acid bass"
  • [23]="64ish pulse"

One With Echo:

  • [06]="celesta"
  • [08]="glass pad"

One With Shape:

  • [00]="kick"
  • [12]="e guitar"

Two-Oscillator Additive:

  • [09]="piano"
  • [10]="shamisen"
  • [17]="organ"

Ring Modulation:

  • [15]="pipe"

FM Modulation:

  • [05]="marimba"
  • [07]="steelpan"
  • [11]="guitar"
  • [16]="flute"
  • [18]="oboe"
  • [21]="fm bass"

Envelopes

One ADSR:

  • [00]="kick"
  • [02]="snare"
  • [03]="hi hat"
  • [04]="crash cymbal"
  • [08]="glass pad"
  • [16]="flute"
  • [19]="trumpet"
  • [21]="fm bass"

Two ADSR:

  • [01]="tom"
  • [05]="marimba"
  • [07]="steelpan"
  • [09]="piano"
  • [10]="shamisen"
  • [11]="guitar"
  • [12]="e guitar"
  • [14]="harp"
  • [20]="synth bass"
  • [22]="acid bass"

ADSR + LFO:

  • [06]="celesta"
  • [13]="violin"
  • [15]="pipe"
  • [17]="organ"
  • [23]="64ish pulse"

ADSR + Data:

  • [18]="oboe"
  • [24]="bleepbloop"

Wavetables

Single WT-0:

  • [00]="kick"
  • [01]="tom"
  • [06]="celesta"
  • [08]="glass pad"
  • [12]="e guitar"
  • [13]="violin"
  • [14]="harp"
  • [19]="trumpet"
  • [20]="synth bass"
  • [22]="acid bass"
  • [23]="64ish pulse"
  • [24]="bleepbloop"

Dual WT-0:

  • [05]="marimba"
  • [07]="steelpan"
  • [09]="piano"
  • [11]="guitar"
  • [15]="pipe"
  • [16]="flute"
  • [17]="organ"
  • [18]="oboe"
  • [21]="fm bass"

WT-0 and WT-1:

  • [10]="shamisen"

WT-1 only:

  • [02]="snare"
  • [03]="hi hat"
  • [04]="crash cymbal"

/ 4

  • [00]="kick"

x 4

  • [12]="e guitar"
  • [16]="flute"

R

  • [03]="hi hat"

P#147851 2024-05-03 15:30 ( Edited 2024-05-04 01:46)

[ :: Read More :: ]

Been playing with modifying Picotron instruments, and sometimes we'd like to add a second carrier oscillator to an existing one while feeding it through the same filter/echo/shape effect. Right now, the only way to do that is to remake the effect manually after the new oscillator and then delete the old one.

P#147378 2024-04-26 14:52

[ :: Read More :: ]

On boot (running NixOS 23.11 with KDE Plasma version 5.27.10) it shows a green "no workspaces" screen with a weird cursor glitch and the SFX workspace icon replaced with a desktop one ... until we click another workspace, at which point everything is fixed.

Edit: GIF of bug:

Edit 2: Seems fixed for us in v0.1.0g - ping us if you're still getting it and we'll unresolve the issue.

P#146777 2024-04-16 17:46 ( Edited 2024-05-01 01:00)

[ :: Read More :: ]

One feature of electronic music is varying instrument parameters during the performance - for example, adjusting the depth of the lowpass filter sweep on an acid bassline. I think if there were a way to specify in the instrument design that one (or more) knobs was mapped to a value controlled by the tracker, it would be very easy to do these kinds of musical manipulations.

P#146607 2024-04-14 12:13

[ :: Read More :: ]

Cart #packbats_2node-3 | 2024-04-12 | Embed ▽ | License: CC4-BY-NC-SA
28

As previously threatened, we have created a collection of simple (1-2 nodes, 1-2 envelopes) Picotron instrument patches for anyone to use in their programs. All of the instrument patches are released as CC-0 public domain - you are free to use, modify, and sell without credit. (Although we would appreciate credit if you do make something with it as long as the thing is not, like, evil or bigoted - Nazis, TERFs, and channers, go away.)

With the 1.0 release, there are 25 instruments (mp3 preview), sorted into five categories:

Drum Kit

  • kick
  • tom
  • snare
  • hi hat
  • crash cymbal

Pitched Idiophones

  • marimba
  • celesta
  • steelpan
  • glass pad

Chordophones

  • piano
  • shamisen
  • guitar
  • e guitar
  • violin*
  • harp

Aerophones

  • pipe
  • flute
  • organ
  • oboe*
  • trumpet

Electrophones

  • synth bass
  • fm bass
  • acid bass
  • 64ish pulse
  • bleepbloop

Directions for use are simple: use the scrollbar or mousewheel to navigate the list, click the name of the instrument to get a short preview, and click "copy" to put the data on your clipboard for pasting into sfx.p64's instrument editor. The volumes are roughly (by ear) matched to the default triangle wave instrument to aid in mixing.

* Technical note: the violin and oboe instruments will not preview correctly in the instrument editor, as ENV 1 on each uses a special 0 value on FREQ and SPD, respectively. With this setting, the vibrato of each of these will be synchronized with the SPD of the SFX in which they are used. To change this, simply change this value in the righthand column.

P.S. A commentary track elaborating on the design of each instrument is now out for anyone interested! It has a lot of info, including a random personal anecdote about the Chemical Plant Zone music from Sonic 2!

Old post text:

As previously threatened, we have created a collection of simple (1-2 nodes, 1-2 envelopes) Picotron instrument patches for anyone to use in their programs. All of the instrument patches are released as CC-0 public domain - you are free to use, modify, and sell without credit. (Although we would appreciate credit if you do make something with it as long as the thing is not, like, evil or bigoted - Nazis, TERFs, and channers, go away.)

Directions for use are simple: use the scrollbar or mousewheel to navigate the list, click the name of the instrument to get a short preview, and click "copy" to put the data on your clipboard for pasting into sfx.p64's instrument editor.

Planned for 1.0:

  • five more instrument patches (thanks to everyone who's made suggestions so far!)
  • a list that's sorted in a way that makes sense instead of being a total jumble

Edit: Small update to add the marimba - current instrument list:

  • piano
  • violin
  • pipe
  • organ
  • kick
  • snare
  • hi hat
  • crash cymbal
  • synth bass
  • fm bass
  • acid bass
  • glass pad
  • guitar
  • trumpet
  • celesta
  • flute
  • e guitar
  • shamisen
  • 64ish pulse
  • bleepbloop
  • marimba

Edit 2:

  • harp
  • oboe
P#146304 2024-04-10 18:37 ( Edited 2024-05-03 15:50)

[ :: Read More :: ]

Thinking about putting together a collection of free instruments for the community - simple stuff with one or two nodes and one or two envelopes, like this:

...so as to leave a lot of room for modification by users.

What instruments would y'all want in a free patch collection? Right now we have crude versions of:

  • violin
  • piano
  • pipe
  • organ
  • kick
  • snare
  • hat
  • crash

but a single .sfx file can hold up to 24 instruments, so it feels like we should offer more than eight.

edit: instrument collection cart!

P#146047 2024-04-08 13:18 ( Edited 2024-04-10 18:54)

[ :: Read More :: ]

Over a week or so in late March and early April, we've been working on instrument.txt - a detailed (~4.6k words) guide to Picotron's built-in instrument editor, designed for musicians who have Picotron but know nothing about synthesizer sound design. In this guide (currently version 2.0) (html version, web version), we:

  • Detail the Picotron instrument editor UI;
  • Explain how each element - output mixer, oscillators, envelopes, and effects - works; and
  • Guide you through putting this to practice by making a series of simple instruments, including organ sounds, 'piano' sounds, kick drums, snare(-adjacent) drums, and cymbals and hi hats.

If you've been wanting to play with Picotron's tracker but not known how to make it work, we hope this sets you up to make lots of sounds.

Changelog

2.0:

  • added info on the space bar halt-sound control and the random and looping envelope options.
  • clarifications of wording throughout, notably including ADSR values in Exercise 1 and a full rewrite of the "Simple Piano" exercise
  • corrections to a few errors (e.g. to change wavetable, you have to click the WT-# label specifically)

1.2:

  • initial public release
P#145806 2024-04-05 16:15 ( Edited 2024-04-07 15:21)

[ :: Read More :: ]

Cart #threespeed_bgm-0 | 2024-03-30 | Embed ▽ | License: CC4-BY-NC-SA
6

Been experimenting to get the hang of the synth, and we figured we'd donate some of the fruits of that experimentation to the community. Two channels, eight music patterns, six SFX, four instruments, CC BY-NC 4.0. Would love to hear if y'all use it (or its instrument designs) for anything.

P#145074 2024-03-30 04:10

[ :: Read More :: ]

Cart #packbats_laser_rot-0 | 2024-02-25 | Code ▽ | Embed ▽ | No License
2

This PICO-8 chiptune was composed for the 2024 PICO-8 Free Music Jam. It uses three channels - bass and bass percussion on channel 0, melody and mid percussion on channel 1, and high percussion on channel 2 - and requires 16 SFX and 24 music patterns, no custom SFX instruments. The full loop is approximately 1 minute 16 seconds long. You can probably interrupt the high percussion on channel 2 if you need a second channel for sound effects.

This piece of music is being released under a Creative Commons Attribution-ShareAlike 4.0 license. Visualizers are provided by Bikibird's album cart. The cover art is based on the image "Time destroyed CD" by Bernd Hutschenreuther, used under a Creative Commons Attribution-ShareAlike 3.0 license, and processed with ImageMagick and Depict.

P#141904 2024-02-25 02:22

[ :: Read More :: ]

Cart #cubancakewalk_brymn-0 | 2024-02-05 | Code ▽ | Embed ▽ | No License
5

This cart, which uses one of @bikibird's visualizers provided courtesy of the PICO-8 Free Music Jam (in a beta version, as a co-organizer we helped with testing), contains an arrangement of the music of someone we'd never heard of: James Timothy Brymn's "Cuban Cake Walk".

And that's a shame, because (a) Lieutenant James Tim Brymn was apparently an absolutely legendary Black American arranger, composer, and bandleader, one of the people who helped give birth to jazz as we know it today, and (b) while we didn't manage to include the entire composition in this, "Cuban Cake Walk" is a delightful piece of music with a really fun bouncy groove. And if we hadn't clicked on the IMSLP website on a day when it was being featured, we'd know none of this.

So, tossing this up for all y'all, declaring my arrangement to be public domain, feel free to drop this in anything that needs it. The melody and bass line are in channels 0 and 1, main harmony in channel 2, and occasional supplemental harmony in channel 3; we would restrict game SFX to channels 2 and 3 personally.

P#141167 2024-02-05 20:26

[ :: Read More :: ]

Cart #noending_by_packbats-1 | 2024-01-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Someone randomly mentioned Minecraft on the official unofficial Discord, and with the PICO-8 Free Music Jam starting tomorrow (plug!), that inspired this chill but slightly dissonant background loop. Approximately two and a quarter minutes long, uses 00, 01, and 02 for custom SFX instruments, total of 15 SFX and 16 patterns.

Music is CC-BY-NC-SA 4.0, art is "Twilight" by RDexter on Flickr, CC-BY-NC 2.0.

P#140937 2024-01-31 16:53 ( Edited 2024-02-03 19:33)

[ :: Read More :: ]

One of the basic problems you might want to solve in doing PCM synthesis is limiting a signal to the range between -1 and +1. Obviously you can just use a mid() function to get hard clipping - the value just locks to the endpoints - but this often has unpleasant side effects. For example, if you hard clip the output, the sound will snap abruptly from smooth to harsh as the volume increases, with very little transition between these. So, people often want to round off that transition, let the sound get gradually harsher, and one of the smoothest options is to use the tanh - hyperbolic tangent - function. Looking at a graph of this function, you can see that it smoothly transitions from reproducing the original x value to squishing it between -1 and 1, just as we often want.

So, I did a bit of experimenting today with sine waves and came up with the following code snippet:

--to use table:
-- tanh = lut[x\0x.01] or sgn(x)
function lut_tanh()
    --lookup table of tanh
    -- between -3 and +3
    -- with step size 1/256
    local tanh={}
    for i_x=-768,768 do
        --naive formula is
        --tanh = 1 - 2/(1+exp(2x))
        local x=i_x>>8 --=i_x*0x.01
        --inspired by https://www.math.utah.edu/~beebe/software/ieee/tanh.pdf formula:
        --1. from 0 to x_small=0x0.01bb, tanh(x) = x
        --2. for x>=0x5.3300, naive formula returns 1
        if abs(x)<=0x.01bb then
            tanh[i_x]=x
        else
            tanh[i_x]=1-2/(1+0x2.b7e1^(2*x))
        end
    end
    return tanh
end

To my ears, with these values, driving a sine wave with an input volume as low as 0.03 sounds only about as bad as the original sine wave does with so few bits to work with, and driving all the way up to 16 there's not a lot of artifacting to the distortion. With some antialiasing you could probably do even better than that.

This function uses 1537 entries in the lookup table, which I think is about 1.4% of Lua memory. I know my ears aren't very trained when it comes to analyzing synth sounds, so feel free to edit this if it seems like too much or not enough, but it seems to me like a fairly practical compromise for PCM slingers.

P#140078 2024-01-13 19:25

[ :: Read More :: ]

Oh hey, a thing we're doing is live!

The PICO-8 Free Music Jam is an itch.io jam for musicians with a very simple concept: PICO-8 devs want music to put in their carts, we're gonna make music for their carts.

It'll be running for the full month of February - no ratings, no competition, just music for PICO-8. And if you wanna get started making music, in PICO-8 or at all, there's loads of resources linked on the jam page.

(edit: And many thanks to the folks in the #music-sfx channel of the official unofficial PICO-8 Discord who came together to hatch this idea and hammer out the details, and to @paraK00PA for the awesome cover art!)

P#139636 2024-01-04 16:21 ( Edited 2024-01-04 17:37)

[ :: Read More :: ]

I don't know if this exists, but I think it would be cool to have a thread of Stuff You Might Not Have Figured Out From Just Messing Around Making Things.

Here's two to start with, from a musician perspective:

  1. If you can, leave SFX 00 through 07 empty. It will help with adding music later - be that you adding music or because those slots can be used for custom SFX instruments that give a lot of character and flavor to compositions.

  2. Decide how many channels to reserve for music. The 4 SFX channels of PICO-8 have to be used by both music and sound effects, and both music and sound effects benefit from having more channels - so think about which is more important to you, and which sound effects can interrupt each other. You can also, if some sound effects are only played sparsely (maybe you have a clicky sound while navigating menus!), try having one channel of music that is interrupted briefly by the sparse effect and then resumes.
P#132103 2023-07-18 15:57

[ :: Read More :: ]

[sfx]

Was listening to some old compositions of mine and realized that I had a nice little instrument that hadn't made it into the midi library!

For the demo, I used the same trick I used then, and split the melody across two separate SFX so the tails of each note could ring out while the next note played. Bit of a faff to do, but it produces a very good effect.

Cart #hifesosani-0 | 2023-02-27 | Code ▽ | Embed ▽ | No License
7

As noted in the cart, at least to me, it still sounds good and has a harp-ish vibe with various combinations of Buzz, Dampen, and Reverb; Detune doesn't work because the bulk of the SFX is the triangle wave.

P#126381 2023-02-27 20:30

[ :: Read More :: ]

So, let's say you're building a synthesizer using the serial PCM output and you want a filter. What do?

Well, what I did was follow a link @luchak posted a while ago in the Discord to this SVF filter design by Andrew Simper, Laurent de Soras, and Steffan Diedrichsen. And then get blasted with noise, because a design that works great with double-precision floating-point numbers is not so great with 16b.16b fixed-point PICO-8 numbers.

Edit: I recommend using the code snippet downthread rather than this one.

Now, I'm not good enough at math to prove mathematically that this is stable, but I'm good enough at hacking together testing code to feel confident that, as long as:

  • the signal being fed into the filter remains in the range -1 to 1,
  • the resonance remains in the range 0 to 1, and
  • the cutoff remains in the range 0 to 2756.25 (the Nyquist frequency for PICO-8's 5512.5 Hz PCM output)

...this should produce an output that remains within the range -3 to 3 -3.5 to 3.5 and is usable.

--this is the initialization section; do it outside the sample calculation loop
local f_low,f_band=0,0

--these are the filter parameters
--I haven't tested changing them while the filter is running but that's what I plan to do, so, here's hoping.
local res=0 to 1
local freq=-2.0*sin(cutoff frequency/22050)--sin( 0.5 * cutoff frequency/(2*sampling frequency) )

--after you set freq and res, these two are derived
local drive=max(0,.05*res-.0125)--0 for res<0.25, increase linearly to 0.0375 for res=1
local damp=min(2.0*(1.0 - res^0.25), min(2.0, 2.0/freq - freq*0.5))

-- --
-- do the calculations here to generate osc, your signal to be filtered
-- --

--2x oversampled filter
local f_notch=osc-damp*f_band
f_low+=freq*f_band
local f_high=f_notch-f_low
f_band-=drive*f_band*f_band*f_band--distortion
f_band+=freq*f_high--filter
local out=(f_notch or f_low or f_high or f_band)>>1--half here...
f_notch=osc-damp*f_band
f_low+=freq*f_band
f_high=f_notch-f_low
f_band-=drive*f_band*f_band*f_band--distortion
f_band+=freq*f_high--filter
out+=(f_notch or f_low or f_high or f_band)>>1--...and half here

To show it off, here's my current very incomplete version of a button keyboard cart. Same keyboard keys as you use for SFX editor note entry; left-right arrows to change octave. This filter is set up with a cutoff frequency of A5 (880 Hz) and a resonance of 1.

Cart #pb_pcmk_filter_demo-0 | 2023-01-28 | Code ▽ | Embed ▽ | No License
6

P#124936 2023-01-28 03:25 ( Edited 2023-09-11 22:19)

[ :: Read More :: ]

I think ever since @carlc27843's Impossible Mission R.T. cart came out, people have been wondering if they could make background music for a cart using PCM synthesis. carlc27843's Emulated Amstrad CPC Chiptunes post discusses using its engine that way, @luchak has had to let people know that the RP-8 groovebox can't be used that way ... folks are curious.

I don't know a lot about digital audio synthesis, but from the conversations that have happened in the PICO-8 Discord, it sounds like there's roughly three sides to the equation:

Cost

  • How many tokens and bytes are cart designers willing to give up to the soundtrack? @bikibird's Speako8 Speech Synthesis Library is under a thousand tokens - is that a good target?
  • What percentage of PICO-8's CPU budget? Four voices with 25% CPU seems possible in a few different ways, but is that too much to give up to background music?
  • How much memory, Lua and addressable? Most forms of synthesis probably run out of CPU first, but this could be a question if you're making a lot of lookup tables.

Usability

  • How do you program tracks? Does it use PICO-8's built-in tracker with its own sound sources? Does it have a custom editor?
  • How do you add them to your games? Presumably you copy a bunch of code into memory and add a function or coroutine to your game loop, but where and how do you store tracks?

Quality

  • How many simultaneous voices? PICO-8's built-in tracker allows 4 simultaneous sounds, but most game BGM is built with 2 or 3.
  • What effects can you add? Reverb is probably out of budget, but echo is possible (if memory-expensive), and distortion and compression are totally feasible. As are filters - certainly low pass, high pass, band pass, and notch.
  • What kind of synth do you make?

It's definitely possible to make:

  • Simple waveform synthesis (e.g. sine, square/pulse, sawtooth, triangle)
  • FM synthesis
  • Sample-based synthesis (very storage-expensive!)
  • Wavetable synthesis (the original PPG Wave synthesizers only had 8-bit samples! but this is also storage-expensive, if less than sample-based synthesis)
  • Subtractive synthesis with any of the above as oscillators

...but the more processing you do, the more sound design tools you add, the more expensive your result will be.

Conclusion?

I don't really have one? But I think it would be good to have a space on the official forums where people who are thinking about this stuff can talk about it. I haven't made a lot of games, so I don't know what what a good budget would be for game developers ... and I haven't made much music with much outside PICO-8 and, like, an actual piano, so I don't know what a good synthesizer would be for game soundtrack composers. And I know barely anything about software synthesis, so I don't know what's possible, what's easy, what's hard, or why my low-pass filter makes hell noises if I give it the wrong parameters.

I think it would be cool to share knowledge, and the forums seems like the best place to do it.

P#124516 2023-01-18 18:45 ( Edited 2023-01-18 19:45)

[ :: Read More :: ]

Cart #pb_line_cbez-0 | 2022-12-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

I know a lot of people have posted functions for drawing cubic bezier curves, but I'm tossing my own into the pot because why not. Just skimming threads, it feels like most people use pset() to draw them pixel by pixel; this one uses line() to draw them segment by segment.

Some animated gifs, because they're fun:


demo of the editor in the cart:

drawing demo, dividing the curve into segments:

drawing demo, dividing the curve dynamically based on pixel precision:

To save you digging into the cart, here's the two versions of the algorithm I'd recommend, based on my testing. If you want to see how fast they run, there's a pause menu item in the code that draws sets of 5000 random bezier curves with a bunch of different algorithm parameters in two sizes - 16-pixel square bounding box and 128-pixel square bounding box - and adds up the total CPU needed at 60 FPS.

  1. The polynomial coefficients function. All of the other code uses this.

    --coefficient fn (39 tokens, shared by all)
    function cubic_coef(p0,p1,p2,p3)
    --coefs for cubic bezier
    return
        p0,
        -3*p0+3*p1,
        3*p0-6*p1+3*p2,
        -p0+3*p1-3*p2+p3
    end
  2. Fixed-segments option. This one has 16 segments, which (a) is convenient numerically and (b) doesn't get too messy for small curves but doesn't look too chunky for large ones. From the benchmark, you could draw 220 big curves or 250 small curves in one 60 FPS frame.

    --fixed 16 points (+80 tokens)
    function cbez_16(x0,y0,x1,y1,x2,y2,x3,y3)
    --cubic bez, dt predefined
    
    --precalculate polynomial coefs
    local a0,a1,a2,a3=cubic_coef(x0,x1,x2,x3)
    local b0,b1,b2,b3=cubic_coef(y0,y1,y2,y3)
    
    --set endpoint for first segment
    -- by poking ram with coords
    poke2(0x5f3c,x0) poke2(0x5f3e,y0)
    --  --optional: clear error to avoid bugs
    --  poke(0x5f35,0)--4 tokens
    
    for t=0x.1,1,0x.1 do
        line(
            a0+t*(a1+t*(a2+t*a3)),
            b0+t*(b1+t*(b2+t*b3))
            )       
    end
    end
  3. Adaptive-segments option. This one is a bit faster for small curves - like 320/frame - but much slower for large curves - like 110/frame.

    --recursive, fixed 2px precision
    -- (+186 tokens)
    function cbez_recurs2(x0,y0,x1,y1,x2,y2,x3,y3)
    --cubic bez, adaptive points
    
    --precalculate polynomial coefs
    local a0,a1,a2,a3=cubic_coef(x0,x1,x2,x3)
    local b0,b1,b2,b3=cubic_coef(y0,y1,y2,y3)
    
    --set endpoint for first segment
    -- by poking ram with coords
    poke2(0x5f3c,x0) poke2(0x5f3e,y0)
    --  --optional: clear error to avoid bugs
    --  poke(0x5f35,0)--4 tokens
    
    --poly function
    local function xy(t)
        return
            a0+t*(a1+t*(a2+t*a3)),
            b0+t*(b1+t*(b2+t*b3))
    end
    --subdividing draw function
    local function crawl(tp,tn,xp,xn,yp,yn)
        --draw curve recursively to tn
        local tm=(tp+tn)>>1
        local xm,ym=xy(tm)
        --luchak fast abs
        local xerr,yerr=(xp+xn)>>1,(yp+yn)>>1
        xerr-=xm
        yerr-=ym
        if xerr^^(xerr>>31)>2
        or yerr^^(yerr>>31)>2
        then
            --not precise enough; recurse
            crawl(tp,tm,xp,xm,yp,ym)
            crawl(tm,tn,xm,xn,ym,yn)
        else
            --close enough; draw
            line(xm,ym)
            line(xn,yn)
        end
    end
    local x5,y5=xy(.5)
    crawl(0,.5,x0,x5,y0,y5)
    crawl(.5,1,x5,x3,y5,y3)
    end

    (Shoutout to @luchak, from whom I swiped this fast abs function - I think it ended up reducing runtime by about 3%, which might not be worth it but hey.)

There's probably ways to optimize these further that I haven't thought of - I'm just not very good at that - so please feel free to sound off with any suggestions.

Also, I tried to make good comments, but let me know if anything's unclear.

P#122890 2022-12-23 14:04

[ :: Read More :: ]

Out of curiosity, I was testing to confirm that the new limit on length of audio recordings via extcmd("audio_rec") was per-instance and not per-session ... and discovered that the length of recording I got was 2 minutes instead of the 8 minutes listed in the v0.2.5d changelog.

An 8-minute limit makes sense to me but a 2-minute one doesn't, so I'm assuming this is an error of some sort.

edit: confirmed fixed in v0.2.5g.

P#122402 2022-12-14 17:46 ( Edited 2023-02-15 20:48)

[ :: Read More :: ]

Taking a crack today at building drum kit SFX - I've labeled this one as a "High Tom", but if you play it on a lower note than C2, I think it'll probably serve for whatever tom you need. You do need to take care of fading out the notes yourself, though - the SFX ends on a held G1, just to let the drums have a longer sustain than 32 ticks.

[sfx]

P#118558 2022-10-04 22:55

View Older Posts