panorama                package:sound                R Documentation

_N_a_r_r_o_w _t_h_e _P_a_n_o_r_a_m_a _o_f _a _S_t_e_r_e_o _S_a_m_p_l_e

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

     Narrow the panorama of a stereo Sample object or of a stereo wav
     file.

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

     panorama(s, pan)

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

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

     pan: a number between -50 and 50 giving the width of the panorama. 

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

     If 'abs(pan)<50', mixtures of the two channels of 's' are used for
     the left and the right channel of the returned Sample object, so
     that they appear closer to the center. For 'pan=0', both sounds
     are completely in the center.

     If 'pan<0', the left and the right channel are interchanged
     afterwards.

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

     a Sample object with the transformed panorama.

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

     Matthias Heymann

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

     'mirror' for 'pan=-50', 'left' and 'right' for access to single
     channels of the sample.

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

     ## Not run: 
     s <- stereo(Sine(440,1),Sine(330,1))
     play(s)
     play(panorama(s,30))  # now right and left tones are closer to the center
     play(panorama(s,10))  # now even closer
     play(panorama(s,0))   # now both at the center, the same as setChannels(s,1)
     play(panorama(s,-30)) # again wider, but both sides switched
     play(panorama(s,-50)) # the same as mirror(s)
     ## End(Not run)

