Last week I posted possibly the most tedious Basic type-in listing ever to World Of Spectrum:

(continues for approx 1500 more lines)
Anyone typing it in in its entirety would be rewarded with this:
Not bad for an evening’s work. Mind you, I did take an ever so teeny shortcut, by writing a Ruby program to convert a MIDI file to BEEP format. (Any .mid file will do, although ones with a single instrument will survive the rather primitive selective-note-butchering process better. Oh, and anything much longer than this one will exceed the 48K Spectrum memory…) And now you can try it out too:
- Midibeep source/downloads at Github
- Midibeep Windows build (thanks to Karl McNeil)
- Minute Waltz (TAP, 38K)
Update 2010-05-26: Karl McNeil has adapted Midibeep into a variant called Mid2ASM, which outputs an assembler listing rather than Basic – this enables the data to be packed much more efficiently, paving the way for altogether longer pieces of music. Download Mid2ASM (453K, Windows EXE included)
Update 2010-06-02: Another update from Karl, featuring a Windows GUI, more space-saving tweaks, and embedding the output in a Basic REM statement. Download Mid2ASM v2 (3.4Mb)
That is awsome!
You know what would also be awesome? Give the listing to someone to type in and when they were done tell them about Midibeep!
No, that’s just just plain mean actually, I don’t mean it ;)
Gasman, you’re crazy! Really loved it :)
Oh, shoot.
And that’s still one audible channel!
You’re a dangerous man.
And actually the music has some weird charm in it.
But does it merge many channels into one automatically or the musician has to do that?
Wouldn’t using DATA statments instead lower the memory usage?
KLP2: A bit, yes. You’d still have the numbers eating up space in both ASCII and floating-point form, which you could condense further with VAL (or the nasty trick of putting a 0 there in the ASCII form but poking the real floating-point value – which would eliminate any pretense of it being type-in-able, of course). Better still – and departing even further from pure Basic – would be to come up with an efficient packed byte encoding for the data, to be read via PEEK. But that’s the point at which I decided that I’d spent too long on this already :-)
Amazing! Everything sounds better in a spectrum.
Iv just emailed you a new version of your tool, renamed Mid2ASM… Thats right, it now spits out Assembly instead of BASIC… It still sounds the same, using the BEEPER, but saves space by cutting out the BASIC listing and converting the beep data into integers… If you think it is worthy of attention, then Id be honoured to see it hosted on your site…
Mid2ASM GUI version emailed to Gasman… Now also compiles the ASM, pumps it through bin2Rem and generates autorunning TAP files…
Optimizations for speed and memory also made…
Gui allows you to preview midi music files prior converting
outputed Assembly now more compatible with other assemblers
Once again, Id be honoured to see this hosted on Gasmans page!…
Mid2ASM v2.3 sent to Gasman & WOS…
- Some minor assembly optimization added (some math is precalc’ed)
- Beeper tune now plays via PC beeper after compiling for preview
- BugFIX: Menu entry now reflects whether music playing or not (STOP added)
NB: The original commandline version is in the source zip file (Its main improvements are the optimized assembly edits)
Mid2ASM v3.0 sent to Gasman & WOS… Once again, the commandline version is in the source package (precompiled), and now allows parameters to adjust the fraction that determines the note lengths, and add an offset that alters the tempo.
eg: default is -M:51(0)
..where 51 is the mininote value from which all note durations are multiples and (0) is the tempo offset added during playing…
The GUI version, allows you to alter these settings via a GUI slider (if you untick the default settings in the menu first), and allows you to adjust the tempo while you listen to the PC beeper preview realtime. Hitting compile then allows you to set this tempo to output the obligatory .TAP file…
…plus the usual bugfixes… etc, etc…
This may be the end of development of this project…
..for now…
..unless I find time to reintegrate output back to BASIC using DATA statements… we’ll see… ;)