Canorus  0.0
Public Member Functions | Private Slots | Private Attributes | List of all members
CAMidiRecorder Class Reference

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

#include <midirecorder.h>

Inheritance diagram for CAMidiRecorder:
Inheritance graph
[legend]

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

◆ CAMidiRecorder()

CAMidiRecorder::CAMidiRecorder ( CAResource r,
CAMidiDevice d 
)

References _paused, and onMidiInEvent().

Here is the call graph for this function:

◆ ~CAMidiRecorder()

CAMidiRecorder::~CAMidiRecorder ( )
virtual

Member Function Documentation

◆ curTime()

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

References _curTime.

Referenced by CAMidiRecorderView::onTimerTimeout().

Here is the caller graph for this function:

◆ onMidiInEvent

void CAMidiRecorder::onMidiInEvent ( QVector< unsigned char >  messages)
privateslot

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:

◆ pauseRecording()

void CAMidiRecorder::pauseRecording ( )

References _paused.

Referenced by CAMidiRecorderView::on_uiPause_clicked().

Here is the caller graph for this function:

◆ startRecording()

void CAMidiRecorder::startRecording ( int  time = 0)

◆ stopRecording()

void CAMidiRecorder::stopRecording ( )

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:

◆ timerTimeout

void CAMidiRecorder::timerTimeout ( )
privateslot

References _curTime, and _paused.

Referenced by startRecording().

Here is the caller graph for this function:

Member Data Documentation

◆ _curTime

unsigned int CAMidiRecorder::_curTime
private

◆ _midiExport

CAMidiExport* CAMidiRecorder::_midiExport
private

◆ _paused

bool CAMidiRecorder::_paused
private

◆ _resource

CAResource* CAMidiRecorder::_resource
private

Referenced by startRecording().

◆ _timer

QTimer* CAMidiRecorder::_timer
private

Referenced by startRecording(), and stopRecording().


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