timer                package:seewave                R Documentation

_T_i_m_e _m_e_a_s_u_r_e_m_e_n_t_s _o_f _a _t_i_m_e _w_a_v_e

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

     This functions computes and shows the duration of signal periods, 
     pause periods and their ratio.

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

     timer(wave, f, threshold, smooth = 0, plot = TRUE,
     plotthreshold = TRUE, col = "black", colval = "red", 
     xlab = "Time (s)", ylab = "Amplitude", ...)

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

    wave: data describing a time wave.

       f: sampling frequency of 'wave'.

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

  smooth: smoothes the envelope by averaging the number of points
          selected

    plot: logical, if 'TRUE' plots the envelope and the measurements 
          (by default 'TRUE').

plotthreshold: logical, if 'TRUE' plots the threshold as an horizontal
          line on the graph (by default 'TRUE').

     col: colour of the envelope.

  colval: colour of plotted measurements.

    xlab: title of the x-axis.

    ylab: title of the y-axis.

     ...: other 'plot' graphical parameters.

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

     If 'plot' is 'FALSE', 'timer' returns a list containing three
     components: 

       s: duration of signal periods in seconds

       p: duration of pause periods in seconds

       r: ratio between the silence and periods

     .

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

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

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

     'oscillo', 'cutw',  'pastew'.

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

     data(tico)
     timer(tico,f=22050,threshold=5,smooth=50)
     # to compare with an oscillographic representation
     data(orni)
     op<-par(mfrow=c(2,1))
     timer(orni,f=22050,threshold=5,smooth=40,tck=0.05,
             bty="l",xaxs="i",colval="blue")
     title(main="A cicada song made of five echemes",col="blue")
     oscillo(orni,f=22050,k=1,j=1)
     par(op)

