void PropertyValueProxy::commit() {
        setLyricPhrase(isDefault[&lyricPhrase] ? "" : lyricPhrase);
        setLyricPhoneticSymbol(isDefault[&lyricPhoneticSymbol] ? "" : lyricPhoneticSymbol);
        setLyricConsonantAdjustment(
            isDefault[&lyricConsonantAdjustment] ? "" : lyricConsonantAdjustment);
        setLyricProtect(isDefault[&lyricProtect] ? 0 : lyricProtect);

        setNoteLength(isDefault[&noteLength] ? "" : StringUtil::toString(noteLength));
        setNoteNumber(isDefault[&noteNumber] ? "" : StringUtil::toString(noteNumber));

        setNotelocationClock(
            isDefault[&notelocationClock] ? "" : StringUtil::toString(notelocationClock));
        setNotelocationMeasure(
            isDefault[&notelocationMeasure] ? "" : StringUtil::toString(notelocationMeasure));
        setNotelocationBeat(
            isDefault[&notelocationBeat] ? "" : StringUtil::toString(notelocationBeat));
        setNotelocationTick(
            isDefault[&notelocationTick] ? "" : StringUtil::toString(notelocationTick));

        setVibratoType(isDefault[&vibratoType] ? 0 : vibratoType);
        setVibratoLength(isDefault[&vibratoLength] ? "" : StringUtil::toString(vibratoLength));
    }
Exemple #2
0
PianoRoll::PianoRoll(AudioProcessor* _plugin, AudioProcessorEditor* _owner, Timeline* _timeline)
	: sequence(0),
	hoveringNoteIndex(-1),
	hoveringNote(0),
	timebase(960.0),
	numEvents(0),
	snapToGrid(true),
	defaultChannel(0),
	playTime(0.0),
	timeSigN(0),
	timeSigD(0),
	beatSize(0),
	barSize(0),
	gridSize(0),
	timeline(0),
	draggingNoteTransposition(0),
	draggingNoteTimeDelta(0)

{
	plugin = _plugin;
	owner = _owner;
	timeline = _timeline;
	blankLength=timebase*16.0;
	pixelsPerPpq = (float)(800.0/blankLength);
	setNoteLength(4.f);
	setTimeSig(4,4);
	addAndMakeVisible(bg = new PianoRollBackground());
	bg->setInterceptsMouseClicks(false,false);
	addAndMakeVisible(noteLayer = new PianoRollNotes());
	noteLayer->setInterceptsMouseClicks(false,false);
	addAndMakeVisible(playline = new Playbar(this));
	playline->setInterceptsMouseClicks(false,false);
	setSize(800,800);
	lasso.setBounds(0,0,0,0);
	wasResizing = false;
}
/**
 * Sets the lenth of the note to play to a full.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::setFullNote() {
    setNoteLength(6);
}
/**
 * Sets the lenth of the note to play to a half.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::setHalfNote() {
    setNoteLength(5);
}
/**
 * Sets the lenth of the note to play to a quarter.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::setQuarterNote() {
    setNoteLength(4);
}
/**
 * Sets the lenth of the note to play to a 8th.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::set8thNote() {
    setNoteLength(3);
}
/**
 * Sets the lenth of the note to play to a 16th.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::set16thNote() {
    setNoteLength(2);
}
/**
 * Sets the lenth of the note to play to a 32nd.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::set32ndNote() {
    setNoteLength(1);
}
/**
 * Sets the lenth of the note to play to a 64th.
 * 
 * @author nedwidek (2012/07/01)
 * 
 */
void ParallaxLCD::set64thNote() {
    setNoteLength(0);
}