File: README.rst

package info (click to toggle)
python-rtmidi 1.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,248 kB
  • sloc: cpp: 4,228; python: 2,853; makefile: 287; sh: 109; ansic: 19
file content (52 lines) | stat: -rw-r--r-- 2,195 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Drum Pattern Sequencer
======================

This example was contributed by Michiel Overtoom [1]_. I just embellished it
a bit and added command line option handling. You can see Michiel's original
script in the repository history.

The script ``drumseq.py`` implements a simple drum pattern sequencer, which
reads patterns from text files in a very simple and easy to edit format, and
plays them back as a MIDI note sequence to a given MIDI output.

Each line starts with the MIDI note number of a drum sound and is followed a
sequence of characters indicating at which step this drum should be triggered.

Different characters map to different velocities and a ``.`` signifies velocity
zero, i.e. the drum note will not be triggered at this step. A dash ``-`` is
a tie, neither a note off nor a new note is sent at this step. Each line must
have the same number of steps. One step is nominally a 1/16 note, but you are
free to define a pattern with twelve steps and increase the BPM by a factor of
4/3 to get a triplet-feel.

Lines starting with a hash (``#``) are ignored and can be used for comments
or temporarily muting a drum sound. The third field of each line, after the
pattern sequence, should name or describe the drum sound to use, but you are
free to put there whatever you want, the field is not used by the sequencer.

You can change the MIDI port, channel, bank and program via command line
options and also specify the BPM at which the pattern is played back.

For a mapping of midi notes to General MIDI drum sounds, see
http://en.wikipedia.org/wiki/General_MIDI#Percussion

For a General MIDI compatible software synthesizer, see:

macOS (OS X)
    SimpleSynth_
Linux
    Qsynth_ (GUI) or fluidsynth_ (command line)
Windows
    Builtin

The patterns whose filenames start with ``example_`` are taken from the article
*The Rhythm Method. Effective Drum Programming* published by the Sound on Sound
magazine [2]_.


.. [1] http://www.michielovertoom.com/
.. [2] http://www.soundonsound.com/sos/feb98/articles/rythm.html

.. _simplesynth: http://notahat.com/simplesynth/
.. _qsynth: http://qsynth.sourceforge.net/
.. _fluidsynth: http://sourceforge.net/apps/trac/fluidsynth/