MidiFileSynthSource Class Reference
[Input/Output]
Reads a MIDI file and synthesizes audio (needs MATLAB and the MIDI Toolbox).
More...
#include <MidiFileSynthSource.h>
Inherits Marsyas::MarSystem.
Detailed Description
Reads a MIDI file and synthesizes audio (needs MATLAB and the MIDI Toolbox).
MidiFileSynthSource makes use of the MIDI Toolbox for MATLAB (see http://www.jyu.fi/hum/laitokset/musiikki/en/research/coe/materials/miditoolbox/ ) using the MATLABengine. It takes a midi file and synthesizes the corresponding audio. Both the mixed audio and each MIDI channel audio is output (the mixed audio is the first observation, while the following observations have the audio of each MIDI track, individually (this may be usefull for ground truth purposes). For each output audio frame is also returned the number of playing MIDI notes (computed from the midi data).
Controls:
- mrs_string/filename [w] : name of the MIDI file to read and synthesize
- mrs_natural/numActiveNotes [r] : number of playing notes at the current audio frame sent to the output.
- mrs_natural/nChannels [r] : number of MIDI tracks in the MIDI file (also corresponds to the number of individual audio tracks output togheter with the mixed audio)
- mrs_natural/pos [r]: current playing position (in samples)
- mrs_bool/hasData [r] : when false, signals the end of the MIDI file
- mrs_real/start [w] : sets the start of the segment of the MIDI file to be synthesized (in seconds).
- mrs_real/end [w] : sets the end of the segment of the MIDI file to be synthesized (in seconds).
- mrs_natural/winSize [w]: when using overlapping analysis windows (which usually make use of a ShiftInput MarSystem somewhere further down in the processing network) this control allows to specify the final analysis window size (since inSamples will correspond to the hop size). This is important to get a correct estimation of the number of active notes in each analysis window (although only outputting the corresponding hopsize number of audio samples).
- mrs_bool/sigNewTextWin [w]: sets mode of operation: if true, this MarSystem will use MIDI note onsets to signal texture windows, setting the newTextWin control to true. If set to false, it will accept signals for new texture windows from an outside source (e.g. an onset detector, etc).
- mrs_bool/newTextWin [rw]: depending on the specified mode (see above), this control will signal a new texture window.
Definition at line 71 of file MidiFileSynthSource.h.
The documentation for this class was generated from the following files: