ECMC PVC example file freqresponse1
# ECMC PVC example "freqresponse1" creates a frequency response
# of a steady-state fragment of a soprano tone (/sflib/voice/sop1.ds4)
# Frequencies are analyzed and averaged only over the .3 seconds between
# times .5 and .8 of this source soundfile:
# analysis_begintime=.5 # analysis_endtime=.8
# Defaults are used for all other parameters
# The resulting frequency response file is used in the old ECMC # PVC example "bandamp1"
 #******************************************************
#*** FREQRESPONSE ANALYSIS ****************
#******************************************************
     # ******ECMC CHANGES & ADDITIONS: ***************
#******** INPUT & OUTPUT SOUNDFILES *************
  # input soundfile, can be aiff or wave format on Linux, aiff only on SGI
analysis_sndfile=/sflib/voice/sop1.ds4
freqresponsefile=sop1.ds4.ss.fr
inputsf=/sflib/voice/sop1.ds4 
# ********************* #


   ##### Cmusic function file generator tempates #####
#   gen0  normalizes function files previously created with other gen routines
# gen0 -Llength  max < inputfuncfile > outputfuncfile
#   gen1 creates linear {straight line} segments, like Csound gen 7
# gen1 -Llength t1 v1 ... tN vN
#   gen2 generates harmonic waveforms from sine {a} & cosine {b} amps
# gen2 -Llength [-o (default) or -c] a1 ... aN b0 ... bM N
#  gen3 generates amp values & linear connections at equally spaced time points
# gen3 -Llength v1 v2 ... vN
#   gen4 generates exponenetial segments; "a" values determine shape &
#  depth of curve: 0 = linear, neg. = exponential, pos. = inverse expo.
# gen4 -Llength t1 v1 a1 ... tN vN
#  gen5 is like Csound gen 9 : harmonic1/amp/phase harmonic2/amp/phase
# gen5 -Llength h1 a1 p1 ... hN aN pN
#     gen6 generates a table of random numbers between +1 and -1
# gen6 -Llength
#    cspline: smooth curve {cubic spline} interpolator
# cspline len_flag [flags] x0 y0 x1 y1 ... xN yN
#   genraw reads in a previously created function file
# genraw -LN filename    (where N is the length of the output function.)
# For a usage summary of "reshape" type  "reshape"  with no arguments.
   ##### End of gen routine function generator tempates #####

#------------------------------------------------------
#******************** ANALYSIS ************************
#------------------------------------------------------
#........ BEGIN/END TIMES .............................

analysis_begintime=.5
analysis_endtime=.8

#........... ANALYSIS CHANNEL(S) .......................
analysis_channel=0
# channels are numbered from 1-maximum, 0 = all channels
#...................................................... 

#*** ANALYSIS PARAMETERS ******************************

FFT_length=1024
analysis_frames_per_second=200
ANALYSIS_METHOD_average_0_peak_1=1

#------------------------------------------------------
#********ANALYSIS LOW/HIGH SHELF EQ *******************

ANALYSIS_LOW_SHELF_EQ_gain_in_decibels=-0
ANALYSIS_LOW_SHELF_EQ_frequency=300

ANALYSIS_HIGH_SHELF_EQ_gain_in_decibels=0
ANALYSIS_HIGH_SHELF_EQ_frequency=1000

#------------------------------------------------------

FREQRESPONSE_PRINTOUT_high_cutoff_frequency=2000
# ( 0 = off )


#====================================================
# COMMAND LINE SETUP -- OFFICE USE ONLY
#      (DO NOT WRITE BELOW THIS LINE)
#====================================================
PVCDIR=/usr/local/soundapps/PVC
PVCBIN=$PVCDIR/bin
cd $SFDIR  # ECMC

if  [ "$OSTYPE" = "irix" ]
then
   input_file=pvcin  # ECMC temporary NeXT format input soundfile
   /sbin/rm -f pvcin 
   #  Create temporary NeXT format input soundfile "pvcin:" ECMC
   /usr/local/bin/sox -t aiff $inputsf -t au pvcin # ECMC
elif [ `echo "$OSTYPE" | grep linux`  ]
 then
  input_file=$inputsf
fi
#  ****** end of ECMC changes & additions ****** #
# ANALYSIS

pvanalysisroutine=freqresponse

PVFLAGS="\
\
-N$FFT_length \
-M0 \
-D$analysis_frames_per_second \
\
-b$analysis_begintime \
-e$analysis_endtime \
\
-c$ANALYSIS_METHOD_average_0_peak_1 \
\
-H$ANALYSIS_LOW_SHELF_EQ_gain_in_decibels \
-m$ANALYSIS_LOW_SHELF_EQ_frequency \
\
-X$ANALYSIS_HIGH_SHELF_EQ_gain_in_decibels \
-R$ANALYSIS_HIGH_SHELF_EQ_frequency \
\
-P$FREQRESPONSE_PRINTOUT_high_cutoff_frequency \
\
-C$analysis_channel \
"
echo "\n\n$pvanalysisroutine $PVFLAGS $analysis_sndfile $freqresponsefile  "

$pvanalysisroutine $PVFLAGS $analysis_sndfile $freqresponsefile ;

# *****  ECMC CHANGES & ADDITIONS: ******* #
if  [ "$OSTYPE" = "irix" ]
then
   /sbin/rm -f pvcin 
fi
echo 'Listing of frequency response file $freqresfile :'
ls -l $freqresponsefile
#  ****** end of ECMC changes & additions ****** #

# If you have created any gen function files above delete them below: