README.md: fix a couple of typos
[vidi-player.git] / README.md
1 vidi-timeline creates a video timeline starting from a MIDI file.
2
3 The video clips are taken from a "VideoFont" in which each sample clip
4 corresponds to a note. The samples are arranged following the time and value of
5 the notes in the MIDI file.
6
7 vidi-timeline allows to create more easily videos like these:
8
9 * [Lasse Gjertsen - Hyperactive](https://youtu.be/o9698TqtY4A)
10 * [Vittorio Saggiomo - Mario Bros Column Chromatography](https://youtu.be/mxi3z2vDV_0)
11
12
13 How to create a VideoFont
14 =========================
15
16 Synthetic VideoFont
17 -------------------
18
19 Create a synthetic VideoFont:
20
21     $ ./create_test_videofont.py videofont/
22
23
24 From a video recording
25 ----------------------
26
27 A VideoFont can also be created by recording a video, and then splitting the
28 recording in samples, one sample per note.
29
30 For an example of a master VideoFont see
31 [keyboard videofont master C4 B5](https://youtu.be/7Btp80LPqRs)
32
33 A file like the one above can be analyzed with [Audacity][1] to find the start
34 and the  end time of the individual samples:
35
36 * use the `Analyze -> Sound Finder...` to find the samples;
37 * use the [`Pitch Detect" plugin`][2] to find the pitch of the samples and name
38   them accordingly;
39 * maybe add  an interval named "rest" to represent the absence of sound;
40 * export the labels track with `File -> Export Labels...`;
41
42 [1]: http://www.audacityteam.org/
43 [2]: http://wiki.audacityteam.org/wiki/Nyquist_Analyze_Plug-ins#Pitch_Detect
44
45 An example of such a file produced by audacity can be found in the `contrib/`
46 directory and it can be used as follows:
47
48     $ youtube-dl -t https://youtu.be/7Btp80LPqRs
49     $ ./contrib/ges-split-samples.py \
50         "keyboard videofont master C4 B5-7Btp80LPqRs.mp4" \
51         "contrib/keyboard videofont master C4 B5-samples.txt" \
52         videofont/ > split.sh
53     $ mkdir videofont/
54     $ sh split.sh && rm split.sh
55
56
57 Examples of use
58 ===============
59
60 vidi-timeline.py
61 ----------------
62
63 Play the timeline from a MIDI file using the samples from the VideoFont:
64
65     $ ./vidi-timeline.py examples/Beyer\ Op.\ 101\ -\ Exercise\ 008.midi videofont/
66
67
68 Save the timeline to be edited somewhere else (e.g. in PiTiVi):
69
70     $ ./vidi-timeline.py examples/Beyer\ Op.\ 101\ -\ Exercise\ 008.midi videofont/ Beyer_008.xges
71
72
73 Render the timeline to a video file:
74
75     $ ges-launch-1.0 --load Beyer_008.xges --outputuri Beyer_008.webm --format="video/webm:video/x-vp8:audio/x-vorbis"
76
77
78 vidi-player.py
79 --------------
80
81 Play a midi file in real time (if the CPU and the disk can keep up):
82
83     $ ./vidi-player.py examples/Beyer\ Op.\ 101\ -\ Exercise\ 008.midi videofont/
84
85
86 vidi-sampler.py
87 ---------------
88
89 Play samples from the note hit on a midi controller:
90
91     $ xset -r && vkeybd && xset r on &
92     $ ./vidi-sampler.py 'Virtual Keyboard' videofont/
93     $ fg
94
95
96 Similar projects
97 ================
98
99 Of course if the idea is cool, chances are that others had it too. :)
100
101 Midi-Vidi
102 ---------
103
104 A similar concept called midi-vidi has been developed by Marcus Fischer:
105
106 * <http://unrecnow.com/dust/325-midi-vidi-effect-demo/>
107 * <https://vimeo.com/8049917>
108 * <http://www.synthtopia.com/content/2009/12/09/midi-vidi-plugin-lets-you-control-video-via-midi-in-max-for-live/>
109 * <http://www.maxforlive.com/library/device.php?id=120>
110
111 Midi-Vidi is also a very cool name, it sound like the Italian "mi dividi" which
112 means "you divide me".
113
114 VidiBox
115 -------
116
117 An interactive video mashup app:
118
119 * <http://www.vidibox.net/>
120 * <https://twitter.com/vidibox>