Better music playback for pidp-1 is (almost) here

58 views
Skip to first unread message

Bill E

unread,
Oct 3, 2025, 8:38:19 PM (7 days ago) Oct 3
to [PiDP-1]
I've done rework of the audio output, adding 4 tunable digital lowpass filters to replicate the original hardware RC filtering and also adjusted the SDL to use floating point and to replicate the original bitrate.

Sounds much better!

I'll work with Oscar and Angelo to get the changes added, not a huge amount of work.
Bill

Bill E

unread,
Oct 4, 2025, 10:16:22 AM (6 days ago) Oct 4
to [PiDP-1]


On Friday, October 3, 2025 at 8:38:19 PM UTC-4 Bill E wrote:
This brings up a question. I'm using floating point because it's easier and more accurate for the filters and SDL likes it also.
It ends up doing 10 float32 multiplies and 10 float32 add/subtracts per audio cycle for a total of 57140 multiplies and the same number of add/subs per second during playback.
The pi5 has no problem at all with this with its >10GFLOP floating point, but I wonder about the pi zero. I'm reasonably sure the original zero might have problems, but the pi zero 2 W should be ok.
Any comments?
Bill

Oscar Vermeulen

unread,
Oct 6, 2025, 10:29:22 AM (4 days ago) Oct 6
to [PiDP-1]
I can try on my Pi Zero if you wish!

So - the way you approach this is to take the raw block waveform data out of the (simulated) Program Flag lamps, and morph it into a nicer waveform? 

Historically, you could argue that Harmony on the PDP-1 was a DAW (Digital Audio Workstation) connected to the simplest synthesizer imaginable: block waveform. Replacing the block waveform with some other "instrument" is making the PDP-1 into an actual, flexible, synthesizer...

Oh, the possibilities :-)

Kind regards,

Oscar.

Adam Thornton

unread,
Oct 6, 2025, 11:24:22 AM (4 days ago) Oct 6
to Oscar Vermeulen, [PiDP-1]
I doubt it's news to anyone here, but the Analogue Pocket (https://www.analogue.co/pocket), which among other things includes an FPGA PDP-1, also includes a synthesizer and sequencer.

I would guess this is because the PDP-1 and straightforward synthesizers live on the edge of "is it hardware, or is it software?" where the physicality hasn't yet been hidden away behind dozens of layers of digital abstraction.

Adam

--
You received this message because you are subscribed to the Google Groups "[PiDP-1]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-1+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-1/9f7347d1-afab-4117-ad4a-ec643d81790an%40googlegroups.com.

Bill E

unread,
Oct 6, 2025, 1:17:27 PM (4 days ago) Oct 6
to [PiDP-1]
The original audio.c code just sampled the state of the 4 program flags 40K times /sec, added them together, and sent them to SDL as a mono bitstream.
I set up 4 separate digital low-pass filters, one per flag, then combine the filtered 1 & 2 into left audio channel, 3 & 4 into right, then feed that to SDL as a stereo stream
I also changed the timing. The original harmony code did 5714 samples/sec, so in order to properly reproduce the pitch, I do the same, oversampled by 4. 40K is very close, but it oversamples by a factor of 7 which is not useful without filtering. 
Bill

Oscar Vermeulen

unread,
Oct 6, 2025, 4:11:01 PM (4 days ago) Oct 6
to [PiDP-1]
On Monday, October 6, 2025 at 5:24:22 PM UTC+2 atho...@gmail.com wrote:
I doubt it's news to anyone here, but the Analogue Pocket (https://www.analogue.co/pocket), which among other things includes an FPGA PDP-1, also includes a synthesizer and sequencer.

That machine is news to me at least, currently repressing the urge to buy it. What a work of art.

 
I would guess this is because the PDP-1 and straightforward synthesizers live on the edge of "is it hardware, or is it software?" where the physicality hasn't yet been hidden away behind dozens of layers of digital abstraction.

For the PDP-1 as a music instrument (at least with the Harmony software), the problem is that the physicality is not hidden at all. Playing a song is alright and simple. But I tried to transcribe a little song into the required format. That is ZERO fun. Maybe I get an AI to write a little translation program (input midi files, output Harmony files).

Kind regards,
Oscar.

Oscar Vermeulen

unread,
Oct 6, 2025, 4:15:42 PM (4 days ago) Oct 6
to [PiDP-1]
Bill, 

Yes, the way the sound output was written had as its goal to stay as close to what was done in hardware at the time. We got the sound improved a while ago - it is a nice benchmark for whether we've got the timings of the PDP-1 circuit emulation exactly right.

The Harmony software, BTW, was always a tiny bit off-pitch. Something with 5ms instruction time not adding up to exact notes. Samson actually mixed 'too high' and 'too low' block pulses to get as close as possible, and felt that it gave the PDP-1 a nice timbre as an instrument. Which is true, in a 1962 kind of way!

Let me know when the time has come to add that to the pidp1 package?

Kind regards,

Oscar.

Bill E

unread,
Oct 6, 2025, 8:12:36 PM (4 days ago) Oct 6
to [PiDP-1]
But, you didn't emulate the hardware RC filters that were also there, which is why I added the low pass filtering.
Bill

Oscar Vermeulen

unread,
Oct 6, 2025, 10:51:29 PM (4 days ago) Oct 6
to [PiDP-1]
Bill,

On Tuesday, October 7, 2025 at 2:12:36 AM UTC+2 wjegr...@gmail.com wrote:
But, you didn't emulate the hardware RC filters that were also there, which is why I added the low pass filtering.

Right! I think that was in the MIT PDP-1 (and is a very good idea) but not in other PDP-1s that had an audio mod at the time. This is how I understand it. Eager to see if we can add your code to the simulator.

Kind regards,

Oscar.

Bill E

unread,
Oct 7, 2025, 9:39:57 AM (3 days ago) Oct 7
to [PiDP-1]
Oscar, just emailed you the changes to your gmail acct.
Bill

Oscar Vermeulen

unread,
Oct 7, 2025, 2:15:42 PM (3 days ago) Oct 7
to [PiDP-1]
Bill, 

Thank you! Give me a couple of days as I suffer some undesired Real Life Interference tomorrow and Thursday - meaning, dragged away from the PiDP-1 against my will.

Kind regards,

Oscar.


Reply all
Reply to author
Forward
0 new messages