aboutsummaryrefslogtreecommitdiff
path: root/portmidi/pm_test/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'portmidi/pm_test/README.txt')
-rw-r--r--portmidi/pm_test/README.txt363
1 files changed, 363 insertions, 0 deletions
diff --git a/portmidi/pm_test/README.txt b/portmidi/pm_test/README.txt
new file mode 100644
index 0000000..6c0c7ab
--- /dev/null
+++ b/portmidi/pm_test/README.txt
@@ -0,0 +1,363 @@
1README.txt - for pm_test directory
2
3These are all test programs for PortMidi
4
5Because device numbers depend on the system, there is no automated
6script to run all tests on PortMidi.
7
8To run the full set of tests manually:
9
10Note: everything is run from the ../Debug or ../Release directory.
11Actual or example input is marked with >>, e.g., >>0 means type 0<ENTER>
12Comments are shown in square brackets [like this]
13
141. ./qtest -- output should show a bunch of tests and no error message.
15
162. ./testio [test input]
17Latency in ms: >>0
18enter your choice... >>1
19Type input number: >>6 [pick a working input device]
20[play some notes, look for note-on (0x90) with pitch and velocity data]
21
223. ./testio [test input (fail w/assert)]
23Latency in ms: >>0
24enter your choice... >>2
25Type input number: >>6 [pick a working input device]
26[play some notes, program will abort after 5 messages
27(this test only applies to a Debug build, otherwise
28the assert() macro is disabled.)]
29
304. ./testio [test input (fail w/NULL assign)]
31Latency in ms: >>0
32enter your choice... >>3
33Type input number: >>6 [pick a working input device]
34[play some notes, program will Segmentation fault after 5 messages
35(this test may not Segfault in the Release build; if not
36try testing with a Debug build.)]
37
385. ./testio [test output, no latency]
39Latency in ms: >>0
40enter your choice... >>4
41Type output number: >>2 [pick a working output device]
42>> [type ENTER when prompted (7 times)]
43[hear note on, note off, note on, note off, chord]
44
456. ./testio [test output, latency > 0]
46Latency in ms: >>300
47enter your choice... >>4
48Type output number: >>2 [pick a working output device]
49>> [type ENTER when prompted (7 times)]
50[hear note on, note off, note on, note off, arpeggiated chord
51 (delay of 300ms should be apparent)]
52
537. ./testio [for both, no latency]
54Latency in ms: >>0
55enter your choice... >>5
56Type input number: >>6 [pick a working input device]
57Type output number: >>2 [pick a working output device]
58[play notes on input, hear them on output]
59
608. ./testio [for both, latency > 0]
61Latency in ms: >>300
62enter your choice... >>5
63Type input number: >>6 [pick a working input device]
64Type output number: >>2 [pick a working output device]
65[play notes on input, hear them on output (delay of 300ms is apparent)]
66
679. ./testio [stream test]
68Latency in ms: >>0 [does not matter]
69enter your choice... >>6
70Type output number: >>2 [pick a working output device]
71>> [type ENTER to start]
72[hear 4 notes: C D E F# at one note per second, then all turn off]
73ready to close and terminate... (type ENTER) :>> [type ENTER (twice)]
74
7510. ./testio [isochronous out]
76Latency in ms: >>300
77enter your choice... >>7
78Type output number: >>2 [pick a working output device]
79ready to send program 1 change... (type ENTER): >> [type ENTER]
80[hear 80 notes, exactly 4 notes per second, no jitter]
81
8211. ./latency [no MIDI, histogram]
83Choose timer period (in ms, >= 1): >>1
84? >>1 [No MIDI traffic option]
85[wait about 10 seconds]
86>> [type ENTER]
87[output should be something like ... Maximum latency: 1 milliseconds]
88
8912. ./latency [MIDI input, histogram]
90Choose timer period (in ms, >= 1): >>1
91? >>2 [MIDI input option]
92Midi input device number: >>6 [pick a working input device]
93[wait about 5 seconds, play input for 10 seconds ]
94>> [type ENTER]
95[output should be something like ... Maximum latency: 3 milliseconds]
96
9713. ./latency [MIDI output, histogram]
98Choose timer period (in ms, >= 1): >>1
99? >>3 [MIDI output option]
100Midi output device number: >>2 [pick a working output device]
101Midi output should be sent every __ callback iterations: >>50
102[wait until you hear notes for 5 or 10 seconds]
103>> [type ENTER to stop]
104[output should be something like ... Maximum latency: 2 milliseconds]
105
10614. ./latency [MIDI input and output, histogram]
107Choose timer period (in ms, >= 1): >>1
108? >>4 [MIDI input and output option]
109Midi input device number: >>6 [pick a working input device]
110Midi output device number: >>2 [pick a working output device]
111Midi output should be sent every __ callback iterations: >>50
112[wait until you hear notes, simultaneously play notes for 5 or 10 seconds]
113>> [type ENTER to stop]
114[output should be something like ... Maximum latency: 1 milliseconds]
115
11615. ./mm [test with device input]
117Type input device number: >>6 [pick a working input device]
118[play some notes, see notes printed]
119>>q [Type q ENTER when finished to exit]
120
12116. ./midithread -i 6 -o 2 [use working input/output device numbers]
122>>5 [enter a transposition number]
123[play some notes, hear parallel 4ths]
124>>q [quit after ENTER a couple of times]
125
12617. ./midiclock [in one shell]
127 ./mm [in another shell]
128[Goal is send clock messages to MIDI monitor program. This requires
129 either a hardware loopback (MIDI cable from OUT to IN on interface)
130 or a software loopback (macOS IAC bus or ALSA MIDI Through Port)]
131[For midiclock application:]
132 Type output device number: >>0 [pick a device with loopback]
133 Type ENTER to start MIDI CLOCK: >> [type ENTER]
134[For mm application:]
135 Type input device number: >>1 [pick device with loopback]
136 [Wait a few seconds]
137 >>s [to get Clock Count]
138 >>s [expect to get a higher Clock Count]
139[For midiclock application:]
140 >>c [turn off clocks]
141[For mm application:]
142 >>s [to get Clock Count]
143 >>s [expect to Clock Count stays the same]
144[For midiclock application:]
145 >>t [turn on time code, see Time Code Quarter Frame messages from mm]
146 >>q [to quit]
147[For mm application:]
148 >>q [to quit]
149
15018. ./midithru -i 6 -o 2 [use working input/output device numbers]
151[Play notes on input evice; notes are sent immediately and also with a
152 2 sec delay to the output device; program terminates in 60 seconds or
153 when you play B3 (B below Middle C)]
154>> [ENTER to exit]
155
15619. ./recvvirtual -h [in one shell, macOS and Linux only]
157 ./recvvirtual -m vvv [for mac, or -c vvv -p vvvport for linux]
158 ./testio [in another shell]
159[For testio application:]
160 Latency in ms: >>0
161 enter your choice... >>4 [test output]
162 Type output number: >>9 [select the "portmidi (output)" device]
163 [type ENTER to each prompt, see that recvvirtual "Got message 0"
164 through "Got message 9"]
165 >> [ENTER to quit]
166[For recvvirtual application:]
167 >> [ENTER to quit]
168
16920. ./sendvirtual -h [in one shell, macOS and Linux only]
170 ./sendvirtual -m vvv [for mac, or -c vvv -p vvvport for linux]
171 ./mm [in another shell]
172[For mm application:]
173 Type input device number: >>10 [select the "portmidi" device]
174[For sendvirtual application:]
175 Type ENTER to send messages: >> [type ENTER]
176 [see NoteOn and off messages received by mm for Key 60-64]
177 >> [ENTER to quit]
178[For mm application:]
179 >>q [and ENTER twice to quit]
180
18121. ./sysex [no latency]
182[This requires either a hardware loopback (MIDI cable from OUT to IN
183 on interface) or a software loopback (macOS IAC bus or ALSA MIDI
184 Through Port)]
185>>l [for loopback test]
186Type output device number: >>0 [pick output device to loopback]
187Latency in milliseconds: >>0
188Type input device number: >>0 [pick input device for loopback]
189[Program will send 100,000 bytes. After awhile, program will quit.
190 You can read the Cummulative bytes/sec value.]
191
19222. ./sysex [latency > 0]
193[This requires either a hardware loopback (MIDI cable from OUT to IN
194 on interface) or a software loopback (macOS IAC bus or ALSA MIDI
195 Through Port)]
196>>l [for loopback test]
197Type output device number: >>0 [pick output device to loopback]
198Latency in milliseconds: >>100
199Type input device number: >>0 [pick input device for loopback]
200[Program will send 100,000 bytes. After awhile, program will quit. You
201 can read the Cummulative bytes/sec value; it is affected by latency.]
202
20323. ./fast [no latency]
204 ./fastrcv [in another shell]
205[This is a speed check, especially for macOSX IAC bus connections,
206 which are known to drop messages if you send messages too fast.
207 fast and fastrcv must use a loopback to function.]
208[In fastrcv:]
209 Input device number: >>1 [pick a non-hardware device if possible]
210[In fast:]
211 Latency in ms: >>0
212 Rate in messages per second: >>10000
213 Duration in seconds: >>10
214 Output device number: >>0 [pick a non-hardware device if possible]
215 sending output...
216[see message counts and times; on Linux you should get about 10000
217 messages/s; on macOS you should get about 1800 messages/s; Windows
218 does not have software ports, so data rate might be limited by the
219 loopback device you use.]
220
221Check output of fastrcv: there should be no errors, just msg/sec.]
222
22324. ./fast [latency > 0]
224 ./fastrcv [in another shell]
225[This is a speed check, especially for macOSX IAC bus connections,
226 which are known to drop messages if you send messages too fast.
227 fast and fastrcv must use a loopback to function.]
228[In fastrcv:]
229 Input device number: >>1 [pick a non-hardware device if possible]
230[In fast:]
231 Latency in ms: >>30 [Note for ALSA, use latency * msgs/ms < 400]
232 Rate in messages per second: >>10000
233 Duration in seconds: >>10
234 Output device number: >>0 [pick a non-hardware device if possible]
235 sending output...
236[see message counts and times; on Linux you should get about 10000
237 messages/s; on macOS you should get about 1800 messages/s; Windows
238 does not have software ports, so data rate might be limited by the
239 loopback device you use.]
240
241Check output of fastrcv: there should be no errors, just msg/sec.]
242
24325. ./fast [virtual output port, latency = 0, macOS and Linux only]
244 ./fastrcv [in another shell]
245[Start fast first:]
246 Latency in ms: >>0
247 Rate in messages per second: >>10000
248 Duration in seconds: >>10
249 Output device number: >>9 [enter number listed for "Create virtual
250 port named 'fast' (output)"]
251 Pausing so you can connect a receiver to the newly created
252 "fast" port. Type ENTER to proceed:
253[In fastrcv:]
254 Input device number: >>3 [pick the device named "fast (input)"]
255[In fast:]
256 >> [type ENTER to start]
257[see message counts and times as above ]
258
259Check output of fastrcv: there should be no errors, just msg/sec.]
260
26126. ./fast [virtual output port, latency > 0, macOS and Linux only]
262 ./fastrcv [in another shell]
263[Start fast first:]
264 Latency in ms: >>30 [Note for ALSA, use latency * msgs/ms < 400]
265 Rate in messages per second: >>10000
266 Duration in seconds: >>10
267 Output device number: >>9 [enter number listed for "Create virtual
268 port named 'fast' (output)"]
269 Pausing so you can connect a receiver to the newly created
270 "fast" port. Type ENTER to proceed:
271[In fastrcv:]
272 Input device number: >>3 [pick the device named "fast (input)"]
273[In fast:]
274 >> [type ENTER to start]
275[see message counts and times as above ]
276
277Check output of fastrcv: there should be no errors, just msg/sec.]
278
27927. ./fast [latency = 0, macOS and Linux only]
280 ./fastrcv [virtual input port, in another shell]
281[In fastrcv:]
282 Input device number: >>8 [enter number listed for "Create virtual
283 port named 'fastrcv' (input)"]
284[In fast:]
285 Latency in ms: >>0
286 Rate in messages per second: >>10000
287 Duration in seconds: >>10
288 Output device number: >>7 [pick the device named "fastrcv (output)"]
289 sending output...
290[see message counts and times as above ]
291
292Check output of fastrcv: there should be no errors, just msg/sec.]
293
29428. ./fast [latency > 0, macOS and Linux only]
295 ./fastrcv [virtual input port, in another shell]
296[In fastrcv:]
297 Input device number: >>8 [enter number listed for "Create virtual
298 port named 'fastrcv' (input)"]
299[In fast:]
300 Latency in ms: >>30 [Note for ALSA, use latency * msgs/ms < 400]
301 Rate in messages per second: >>10000
302 Duration in seconds: >>10
303 Output device number: >>7 [pick the device named "fastrcv (output)"]
304 sending output...
305[see message counts and times as above ]
306
307Check output of fastrcv: there should be no errors, just msg/sec.]
308
30929. ./midithru -v -n [virtual input and output, macOS and Linux only]
310 ./fast [latency = 0]
311 ./fastrcv [in another shell]
312[Start midithru first, it will run for 60 seconds]
313[In fastrcv:]
314 Input device number: >>3 [pick the device named
315 port named "midithru (input)"]
316[In fast:]
317 Latency in ms: >>0
318 Rate in messages per second: >>10000
319 Duration in seconds: >>10
320 Output device number: >>8 [pick the device named "midithru (output)"]
321 sending output...
322[see message counts and times as above, on Mac, output from fast to
323 midithru AND output from midithru to fastrcv are rate limited, so
324 as in other tests, it will take more than 10s to receive all the
325 messages and the receiving message rate will be about 1800 messages/second]
326
32730. ./multivirtual [macOS and Linux only]
328 ./testio
329 ./testio
330[Start multivirtual first]
331[In first testio:]
332 Latency in ms: >>0
333 enter your choice... >>5 [test both]
334 Type input number: >>1 [pick portmidi1 (input)
335 Type output number: >>4 [pick portmidi1 (output)
336[In second testio:]
337 Latency in ms: >>10
338 enter your choice... >>5 [test both]
339 Type input number: >>2 [pick portmidi2 (input)
340 Type output number: >>5 [pick portmidi2 (output)
341[In multivirtual:]
342 Type ENTER to send messages: >> [type ENTER to start]
343[see that each testio gets 11 messages (0 to 10) at reasonable times
344 (e.g. 2077 to 7580, and the "@" times (real times) should match the
345 timestamps). multivirtual should also report reasonable times and
346 line near the end of output should be "Got 11 messages from
347 portmidi1 and 11 from portmidi2; expected 11."]
348
34931. ./multivirtual [macOS and Linux only]
350 ./multivirtual
351[Second instance should report "PortMidi call failed...
352 PortMidi: Cannot create virtual device: name is taken"]
353
35432. pmlist
355 ./pmlist [check the output]
356 [plug in or remove a device]
357 >> [type RETURN]
358 [check for changes in device list]
359 >>q
360
361
362
363