We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2024-07-09
Package Version: 2.0.0.8
mikroSDK Library: 2.0.0.0
Category: USB
Downloaded: 98 times
Not followed.
License: MIT license
The application demonstrates USB MIDI functionality.
Do you want to subscribe in order to receive notifications regarding "USB-MIDI Demo" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "USB-MIDI Demo" changes.
Do you want to report abuse regarding "USB-MIDI Demo".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
5490_usb_midi_demo.zip [11.56KB] | GCC for ARM Clang for ARM GCC for RISC-V Clang for RISC-V XC32 |
|
Code developed on UNI-DS v8 and it can be used on other MIKROE development boards as well. Code was developed with purpose of easier understanding functions for USB Musical Instrument Digital Interface (MIDI).
Depending on the numbers in the note_sequence array, different melodies will play. By default there is a "Happy Birthday" melody playing.
This code was developed on UNI-DS v8 board. For this hardware to work according to program, it is necessary to:
All functions used in main project are located in MikroSDK.USB.Tiny and MikroSDK.USB.HW.
Functions in main file:
bool tusb_init(void)
uint32_t tud_midi_available(void)
bool tud_midi_packet_read(uint8_t packet[4])
uint32_t tud_midi_stream_write(uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize)
We provide demo code for testing all MIDI functions contained in libraries MikroSDK.USB.Tiny and MikroSDK.USB.HW, available in mikroSDK 2.0.
In order to make this example work, proper clock setup is needed. To create a setup with the adequate clock scheme, follow these steps: