HP 20S: Acoustics Programs
Program A: Speed of Sound in Dry Air
cs = 20.05 × √(273.15 + T°C)
Code:
01: 61, 41, A: LBL A
02: 75: +
03: 2: 2
04: 7: 7
05: 3: 3
06: 73: .
07: 1: 1
08: 5: 5
09: 74: =
10: 11: √
11: 55: ×
12: 2: 2
13: 0: 0
14: 73: .
15: 0: 0
16: 5: 5
17: 74: =
18: 61, 25: RTN
Program B: Mersenne's Law: Fundamental Frequency
f0 = √(F ÷ µ) ÷ (2 × L)
F: force (N)
µ: mass per unit length (kg/m)
L: string length (m)
f0: fundamental frequency (Hz)
(Marshall, pg. 19)
Store before running:
R1: force
R2: µ
R3: L
Code (continuing from the previous section):
19: 61, 41, b: LBL B
20: 33: (
21: 22, 1: RCL 1
22: 45: ÷
23: 22, 2: RCL 2
24: 34: )
25: 11: √
26: 45: ÷
27: 33: (
28: 2: 2
29: 55: ×
30: 22, 3: RCL 3
31: 34: )
32: 74: =
33: 61, 26: RTN
Program C: Standing Wavelength in an Open Pipe for the 1st through 5th Harmonic
λ = 2 × L ÷ n
L: length of the pipe
n: nth harmonic (positive integer)
(Marshall, pg. 21)
Code (continuing from the previous section):
34: 61, 41, C: LBL C
35: 21, 1: STO 1
36: 1: 1
37: 21, 2: STO 2
38: 61, 41, 3: LBL 3
39: 2: 2
40: 55: ×
41: 22, 1: RCL 1
42: 45: ÷
43: 22, 2: RCL 2
44: 74: =
45: 26: R/S
46: 1: 1
47: 21, 75, 2: STO+ 2
48: 22, 2: RCL 2
49: 31: INPUT
50: 5: 5
51: 61, 42: x≤y?
52: 51, 41, 3: GTO 3
53: 61, 26: RTN
Program D: Finding the perfect length and height for recording studios given the width.
Length = W × φ (stored in R1)
Width = W (stored in R2)
Height = W ÷ φ (stored in R3)
φ = (1 + √5) ÷ 2
(Marshall, pg. 34)
Code (continuing from the previous section):
54: 61, 41, d: LBL D
55: 21, 1: STO 1
56: 22, 2: STO 2
57: STO 3: STO 3
58: 33: (
59: 1: 1
60: 75: +
61: 5: 5
62: 11: √
63: 34: )
64: 45: ÷
65: 2: 2
66: 74: =
67: 21, 55, 1: STO× 1
68: 21, 45, 3: STO÷ 3
69: 22, 1: RCL 1
70: 26: R/S
71: 22, 2: RCL 2
72: 26: R/S
73: 22, 3: RCL 3
74: 61, 26: RTN
HP 20S - The Complete Code:
01: 61, 41, A: LBL A
02: 75: +
03: 2: 2
04: 7: 7
05: 3: 3
06: 73: .
07: 1: 1
08: 5: 5
09: 74: =
10: 11: √
11: 55: ×
12: 2: 2
13: 0: 0
14: 73: .
15: 0: 0
16: 5: 5
17: 74: =
18: 61, 25: RTN
19: 61, 41, b: LBL B
20: 33: (
21: 22, 1: RCL 1
22: 45: ÷
23: 22, 2: RCL 2
24: 34: )
25: 11: √
26: 45: ÷
27: 33: (
28: 2: 2
29: 55: ×
30: 22, 3: RCL 3
31: 34: )
32: 74: =
33: 61, 26: RTN
34: 61, 41, C: LBL C
35: 21, 1: STO 1
36: 1: 1
37: 21, 2: STO 2
38: 61, 41, 3: LBL 3
39: 2: 2
40: 55: ×
41: 22, 1: RCL 1
42: 45: ÷
43: 22, 2: RCL 2
44: 74: =
45: 26: R/S
46: 1: 1
47: 21, 75, 2: STO+ 2
48: 22, 2: RCL 2
49: 31: INPUT
50: 5: 5
51: 61, 42: x≤y?
52: 51, 41, 3: GTO 3
53: 61, 26: RTN
54: 61, 41, d: LBL D
55: 21, 1: STO 1
56: 22, 2: STO 2
57: STO 3: STO 3
58: 33: (
59: 1: 1
60: 75: +
61: 5: 5
62: 11: √
63: 34: )
64: 45: ÷
65: 2: 2
66: 74: =
67: 21, 55, 1: STO× 1
68: 21, 45, 3: STO÷ 3
69: 22, 1: RCL 1
70: 26: R/S
71: 22, 2: RCL 2
72: 26: R/S
73: 22, 3: RCL 3
74: 61, 26: RTN
Examples
LBL A:
Input: T = 0°C: Speed of sound: 331.371367011 m/s
Input: T = 10°C (50°F): Speed of sound: 337.82583835 m/s
Input: T = 26.66666667 (80°F) C: Speed of sound: 347.170058532 m/s
LBL B:
R1: 45 N, R2: 0.008 kg, R3: 0.06 m; f: 625 Hz
R1: 3 N, R2: 0.006 kg, R3: 0.058 m; f: 192.764480819 Hz
LBL C:
Open ended pipe length: 1.2 m
The wavelengths for the 1st, 2nd, 3rd, 4th, and 5th harmonics respectively:
2.4, 1.2, 0.8, 0.6, 0.48
Open ended pipe length: 0.059 m
The wavelengths for the 1st, 2nd, 3rd, 4th, and 5th harmonics respectively:
0.118, 0.059, 3.933333333E-2, 0.0295, 0.0236
LBL D:
Width: 12 ft; Length: 19.416407865 ft, Height: 7.416407865 ft
Width: 18 ft 6 in = 18.5 ft; Length: 29.9336287919 ft, 11.4336287919 ft
Source
Marshall, Steve. Acoustics: The Art of Sound. Wooden Books, LLC. San Rafael, California. 2023. ISBN 978-1-952178-33-7
Eddie
All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.
The author does not use AI engines and never will.