volume doesn't control the volume, but the duty cycle (timbre and harmonic content) of the waveform. And it looks like I guessed the 40% (audibly equivalent to 60%) duty cycle exactly!
I just love how good us humans can get at nichy distinction topics if we just keep at the task long enough (and start early).
We once had a film crew in our school trying to get some shots of us at the computer. I overheard them having big problems getting the CRT flicker free on camera and trying to find out the refresh rate.
I was maybe 12 at the time and just told them point blank it‘s 60Hz. They asked me how I knew and I just told them I could see it from the feel of the flicker. Was a good guess as well since it was one of the standard VESA frame rates.
The cameraman came back to that kid 3 minutes later, showing me the shutter set to exactly 59.7 Hz with a still very surprised face.
Can you tell me what you're hearing? I don't recall the original music well enough, but this one sounds slightly muddy -- would a 50% square waves sounds crisper?
I used to make chiptune (and still do to some extent). Pulse waves (periodically alternating high and low sound pressures) are a type of waveform, and the width or duty cycle of the waveform (the percent of the time the sound pressure is high rather than low) controls the harmonic spectrum and perceived timbre. I could identify by listening that it was greater than 25% but less than 50% by listening by ear, and hone in on a guess by comparing to FamiTracker's emulated VRC6 (which can output duty cycles between 6.25% and 50% in steps of 6.25%).
I don't know what you mean by "muddy", but I did notice the speaker (perhaps mic too) has a crappy frequency response, and the bass notes are quiet and difficult to identify the pitch of.
Just to add a datapoint, I've been making chip music for nearly 15 years and being able to accurately hear pulsewidth, waveform (assuming a simple, fundamental chiptune waveform like square, saw, triangle) is actually relatively common with a bit of experience.
When I got started I was awed by it in others I talked to on IRC, but it wasn't too long before I was familiar with it, too. It's also pretty easy for me—and I'd bet for nyanpasu64 as well—to identify the actual PSG or platform used and even to get a good idea of what sort of sequencing/programming is involved to get any particular sound I hear.
For me it's pretty specialized, though. I absolutely can't do that with traditional music production. I wouldn't be able to tell you too much about music I heard produced with modern tools.
Describing timbre in text is difficult, but I wouldn’t say a symmetric square wave is “crisper”. Maybe more hollow, tooty, clarinet-like. Asymmetric pulses first sound richer but less clear, brighter, more nasal, then as you get to more extreme settings it starts to sound thin and fragile.
BTW, if you want to compare the Monkey Island title music for all platforms the game was ported to (and some it wasn't ported to, looking at you C64), take a look at this video: https://www.youtube.com/watch?v=DydmYhaL7zw
For me, the Amiga version brings back the fondest memories - 4 channels of glorious 8-bit sampled sound! Unfortunately two of those channels were hardwired to the left speaker and two to the right speaker, so listening with headphones is not so great, but still...
I kind of prefer this other video by LGR on the subject of monkey island title music through different PC music devices. It does not have the commodore 64 as it only cover PC, it more devices and illustrate how different the same song is on same platform with different hardware.
Yeah, that really shows how much effort they (had to) put into supporting the variety of PC sound cards - although by the 90s most (affordable) cards were (or claimed to be) "AdLib/SoundBlaster-compatible". But I still like the video I posted better - I mean, there were (and partly still are) other systems out there than the PC, let's not forget that! And I originally played Monkey Island on the Amiga, so that version has a special place in my heart...
It's amazing how the PC speaker version has a Melody, but also chords and accompaniment, even though only one frequency can be played at a time. There's so much going on it sounds impossible.
I really wanna know how this was done, presumably by offsetting all the various sounds. Maybe very short notes jumping around, perhaps the raggae style off-beats help.
There's a big documentary on Monkey island on YouTube, unfortunately it doesn't go much into the music.
The PC speaker version is really clever. It's arranged in a way that suggests to the listener that multiple voices are present, but they can only hear the most prominent one that's active at any given time. The arpeggiated chords (marimba on other arrangements) help with this; in other cases, a background note is offset slightly to make it "peek" around the edges of the lead.
There even used to be a driver for Win 3.x that allowed playing digitized sound via the PC speaker as if it was a real soundcard. It was (unsurprisingly) very CPU intensive so not useful for games.
> It's amazing how the PC speaker version has a Melody, but also chords and accompaniment, even though only one frequency can be played at a time.
The PC speaker doesn't play a single frequency, it toggles between “on” and “off”. There's techniqueels to drive so that it looks to be next level of softwarr like it is playing a single frequency, or like it has, e.g., an 8-bit position setting, or...a number of other things. But even those super-basic things are illusions over toggling at appropriate times, not the native function of the speaker
> Wouldn't toggling off and on 8000 times per second be the same as playing 8KHz?
Sure. But its not “tell the speaker to play an 8kHz frequency”. The speaker doesn't inherently play “one frequency”, it just toggles on and off when you tell it to. If you tell it to toggle on and off based on a function driven by the combination of an 8kHz cycle and, say, a 2.5kHz cycle it will do that, too.
...and I think that's exactly the technique the "Monkey Island PC-Speaker coders" used to overlay the percussion over the melody. The IBM PC and its descendants had the advantage of having a relatively fast CPU which could partly make up for the primitive sound system - i.e. it could only play a square wave, but it could be a very complex square wave. Some games even played voice samples - they were extremely distorted, but more or less understandable. Similar to how you can show photos on a monochrome display (like the good old Hercules) - they won't look pretty, but you can do it...
Playing "8KHz audio" is not the same thing as a playing an "8KHz frequency" (which yes in this case is a actually a square wave, so technically its Fourier transform shows other frequencies being played - but the programmer only gets to set the frequency of the square wave).
Additionally since this game as well as many others from the era can be configured to output MIDI data you can buy new midi hardware and continue to hear how we've developed this kind of sampling! https://twitter.com/GyoJc/status/1304638489313644546
For a time when stereo was new for recorded music, the Beatles and the Doors both like to really play with that ability. They would put some tracks on just one ear, so that only the people with the latest stereo equipment could truly enjoy the work as intended.
Even though it was supposed to be mostly parody, Monkey Island instills a sense of adventure that few other games have (like King’s Quest).
The semi-open island hopping of MI2 was specially fun. I still wonder if there will be an open-world game like Skyrim or Fallout etc. that is spread across islands instead of an endless landmass.
Too bad LucasArts got gobbled up by the D Demon and Monkey Island will probably never get another revival because it cannibalizes Pirates of the Caribbean.
Unless Ron Gilbert et al. can pull off a Thimbleweed Park with it.. ;)
Interestingly, the music is different based on the audio you select. If you listen to the PC speaker version of the theme, you might notice that the final note is arpeggiated, which isn't true for the midi version. The PC speaker version is also missing a note in the previous measure that exists in the midi.
Then when the opening credits have finished and the game begins, there is background music for the lookout if you have midi audio, but silence for the PC speaker.
I have it as a default ohrwurm, with ot regularly popping into mind as a background theme for hours on end, but I don't mind - it's better than the other wurms...
My young daughter will grow up with a vague knowledge of it as it - along with the theme to Monty Python's flying Circus - are the two tunes I hum to her to get her to sleep.
The Last Ninja (C64 version) holds that title in my heart. If you like it, do check out the rock remixes by a band called the Fastloaders (a live performance also features Ben Daglish, the original composer of some of the tracks. RIP, sadly).
I’ve been wondering for a while. What tools were used to compose PC beeper music? Was there some sort of DAW or toolkit, or was the music all hard coded as a text file?
Based on interviews, Lucas Arts were using common MIDI tools and composition software.
The real magic happens in their music driver, which takes the sound effects, multi-track MIDI music, along with track priority infomation and dynamically down-mixes it to however many tracks the current audio device has. Just one in the case of the PC speaker.
I assume they would have had a setup that allowed them to quickly hear what the track sounded like on all their target audio devices.
I don't know of any toolkits used by the pc speaker games. I did enjoy some videos on YouTube from the 8-bit Guy recently that had some good info though:
By the late 1980's early versions of Cubase et al. existed. These were not yet DAWs in the modern sense(while there were some very early high-end examples of multitrack digital audio, that phenomenon waited until memory and storage were cheaper) but they were competent sequencers and could drive MIDI devices easily. Building up a MIDI sequence and then exporting that to the game engine format was the preferred workflow for the studios on PC attempting full scores(rather than "tunes and jingles") starting in this timeframe since it offered the flexibility of hiring traditional composers who could record in from a keyboard and then do some cleanup and edits for the target device as needed, including simplified beeper versions.
The tracker music/custom sequencer formats operated in a parallel universe alongside the MIDI workflow and were more often the provenance of scrappy demosceners and independents who saw an opportunity to completely control the output quality(as long as it was sample-based). Not everyone literally used a tracker type of workflow and there are examples like MML(Music Macro Language) as another idea of source formats, as well as the low-level "enter hexcodes in a machine language monitor while the playback routine is running" (used by some C64 composers.) If you played a DOS game made with QBasic it probably used the PLAY statement to control the beeper, with an MML-style syntax. This style of syntax would appear again with programmable mobile ringtones.
In the mid-90's the balance shifted again towards CD audio, ushering in simple drum loop sequences as the quick-and-dirty audio filler of choice, and everything since then has largely been variations on that theme with more tracks and processing.
A lot of game music was also composed with trackers, including some big titles like the original Unreal and others using its engine such as Deus Ex. But tracker music is all about arranging digital samples on a multi-track timeline, requiring an audio output that can play digitized multi-channel sound in the first place…
Scream Tracker 3 did have an Adlib output mode, and there were a few .s3m files out there that used Adlib FM instruments instead of sampled instruments.
Haha, yeah - many years later, finding the .IT files in the original Unreal Tournament and downloading a tracker was what got me into composing music on the PC. It was wonderful having the music available in such a reverse-engineerable format.
This reminds me of how I was used to this music while playing MI on my PS/2 and how I was blown away the day I installed an adlib-compatible soundcard (the cheapest I could find with my 11yo money) and the first game I tried was Monkey Island.
It's one of those memories that will stay with me forever.
The important question at hand here: When and how did you expose your nieces and nephews to Monkey Island and how did you introduce it to them? :D
I would really like to share this experience with kids I know but I find it hard to find the right time and way to show it to them and to get them to play. Did you play it with them? Or just show it to them? On a computer or a phone?
I played the game with them, when they were very young. They loved every minute of it - with their uncle performing impromptu dramatization-translations :-)
I am seriously considering playing it again with them this summer :-D
Monkey Island 1 and 2 is available on steam, even remastered if I remember correctly, to not damage their modern sensitive eyes that is used to high resolution graphics...
Another recommended remaster is Full throttle...also available on steam and Xbox.
Big ups to full throttle, cinematic and fun, beautiful art & animation & voice acting, a game for kids that felt like it was made for grown ups - and vice versa.
Oh man, I'm sure only people who've actually played the games back then can relate, but I got literal goosebumps upon hearing that music when I played that video. I think the fact that it's played from a PC speaker added that much more level of nostalgia.
My mind was completely blown away by the early MOD players that somehow managed to play relatively high res music through the speaker. I have a vivid memory of playing Axel F and being in total disbelief!
I am looking for an old mod player from 1990-3 Called something like fli player. With a full screen modus where you see 3 circles red green and blue. Already looking for it for about 15 years. If I could only find that player.
It can be easy sometimes, sitting where we do now in the era of smartphones and globe-spanning networks, to forget that teaching sand to think has been hard.
Videogames required a lot of trickery to do what developers wanted them to do. And they succeeded.
(As a fun parenthetical, it's enjoyable to consider that the studio that produced this game was LucasArts. This was one of the projects Lucas had his game studio create because he was gunshy about whether they could produce games that would enrich or dilute the Star Wars brand. He wanted them to do original IP first to verify they were, first and foremost, game creators. The studio's first published game was 1985, this game came out in 1990, and 1991 would see their first Star Wars game released).
There is also the fact that Lucas had licensed the game rights to Star Wars to Kenner along with the toys, in a deal that was very much in Kenner's favor. As long as Kenner paid them either 5% of their yearly profits on Star Wars toys and games or 100k, the deal would continue. They finally stopped paying in 1991.
Of all DOS games I ever played, by far the coolest PC speaker music was in Star Control 2. Unfortunately (understandably) it was not loud enough, but it was great.
MI music is great though, I speak it as a person who has LeChuck fanfare on a ringtone.
It needs to be emphasized that the game had hours of music. Every different race encountered, every mode of travel and even different planet types had different music. All through a PC Speaker and would run on a 286. The game was a technical marvel for the time.
It’s rather sad that this was the music in these otherwise excellent 80s PC games when earlier machines such as the Commodore 64 or even 8 bit contemporaries like the NES and Sega Master System had far superior audio capabilities. PC games for the most part skipped a lovely era of synthesized music.
Those do sound pretty nice. I wonder what the usage rate was for enhanced sound hardware. None of the systems I used up to the mid 90s had anything besides the PC speaker, even in the VGA era.
Not sure what the usage rate was. But the devices saw pretty wide support. For example the Roland was supported by 900 games, same with the Soundblaster
PC games had great music by the late 80s, it just wasn't cheap. Sierra On-Line is notable for supporting the Roland MT-32, starting with King's Quest IV in 1988.
Many games supported digitized output over a DAC on the LPT port. I remember building one myself. There are many tutorials. A moderately fast 486 can output CD-Quality sample rates with such a thing.
Covox had one in the 80s: https://en.wikipedia.org/wiki/Covox_Speech_Thing
By way of compensation however, a few years later PC gamers could enjoy the FM synthesis of the Sound Blaster card or the PCM-based sounds of sound modules like the Roland Sound Canvas. A lot of PC game soundtracks from that era have aged very well and have become classics in their own right.
Building little audio gizmos is fun. I recommend using replacement smartphone speakers (eg for the iPhone SE 2020) if size is an issue, because a bare chassis without an enclosure sounds like crap due to acoustic short-circuit.
Another option is LCD TV speakers, those already have an enclosure but are a bit larger.
This looks like the speaker that goes into your ear, but I meant the one at the bottom of your phone that activates when you switch to "speaker phone". They usually have the keyword "buzzer" in the title of sites that sell them to distinguish them from the earpiece.
Some have just two contacts you can easily solder speaker cables to, just avoid the ones with complicated connectors. You don't need to enclose it to get good sound, it already has an enclosure. I often choose plush toys with a simple MP3 SD player (1€ on Aliexpress, eg https://www.aliexpress.com/item/32657798948.html) and some triggering mechanism.
I had the same idea! Except that I wanted to do it for Xenon 2 Megablast. It was a DOS game I grew up with and loved the intro music, so much that I wanted to play it outside the computer.
Well, if the bird in question used an LZ77 followed by Huffman, he could compress all that wood/chuck stuff down to almost nothing. So he could chuck a lot :-D
I don't hear it myself but you might be interested to learn that the DotA song derives from 2000's Daddy DJ by the band of the same name https://www.youtube.com/watch?v=flL_2awF-QI
What a great write-up. A huge amount of tricky concepts in a single project. This seems like it could be the capstone project for an advanced microcontrollers course.
And, as someone who wants to program in more embedded systems, it tells me how high the cliffs are ahead of me...
> I wonder if using RLE encoding would not have been but vastly simpler and more compact...
No, mate - it wouldn't. Don't be confused by the "printf"-dump; the Python script processed it into pairs of (frequency,delay). That is, when you see...
The notes were already encoded as frequency and duration. The Huffman coding was required to get that down to an even smaller size.
RLE might have helped for repeated notes - but I guess Huffman coding kinda compensates for that anyway, in the repeated notes will probably end up with shorter bit strings.
A USB tester - it just reports the voltage (5V) and the current. As you can see in the video, the current hovers around 10mA, spiking to 20mA when we use the speaker.
If you can, try to make the video louder. I really had to crank up the volume to listen to it. (Probably use a combination of normalize and compress in Audacity.)
I think the speaker is too big and / or the circuit doesn't have an amplifier, so that would be an improvement; the USB power supply should have enough juice left over to crank up the volume.
I probably would have loved this game series. I couldn't play very long because I found the constant ™ after words intrusive and definitely an impediment to immersion.
It's a joke that probably made a lot more sense in the 90s. Back then people would use ™ everywhere, in logos, whenever certain brands were mentioned, etc.
In my opinion it fits the general humor of the game perfectly, but I can definitely see how it would could be annoying.
I was nineteen when the game came out and I got that joke. It's an important part of selling the broader joke that the world of Monkey Island is probably more of a pirate-themed amusement park, owned by a faceless corporation, than it is an actual world.
Just to weight in here, I completely got that also. I probably would have played somewhere in the mid-90s, when I was ~11-13.
As far as I knew, forums didn't even exist at the time (Of course, there probably were forums, and of course mailing lists and usenet were around before that, but I didn't know about them). It really just fit the humour style of the game, not taking itself too seriously. To be honest, it was far from the funniest joke in the game.
It was definitely a joke and it was in line with the humor of the game. The game broke the fourth wall all the time. One of the characters told you to buy the game Loom. The troll on the bridge was George Lucas with a troll mask on. They had a ton of anachronistic elements like soda vending machines in the age of piracy. At the end of the game Guybrush reveals that he learned to never pay more than 20 bucks for a video game.
EDIT: Upon reading the original code:
volume doesn't control the volume, but the duty cycle (timbre and harmonic content) of the waveform. And it looks like I guessed the 40% (audibly equivalent to 60%) duty cycle exactly!