Shitwave - A PRNG based drone generator for Gameboy
March 23rd, 2009
Little-scale recently posted All 4-bit Waveforms That Have 32 Samples, a Max patch that would generate all possible wave frames that could be used with LSDj, given gazillions years. However, the result was a little boring because it would start out as a 1/32 PWM and slowly progress towards a longer and longer PWM. Even within many years, chances are you’d still have a very low duty PWM.
So I decided to find an algorithm that would produce more interesting sounds and still cycle through all 1632 possibilities. My choice was a pseudo random number generator using a linear feedback shift register. Actually not completely unlike the one in the Gameboy’s noise generator.
However, where the GB’s generator goes through a small number of states, and the buffer constitutes one sample, I’m using the full 16 bytes (32 samples) used in the Gameboy’s wave channel as my shift register. (Equivalent of one frame in the LSDj softsynth)
The shift register is a regular Fibonacci where the two topmost bits are xor’d with each other and shifted in at the bottom. The program is written in spaghetti style hardcore assembly language and the code is 256 bytes big. (The file header is another 80 bytes. So all in all, the program is 336 bytes.) The rest of the 32 kB is zeros, so there’s room for additional functionality. (Suggestions, anyone?)
The visuals are showing the currently playing waveform. The background pattern for the visuals are generated with a simple xor algorithm to make it appear random.
Unfortunately I don’t have a camera with a microphone, or even editing software that can handle the non-standard MOV file that my DSC gives me. So the audio is recorded separately from the video.
Audio:
Video: (No sound )
And last but not least… The ROM for those who dare and desire to try the program themselves.
shitwave1.zip (637 bytes, zip)
A and B (Or left and right) controls the type of visualization used. Select (Or up) re-seeds the PRNG. Preferably, run this program on real hardware, not in an emulator. If you must use an emulator, use no$gmb.
Oh, the name “Shitwave”? I mispelled “Shiftwave” when creating the folder for the project, and then I decided it was a fitting name.
March 23rd, 2009 at 7:45 am
“it’s boring waaah”. Awesome work, Nitro! Very, very impressive.
March 23rd, 2009 at 8:47 am
can’t wait to give this a go.
Ima use it in my set as a reference to you both!
March 23rd, 2009 at 9:00 am
do it as i will be there with you in spirit. im sorry i can’t make it. and nitro, i’m going to be using this as part of a performance if that is okay with you.
March 23rd, 2009 at 2:32 pm
You m may proceed, sir!
March 23rd, 2009 at 5:25 pm
Sounds good in emulator thru PC speaks at work… can’t WAIT to hear it DMG-> amp at home!!!!!!
March 23rd, 2009 at 5:53 pm
fuckin amazing. How do I get as smart as you guys? little scale and nitro awesome work!
March 24th, 2009 at 6:07 am
amazing stuff man.. really cool
March 24th, 2009 at 4:44 pm
[...] Gameboy Genius » Blog Archive » Shitwave - A PRNG based drone generator for Gameboy. Share [...]
March 24th, 2009 at 6:53 pm
You and little scale are sick individuals.
Love it.
April 9th, 2009 at 2:34 pm
great work! so, is there a recording with both audio+visuals available yet? i wanted to show it off somewhere…
April 10th, 2009 at 5:29 am
amazing, i’m tryin’ it and i love the sound!
April 18th, 2009 at 2:38 am
http://depositfiles.com/files/jt5gb8qp6
no$gmb with bios and firmware
June 3rd, 2009 at 11:28 am
[...] Shitwave running in KiGB, fed into Live. At times like these I feel ashamed that I haven’t added support for any kind of MIDI control yet. It would make Shitwave much more useful for actual composition. But at the point it was more of a proof of concept. [...]
September 10th, 2009 at 6:01 pm
Great work. Sounds good in emulator thru PC speaks at work. Thanks
September 15th, 2009 at 9:50 am
Very funny to work with!
http://www.youtube.com/watch?v=ECPkCJnD61M
October 21st, 2009 at 4:48 pm
That’s lovely!
But unfortunately link to download it is not working…
March 19th, 2010 at 1:16 am
[...] of a LTC1799 variable oscillator which is contralling the clock frequency of the DMG running Shitwave. (Don’t forget that Shitwave sucks [...]
March 24th, 2010 at 10:14 am
[...] First off a confession. Shiftwave as a name was totally lifted from the blog of the creator of shitwave. [...]
May 9th, 2010 at 4:14 am
this is effin great work! I love it.
August 7th, 2010 at 5:42 am
[...] Gameboy Genius » Blog Archive » Shitwave - A PRNG based drone generator for Gameboy blog.gg8.se/wordpress/2009/03/23/shitwave-a-prng-based-drone-generator-for-gameboy/ – view page – cached * Bill Hicks on Rick Astley, creationists and positive drug stories * Regarding the message on the 8bitcollective front page… * 3 new tracks (+1 old one) * Twuttr * Shitwave synced to LSDj * Figma - Drossel von Flügel * Best g’damn action scene ever! * LittleFM on GBC * ReBub * Red onion macro and photo dump! * 漢字 test Tweets about this link [...]
January 26th, 2011 at 4:01 am
Amazing work. Just wanted to say that I’ve been using this for generating visuals. Through No$GB on a PC or using an EMS cart in a Super Game Boy and SNES, you can change the four shades of gray to whatever colors you wish and project this as a background of pixelated static that can be controlled, to some extent, by pressing A, B, and Select, more so if used with an emulator with an adjustable frame rate or a LTC1799-pitch bent SuperGB.
January 26th, 2011 at 4:21 am
Oh cool. Knowing that someone is actually using it after so long almost makes me want to take up development again.
February 13th, 2011 at 8:00 pm
It’s a fantastic piece of code. If you’re willing to share the source, I’d love to work on it some more and add controls (such as pause, reverse sequence, etc.).
February 13th, 2011 at 8:11 pm
Let me put it this way, the disassembled code looks cleaner the original source code. And the code is written to be esoteric and weird.
October 18th, 2011 at 12:01 am
[...] An untitled collaboration between Simon Mattisson and Marcus Olsson. A Gameboy in a dark room is overclocked until it crashes. I’m almost getting Saw vibes from this. The Gameboy is modded by NeX and is actually being overclocked. The sound is produced by Shitwave. [...]
March 16th, 2012 at 4:01 am
excellent!
May 3rd, 2012 at 8:35 pm
going to be using shitwave for a noise/drone performance soon. I’ve been wanting an excuse to use it like that since it was released. cheers nitro2k01!
January 29th, 2013 at 1:02 am
I invented a theramin controller for shitwave.
January 29th, 2013 at 1:03 am
ok, just kidding. but think of how cool that would be.
October 23rd, 2014 at 8:53 pm
So cool! I could listen to it forever!! I really love that warm, fuzzy sound!!
Hope a next version will add more controls to add some entropy/variations to the whole!
<3
May 24th, 2016 at 7:03 am
[...] Tronimal erklärt die Game Boy Musiksoftware Shitwave. [...]
March 3rd, 2020 at 9:17 am
[...] able to get out of just the two Gameboys alone, one running mGB and the other droning the glitchy Shitwave. I now have a fairly good basis on what I want to do for my composition and [...]