Jump to content


Recommended Posts

This thread discusses interesting music and FX in BREAKOUT 2002 LASERBEAMS


The BASIC listing for the game is here: BREAKOUT2002_LASERBEAMS_NTSC.txt

Steps to Get the BASIC program running in the IDE for this discussion -


This BASIC has an experimental sound engine and is close enough to bB that bB programmers will have an easy time programming with it and will like the new features - the codebase is free and anyone is welcome to port existing features and ideas to bB as well like the recent dynamic sprite kernel.


Here's a screenshot of the simple IDE which is already installed on Windows:



SuperCharger BASIC and setup instructions are available for download here and there's one final step (thank you RT!) necessary to create a c:\vwbasic\Stella subfolder like this:


You must place a copy of Stella.exe in this subfolder, or you can use another emulator like Z26.exe and it's DLL's in the folder and rename it as Stella.exe - that's what I did on the machine in the screenshot. It doesn't matter what version of Stella you use, but you'll want to use the latest Z26 if you prefer Z26. Any other Atari emu that can handle the SuperCharger format will work as well. Make sure the emu is configured to launch full screen and that you do not have a dual display active.


We're going to use the online bB Atari Music composition page by RT as well:




This thread is just to talk about music theory chiptune composition and interactive Fx programming in BASIC, if anyone has setup issues with the IDE please PM me and I will help you via PM - you should be able to load the .bas or .txt BASIC program in one tab and the compiler in another and click Play to compile and lauch the game in the emu.


Inspiration and the ADSR Envelope


Here are a couple of really incredible music videos by KK/DMA, Flush , KK/DMA and Shadow/Noice for inspiration,


and an awesome sound digitizer written by Tjoppen with a Popcorn cover by Esposta - one of my favorites! 

That last one pushes the TIA so hard that no video is possible unless the ARM or the Pitfall II chip is leveraged, but our techniques are all related - the key to shaping an ADSR envelope to any degree is punching the volume at regular intervals. We can do this even at 60, 30 or 15x per second, but the lower the frequency the less of an effect that is exerted on the selected waveform and frequency.


There was a thread recently about the two TIA channels sounding slightly different with the same inputs that is very related here as the twin oscillators have a slight variance in volume/power causing a different ADSR where none is intended. The experimental sound engine in this BASIC is already shaping the ADSR envelope very differently for both oscillators, here's the first few lines of the chiptune definition in the code:




The last value in each line is a shared duration in frames (or every two frames) and a maximum of 51 entries are available in the table (short chiptunes but we can remix them!)


RT's awsome composition page will be used to find and hear the base waveform and frequency for the notes you want, these are the second and third values that appear in the copy/paste box at the bottom of the page when you click on an available note from any of the waveform keyboards, for example:




Ignore the initial 8 and take the "6,18" this is the waveform and frequency for the first voice/oscillator. The experimental sound engine expects this information for both oscillators and a shared duration, so you will want to select a sound for the second voice/oscillator and set a shared duration. 


Very different sounds on both channels from the same inputs:


If we choose exactly the same waveform and frequency "6,18" and set a shared duration of 15 we will experience a very different sound from the same oscillators:




Why? The ADSR envelopes are now very different:


The experimental sound engine punches the volume down from 15 (using the duration) every other frame in this example to flare one oscillator while fading the other punching the volume up every other frame from 0 to 15 shaping the envelopes differently.


Tweaking the envelope and applying other Fx:


This game doesn't allow a linear fade or flare but instead uses a vibratto effect on the ADSR; down up down up down down, and up down up down up up, instead of moving linearly - this also extends our tempo; instead of 15 representing 15 or 30 frames (two modes available) 15 becomes 60 or 120 frames (one or two seconds sustained) and the ADSR can become more interesting for our limited punches.


The LASERBEAM theme - Overriding one channel AND the sustain value:


The game starts out with the lasers activated (unless you hold down the button to turn them off) and uses an algorithm to create a different Harmony overriding one of the channels and modifies the melody on the other channel/oscillator via the shared sustain.


The Balls theme - Overriding one channel and the sustain value:


If you have the lasers off and are listening to the main harmony chiptune (or when they run out) you can perform either a "sonic roll" through a contiguous line of bricks or find yourself bouncing quickly back and forth through a narrow corridor between rows you will hear the Ball's theme directly replacing the harmony (or is it replacing the melody? need to check which channel) or mixing in at evenly spaced alternating intervals and modifing the other channel/oscillator via the shared sustain. In this instance it doesn't use an algorithm to generate melodious music but reads it from a table. 

The Balls theme is in it's own table and is also composed with RT's awesome bB music page!    


The Balls theme and LASERBEAM theme are arpeggios and canons initiated by the gameplay events, these musical structures can have a compelling and captivating effect in tandem with gameplay and visuals. 


There's a lot going on with the Experimental music engine with opposing ADSR shaping and these other Fx techniques used together and the complex musical structures created from music tables and algorithms mingling with the gameplay and revising the Harmony and Melody in the chiptunes.


Looking forward to ideas and discussion! :)


Here's another thread with a fun experimental sound engine I put together for a demo at an Expo in the 80's with my voice digitized in the Fx: 


Update: I found the first note in the Balls theme arpeggio was getting detuned by a bug, fixed it in the BASIC code before sharing it today - recompile this game and see the melodious improvement from correcting just one note in an Arpeggio! All participating notes must be in tune for the Arpeggios to work properly.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...