cutSample               package:sound               R Documentation

_C_u_t _S_a_m_p_l_e _O_b_j_e_c_t_s

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

     Cut a part out of a Sample object.

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

     cutSample(s, start, end)
     s[v]

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

       s: a Sample object, or a string giving the name of a wav file. 

   start: the start position in seconds. 

     end: the end position in seconds. 

       v: a vector of integers giving the numbers of the columns in the
          waveform matrix to be used. 

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

     Only the intersection of ['start','end'] with [0,'duration(s)'] is
     returned. Similarly, in the second form the intersection of 'v'
     with '1:sampleLength(s)' is returned.

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

     the specified part of the given sample as a new Sample object.

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

     Matthias Heymann

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

     'sound' for direct access to the waveform matrix,

     'cutSampleEnds' and 'noSilence' for special cutoff techniques.

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

     ## Not run: 
     s <- appendSample(Sine(330,1),Sine(440,1))
     play(cutSample(s,.8,1.8))
     play(s[(44100*.8):(44100*1.8)])  # the same
     ## End(Not run)

