Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Slots | Private Attributes
CAMidiRecorder Class Reference

Class for live recording of the Midi events. More...

#include <midirecorder.h>

Inheritance diagram for CAMidiRecorder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CAMidiRecorder (CAResource *r, CAMidiDevice *d)
virtual ~CAMidiRecorder ()
void startRecording (int time=0)
void pauseRecording ()
void stopRecording ()
const unsigned int & curTime () const

Private Slots

void timerTimeout ()
void onMidiInEvent (QVector< unsigned char > messages)

Private Attributes

CAResource_resource
CAMidiExport_midiExport
QTimer * _timer
unsigned int _curTime
bool _paused

Detailed Description

Class for live recording of the Midi events.

Copyright (c) 2008, 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.

    This class is used when a composer has a musical idea in his fingers and
    wants to record it.

    1) Create a new output resource (eg. midi file in tmp directory)
    2) Create this class and pass this resource
    2) Call record(). Class will run in a separated thread and start recording
       all the midi events into the given resource file.
    3) Call stop() when recording is done. Class will write the midi data and
       close the stream.

Constructor & Destructor Documentation

References _paused, and onMidiInEvent().

Here is the call graph for this function:


Member Function Documentation

const unsigned int& CAMidiRecorder::curTime ( ) const [inline]

References _curTime.

Referenced by CAMidiRecorderView::onTimerTimeout().

Here is the caller graph for this function:

void CAMidiRecorder::onMidiInEvent ( QVector< unsigned char >  messages) [private, slot]

References _curTime, _midiExport, _paused, and CAMidiExport::send().

Referenced by CAMidiRecorder().

Here is the call graph for this function:

Here is the caller graph for this function:

References _paused.

Referenced by CAMidiRecorderView::on_uiPause_clicked().

Here is the caller graph for this function:

void CAMidiRecorder::startRecording ( int  time = 0)

References _curTime, _midiExport, _paused, _resource, _timer, CAExport::setStreamToFile(), timerTimeout(), and CAResource::url().

Referenced by CAMidiRecorderView::on_uiRecord_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

References _midiExport, _timer, and CAMidiExport::writeFile().

Referenced by CAMidiRecorderView::on_uiStop_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAMidiRecorder::timerTimeout ( ) [private, slot]

References _curTime, and _paused.

Referenced by startRecording().

Here is the caller graph for this function:


Member Data Documentation

unsigned int CAMidiRecorder::_curTime [private]
bool CAMidiRecorder::_paused [private]

Referenced by startRecording().

QTimer* CAMidiRecorder::_timer [private]

Referenced by startRecording(), and stopRecording().


The documentation for this class was generated from the following files: