|
Canorus
0.7
|
Class used for transposing a set of notes for the given interval. More...
#include <transpose.h>
Public Member Functions | |
| CATranspose () | |
| CATranspose (CASheet *sheet) | |
| CATranspose (QList< CAContext * > contexts) | |
| CATranspose (QList< CAMusElement * > selection) | |
| ~CATranspose () | |
| void | transposeBySemitones (int semitones) |
| void | transposeByInterval (CAInterval) |
| void | transposeByKeySig (CADiatonicKey from, CADiatonicKey to, int direction) |
| void | addSheet (CASheet *s) |
| void | addContext (CAContext *context) |
| void | addMusElement (CAMusElement *musElt) |
Private Attributes | |
| QSet< CAMusElement * > | _elements |
Class used for transposing a set of notes for the given interval.
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 COPYING for details.
This is a control class used for making a transposition of a set of music elements, contexts or even the whole score sheet.
Use: 1) Create a CATranspose class 2) Pass the music elements you want to transpose in the constructor or by calling addMusElement() or addContext(). 3) Transpose the elements by calling transposeByKeySig(), transposeByInterval() or transposeBySemitones()
| CATranspose::CATranspose | ( | ) |
| CATranspose::CATranspose | ( | CASheet * | sheet | ) |
| CATranspose::CATranspose | ( | QList< CAContext * > | contexts | ) |
| CATranspose::CATranspose | ( | QList< CAMusElement * > | selection | ) |
References _elements.
| CATranspose::~CATranspose | ( | ) |
| void CATranspose::addContext | ( | CAContext * | context | ) |
References _elements, addMusElement(), CAContext::contextType(), CAContext::FunctionMarkContext, CAContext::Staff, CAStaff::voiceCount(), and CAStaff::voiceList().
Referenced by addSheet(), CATranspose(), and CATransposeView::on_uiApply_clicked().


|
inline |
References _elements.
Referenced by addContext(), and CATransposeView::on_uiApply_clicked().

| void CATranspose::addSheet | ( | CASheet * | s | ) |
References addContext(), CASheet::contextCount(), and CASheet::contextList().
Referenced by CATransposeView::on_uiApply_clicked().


| void CATranspose::transposeByInterval | ( | CAInterval | interval | ) |
Transposes the music elements by the given interval. If the interval quantity is negative, elements are transposed down.
References _elements, CAMusElement::FunctionMark, CAMusElement::KeySignature, CAMusElement::musElementType(), and CAMusElement::Note.
Referenced by CATransposeView::on_uiApply_clicked(), transposeByKeySig(), and transposeBySemitones().


| void CATranspose::transposeByKeySig | ( | CADiatonicKey | from, |
| CADiatonicKey | to, | ||
| int | direction | ||
| ) |
Transposes the music elements from the given key signature from to the key signature to in the given direction. Direction can be 1 for up or -1 for down.
References CADiatonicKey::diatonicPitch(), CADiatonicPitch::noteName(), CAInterval::setQuantity(), and transposeByInterval().
Referenced by CATransposeView::on_uiApply_clicked().


| void CATranspose::transposeBySemitones | ( | int | semitones | ) |
Transposes the music elements by the given number of semitones. Number can be negative for the direction down.
References CAInterval::fromSemitones(), and transposeByInterval().
Referenced by CATransposeView::on_uiApply_clicked().


|
private |
Referenced by addContext(), addMusElement(), CATranspose(), and transposeByInterval().
1.8.3