Differences
This shows you the differences between two versions of the page.
| test-and-measurement:analog-discovery-pro-3x50:midi [2022/04/04 11:02] – [MIDI] Álmos Veres-Vitályos | test-and-measurement:analog-discovery-pro-3x50:midi [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 347: | Line 347: | ||
| ---- | ---- | ||
| - | ==== Program Body ==== | + | ==== MIDI Controller Script |
| - | [[content]] | + | <WRAP group> |
| + | In your wrapper script, define the connections between the devices and other parameters like the frequency and amplitude/ | ||
| + | |||
| + | Start the WaveForms instruments needed in your controller: start the power supplies, generate the necessary analog and digital signals, set static DIO pins to the desired state and initialize the oscilloscope and the logic analyzer. (Don't forget to close these instruments and disconnect from the ADP at the end of your script! Also stop raveloxmidi when the script is terminated.) | ||
| + | |||
| + | The rest of your code should run in an infinite loop, broken only by pressing Ctrl+C. In each iteration set the address pins of the multiplexers in the driver to 0, 1, 2, or 3 (implement a 2 bit counter here), then read the current state of the multiplexer outputs. Decode these outputs according to the current address and compare the results to the previous ones. If there is no change in the state of a user interface element, no new command should be sent, but if there is a change, send the respective MIDI command with raveloxmidi. | ||
| + | |||
| + | You might also want to set some visual effects using the RGB LEDs. Use your creativity to modify the colors according to the received data. | ||
| + | </ | ||
| ---- | ---- | ||
| Line 359: | Line 367: | ||
| < | < | ||
| </ | </ | ||
| - | [[image]] | + | {{ : |
| </ | </ | ||

