diff options
Diffstat (limited to 'portmidi/pm_test/README.txt')
| -rw-r--r-- | portmidi/pm_test/README.txt | 363 |
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 @@ | |||
| 1 | README.txt - for pm_test directory | ||
| 2 | |||
| 3 | These are all test programs for PortMidi | ||
| 4 | |||
| 5 | Because device numbers depend on the system, there is no automated | ||
| 6 | script to run all tests on PortMidi. | ||
| 7 | |||
| 8 | To run the full set of tests manually: | ||
| 9 | |||
| 10 | Note: everything is run from the ../Debug or ../Release directory. | ||
| 11 | Actual or example input is marked with >>, e.g., >>0 means type 0<ENTER> | ||
| 12 | Comments are shown in square brackets [like this] | ||
| 13 | |||
| 14 | 1. ./qtest -- output should show a bunch of tests and no error message. | ||
| 15 | |||
| 16 | 2. ./testio [test input] | ||
| 17 | Latency in ms: >>0 | ||
| 18 | enter your choice... >>1 | ||
| 19 | Type input number: >>6 [pick a working input device] | ||
| 20 | [play some notes, look for note-on (0x90) with pitch and velocity data] | ||
| 21 | |||
| 22 | 3. ./testio [test input (fail w/assert)] | ||
| 23 | Latency in ms: >>0 | ||
| 24 | enter your choice... >>2 | ||
| 25 | Type 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 | ||
| 28 | the assert() macro is disabled.)] | ||
| 29 | |||
| 30 | 4. ./testio [test input (fail w/NULL assign)] | ||
| 31 | Latency in ms: >>0 | ||
| 32 | enter your choice... >>3 | ||
| 33 | Type 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 | ||
| 36 | try testing with a Debug build.)] | ||
| 37 | |||
| 38 | 5. ./testio [test output, no latency] | ||
| 39 | Latency in ms: >>0 | ||
| 40 | enter your choice... >>4 | ||
| 41 | Type 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 | |||
| 45 | 6. ./testio [test output, latency > 0] | ||
| 46 | Latency in ms: >>300 | ||
| 47 | enter your choice... >>4 | ||
| 48 | Type 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 | |||
| 53 | 7. ./testio [for both, no latency] | ||
| 54 | Latency in ms: >>0 | ||
| 55 | enter your choice... >>5 | ||
| 56 | Type input number: >>6 [pick a working input device] | ||
| 57 | Type output number: >>2 [pick a working output device] | ||
| 58 | [play notes on input, hear them on output] | ||
| 59 | |||
| 60 | 8. ./testio [for both, latency > 0] | ||
| 61 | Latency in ms: >>300 | ||
| 62 | enter your choice... >>5 | ||
| 63 | Type input number: >>6 [pick a working input device] | ||
| 64 | Type output number: >>2 [pick a working output device] | ||
| 65 | [play notes on input, hear them on output (delay of 300ms is apparent)] | ||
| 66 | |||
| 67 | 9. ./testio [stream test] | ||
| 68 | Latency in ms: >>0 [does not matter] | ||
| 69 | enter your choice... >>6 | ||
| 70 | Type 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] | ||
| 73 | ready to close and terminate... (type ENTER) :>> [type ENTER (twice)] | ||
| 74 | |||
| 75 | 10. ./testio [isochronous out] | ||
| 76 | Latency in ms: >>300 | ||
| 77 | enter your choice... >>7 | ||
| 78 | Type output number: >>2 [pick a working output device] | ||
| 79 | ready to send program 1 change... (type ENTER): >> [type ENTER] | ||
| 80 | [hear 80 notes, exactly 4 notes per second, no jitter] | ||
| 81 | |||
| 82 | 11. ./latency [no MIDI, histogram] | ||
| 83 | Choose 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 | |||
| 89 | 12. ./latency [MIDI input, histogram] | ||
| 90 | Choose timer period (in ms, >= 1): >>1 | ||
| 91 | ? >>2 [MIDI input option] | ||
| 92 | Midi 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 | |||
| 97 | 13. ./latency [MIDI output, histogram] | ||
| 98 | Choose timer period (in ms, >= 1): >>1 | ||
| 99 | ? >>3 [MIDI output option] | ||
| 100 | Midi output device number: >>2 [pick a working output device] | ||
| 101 | Midi 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 | |||
| 106 | 14. ./latency [MIDI input and output, histogram] | ||
| 107 | Choose timer period (in ms, >= 1): >>1 | ||
| 108 | ? >>4 [MIDI input and output option] | ||
| 109 | Midi input device number: >>6 [pick a working input device] | ||
| 110 | Midi output device number: >>2 [pick a working output device] | ||
| 111 | Midi 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 | |||
| 116 | 15. ./mm [test with device input] | ||
| 117 | Type 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 | |||
| 121 | 16. ./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 | |||
| 126 | 17. ./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 | |||
| 150 | 18. ./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 | |||
| 156 | 19. ./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 | |||
| 169 | 20. ./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 | |||
| 181 | 21. ./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] | ||
| 186 | Type output device number: >>0 [pick output device to loopback] | ||
| 187 | Latency in milliseconds: >>0 | ||
| 188 | Type 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 | |||
| 192 | 22. ./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] | ||
| 197 | Type output device number: >>0 [pick output device to loopback] | ||
| 198 | Latency in milliseconds: >>100 | ||
| 199 | Type 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 | |||
| 203 | 23. ./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 | |||
| 221 | Check output of fastrcv: there should be no errors, just msg/sec.] | ||
| 222 | |||
| 223 | 24. ./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 | |||
| 241 | Check output of fastrcv: there should be no errors, just msg/sec.] | ||
| 242 | |||
| 243 | 25. ./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 | |||
| 259 | Check output of fastrcv: there should be no errors, just msg/sec.] | ||
| 260 | |||
| 261 | 26. ./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 | |||
| 277 | Check output of fastrcv: there should be no errors, just msg/sec.] | ||
| 278 | |||
| 279 | 27. ./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 | |||
| 292 | Check output of fastrcv: there should be no errors, just msg/sec.] | ||
| 293 | |||
| 294 | 28. ./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 | |||
| 307 | Check output of fastrcv: there should be no errors, just msg/sec.] | ||
| 308 | |||
| 309 | 29. ./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 | |||
| 327 | 30. ./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 | |||
| 349 | 31. ./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 | |||
| 354 | 32. 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 | |||
