10 REM **** HEADJOINT ACOUSTIC LENGTH - FROM CONES **** USE RUN 1000 FOR EFFECTS OF CURVE 20 REM * * * * BASS FLUTES - NOTES AS WRITTEN * * * * 30 NS=3 40 H=93: REM MOUTHHOLE HEIGHT, RELATIVE TO DIAMETER THERE * 50 C=39: REM CORK DISTANCE FROM CL OF MOUTHHOLE * 60 REM THE FOLLOWING DATA ARE THE LENGTHS OF THE NS SECTIONS 70 DATA 25,95,93.8 80 REM THE FOLLOWING ARE THE DIAMETERS OF THE NS+1 CROSS SECTIONS 90 DATA 27.7,27.9,29.9,29.9 100 INPUT "DO YOU RESULTS PRINTED (Y OR N)";RP\$ 110 PRINT "MOUTH HEIGHT=";H;" CORK DIST=";C 120 IF RP\$="Y" THEN LPRINT "MOUTH HEIGHT=";H;" CORK DIST=";C 130 DIM X(NS+1):DIM D(NS+1):DIM R(NS+1) 140 PI=3.14159 150 POKE 16553,255 160 FOR N=1 TO NS: READ X(N) : NEXT N 170 FOR N=1 TO NS+1:READ D(N):NEXT N 180 FOR N=1 TO NS 190 IF D(N+1)=D(N) THEN R(N)=1000000! :GOTO 210 200 R(N)=X(N)*D(N)/(D(N+1)-D(N)) 210 NEXT N 220 PRINT " N","DIAM","LENGTH","CONE APEX":PRINT 230 IF RP\$="Y" THEN LPRINT " N","DIAM","LENGTHS","CONE APEX":LPRINT 240 FOR N=1 TO NS+1 250 PRINT N,D(N),X(N),R(N) 260 IF RP\$="Y" THEN LPRINT N,D(N),X(N),R(N) 270 NEXT N 280 REM FL IS FREQUENCY LEVEL WHERE C4 =48, A4=57 WE STEP 4 UNITS, IE C,E,G#,C ETC. 290 PRINT:PRINT "NOTE FREQ LENGTH, MM" 300 IF RP\$="Y" THEN LPRINT:LPRINT "NOTE FREQUENCY LENGTH, MM" 310 FOR FL=36 TO 76 STEP 4 320 F=16.3516*EXP(FL/17.3123) 330 K=F/55386! : REM * ASSUME VELOCITY OF SOUND =348,000 MM/SEC 340 B=TAN(K*C)-1/K/H 350 FOR N= 1 TO NS 360 X=ATN(1/(1/K/R(N)-B))/K 370 IF X<0 THEN X=X+PI/K : GOTO 370 380 X=X+X(N) 390 B=1/K/(R(N)+X(N))-1/TAN(K*X) 400 NEXT N 410 L=ATN(-1/B)/K 420 IF L<200 THEN L=L+PI/K: GOTO 420 430 IN=INT(FL/12) 440 P=(FL-12*IN)/4 450 IF P=0 THEN C\$="C" 460 IF P=1 THEN C\$="E" 470 IF P=2 THEN C\$="G#" 480 PRINT C\$;IN; " ";F;" ";L 490 IF RP\$="Y" THEN LPRINT C\$;IN;" ";F;" ";L 500 NEXT FL 700 END 1000 REM - FORMULA FOR EFFECT OF CURVED SECTION 1010 INPUT "DIAMETER OF TUBE"; TD 1020 INPUT "RADIUS OF CURVATURE, CENTERLINE";RC 1030 RA=RC/TD*2 1040 RHO=1/2/(RA*RA-RA*SQR(RA*RA-1)) 1045 RHO=SQR(RHO) 1050 PRINT "EFFECTIVE LENGTH OF TUBE=";3.14159*RC*RHO 1060 PRINT "EFFECTIVE DIAMETER="TD/SQR(RHO) 1070 END 