Sine                  package:sound                  R Documentation

_C_r_e_a_t_e _S_a_m_p_l_e _O_b_j_e_c_t_s _f_o_r _t_h_e _B_a_s_i_c _w_a_v_e_f_o_r_m_s

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

     Create a Sample object with a sine, sawtooth, or square waveform,
     silence, or noise.

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

     Sine(freq, dur, rate=44100, bits=16, channels=1)
     Sawtooth(freq, dur, rate=44100, bits=16, channels=1, reverse=FALSE)
     Square(freq, dur, rate=44100, bits=16, channels=1, upPerc=50)
     Silence(dur, rate=8000, bits=8, channels=1)
     Noise(dur, rate=44100, bits=16, channels=1)

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

    freq: the frequency (a double). 

     dur: the duration in seconds (a double). 

    rate: the sampling rate, an integer between 1000 and 48000. 

    bits: the sampling quality in bits per sample, 8 or 16. 

channels: 1 for mono, or 2 for stereo. 

 reverse: logical. If 'TRUE', the waveform will be mirrored vertically. 

  upPerc: a number between 0 and 100 giving the percentage of the
          waveform with value +1. 

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

     If 'channels=2', left and right side of the sample will be the
     same for 'Sine', 'Sawtooth' and 'Square'. For 'Noise', both sides
     will be generated separately, using 'runif'.

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

     a Sample object.

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

     Matthias Heymann

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

     'as.Sample', 'loadSample', 'nullSample'

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

     ## Not run: s1 <- Sine(440,1)
     play(s1)

     s2 <- Sawtooth(440,1)
     play(s2)

     play(Noise(1))## End(Not run)

