Rhythm generator
BACKGROUND OF THE INVENTION 
     1. Field of The Invention 
     This invention relates to a rhythm generator which is adapted so that desired rhythm patterns, each corresponding to one bar, are automatically generated in a sequential order over a desired number of bars during playing of a tune. 
     2. Description of the Prior Art 
     Conventional rhythm generators usually generate one selected rhythm repeatedly throughout a tune being played. In practice, however, substantially no tunes are played in the same rhythm pattern; in general, they are played inserting some variations of the selected rhlythm at proper intervals. Hence the rhythm produced by the conventional rhythm generators inevitably feels monotonous. 
     To avoid such monotony, there has recently been proposed a rhythm generator capable of producing variations of a rhythm, but the variations are automatically switched at equal time intervals or manually at desired times. In the former case, however, the rhythms are each repeated on the same cycle and hence still feel monotonous, though less monotous than in the past, and in the latter case such manual operation is difficult for a player using his both hands and feet during playing. 
     SUMMARY OF THE INVENTION 
     This invention is to provide a rhythm generator which solves the abovesaid problems of the prior art and which is designed so that rhythm patterns and their repetitive frequencies are freely selected and combined in a sequential order and that the combined rhythm patterns are automatically generated. 
     The above object is achieved by providing a rhythm generator which comprises a plurality of rhythm pattern memories, each storing one rhythm pattern and outputting the rhythm pattern in response to a rhythm clock, a bar counter for counting the number of bars with the rhythm clock, and means supplied with the output from the bar counter to selectively assign desired ones of the rhythm pattern memories one after another for a desired number of bars. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     The accompanying drawing is an explanatory diagram illustrating the constuction of an embodiment of this invention. 
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     In the drawing, each of rhythm pattern memories ROM(RAM)9 1  to 9 n  stores a rhythm pattern for each bar and provides its output to a tone source circuit in response to addressing by a rhythm clock. It is prestored in a selecting memory RAM(ROM)6 in what order the memories ROM(RAM)9 1  to 9 n  are to be selected, and the number of bars over which the rhythm pattern or patterns stored in the memory 6 are to be repeated is also prestored in a memory RAM(ROM)7. Rhythm clock pulses from a rhythm clock generator 1 are applied to an address counter 2 for addressing the memories 9 1  to 9 n . For example, if the address counter 2 is a 24-step counter, then the number of bits required for the memories 9 1  to 9 n  is (24×m) bits, where m is the number of tone sources. Where 24 clock pulses correspond to one bar, a bar counter 3 advances by one bit every 24 clock pulses and the output from the bar counter 3 is compared by a comparator 5 with the number of outputs from the bar number memory 7. The bar counter 3 continues counting until its output coincides with the output from the memory 7. In the case of coincidence, the comparator 5 applies a coincidence signal to an address counter 4 for counting and its count value is provided to the selecting memory 6 and the bar number memory 7 to read out their contents. The count value of the address counter 4 is equal to the number of rhythm pattern changes n in one tune, that is, the word number n of the bar number memory 7. 
     The content of the selecting memory 6 is subjected to code conversion by a decoder 8 and applied to the memories 9 1  to 9 n  to read out their contents for input to a tone source circuit. 
     The operation of the above arrangement will hereinafter be described in concrete terms. 
     In the case of playing a tune, for example, in the rhythm pattern of the memory 9 1  for first two bars, the rhythm pattern of the memory 9 2  for the next three bars, the rhythm pattern of the memory 9 1  for the next one bar, . . . , the order of selection of the rhythm pattern memories 9 1  to 9 n  and the numbers of bars, that is, 2, 3, 1, . . . in this case, are prestored in the selecting memory 6 and the bar number memory 7, respectively. 
     During playing the address counter 2 counts the rhythm clock pulses yielded from the rhythm clock generator 1 and inputs addresses to the memories 9 1  to 9 n . At that time, a signal (0, 0, 0) is applied from the address counter 4 to the selecting memory 6, from which a signal is provided via the decoder 8 to the memory 9 1  to actuate it. Having counted 2 applies one pulse to the bar counter 3. When the address counter 2 has counted 24 clock pulses again, it provides another pulse to the bar counter 3 to derive therefrom a signal (0, 1, 0). The bar number memory 7 is supplied first with the signal (0, 0, 0) from the address counter 4, so that the bar number memory 7 applies a signal (0, 1, 0) to the comparator 5. Then, the output signals from the bar number memory 7 and the bar counter 3 coincide, and the comparator 5 provides one coincidence signal to the address counter 4 to drive therefrom an output signal (0, 0, 1) and, at the same time, supplies a reset signal to the bar counter 3. And the bar number memory 7 is supplied with the output signal (0, 0, 1) from the address counter 4 to provide an output signal (0, 1, 1). 
     The selecting memory 6 is supplied with the signal (0, 0, 1) from the address counter 4 to activate the rhythm pattern memory 9 2 , and the rhythm pattern stored in the memory 9 2  is read out therefrom by an address signal from the address counter 2 and applied to the tone source circuit. 
     Next, when three pulses have been applied from the address counter 2 to the bar counter 3 to derive therefrom a signal (0, 1, 1), since this output signal coincides with the output signal from the bar number memory 7, the comparator 5 applies a coincidence signal to the address counter 4 to advance its count value by one. As a consequence, the bar number memory 7 produces a signal (0, 0, 1), and the selecting memory 6 activates the rhythm pattern memory 9 3  via the decoder 8. Thereafter, the same operations as described above are carried out for each selected rhythm pattern. 
     In the above embodiment, the rhythm pattern memories 9 1  to 9 n  are described to be fixed memories (ROM&#39;s) but may also be random access memories, whereas the selecting memory 6 and the bar number memory 7 are usually random access memories but may also be fixed memories (ROM&#39;s). 
     Further, while the plurality of rhythm pattern memories 9 1  to 9 n  are used in the embodiement, they may also be combined into one. 
     As has been described in the foregoing, according to this invention, desired rhythm patterns are each preselected for a desired number of bars, and the order of generation of the rhythm patterns and the numbers of bars are respectively prestored in a rhythm pattern selecting memory and a bar number memory, and in accordance with the output signals therefrom, the preselected rhythm patterns are successively generated for the preselected numbers of bars. Since it is possible to preset any combinations of rhythm patterns and the number of bar over which the rhythm patterns are each repeated, the rhythm generator of this invention exhibits the advantage of producing desired rhythms full of variety over the conventional monotonous rhythm generators. 
     It will be apparent that many modifications and variations may be effected without departing from the scope of the novel concepts of this invention.