dfreq                package:seewave                R Documentation

_D_o_m_i_n_a_n_t _f_r_e_q_u_e_n_c_y _o_f _a _t_i_m_e _w_a_v_e

_D_e_s_c_r_i_p_t_i_o_n:

     This function gives the dominant frequency (i. e. the frequency of
     highest amplitude) of a time wave.

_U_s_a_g_e:

     dfreq(wave, f, wl, ovlp = 0, threshold = FALSE,
     plot = TRUE, xlab = "Times (s)", ylab = "Frequency (kHz)",
     ylim = c(0, f/2000), ...)

_A_r_g_u_m_e_n_t_s:

    wave: data describing a time wave.

       f: sampling frequency of 'wave'.

      wl: length of the window for the analysis (even number of
          points).

    ovlp: overlap between two successive analysis windows (in % ).

threshold: amplitude threshold for signal detection (in % ).

    plot: logical, if 'TRUE' plots the dominant frequency against time
          (by default 'TRUE').

    xlab: title of the x axis.

    ylab: title of the y axis.

    ylim: the range of y values.

     ...: other 'plot' graphical parameters.

_D_e_t_a_i_l_s:

     A Hanning function is applied to the analysis window.

_V_a_l_u_e:

     If 'plot' is 'FALSE', 'dfreq' function returns a vector of 
     numeric data corresponding to the dominant frequency along the
     time wave.

_N_o_t_e:

     This function is based on 'fft'.

_A_u_t_h_o_r(_s):

     Jrme Sueur jerome.sueur@ibaic.u-psud.fr

_S_e_e _A_l_s_o:

     'spec', 'meanspec','spectro'.

_E_x_a_m_p_l_e_s:

     data(tico)
     dfreq(tico,f=22050,wl=512,ovlp=50,threshold=5)
     # overlay on spectrogram
     spectro(tico,f=22050,wl=512,ovlp=50,zp=16,scale=FALSE,
         collevels=seq(-40,0,1),palette=rev.terrain.colors)
     par(new=TRUE)
     dfreq(tico,f=22050,wl=512,ovlp=50,threshold=6,type="l",col="red",lwd=2,
         ann=FALSE,xaxs="i",yaxs="i")

