nullSample               package:sound               R Documentation

_T_h_e _N_U_L_L _S_a_m_p_l_e _O_b_j_e_c_t

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

     Create a Sample object whose waveform has length 1 and value 0.
     Often useful to initialize loops.

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

     nullSample(rate=44100, bits=16, channels=1)

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

    rate: the sampling rate, between 1000 and 48000. 

    bits: the sample quality (number of bits per sample), 8 or 16. 

channels: 1 for mono, or 2 for stereo. 

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

     a Sample object.

_N_o_t_e:

     Future versions may use a special NULLSample flag instead of using
     a sample of length 1.

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

     Matthias Heymann

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

     'Silence'

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

     ## Not run: 
     scale <- 2^(seq(0,1,length=13))[c(1,3,5,6,8,10,12,13)]
     base <- 440
     s <- nullSample()
     for (f in scale)
       s <- appendSample(s,Sine(f*base,1))
     play(s)
     ## End(Not run)

