The issues of law and of fact in cases for violations of other than ordinances may be tried by the judge unless the defendant demands a trial by jury, in which case the issues shall be tried by a jury of twelve (12) persons unless the defendant shall consent to be tried by a lesser number.