MATLAB Answers

How to setup a MIDI device for a software instrument?

5 ビュー (過去 30 日間)
BreezyWest
BreezyWest 2018 年 11 月 6 日
回答済み: Charlie DeVane 2019 年 10 月 9 日
How would I go about interfacing my digital piano with Matlab, such that I can play audio files from my computer in real-time?
Many implementations available only use a computer keyboard for input and thus don't have the velocity or sustain (via pedal) associated with the use of software instruments. I have access to the Audio System Toolbox, but am struggling through the documentation to see how such can be implemented. Additionally, what concerns are there about latency with Matlab's MIDI interface?

  1 件のコメント

Frederic Piat
Frederic Piat 2019 年 6 月 9 日
This is what I believe with the little experience I have but you'd need to check on my answer:
  • when playing files, I do not need Matlab and did not try from within Matlab, but when I play a midi file from windows, the standard windows (or any other) player plays it and if I plug my keyboard on the USB port (cord bought from Amazon for 5€, works great) the sound is redirected to my keyboard without anything else to do. I believe that will be the same if playing the midifile (but probably not just any sound file) with a Matlab command (unless Matlab translates it into a soundwave or something, different from the midi standard)
  • to do MIDI in real-time (I know that's not what you're asking but you may still find some answers to related questions):
https://fr.mathworks.com/help/audio/musical-instrument-digital-interface-midi.html?s_tid=CRUX_lftnav
Musical Instrument Digital Interface (MIDI)
Create, send, and receive MIDI messages
Audio Toolbox™ enables you to create, send, and receive MIDI messages. You can interface with MIDI Control Surfaces and MIDI Devices in real time.
  • Regarding latency, I don't know

サインインしてコメントする。

回答 (1 件)

Charlie DeVane
Charlie DeVane 2019 年 10 月 9 日
Sorry, the Audio Toolbox does not have any builtin capability to read or write MIDI files.
hth,
Charlie

  0 件のコメント

サインインしてコメントする。

製品


リリース

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by