The Museum of HP Calculators

HP Forum Archive 13

[ Return to Index | Top of Index ]

HP41 and tone generator
Message #1 Posted by Ted on 31 May 2003, 5:54 a.m.

Some time, mucho eons ago when I used to get the newsletter from the HP group in Switerzerland, there was an article about a program for a tone generator for the HP41; (or I am getting senile?) Various pitches are available in the standard 41; what I would like to do is be able to generate exact pitches at A=440hz, 441hz and 415 and 430 etc. to use as a pitch reference for tuning harpsichords and clavichords, lutes etc. It should also be possible to generate a scale in different temperments as well without too much trouble, I should think. Am unsure however if the tone generator in the 41 is stable enough for that kind of accuracy (less than 3% of 1 cent variation). Anyway, I'll do my homework and dig into the archives, but any tips for searching or sources would be appreciated.

      
Re: HP41 and tone generator
Message #2 Posted by Ellis Easley on 31 May 2003, 7:00 a.m.,
in response to message #1 by Ted

Are you talking about machine language programs? Is the sound generated by a "bit banger" port that should be able to generate any frequency up to a limit set by the shortest loop you can execute?

The main things I've seen written about tones on the 41 are the much wider that normal range available through synthetic programming. Even then, it looks to me like some bands of tones, not a full spectrum. Also, I think each tone instruction has a certain frequency and duration. The chart of synthetic tones should be in any synthetic programming book and maybe the PPC ROM manual.

            
Re: HP41 and tone generator
Message #3 Posted by Ted on 31 May 2003, 7:44 a.m.,
in response to message #2 by Ellis Easley

I'm a newbie to this after years of being away, so I might sound stupid! But all I'm looking for is a simple way of controlling the pitch of the internal speaker of the 41 to generate tones of an exact pitch and unlimited duration (for a couple of minutes) without resorting to any peripherals. This would make the 41 unbelievably useful in daily musical life and eliminate carrying another box around. Come to think of it, a metronome should also be possible as well......

                  
Re: HP41 and tone generator
Message #4 Posted by Ellis Easley on 31 May 2003, 7:53 a.m.,
in response to message #3 by Ted

I'm pretty sure that to do that (unless there is an existing program) you will need to learn machine language programming. Later today, I'm sure people who know what they are talking about will be awake and will answer your question! I predict you will learn that it is easy if you can find a ROM that is almost impossible to find!

            
any frequency?
Message #5 Posted by Ellis Easley on 31 May 2003, 11:11 a.m.,
in response to message #2 by Ellis Easley

I completely overlooked the granularity of such a program. If the tightest possible loop (something like "out, xor, jump", with no way out) generates a frequency of F, adding one more instruction in the loop might generate (F*4)/3, if all instructions took the same time. On something like a Pentium, that shortest loop would generate a frequency in the megaHertz (possibly) so you could add a timing loop inside the loop to increase the period (and lower the frequency inversely) proportional to the count of the inside loop to generate any period that is a multiple of a few microseconds. Plus you could add a way out! But the HP41 runs so slowly that the granularity would be much larger - maybe the range of synthetic tones is the practical limit. I found the graphical chart of synthetic tones, it's not in the PPC ROM manual, although that has a table of all synthetic tones - this chart is in another PPC book and says it corrects some times in the PPC ROM manual table. It looks to me like the synthetic tones only include 16 frequencies (in Hertz): 105,113,121,131,143,158,175,197,225,263,315,394,525,629,788,1051. Each frequency is available in 8 durations, varying from 0.02 to 5 seconds depending on the frequency. The chart appears to show that each duration of a given nominal frequency produces a slightly different frequency.

                  
correction
Message #6 Posted by Ellis Easley on 31 May 2003, 11:43 a.m.,
in response to message #5 by Ellis Easley

Quote:
loop might generate (F*4)/3

should have said (F*3)/4

      
Re: HP41 and tone generator
Message #7 Posted by hans brueggemann on 31 May 2003, 3:40 p.m.,
in response to message #1 by Ted

ted, the 41 is waaay too inaccurate for this application, simply because its master-clock is not quartz-driven, but a simple L-C resonant circuit. the 41 is by far the most "unmusical" calculator i've ever heard. the hp28S seems to be the far better choice for this kind of application, because you can program the generator frequency directly. however, i noticed some funny pitch-bend effects when running it as a random tone generator. also, frequency settings with cents of deviation are also not possible on this machine.

cheers, hans

            
Re: HP41 and tone generator
Message #8 Posted by Ted on 1 June 2003, 2:01 a.m.,
in response to message #7 by hans brueggemann

Thanks Hans, this is what I neede to know before going surfing for hours!

      
Re: HP41 and tone generator
Message #9 Posted by JimC on 2 June 2003, 3:45 p.m.,
in response to message #1 by Ted

Ted, you might want to check this link. No promises though!

http://www.irving.org/ftplib/misc/00index.html - the file is mf.zip

I haven't tried running this or even downloading it. Apologies if you have already seen it.

            
Re: HP41 and tone generator
Message #10 Posted by Ted on 3 June 2003, 6:07 a.m.,
in response to message #9 by JimC

Thanks Jim, this looks like a handy program, much obliged. The only thing that seems impossible is to hook it up to the HP's oscillator. Hans is correct however- you need accuracy and a little bit of frequency range for that to be of any use. If it were possible it would be a damn handy program for educational as well as musical purposes..sigh. I'll save this program for a long afternoon of inputting.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall