pitch                 package:sound                 R Documentation

_P_i_t_c_h _a _S_a_m_p_l_e _O_b_j_e_c_t

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

     Change the pitch of a Sample object or a wav file.

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

     pitch(s, semitones)

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

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

semitones: a double giving the number of semitones to be pitched. 

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

     Pitching +12 semitones (+1 octave) means to double the
     frequencies. Negative values of 'semitones' are used to lower the
     frequencies.

     Note that this transformation changes the actual data of the
     sample. Since pitching a sample is equivalent to playing it at a
     different speed, the length of the Sample object will also change.

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

     a Sample object.

_N_o_t_e:

     Future versions of this command may use a different algorithm to
     increase the quality of the returned sample.

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

     Matthias Heymann

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

     ## Not run: 
     s <- Sine(440,1)
     # Now play it 12 semitones = 1 octave deeper,
     # that is half the frequencies and twice the length,
     # or played at half speed.
     play(pitch(s,-12)) # is the same as...
     play(Sine(220,2))
     ## End(Not run)

