|
Canorus
0.7
|
Midi file export filter This class is used to export the document or parts of the document to a midi file. The most common use is to simply call one of the constructors. More...
#include <midiexport.h>

Public Member Functions | |
| CAMidiExport (QTextStream *out=0) | |
| QMap< int, QString > | getOutputPorts () |
| QMap< int, QString > | getInputPorts () |
| bool | openOutputPort (int port) |
| bool | openInputPort (int port) |
| void | closeOutputPort () |
| void | closeInputPort () |
| void | send (QVector< unsigned char > message, int time) |
| void | writeFile () |
Public Member Functions inherited from CAExport | |
| CAExport (QTextStream *stream=0) | |
| virtual | ~CAExport () |
| virtual const QString | readableStatus () |
| void | exportDocument (CADocument *, bool bStartThread=true) |
| void | exportSheet (CASheet *) |
| void | exportStaff (CAStaff *) |
| void | exportVoice (CAVoice *) |
| void | exportLyricsContext (CALyricsContext *) |
| void | exportFunctionMarkContext (CAFunctionMarkContext *) |
| CADocument * | exportedDocument () |
| CASheet * | exportedSheet () |
| CAStaff * | exportedStaff () |
| CAVoice * | exportedVoice () |
| CALyricsContext * | exportedLyricsContext () |
| CAFunctionMarkContext * | exportedFunctionMarkContext () |
| virtual void | setStreamToFile (const QString filename) |
| bool | wait (unsigned long time=ULONG_MAX) |
Public Member Functions inherited from CAFile | |
| CAFile () | |
| virtual | ~CAFile () |
| const int | status () |
| const int | progress () |
| void | setStreamFromFile (const QString filename) |
| void | setStreamToFile (const QString filename) |
| void | setStreamFromDevice (QIODevice *device) |
| void | setStreamToDevice (QIODevice *device) |
Public Member Functions inherited from CAMidiDevice | |
| CAMidiDevice () | |
| virtual | ~CAMidiDevice () |
| CAMidiDeviceType | midiDeviceType () |
| bool | isRealTime () |
Private Member Functions | |
| QByteArray | writeTime (int time) |
| void | exportDocumentImpl (CADocument *doc) |
| void | printQByteArray (QByteArray x) |
| QByteArray | variableLengthValue (int value) |
| QByteArray | word16 (int x) |
| QByteArray | textEvent (int time, QString s) |
| QByteArray | trackEnd (void) |
| QByteArray | timeSignature (void) |
| QByteArray | keySignature (void) |
| void | setChunkLength (QByteArray *x) |
| void | setCurVoice (CAVoice *voice) |
| void | setCurSheet (CASheet *sheet) |
Private Attributes | |
| int | midiTrackCount |
| QByteArray | trackChunk |
| int | trackTime |
| QVector< QByteArray > | trackChunks |
| QVector< int > | trackTimes |
| CAVoice * | _curVoice |
| CASheet * | _curSheet |
Midi file export filter This class is used to export the document or parts of the document to a midi file. The most common use is to simply call one of the constructors.
Copyright (c) 2007, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
textStream is usually the file stream.
| CAMidiExport::CAMidiExport | ( | QTextStream * | out = 0 | ) |
Constructor for midi file export. Called when choosing the mid/midi file extension in the export dialog. Exports all voices to the given text stream.
References CAMidiDevice::_midiDeviceType, CAMidiDevice::MidiExportDevice, CAMidiDevice::setRealTime(), and trackTime.

|
inlinevirtual |
Implements CAMidiDevice.
|
inlinevirtual |
Implements CAMidiDevice.
|
privatevirtual |
Exports the current document to Lilypond syntax as a complete .ly file.
Reimplemented from CAExport.
References CASheet::contextAt(), CASheet::contextCount(), CAContext::contextType(), CAPlayback::run(), setCurSheet(), setCurVoice(), CADocument::sheetAt(), CADocument::sheetCount(), CAContext::Staff, trackChunk, CAStaff::voiceAt(), CAStaff::voiceCount(), and writeFile().

|
inlinevirtual |
Implements CAMidiDevice.
|
inlinevirtual |
Implements CAMidiDevice.
|
private |
References META_KEYSIG, MIDI_CTL_EVENT, variableLengthValue(), and writeTime().
Referenced by writeFile().


|
inlinevirtual |
Implements CAMidiDevice.
|
inlinevirtual |
Implements CAMidiDevice.
|
private |
|
virtual |
Implements CAMidiDevice.
References trackChunk, trackTime, and writeTime().
Referenced by CAMidiRecorder::onMidiInEvent().


|
private |
|
inlineprivate |
References _curSheet.
Referenced by exportDocumentImpl().

|
inlineprivate |
References _curVoice.
Referenced by exportDocumentImpl().

|
private |
References META_TEXT, MIDI_CTL_EVENT, variableLengthValue(), and writeTime().
Referenced by writeFile().


|
private |
References META_TIMESIG, MIDI_CTL_EVENT, variableLengthValue(), and writeTime().
Referenced by writeFile().


|
private |
References META_TRACK_END, MIDI_CTL_EVENT, and writeTime().
Referenced by writeFile().


|
private |
Referenced by keySignature(), textEvent(), and timeSignature().

|
private |
| void CAMidiExport::writeFile | ( | ) |
References keySignature(), CAExport::out(), setChunkLength(), CAFile::stream(), textEvent(), timeSignature(), trackChunk, trackEnd(), and word16().
Referenced by exportDocumentImpl(), and CAMidiRecorder::stopRecording().


|
private |
Referenced by keySignature(), send(), textEvent(), timeSignature(), and trackEnd().

|
private |
Referenced by setCurSheet().
|
private |
Referenced by setCurVoice().
|
private |
|
private |
Referenced by exportDocumentImpl(), send(), and writeFile().
|
private |
|
private |
Referenced by CAMidiExport(), and send().
|
private |
1.8.3