"These are the elements of life/"

Showing posts with label vintage. Show all posts
Showing posts with label vintage. Show all posts

Monday, August 17, 2020

My web-based Amiga Protracker MOD music player

Back in 2013 I took a web coding course, and for the class project, I wrote a PHP and JavaScript-based MOD player.  Back then, I didn't yet know the concepts of resampling well enough to get the DSP portion of the MOD player correct in time for the submission due date.  It would play the correct rhythms but the samples sounded like static.  It was also doomed from the start to not sound at all musical, because even though I was pulling samples with correct byte order from the MOD files, when calculating a value I was naively using ^ for power, which is of course Exclusive-OR.  Oops!  No wonder the samples sounded bad!

A year or so later, I implemented in the embedded software for a pathogen detection instrument some resampling routines, and I realized that was the knowledge I needed to make my MOD player work.  For many years the desire to finish my MOD player was on the back of my mind, until this year, when I finally decided to finish it.

When fixing my MOD player, I first tried just playing back the samples that it read from the MOD files, and I knew something was wrong simply by the way they sounded at a fixed and reasonable playback rate.  I thought maybe it had to do with how I was doing byte-swapping, but all that code looked okay.  Then I noticed I was using XOR instead of a power, changed it to some repeated multiplies, and BAM all of a sudden the samples sounded like they came from the song!  I was pretty ecstatic.

I then kept working from there, making it properly resample the data to get the right notes.  I incrementally added effects to get songs that required them to sound right.

As I had started it in 2013, I didn't want to deal with anything but getting it to work, so I begin development in 2020 on the same computer with an old version of Mozilla.  After I got it playing songs nicely, I then moved my development to a newer computer, and to my dismay, discovered that the Mozilla-specific moz audio functions had been deprecated.  At first I was annoyed, but after I got it to work using WebAudio, I realized that it was a great benefit, because most people use the spy browser anyway, so nobody would visit it if they had to use Mozilla Firefox, etc.  Also, it now works on phone, which is pretty fun.

Currently it needs the 0xA command implemented, and the related effects that also attenuate the volume of a sample over time.  At this point I think it sounds good enough to share, though.

I don't know JavaScript well enough to really write it in a thought out, object-oriented manner, like I would if I had written it in Java or C++.  It suffers as a result, that effects that need to bend pitch will be really hard to implement, so I probably just won't.  Also, adding support for 8 channel mods will be ugly, but possible, instead of just instantiating more channels, or something.

When I started the project, I didn't know of other JavaScript MOD players.  I then discovered the one made by Gasman.  I think his is still reliant on the old Mozilla moz audio functions.  This year, I have also discovered the JavaScript MOD player that is used by files.scene.org, and the one used by the MOD Archive (though that one is very resource heavy, and super choppy on my phone.)  There is also a pretty good one made by a Finnish guy, and another one on github too.

The value of mine is that it is super fun to use.  It is light weight and works on phones, and has a bunch of MODs uploaded and ready to be enjoyed.  I sporadically add new MODs to it as I hear ones that make me excited to put on my MOD player.  I usually hear them on Nectarine Demoscene Radio, and then download them from Modland or Amiga Music Preservation.

Here is the link to my MOD player: http://pwh.sdf.org/web_mod_player/

I hope you enjoy the great music!

Monday, March 26, 2012

The Computer Chronicles and Chocolate Floppies

The greatest thing I discovered on the Internet in the last year, and quite possibly ever, occurred about six months ago when I discovered the classic PBS show The Computer Chronicles, and that almost 600 episodes from the show are online over at the Internet Archive. The show ran from ~1982 (the earliest archived show I've seen so far was from 1983) to 2002, when Stewart Cheifet, the host and producer, decided to take a break from this and his other show, Net Cafe. Plus, Leo Laporte's Screen Savers and Call for Help over on ZDTV / TechTV were possibly giving tough competition, but I don't see how, considering The Computer Chronicles was available to everyone on PBS, and was the gold standard for computer reporting.

This show is the absolute best! The hosts are charming; Stewart Cheifet, Gary Kildall (yes, the CP/M legend who founded Digital Research), Paul Schindler with the software review, Wendy Woods and others give the show a friendly and cozy ambiance despite actually being quite in-depth and even academic. Gary Kildall's gentleness and humility really shine through, as does his genius, and Paul Schindler's humor certainly makes me laugh.

The show is also very stylish, and gives you that good feeling inside that occurs when watching legendary PBS programs. One could say it's nostalgia, but I got that same feeling when watching Nova, Square One, Reading Rainbow, Newton's Apple, The Frugal Gourmet, and Nature back in the 80s, so I don't think that's quite it. It's just that it's very high-quality, and even epic. For example, both musical themes for the show, but especially the earlier one, are dramatic, and when the show starts with Stewart and Gary in the dark, only lit indirectly, the music booming, and then the lights come up, you know you're in for a treat!

The history contained in this show is priceless. Every time I watch an episode (which is at least one-per-day :) ) I am wowed by the incredible technology we already had in the 80s and 90s, and it makes me excited to try some of the devices or techniques they discuss, or sometimes I feel yearning for by-gone experiences and aspects of the computer culture, like the BBS community (yes, yes, I know, BBSes still exist through Telnet, but it's not like I can dial up some local number anymore). In fact, some of the software reviews and programmer interviews have led to me searching eBay and excitedly purchasing what I just witnessed on the show (especially regarding the 90s shows and CD-ROMs).

Except for a few early shows where the credits roll over an image of the darkened studio from a vantage point behind the video cameras (see? stylish!), the Computer Chronicles always ends with a news section, Random Access, and just like the rest of the show, these are always historically significant. It never fails that the news reader will mention some event that is still remembered today in computer lore!

My only beef with this show is: how could I have not known about it when I was young and it was on TV? Arg, grumble, harumph! I loved PBS and would watch it a lot; I can't believe I wouldn't eagerly look forward to this show every week. Maybe it wasn't carried in my market, but I doubt that. Goodness, I would've loved this show as a kid...thank heaven I discovered it now, though.

Well, while watching the 1985 Christmas guide, Wendy Woods pulled out a 5.25" chocolate floppy, and a year later, for 1986, she plugged a 3.5" floppy made by the same chocolatier (I'm pretty sure). Well, naturally this got me excitedly searching the net for chocolate computer devices, and while I couldn't find any floppies, I found something much, much better. Both 3.5" and EVEN 5.25" (yes!) chocolate/candy/soap molds! I purchased mine from Cybertrade's eBay store, though they have an amazon.com presence as well. They have a lot of new old-stock (or perhaps still in production) molds for computers and floppies and more. The coolest thing about these molds is that they're copyrighted 1984 and 1985...that's right, they're not merely retro and fad-like, they're truly vintage! I never new making chocolate would become one of my hobbies, but eating floppy chocolate has become my newest pastime.

Here is a great modern interview done with Stewart Cheifet in 2010 by the Retrobits Podcast:
Part One
Part Two

Peter