--- ./switch.ml	2011-10-04 10:14:05.528030726 -0300
+++ /home/fabio/Desktop/switch.ml	2011-10-04 10:15:46.656030731 -0300
@@ -509,110 +509,3 @@
       "Weights of the children (padded with 1), defining for each child \
        how many tracks are played from it per round, if that many are \
        actually available."
-
-(** Function that get the next element based on the current round and the module of its weight
-if  round mod weight =0 the song is played
-returns (list,num) in which list is the list of childs and num the rount after this interaction**)
-let mod_check =fun  ~pos ~ready_list ->
-	
-		(*just let one hundred possible values in the counter *)
-		let aux = if pos+1>=101 then 1 else pos+1 in
-		 
-		(* if the round is a multiple of the source it's put on the play_list, if isn't then we increase the music counter, i'm assumming here that the musics are in a ascendent order, otherwise it should loop the whole list before increment the counter *)
-		let (aux_list,aux)=List.fold_left 	(fun (l,n) (s,w) -> if n mod w=0 then
-										(l@[s],n) 
-										else if (List.length(l))<=0 then(l,n+1)
-										else(l,n))
-							([],aux) ready_list in
-			
-		 	(aux_list,aux)
-	
-
-(** Switch the songs according to a given function
-* the param func is the function
-
-class random ~kind ?replay_meta strict mode children =
-  let name = if strict then "quota" else "random" in
- *)
-
-class func_random ~kind ?replay_meta ~func ~strict  mode children =
-object
-  inherit random  ~kind ?replay_meta strict mode children
-  val mutable pos=0
-  val mutable play_list=ref []
-  (* Annihilate the reversal in #select once for all. *)
-
-  method private select =
-    (* There isn't itens in th list*)
-    if (List.length(!play_list))<=0 then
-	
-		    let (ready_list,n) =
-	
-			 (*
-			  fold_left função valor_inicial lista
-			  :: add na lista
-				l é a lista vazia, k é 0
-				Ao passar por aqui ela é revertida com a lista das filhas ficando em primeiro,peso em ultimo
-			  *)
-		      List.fold_left
-			(fun (l,k) (w,s) -> if s.source#is_ready then (s,w)::l,(k+w) else l,k)
-			([],0) children
-		    in
-	
-		      if n = 0 then None else
-			(*Gets the list of avaiable musics based on the givem function*)
-		       	let (aux_list,aux)=( func ~pos:pos ~ready_list:ready_list) in
-			let retval=List.hd(aux_list) in
-			play_list:=List.tl(aux_list);
-			pos<-aux;
-		 	Some retval 
-	
-	else (*there was itens in the list *)
-		begin 
-			 let retval=List.hd(!play_list) in
-			 play_list:=List.tl(!play_list);
-	
-			Some  retval
-		end;
-end
-let () =
-  let add name  descr weight_descr func =
-    let kind = Lang.univ_t 1 in
-    Lang.add_operator name ~descr ~category:Lang.TrackProcessing
-      (common  kind @
-       [ "weights", Lang.list_t Lang.int_t, Some (Lang.list Lang.int_t []),
-         Some weight_descr ;
-         "", Lang.list_t (Lang.source_t kind), None, None ])
-      ~kind:(Lang.Unconstrained kind)
-      (fun p kind ->
-         let children = Lang.to_source_list (List.assoc "" p) in
-         let replay_meta,ts,tr =
-           extract_common ~kind p (List.length children)
-         in
-         let weights =
-           List.map Lang.to_int (Lang.to_list (List.assoc "weights" p))
-         in
-         let weights =
-           if weights <> [] then weights else
-             Utils.make_list (List.length children) 1
-         in
-         let children =
-           if List.length weights <> List.length children then
-             raise
-               (Lang.Invalid_value
-                  ((List.assoc "weights" p),
-                   "there should be as many weights as sources")) ;
-			(*
-			Children vira uma tupla (weight,{trasition,source,cur_meta})	   
-			*)
-           List.map2
-             (fun w c -> w,c)
-             weights
-             (List.map2
-                (fun tr s -> { transition = tr ; source = s ; cur_meta = None })
-                tr children)
-         in
-           new  func_random ~kind ~replay_meta ~func:func ~strict:true ts children)
-  in
-add "rotate_modulus" "Play a song if the current round is a multiple of its weight" "The weight list" mod_check ;
-
