The pips

On the creation of AY or Beeper music, including the packages used to do so.
Post Reply
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

The pips

Post by R-Tape »

This week celebrates the 100th birthday of The Greenwich Time Signal, otherwise known as 'the pips'.

It's a sequence of 1000 Hz pulses. It starts with 5 x 0.1 second pulses every second, then finishes with a 0.5 second pulse.

I'm a duffer when it comes to sound, but I think BEEP 23 is close to 1000 Hz (?), and PAUSE 45 is the remaining 0.9 seconds after the pulse (50 frames * 0.9)

10 FOR A=1 TO 5
20 BEEP 0.1,23
30 PAUSE 45
40 NEXT A
50 BEEP 0.5,23

Am I way off? Can anyone get this perfect in BASIC or asm?
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: The pips

Post by Morkin »

At 8 am on 17 September 2008, to the surprise of John Humphrys, the day's main presenter on the Today programme, and Johnnie Walker, who was standing in for Terry Wogan on Radio 2, the pips went "adrift" by six seconds, and broadcast seven pips rather than six. This was traced to a problem with the pip generator, which was rectified by switching it off and on again
My Speccy site: thirdharmoniser.com
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: The pips

Post by R-Tape »

They should have gone with Sinclair.
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: The pips

Post by R-Tape »

R-Tape wrote: Wed Feb 07, 2024 12:22 pm 10 FOR A=1 TO 5
20 BEEP 0.1,23
30 PAUSE 45
40 NEXT A
50 BEEP 0.5,23
I make it that BEEP 23.2 is the closest BASIC can get to 1000 Hertz (having more decimal places makes no difference to the rom routine). Can anyone in the know confirm?
User avatar
TMD2003
Rick Dangerous
Posts: 2045
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: The pips

Post by TMD2003 »

I can try. If you want exactly 1000 Hz, get your assembler out and do it that way.

Also: at the third stroke, the time sponsored by Accurist will be... 6... 15... and 20 seconds.

FOR A=1 TO 3: BEEP 0.1,23: PAUSE 45: NEXT A
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: The pips

Post by R-Tape »

TMD2003 wrote: Wed Feb 07, 2024 6:15 pm I can try.
Cheers. When I first tried it, I somehow calculated that it was BEEP 11, and when I heard it thought 'yep sounds about right', so my work and ear should be double checked!
If you want exactly 1000 Hz, get your assembler out and do it that way.
Working on it, but I'm finding it a challenge. On the plus side my scant knowledge of t-states and frequency has improved a bit.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: The pips

Post by 1024MAK »

From BASIC you can have either:

Code: Select all

BEEP .1,23.2
REM which has a frequency of 999.3Hz 
or

Code: Select all

BEEP .1,23.21
REM which has a frequency of 1001.0Hz 
The choice is yours....

Anyway, this is what I typed into my Speccy (issue 6A plus):

Code: Select all

10 FOR a=1 TO 5: BEEP .1,23.2: PAUSE 45: NEXT a: BEEP .5,23.2
Mark

PS I have absolutely no music ability or talent (at school they only let me loose with a triangle ) but I don't think there will be many, if any who can tell the difference between those two frequencies / tones.

PPS frequency measured on a multimeter that costs more that the Speccy did! :lol:
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: The pips

Post by R-Tape »

Brilliant. Thanks for checking @1024MAK, and actually measuring!

I was mistaken in thinking the second decimal place makes no difference then. I was only looking closely at the contents of the DE register (thinking that was all that mattered for pitch) on arrival at the rom routine at 949.

23.2 DE = 99
HL = 408

23.21 DE = 99
HL = 407

The ideal 23.213 makes no difference to the above.
1024MAK wrote: Wed Feb 07, 2024 10:42 pm PS I have absolutely no music ability or talent (at school they only let me loose with a triangle ) but I don't think there will be many, if any who can tell the difference between those two frequencies / tones.
I tried running a sequence of 23.2 with occasional 23.21 thrown in, and thankfully my life doesn't depend on picking them out because I've got zero chance of doing so!
User avatar
TMD2003
Rick Dangerous
Posts: 2045
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: The pips

Post by TMD2003 »

For the record: my enjoyment of the two Perturbator albums "I Am The Night" and "Dangerous Days" (an excellent soundtrack for doing what you now all know I do with that last program on the Next Dumping Ground) is compromised by the intrusion of Isabella Goloversic. She would be a reasonable singer, except that she is consistently a quarter of a tone flat - and that's enough for me to notice. The A above middle C, about dead centre of the standard female range, is defined in standard concert pitch as exactly 440 Hz, and the semitones each side of that are 415.305 and 466.164 Hz. Hence, a quarter of a tone at that pitch is 12-13 Hz. At 1 kHz (midway between the B and C two octaves above middle C), the quarter-tone is more like 34-35 Hz.

Hence, I doubt there is anyone who can tell the difference between 999.3 and 1001.0 Hz. Anyone who can will find every piece of music made by real instruments jarringly out of tune by even the slightest sniff.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: The pips

Post by R-Tape »

TMD2003 wrote: Thu Feb 08, 2024 8:29 pm Hence, a quarter of a tone at that pitch is 12-13 Hz.
I'm pleased to say that even I can hear the difference between BEEP 9 vs BEEP 8.47. At 0.3 seconds it's like an ambulance siren.
User avatar
TMD2003
Rick Dangerous
Posts: 2045
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: The pips

Post by TMD2003 »

Clearly you're ready to make the jump into smeg head territory that is microtonal music. The smugness among those who listen to it and pretend to like it is suffocating.

But then there's xenharmonic music, for even more smeg head credibility. Allow me with that one.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Post Reply