10 REM **** OBOE ACOUSTIC LENGTH - FROM CONES **** USE RUN 1000 TO CALCULATE U-BEND 20 NS = 6: REM NO. OF SECTIONS 30 H = 0: REM MOUTHHOLE HEIGHT, RELATIVE TO DIAMETER THERE * 50 REM THE FOLLOWING DATA ARE THE LENGTHS OF THE NS SECTIONS 55 DATA 22.9,22,20,5.1,.2,241.2 REM 60 DATA 124.8,40,.0001,.0001,.0001,241.2 70 REM THE FOLLOWING ARE THE DIAMETERS OF THE NS+1 CROSS REM 80 DATA 1E-10,3.074,4.06,4.06,4.06,4.06,10 81 DATA 5.5 ,2.37,3.37,3.95,4.06,4.06,10 82 SCREEN 11: CLS 83 INPUT "DO YOU RESULTS PRINTED (Y OR N)"; RP$: CLS 84 IF RP$ = "; Y; " THEN LPRINT "; MOUTH; HEIGHT = "; H 90 DIM X(NS + 1): DIM D(NS + 1): DIM R(NS + 1) 93 PI = 3.14159 95 POKE 16553, 255 100 FOR N = 1 TO NS: READ X(N): NEXT N 110 FOR N = 1 TO NS + 1: READ D(N): NEXT N 120 FOR N = 1 TO NS 125 IF D(N + 1) = D(N) THEN R(N) = 1000000!: GOTO 140 130 R(N) = X(N) * D(N) / (D(N + 1) - D(N)) 140 NEXT N 141 VIEW (0, 0)-(639, 240) 142 WINDOW (0, 0)-(410, 10.5) 143 LINE (0, 0)-(410, 0) 144 FOR N = 1 TO NS 145 DIST(N) = DIST(N - 1) + X(N): PRINT N, DIST(N) 146 LINE (DIST(N - 1), D(N))-(DIST(N), D(N + 1)) 147 LINE (DIST(N - 1), 0)-(DIST(N - 1), D(N)) 152 NEXT N 190 LOCATE 19, 1: PRINT " N DIAM LENGTH DISTANCE CONE APEX": PRINT 192 IF RP$ = "Y" THEN LPRINT CHR$(30); : LPRINT " N", "DIAM", "LENGTHS", "DISTANCE", "CONE APEX": LPRINT 194 FOR N = 1 TO NS + 1 196 PRINT USING "## ##.## ###.# ###.# ####.#"; N; D(N); X(N); DIST(N); R(N) 197 IF RP$ = "Y" THEN LPRINT N, D(N), X(N), DIST(N), R(N) 198 NEXT N 199 WHILE INKEY$ = "": WEND 200 SCREEN 11: CLS 0 202 VIEW (280, 440)-(600, 200) 204 WINDOW (46, 370)-(78, 420) 206 REM FL IS FREQUENCY LEVEL WHERE C4 =48, A4=57 208 PRINT : PRINT "NOTE FREQ LENGTH, MM" 210 IF RP$ = "Y" THEN LPRINT : LPRINT "NOTE FREQ LENGTH, MM" 211 CLS 212 LINE (46, 370)-(78, 370): LINE (46, 370)-(46, 420) 218 FOR FL = 48 TO 76 STEP 4 220 F = 16.352 * EXP(FL / 17.3123) 230 K = F / 55386!: REM * ASSUME VELOCITY OF SOUND =348,000 MM/SEC 300 B = 0 310 FOR N = 1 TO NS 320 X = ATN(1 / (1 / K / R(N) - B)) / K 324 IF X < 0 THEN X = X + PI / K: GOTO 324 330 X = X + X(N) 340 B = 1 / K / (R(N) + X(N)) - 1 / TAN(K * X) 350 NEXT N 360 L = X 365 IF L < 350 THEN L = L + PI / K: GOTO 365 370 IN = INT(FL / 12) 380 P = (FL - 12 * IN) / 4 390 IF P = 0 THEN C$ = "C" 391 IF P = 1 THEN C$ = "E" 392 IF P = 2 THEN C$ = "G#" 400 PRINT C$; : PRINT TAB(7); USING "####.# ###.#"; F; L 402 IF RP$ = "Y" THEN LPRINT C$; : LPRINT TAB(7); USING "####.# ###.#"; F; L 404 PSET (FL, L) 410 NEXT FL 420 FOR FL = 48 TO 76 STEP 4: LINE (FL, 370)-(FL, 372) 421 IN = INT(FL / 12) 422 P = (FL - 12 * IN) / 4 424 IF P = 0 THEN C$ = "C" 426 IF P = 1 THEN C$ = "E" 428 IF P = 2 THEN C$ = "G#" 452 LOCATE 29, 5 * FL / 4 - 22: PRINT C$; 454 NEXT FL 500 FOR L = 370 TO 420 STEP 10: LINE (46, L)-(47, L) 510 LOCATE 139 - L * .3, 31: PRINT L; : NEXT L 700 END 2000 REM - FORMULA FOR EFFECTIVE CORK DISTANCE 2010 INPUT "DIAM AT MOUTH HOLE, DIAM AT CORK "; DH, DC 2020 INPUT " ACTUAL CORK DISTANCE"; CD 2030 DD = DC / DH 2040 CN = CD * (1 + DD + DD * DD) / 3 2050 PRINT "EFFECTIVE CORK DISTANCE FOR CONICAL FRUSTRUM ="; CN 2060 END