/**********
     TITLE: Music Object Extension - Groups
   VERSION: 1.1.0
    AUTHOR: Chris van Rensburg
 COPYRIGHT: 1996-2001 Beatnik, Inc. All Rights Reserved
  REQUIRES: music-object.js (3.3.0 or higher)
**********/
function mo_getGroupState(_a,_b,_c){var _d='get'+_a+_b,_e=_a=='Channel'?16:64;if(typeof _c=='number'){if(_c==0){for(var _f=1;_f<=_e;_f++){if(!this[_d](_f))return false;}return true;}else{return this[_d](_c);}}else if(typeof _c=='string'){var _g=_c.split(',');for(var _f=0;_f<_g.length;_f++){if(!this.getGroupState(_a,_b,_g[_f]-0))return false;}return true;}else{return null;}}function mo_setGroupState(_a,_b,_c,_h,_i){_i=typeof _i=='boolean'&&_i;var _j='set'+_a+_b,_d='get'+_a+_b,_e=_a=='Channel'?16:64;if(typeof _h=='undefined'||_h==null)_h=true;if(typeof _h=='string'&&(_h=='Toggle Group'||_i))_h=_h==_b||(_h.indexOf('Toggle')==0&& !this.getGroupState(_a,_b,_c));if(typeof _c=='number'&&_c==0){for(var _f=1;_f<=_e;_f++)this[_j](_f,(typeof _h=='string')?(_h==_b||(_h=='Toggle'&& !this[_d](_f))):_h)
;}else{if(typeof _c=='string'){var _g=_c.split(',');}else{var _g=new Array();if(typeof _c=='number')_g[0]=_c;}if(_i){var _k=new Array();for(var _f=0;_f<_g.length;_f++)_k[_g[_f-0]]=true;;for(var _f=1;_f<=_e;_f++)this[_j](_f,(typeof _k[_f]=='boolean')?_h: !_h);}else{for(var _f=0;_f<_g.length;_f++)this[_j](_g[_f]-0,(typeof _h=='string')?(_h==_b||(_h=='Toggle'&& !this[_d](_g[_f]-0))):_h);}}}function mo_getChannelsMute(_l){return this.getGroupState('Channel','Mute',_l);}function mo_getChannelsSolo(_l){return this.getGroupState('Channel','Solo',_l);}function mo_getTracksMute(_m){return this.getGroupState('Track','Mute',_m);}function mo_getTracksSolo(_m){return this.getGroupState('Track','Solo',_m);}function mo_setChannelsMute(_l,_h,_i){this.setGroupState('Channel','Mute',_l,_h,_i);}function mo_setChannelsSolo(_l,_h,_i){this.setGroupState('Channel','Solo',_l,_h,_i);}function mo_setTracksMute(_m,_h,_i){this.setGroupState('Track','Mute',_m,_h,_i);}function mo_setTracksSolo(_m,_h,_i){
this.setGroupState('Track','Solo',_m,_h,_i);}Music.addPublicInstanceMethods('getChannelsMute','getChannelsSolo','getGroupState','getTracksMute','getTracksSolo','setChannelsMute','setChannelsSolo','setGroupState','setTracksMute','setTracksSolo');