Differences

This shows you the differences between two versions of the page.

Link to this comparison view

test-and-measurement:analog-discovery-pro-3x50:midi [2022/04/04 11:04] – [Program Body] Álmos Veres-Vitályostest-and-measurement:analog-discovery-pro-3x50:midi [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 349: Line 349:
 ==== MIDI Controller Script ==== ==== MIDI Controller Script ====
 <WRAP group> <WRAP group>
 +In your wrapper script, define the connections between the devices and other parameters like the frequency and amplitude/offset of the output signals, then import your HAL, the previously defined MIDI commands, functions and constants and the FPGA programming function. Use these modules to upload the bit file to the FPGA, start raveloxmidi and initialize the WaveForms SDK.
  
 +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.
 </WRAP> </WRAP>
 ---- ----
Line 361: Line 367:
 <code>sudo python3 midi_controller.py</code> <code>sudo python3 midi_controller.py</code>
 </WRAP><WRAP half column> </WRAP><WRAP half column>
-[[image]]+{{ :test-and-measurement:analog-discovery-pro-3x50:sftp-winscp.png?600 |}}
 </WRAP></WRAP> </WRAP></WRAP>