SUBROUTINE TOBCF( IDO, FMIN, FMAX, FREQ ) C C This subroutine will calculate the 1/3 octave band C center frequencies. The calling arguments and the C range of frequencies caluculated is determined by C IDO. C C CALL TOBCF( 1, MINB, MAXB, FREQ ) -- MINB and MAXB are C the lower and upper 1/3 octave bands. C C CALL TOBCF( 2, FMIN, FMAX, FREQ ) -- FMIN and FMAX are C the lower and upper frequency limits in hertz. The C closest 1/3 octave bands to the chosen frequencies C are used. C C FREQ - Array which will be filled with the 1/3 octave band C center frequencies in Hz. C DIMENSION FREAK(10), FREQ(1) EQUIVALENCE ( MF, F ) DATA FREAK/1., 1.25, 1.6, 2., 2.5, 3.15, 4., 5., 6.3, 8./ C C - FIND RANGE. IF( IDO .EQ. 1 ) GO TO 100 MINB = 10.*ALOG10( FMIN ) + 0.5 MAXB = 10.*ALOG10( FMAX ) + 0.5 GO TO 200 C C - GET BAND NUMBERS. 100 F = FMIN MINB = MF F = FMAX MAXB = MF C C - FILL IN FREQUENCIES. 200 NBANDS = MAXB-MINB+1 IF( IDO .EQ. 2 ) IDO = NBANDS DO 1000 I=1,NBANDS J = MINB+I-1 1000 FREQ( I ) = FREAK( MOD( J, 10 )+1 )*10.**( J/10 ) C RETURN END