Topic: Video about 1-bit sound in Apple Lisa

Apple Lisa has a 1-bit sound output. I'm exploring the possibilities in this video + challenging others to try and code an engine for that platform for which I lack skills. I know that Shiru (whom I've given credit in the video) has done a lot of work on shift register on the PET platform; Lisa offers a similar approach but with a 68K procesor + software-controlled volume.

Lisa hardware is relatively rare, but there is a good emulator; problem is that it does not support sound correctly yet, but its author is actively working to fix it. Once fixed, I hope skilled people will start coding a lot more for that platform, and explore its sound peculiarities.

For now I had to test all the experiments on a physical machine. I hope with this post to excite others about this platform for which (from what I know) the demoscene is almost non-existent. Except for one Requiem demo which, however, has very simple sound only.

The video is here:
There's also an accompanying article here:

2 (edited by Shiru 2022-04-12 07:41:10)

Re: Video about 1-bit sound in Apple Lisa

Greetings, kewatsdop!

Wow, just started to watch the video before seeing this post. Very interesting, hopefully will find time to give it a go. My list of obscure computer hardware to pay some love and get some sound of it grown a lot lately, though. Wish the days were 128 hours long.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Video about 1-bit sound in Apple Lisa

Great. I'm really hoping you can exercise the techniques you used on PET, but on the Lisa... very interesting is the 3-bit volume control available on low level which is not available on other platforms of that era (from what I was able to research). In my experiments I was able to switch very fast between lowest and highest volume which created interesting echo effects.

Also funny how I found your article on the PET very shortly before publishing my video, glad I did because I was able to reference it!

Apple Lisa has a strong cult following but (almost) no demos, so there's a fertile ground and large audience if you ever find time to work in it.

Re: Video about 1-bit sound in Apple Lisa

Thanks a lot for another fantastic installment in your "Understanding Computer Sound" series. The amount of work you put into these is mindblowing.
Also yes, you totally convinced me that I want to program aunt Lisa. I think both Shiru and me still have nightmares from working with PET and 6522, but in theory it's a pretty good setup. 68k @ 5MHz is a bit meh, but not too bad considering the other goodies. 3-bit volume control on top of that is excellent. In my head, that translates to 8 channels polyphony already, hehe. However, from the video it sounds like the upper end is somewhat compressed, ie. the increase in volume is not linear. Could you check that with your oscilloscope?

Re: Video about 1-bit sound in Apple Lisa

Thank you for watching utz and for the kind words. And I'm sorry for totally missing the fact that you worked on the PET implementation with Shiru, I didn't realize that, I would've mentioned!

In any case yes, the volume gain definitely doesn't sound linear, and I'll do the measurements shortly and post here, good idea.

Also, Ray Arachelian is actively working on fixing the LisaEm based on my feedback, so hopefully soon it will be easier to compose stuff; see here for details,255.0.html

Re: Video about 1-bit sound in Apple Lisa

No worries, I didn't do any work on Shiru's PET player, I just happened to work on some PET stuff at the same time.

Yes, we'll definitely need proper sound emulation. Either way I guess you've just signed yourself up for some beta testing if we get around to coding something big_smile

7 (edited by Shiru 2022-04-13 06:02:06)

Re: Video about 1-bit sound in Apple Lisa

I guess with M68K and 6522 we can actually set the shift register to the highest shift frequency possible, hook up an IRQ fired when it gets empty, and generate bit stream for a few channels at once not in a timed loop, like we usually do, but for a few iterations ahead. So we'd have the traditional sounding beeper music that will still leave some time for other code to run.

Another idea is to have the same single voice music as I did on the PET, but modulate the volume with a timer driven rapid changes, like, triangle/saw/pulse, much among the lines of the AY-3-8910 envelope abuse. This approach won't bring the polyphony, but very complex timbres instead.

Either way, a good quality sound emulation is needed to be able to tackle the thing. I'm afraid I haven't seen an actual Lisa at any computer museum here, let alone someone's personal possession. It is even biggest challenge than the PET in this regard.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

8 (edited by utz 2022-04-13 08:46:44)

Re: Video about 1-bit sound in Apple Lisa

Yes, I would try reload-stuffing the sreg at the highest (or at least high enough) rate, too. The problem with that approach is however, that with an IRQ running at such high speed, you can't get much work done in the interrupt. So at best, this still blocks CPU most of the time.

Another approach would be to to set the max shift freq and just rotate patterns of %01010101/%00010001/%01110111/#ff in combination with playing with built-in volume. That way, you can update at a fairly low rate, say a couple thousand hertz. Though I'm not sure if it's possible to achieve frequencies outside the audible range in Lisa.

Edit: You know what might work, too? Treat the sreg as a 1-bit dpcm decoder. There's plenty of RAM so that could be fun.

Re: Video about 1-bit sound in Apple Lisa

utz wrote:

(...) However, from the video it sounds like the upper end is somewhat compressed, ie. the increase in volume is not linear. Could you check that with your oscilloscope?

The increase in voltage looks linear (see attachment), but linear voltage increase does not translate to linear power increase, so probably that's why we hear relatively strong difference between quiet levels, and relatively negligible at the loudest levels.

That's for frequency 440Hz, 50-percent duty cycle, notes at individual volume levels played in quick succession.

Also, I am traveling for the next 10 days so won't be able to test anything on the Lisa. But I'll test when I'm back if needed.


Re: Video about 1-bit sound in Apple Lisa

Aye, that looks... pretty bad. I'm actually surprised to see such a result from a resistor ladder. But good to know, thanks a lot for investigating.
One question, looks like there are nine pulses, but I would expect 8, with the first one being silent. Do you know what's going on there?

In any case, I'm afraid I won't get around to this any time soon. And first we need to emulator to emulate sound correctly, anyway.

11 (edited by kewatsdop 2022-04-14 09:25:59)

Re: Video about 1-bit sound in Apple Lisa

I don't think there are 9 pulses; the vertical spacing looks arbitrary to me and does not really correspond to volume changes, something else must be causing the spacing (and quite possibly my cheap oscilloscope). There are clearly 8 levels heard from the speaker, and the code responsible for the above is attached.

Yeah, I don't expect people to drop everything and start working on the Lisa... it's been waiting 40 years, can wait a few more! I'll try to experiment myself a bit within limited capabilities. I'll be refreshing the thread with progress.

Ray Arachelian is working on fixing the emulator; he acknowledged my yesterday's feedback.

Lastly, just a minute ago I tried a crazy idea to simply keep shoving new and new series of 8 bits to the shift register without waiting for the sound to finish like below, and it's working — you can basically keep flooding the shift register without changing its state first in any way. Like this:

        MOVE.W #$20,D6
loader  MOVE.W #$FF,D5          ; load only 1s first, then change pattern with every iteration
pusher  MOVE.B  D5,SHR1(A0)
        MOVE.W  #$00D0,D4       ;set some arbitrary delay constant
ticker  DBF     D4,ticker
        DBF     D5,pusher
        DBF     D6,loader

It didn't choke or anything. Produced weird whizzing sound because we iterated through all possible 8-bit pulse train shapes.

Post's attachments

testsound.asm68k 3.83 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.


Re: Video about 1-bit sound in Apple Lisa

At this rate you'll have polyphony figured out before us, hehe.

It seems you missed the attachment. The system is a bit stupid, you have to first select the file with the Browse button but then also hit the Add File button.

Re: Video about 1-bit sound in Apple Lisa

Thanks. Attachment added. I'm traveling now so will take time to respond. But once I'm back at the physical Lisa, I will try to update this thread if/when I discover more.