Source code: | loop2.cpp |
loop2 is a polyphonic version of the loop1 drum sequencer. There are 9 instruments which can played by pressing the computer keyboard characters "1" through "9" which play various General MIDI percussion instruments on MIDI channel 10 (offset 1). The default instruments are:
1 LOW_TOM 6 MUTE_CUICA 2 LOW_MID_TOM 7 OPEN_CUICA 3 HIGH_MID_TOM 8 MUTE_TRIANGLE 4 HIGH_TOM 9 ACOUSTIC_BASS_DRUM 5 HI_BONGO 0 REST
The primary implementation for the loop2 program is similar to the loop1 program but there are nine parallel arrays instead of one array.
Note that in this program attack-velocity control is possible. All instruments are played at the attack velocity specified in the performance array.
In the loop program, you can save or load three patterns from a text files called "loop1.txt", "loop2.txt", and "loop3.txt".
Here are some rhythmic patterns which can be loaded into the loop.exe program (after renaming them "loop[123].txt")
The syntax for loop files is as follows: