(1) JOINDER OF CRIMES. Two or more crimes may be charged in the same complaint, information or indictment in a separate count for each crime if the crimes charged, whether felonies or misdemeanors, or both, are of the same or similar character or are based on the same act or transaction or on 2 or more acts or transactions connected together or constituting parts of a common scheme or plan. When a misdemeanor is joined with a felony, the trial shall be in the court with jurisdiction to try the felony.(2) JOINDER OF DEFENDANTS. Two or more defendants may be charged in the same complaint, information or indictment if they are alleged to have participated in the same act or transaction or in the same series of acts or transactions constituting one or more crimes. Such defendants may be charged in one or more counts together or separately and all of the defendants need not be charged in each count.(3) RELIEF FROM PREJUDICIAL JOINDER. If it appears that a defendant or the state is prejudiced by a joinder of crimes or of defendants in a complaint, information or indictment or by such joinder for trial together, the court may order separate trials of counts, grant a severance of defendants or provide whatever other relief justice requires. The district attorney shall advise the court prior to trial if the district attorney intends to use the statement of a codefendant which implicates another defendant in the crime charged. Thereupon, the judge shall grant a severance as to any such defendant.(4) TRIAL TOGETHER OF SEPARATE CHARGES. The court may order 2 or more complaints, informations or indictments to be tried together if the crimes and the defendants, if there is more than one, could have been joined in a single complaint, information or indictment. The procedure shall be the same as if the prosecution were under such single complaint, information or indictment.