| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This documentation was generated for Rumor 1.0.4 at 11 November 2009.
Rumor is a realtime monophonic (with chords) MIDI keyboard to Lilypond converter. It receives MIDI events, quantizes them according to its metronome on the fly and outputs handwritten-like corresponding Lilypond notation. Tempo, meter, key and other parameters can be set via command-line options (see section Invocation).
| 2. Features | ||
| 3. Examples | ||
| 4. Invocation | ||
| 5. Scripting | Guile interface | |
| 6. Links | Sources, further information |
This program is Copyright © 2003 Vaclav Smilauer and is covered by GNU General Public License (see the file ‘COPYING’ in the source distribution).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Rumor’s only purpose is to help out with music transcriptions (even of polyphonic music with separated voices); typical usage is to write Lilypond file skeleton by hand and then paste Rumor output into it (see section Examples).
It does not want to be a full-blown quantization program; fancy features like tuplets, polyphony and tempo tracking were ommited deliberately.
gis/as) given the --key=NOTE option (see section Invocation)
Rumor is written in c++ and developped under Linux; windows port is conceivable but not planned.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For real-life examples, Links.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A minimalistic rumor session follows (play keyboard, then press ^-C).
vaclav@frigo:~/ujf/quant/rumor$ ./rumor -m68 -kb -g32 b'8 ~ b32 a g fis g16 e cis8 ~ cis16 g' fis8 | e d b4 ais8 r | ais b32 a g fis g16 e' g, fis32 e fis16 cis' e, cis' | e, d32 cis d16 b' ~ b ais ~ ais32 cis b ais b16 d ~ d cis ~| cis32 e d cis d16 fis ~ fis e ~ e32 g fis e fis16 b ~ b ais | b32 a gis fis gis16 b eis, fis ~ fis32 fis eis dis eis16 gis ais, b ~| b32 b ais gis ais16 cis eis, fis d'8 cis vaclav@frigo:~/ujf/quant/rumor$ |
-m68 (or equivalently, --meter=6/8) sets six-eights bar, -kb (--key=b) indicates b-based scale, -g32 (--grain=32) sets resolution to 32nd notes.
If run with –full option, Rumor outputs complete Lilypond file; the tune of the precceding session would look thusly (beginning of J.S. Bach’s Prelude in b-minor):
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Suppose you don not like the tied 16th notes in bar 4 and 5 (indeed, in original sheet, they are printed as eights). I this case, you can override default rhythms by a guile script, loaded with the --script option (see section Invocation). The syntax is very simple (see section Scripting); put the following into file ‘rhythm68.scm’:
(rumor-rhythms 32 6 8 '(#(8) 18 6)) |
Run rumor and play the two bars on the keyboard:
vaclav@frigo:~/ujf/quant/rumor$ ./rumor -m68 --script=rhythm68.scm -t80 -kb -a2 -f -g5 > hmoll_prael1.ly |
This will lead to
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Default start-up values are --alsa=64:0,65:0 --tempo=100 --meter=44 --grain=16 --key=c.
-g,--grain=NUMSet minimum time resolution to the NUMth note. Only powers of two are valid, from 1 up to 128.
-l,--legatoIgnore any rests between notes. Every note terminates upon the start of the next one.
-D,--no-dotsDo not use dotted notes (dotted rests are always disallowed).
-m,--meter=P[/]Q Set time signature. Bar will have P beats of duration of the Qth note. Metronome will sound every beat. (thus e.g. 4/4 and 8/8 will give the same output, only metronome behavior will change).
Q must be a power of two. Slash may be omited if P and Q are both smaller than 10.
-t,--tempo=BPMMetronome speed will be BPM beats per minute. Note that what is considered a beat is determined by --meter.
-w,--wait=BEATStart metronome upon arrival of the first MIDI note, at the beginning of bar (BEAT=1) unless overridden.
--flatOutput only pitches as you play, no lengths. Metronome will not be started.
--no-chordsDisables chords (groups of notes pressed and released “simultaneously”, with regard to quantization). Enabled by default.
--explicit-durationsOutput duration indication after every note, even if it remains the same as preceedingly.
--absolute-pitchesDo not use Lilypond relative notation. Instead, all pitches have their octave indicated by (possibly zero) tics or commas.
--lang=LANGLANG can be one of ne (default: ces, c, cis, …), en, en-short, de, no, sv, it, ca, es. Languages match those used by Lilypond (not necessarily the version you have installed, though). Note that pitch names can be always overridden by rumor-pitches (see section Scripting).
-k,--key=KEYSet base note of current scale, used to resolve enharmonic ambiguities (i.e. fis vs. ges). Valid value for KEY is any pitch having less than two accidentals, in current language (--lang; this option must precede --key in order to have effect).
Run --sample-sheet and look at scales to see its impact and possible values for KEY.
--sample-sheetProduce complete Lilypond file showing all possible rhythm notations and chromatic scale in all possible keys (see --key). It is influenced by --meter, --grain and also user-defined notations (see --script).
-s,--stripStrip leading and trailing rests from output. First and last bars may thus be incomplete.
-f,--fullOutput can be fed directly into Lilypond. It will be one–line staff in violin clef and key signature as determined by --accidentals.
-a,--accidentals=NUMSet number of sharps or flats (if NUM is positive or negative, respectively) for full Lilypond output. No effect without --full.
--script=FILERun guile script FILE before beginning. See section Scripting.
--alsa=[[IC:IP,]OC:OP]Use ALSA interface. If argument is specified, connect input to client IC on port IP and output to OC:OP. By default, Rumor will try to use 64:0,65:0. If connection fails, you can use aconnect to do this manually.
If you specify only one pair C:P, it will be the output port. This is useful with --kbd.
--oss[=DEV]Use OSS interface. Device number 0 on /dev/sequencer will be used, unless overridden by DEV.
--kbdEmulate MIDI keyboard using ordinary keyboard. An ordinary MIDI interface (ALSA or OSS) is still needed for metronome and echoing. Standard input must be a terminal. There is a usable keyboard layout builtin; however, key bindings are configurable via (rumor-kbd ...) (see section Scripting).
-v,--verboseBe verbose. This option may be used more times and every time will increase verbosity level by 1. If it is greater than 3 and Rumor was compiled with debuggins support, debugging and tracing messages will be printed. If verbosity is zero (default), Rumor will only report errors.
-?,--help--usage-V,--version| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| 5.1 rumor-rhythms | override default rhythm notations | |
| 5.2 rumor-pitches | override default (netherlands) pitch names | |
| 5.3 rumor-kbd | override default keyboard layout for keyboard emulation | |
| 5.4 rumor-beats | override default metronome sounds |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can change default notations knowing TU at which the note starts, via guile command rumor-rhythms. Rumor will always look at user-defined notations, if it fails (meaning: there is no notation shorter than or equal to at the position of the note requested), it will use its built-in algorithm. Syntax of the aforementioned command is
(rumor-rhythms grain P Q notation-def …) |
--grain), rhythm will be divided (multiplied) accordingly. Meters like 3/4 and 6/8 are equal.
Notation is vector of basic rhythms (single notes). Basic rhythm is expressed in scheme as numeric duration for undotted notes (like in Lilypond) or as a pair '(DUR . DOTS) for notes with DOTS dots (DUR is eqivalent to '(DUR . 0)).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This example can be found as ‘doc/rhythm68.scm’ in Rumor source distribution.
(rumor-rhythms 32 6 8 |
We have 6/8 bar with 32th notes. This gives 32*6/8=24 TU/bar, one beat corresponding to 4TU.
'( #(8) 18 6) |
First item in the list is vector (denoted #(...)) of basic rhythms. Eight note #(8); it may appear at positions given after in TU.
'( #((4 . 1)) 0 12) |
Dotted quarter note (4. in Lilypond) may be in either half of bar.
'( #(8 8) 8) |
6/8 bar is like two subbars, whence we do not want a quarter note to go over the middle: override it with two tied eights (this is where Rumor simple algorithm goes “wrong” as it treats 3/4 bar as shortened 4/4).
'( #(2) 0 8) |
Half note would not normally (i.e. 4/4) begin at the third 1/8 beat, right after first 1/4; however, it is perfectly OK in 6/8.
) |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Rumor normally uses notations corresponding to ‘nederlands.ly’ in standard Lilypond distribution. This command makes it possible to define arbitrary names for different tones.
(rumor-pitches '(tone double-flat flat natural sharp double-sharp) …) |
tone is a number from 0 ("c") to 6 ("b"), next five parameters are strings for respective pitches relative to tone.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you wish to use german (defined in ‘deutsch.ly’) notation, you can do it like this:
(rumor-pitches '(5 "asas" "as" "a" "ais" "aisis" ) '(6 "heses" "b" "h" "his" "hisis") ) |
Please note that a better solution is to use --lang=de to achieve this. This option is now partially obsolete but possibly useful for something fancy.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you use --kbd options (see section Invocation), you may want to change the builtin keyboard layout (for example, if not using a QWERTY keyboard).
(rumor-kbd reset transposition '(char . pitch) …) |
#t (true), in which case all established bindings will be deleted before adding the new ones. If it is #f (false), new bindings will be appended (and may overwrite the old ones).
#\c for small “c”, for example; there are special characters as #\space, see guile documentation for these).
If keyboard emulation is not used, this command returns error.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This example can be found as ‘doc/kbd.scm’ in Rumor source distribution.
(rumor-kbd #t 0 '(#\space . 0)) |
Assign rest to spacebar, first resetting all previous bindings.
(rumor-kbd #f 60 |
Append new settings, transposing all following pitches by 60 (that is, 5 octaves up).
'(#\g . 6)'(#\h . 8)'(#\j . 10)
'(#\v . 5)'(#\b . 7)'(#\n . 9)'(#\m . 11)
'(#\s . 1)'(#\d . 3)
'(#\z . 0)'(#\x . 2)'(#\c . 4)
|
The source is deliberately laid out as on keyboard. “z” is assigned 0+60 and so forth, up to “m” (11+60), which completes the octave.
Now we assign the next octave to the same keys, but capitalized:
(rumor-kbd #f 72
'(#\G . 6)'(#\H . 8)'(#\J . 10)
'(#\V . 5)'(#\B . 7)'(#\N . 9)'(#\M . 11)
'(#\E . 1)'(#\D . 3)
'(#\Z . 0)'(#\X . 2)'(#\C . 4)'
)
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This command changes default beat sounds.
(rumor-beats channel first-beat-specification other-beats-specification) |
channel is MIDI channel we use for beats (note that keyboard input’s channel is used also for tone output but not for beat output) and should be 1–16. beat-specification is specific to the first beat and then to all other beats. It is a list of the following form:
'(patch pitch velocity duration) |
instrument is number of the MIDI instrument or patch (should be 1–128). pitch is self-explanatory and should be 0–127 (semitone count from the lower (base) c). velocity corresponds to volume and should be in 0–127. duration is a floating-point number given in seconds. The beat sound will be released after this duration.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If your setup has a functioning MIDI drum channel, you can use it like this:
(rumor-beats
10 ; this is the MIDI drum (percussion) channel
; with the drum channel, pitches are not pitches,
; they represent different percussions
'(15 15 127 0 05) ; 1st beat
'(20 20 95 0.05) ; all other beats
)
|
This example can be found as ‘doc/drums.scm’ in Rumor source disribution.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For further information, consult source documentation and ‘README’ in particular. Try also here:
Real-life pieces typeset using Rumor (please report if there are more!)
Related sites:
| [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by root on November 14, 2009 using texi2html 1.82.
The buttons in the navigation panels have the following meaning:
| Button | Name | Go to | From 1.2.3 go to |
|---|---|---|---|
| [ < ] | Back | Previous section in reading order | 1.2.2 |
| [ > ] | Forward | Next section in reading order | 1.2.4 |
| [ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
| [ Up ] | Up | Up section | 1.2 |
| [ >> ] | FastForward | Next chapter | 2 |
| [Top] | Top | Cover (top) of document | |
| [Contents] | Contents | Table of contents | |
| [Index] | Index | Index | |
| [ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated by root on November 14, 2009 using texi2html 1.82.