-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
290 lines (225 loc) · 9.19 KB
/
README
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
====================================================================
VIRTUAL KEYBOARD ver.0.1.18
Takashi Iwai <tiwai@suse.de>
====================================================================
GENERAL NOTES
-------------
This is a virtual keyboard for AWE, MIDI and ALSA drivers.
It's a simple fake of a MIDI keyboard on X-windows system.
Enjoy a music with your mouse and "computer" keyboard :-)
The program requires Tcl7.5/Tk4.1 or newer libraries.
This program supports:
- ALSA sequencer (ver.0.5.x or 0.9.x)
- AWE driver on OSS (ver.0.4.3)
- MIDI device on OSS and ALSA
Since the most of the part is written by Tcl/Tk script, it'll be not
so difficult to apply this program to other systems.
INSTALLATION
------------
1. Edit Makefile
You may need to modify Makefile for your system.
The following values can be configurable:
- PREFIX
Destination directory prefix (e.g. /usr/local)
- BIN_DIR
Destination directory where the program will be installed.
- VKLIB_DIR
Directory where vkeybd Tcl file, key list and preset list files
are stored.
- MAN_DIR
Man page prefix directory (e.g. /usr/local/man)
- MAN_SUFFIX
Man page prefix
- USE_ALSA
- USE_AWE
- USE_MIDI
Device selection. Multiple devices are available.
To disable a device, set the value 0. Do not undefine it.
At least one of them must have non-zero value.
- USE_LADCCA
Supports LADCCA (http://pkl.net/~node/software/)
Set 1 to add the this support.
- TCLLIB
Tcl library for linking, given as "-lxxx"
- TCLINC
Tcl include path option for cc, given as "-Ixxx"
- TKLIB, XLIB
Tk and X libraries (-lxxx)
- TKINC, XINC
Tk and X include path option (-Ixxx)
- EXTRALIB
Other required library (-lxxx)
2. Run make.
3. Install via "make install".
USAGE
-----
Load the soundfont via sfxload utility before using this program.
Then, just start vkeybd. The following command line options are
accepted.
Common Options:
--device mode
Use the specified mode for output device.
The argument are "awe", "midi" or "alsa", for AWE/OSS,
MIDI/OSS and ALSA devices, respectively.
Default is alsa.
--config file
Use the specified file as config file (see below)
--keymap file
Use the specified file as keymap file (see below)
--preset file
Use the specified file as preset list file (see below)
--channel num
Specify the channel to be played for normal instruments.
Valid only for MIDI and ALSA devices. Default is 0.
--drum num
Specify the channel to be played for drum instruments.
Valid only for MIDI and ALSA devices. Default is 9.
--octave num
Specify the number of octaves to display keys.
Default is 3.
ALSA Device Option:
--addr client:port or 's'
Set ALSA client and port numbers to be connected.
If argument begins with 's', the port is opened as subscription
port, and events are sent to all subscribers. Otherwise,
vkeybd connects directly to the specified port.
Default is 's'.
--name string
Specify the name of client/port. Some applications like
tk707 check the client/port name whether it is a valid MIDI
device port. This options makes vkeybd possible to "fake"
as a real MIDI device.
--ladcca bool
Specify the support of LADCCA. Give yes or no as the
argument. The default value is no.
OSS Sequencer Device Option:
--seqdev file
Specify the device file path for sequencer access.
As default /dev/sequencer is used.
--seqidx num
Specify the synth device index for AWE32/64 WaveTable.
If negative value is given, the device is auto-probed.
Default value is -1.
MIDI Device Option:
--mididev file
Specify the file path of MIDI device.
Default value is /dev/midi.
FILE MENU
---------
"Connection" shows whether the vkeybd connects to the device.
On OSS system, only one application is allowed to access sequencer
device. Thus, if one wants to play another program even using another
device, he needs to disconnect vkeybd once. On ALSA or OSS emulation
on ALSA, you don't have to switch vkeybd off, since multiple access is
allowed.
With "Save Config", the current keymap and view configuration are
saved on ~/.vkeybdrc config file. This file will be read at the next
invoke.
VIEW MENU
---------
This menu shows the check buttons to toggle the display of control
buttons.
With "Key/Velocity" button, a key and a velocity scale bars are
shown. The key scale indicates the lowest note value of the visible
keyboard (as default 48 = C4). The velocity scale bar is used to
change the velocity of each note-on.
With "Control" button, controls for the current channel and for the
MIDI continous-controls are enabled. The channel number is increased
or decreased by clicking the right or left button around the shown
channel number. The bank and preset are remembered for each channel.
You may choose the CC to be adjusted by pull-down menu, which
indicates "ModWheel" as default. Then change the parameter value with
the scale bar at the right side.
With "Pitch" button, you may adjust pitch wheel. The pitch goes
back to the center position when you click the "Pitch Clear" button
at the left.
With "Program" button, the selection list of playing instrument is
toggled. The shown presets are read from preset list file.
KEYBOARD
--------
Each visible key is mapped on your computer keyboard from 'z' to '\'.
On the version 0.1.11, the key auto-repeat is filtered so that only
one note is generated. Thus you no longer have to turn off auto
repeat via "xset -r".
The key assignment can be changed by editting the config file
~/.vkeybdmap. Once save the current configuration via File/Save Keymap
menu. The config file is the Tcl source, and you may change the list
of keymap as you wish.
The keymap is a list of elements consisting on the key symbol and the
corresponding note offset. The key symbol is the X key symbol for
assigned key, and note offset is the shifted note number from note key
of beginning of keyboard, which is changed by "Key" scalebar.
See the next section for details.
KEYMAP FILE
-----------
The keymap file can be specified via the command line option
--keymap. If not given, the default keymap file is searched from
the home directory (~/vkeybdmap or ~/.vkeybdmap) and the system-wide
directory (/etc/vkeybdmap).
The system-wide keymap is locale-sensitive now. A file
vkeybdmap-$LANG is searched in prior. For example, /etc/vkeybdmap-de
can be used for the german locale.
CHANGING THE KEYMAP
-------------------
The steps for changing the keymap manually are like this.
1. Save the current configuration by "File / Save Keymap" menu.
You'll have ~/.vkeybdmap file.
2. Edit it using your favorite text editor.
There is a list of keymap definitions such as
set keymap {
{a 8}
{z 9}
{s 10}
{x 11}
....
The first element of each keymap is the key-symbol of X11.
you can get the key-symbol for your computer keyboard by xev:
2a. Start xev on a terminal.
% xev
You'll get a small window.
2b. Move the cursor pointer into the window.
Many X11 events will be displayed in realtime on the terminal.
Depending on the window manager, you'll need to click the
window to choose focus.
2c. Push the key you want to use.
The key-push/release event will be shown on the terminal like below.
KeyRelease event, serial 26, synthetic NO, window 0x1600001,
root 0x3f, subw 0x0, time 4352873, (88,98), root:(1185,149),
state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: "
Then you know the key-symbol is "Escape" (see keysym entry).
The second element of each keymap is the MIDI note offset from the
base note. If the key is set to 48 on the vkeybd and if you have a
keymap entry like {Escape 15}, the key 63 (15+48) will be played
when you push Escape key.
3. Restart vkeybd.
PRESET LIST FILE
----------------
The preset list file is used to describe the list of MIDI preset
names. If the command line option is omitted, the default preset list
files "~/vkeybd.list", "~/.vkeybd.list" and "$vkblib/vkeybd.list" are
searched sequentially. The preset list will appear when "Program"
toggle button is on, and you can select your favorite sound from the
list.
The preset list file can be converted from soundfont file via sftovkb
utility included in this package. For example,
% sftovkb /usr/local/lib/sfbank/synthgm.sbk > vkeybd.list
The only command line argument is the soundfont file name. This must
be a full path name.
ACKNOWLEDGMENT
--------------
The desktop pixmaps are by courtesy of Ivo Clarysse.
COPYRIGHT
---------
Copyright (C) 1997-2007 Takashi Iwai
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.