File: /home/padewitte/projets/webcomponents/myscript-js/src/output/music/musicNote.js
'use strict';
(function (scope) {
/**
* Music note
*
* @class MusicNote
* @extends MusicElement
* @param {Object} [obj]
* @constructor
*/
function MusicNote(obj) {
scope.MusicElement.call(this, obj);
this.decorations = [];
this.beamTypes = [];
this.ledgerLines = [];
this.startSlurs = [];
this.stopSlurs = [];
if (obj) {
this.accidental = new scope.MusicAccidental(obj.accidental);
this.dots = new scope.MusicDots(obj.dots);
this.duration = obj.duration;
this.head = new scope.MusicHead(obj.head);
this.line = obj.line;
this.pitch = new scope.MusicPitchData(obj.pitch);
this.startBeam = new scope.MusicBeam(obj.startBeam);
this.stopBeam = new scope.MusicBeam(obj.stopBeam);
this.stem = new scope.MusicStem(obj.stem);
this.startTie = new scope.MusicTie(obj.startTie);
this.stopTie = new scope.MusicTie(obj.stopTie);
this.startTuplet = new scope.MusicTuplet(obj.startTuplet);
this.stopTuplet = new scope.MusicTuplet(obj.stopTuplet);
this.timeModification = new scope.MusicTimeModificationData(obj.timeModification);
this.type = obj.type;
for (var i in obj.decorations) {
this.decorations.push(new scope.MusicDecoration(obj.decorations[i]));
}
for (var j in obj.beamTypes) {
this.beamTypes.push(obj.beamTypes[j]);
}
for (var k in obj.ledgerLines) {
this.ledgerLines.push(new scope.MusicLedgerLine(obj.ledgerLines[k]));
}
for (var l in obj.startSlurs) {
this.startSlurs.push(new scope.MusicSlur(obj.startSlurs[l]));
}
for (var m in obj.stopSlurs) {
this.stopSlurs.push(new scope.MusicSlur(obj.stopSlurs[m]));
}
}
}
/**
* Inheritance property
*/
MusicNote.prototype = new scope.MusicElement();
/**
* Constructor property
*/
MusicNote.prototype.constructor = MusicNote;
/**
* Get accidental
*
* @method getAccidental
* @returns {MusicAccidental}
*/
MusicNote.prototype.getAccidental = function () {
return this.accidental;
};
/**
* Get dots
*
* @method getDots
* @returns {MusicDots}
*/
MusicNote.prototype.getDots = function () {
return this.dots;
};
/**
* Get duration
*
* @method getDuration
* @returns {Number}
*/
MusicNote.prototype.getDuration = function () {
return this.duration;
};
/**
* Get head
*
* @method getHead
* @returns {MusicHead}
*/
MusicNote.prototype.getHead = function () {
return this.head;
};
/**
* Get line
*
* @method getLine
* @returns {Number}
*/
MusicNote.prototype.getLine = function () {
return this.line;
};
/**
* Get pitch
*
* @method getPitch
* @returns {MusicPitchData}
*/
MusicNote.prototype.getPitch = function () {
return this.pitch;
};
/**
* Get start beam
*
* @method getStartBeam
* @returns {MusicBeam}
*/
MusicNote.prototype.getStartBeam = function () {
return this.startBeam;
};
/**
* Get stop beam
*
* @method getStopBeam
* @returns {MusicBeam}
*/
MusicNote.prototype.getStopBeam = function () {
return this.stopBeam;
};
/**
* Get stem
*
* @method getStem
* @returns {MusicStem}
*/
MusicNote.prototype.getStem = function () {
return this.stem;
};
/**
* Get start tie
*
* @method getStartTie
* @returns {MusicTie}
*/
MusicNote.prototype.getStartTie = function () {
return this.startTie;
};
/**
* Get stop tie
*
* @method getStopTie
* @returns {MusicTie}
*/
MusicNote.prototype.getStopTie = function () {
return this.stopTie;
};
/**
* Get start tuplet
*
* @method getStartTuplet
* @returns {MusicTuplet}
*/
MusicNote.prototype.getStartTuplet = function () {
return this.startTuplet;
};
/**
* Get stop tuplet
*
* @method getStopTuplet
* @returns {MusicTuplet}
*/
MusicNote.prototype.getStopTuplet = function () {
return this.stopTuplet;
};
/**
* Get time modification
*
* @method getTimeModification
* @returns {MusicTimeModificationData}
*/
MusicNote.prototype.getTimeModification = function () {
return this.timeModification;
};
/**
* Get type
*
* @method getType
* @returns {String}
*/
MusicNote.prototype.getType = function () {
return this.type;
};
/**
* Get decorations
*
* @method getDecorations
* @returns {MusicDecoration[]}
*/
MusicNote.prototype.getDecorations = function () {
return this.decorations;
};
/**
* Get beam types
*
* @method getBeamTypes
* @returns {Array}
*/
MusicNote.prototype.getBeamTypes = function () {
return this.beamTypes;
};
/**
* Get ledger lines
*
* @method getLedgerLines
* @returns {MusicLedgerLine[]}
*/
MusicNote.prototype.getLedgerLines = function () {
return this.ledgerLines;
};
/**
* Get start slurs
*
* @method getStartSlurs
* @returns {MusicSlur[]}
*/
MusicNote.prototype.getStartSlurs = function () {
return this.startSlurs;
};
/**
* Get stop slurs
*
* @method getStopSlurs
* @returns {MusicSlur[]}
*/
MusicNote.prototype.getStopSlurs = function () {
return this.stopSlurs;
};
// Export
scope.MusicNote = MusicNote;
})(MyScript);