src/tool-autostem.cpp
bool Tool_autostem::autostem(HumdrumFile& infile) {
	vector<vector<int> > baseline;
	getClefInfo(baseline, infile);

	// get staff-line position of all notes:
	vector<vector<vector<int> > > notepos;
	getNotePositions(notepos, baseline, infile);
	if (noteposQ) {
		printNotePositions(infile, notepos);
		return true;
	}

	// get voice/layer number in track:
	vector<vector<int> > voice;
	getVoiceInfo(voice, infile);
	if (voiceQ) {
		printVoiceInfo(infile, voice);
		return true;
	}

	// get stem directions:
	vector<vector<int> > stemdir;
	bool status = assignStemDirections(stemdir, voice, notepos, infile);
	if (!status) {
		return false;
	}
	insertStems(infile, stemdir);
	return true;
}
//////////////////////////////
//
// Tool_autostem::autostem -- add an up/down stem on notes in **kern data
//     that do not already have stem information.
//
:autostem -- add an up/down stem on notes in **kern data
that do not already have stem information.
: autostem -- add an up / down stem on notes in ** kern data that do not already have stem information .
bool Tool_autostem::autostem(HumdrumFile& infile) {
	vector<vector<int> > baseline;
	getClefInfo(baseline, infile);
	vector<vector<vector<int> > > notepos;
	getNotePositions(notepos, baseline, infile);
	if (noteposQ) {
		printNotePositions(infile, notepos);
		return true;
	}
	vector<vector<int> > voice;
	getVoiceInfo(voice, infile);
	if (voiceQ) {
		printVoiceInfo(infile, voice);
		return true;
	}
	vector<vector<int> > stemdir;
	bool status = assignStemDirections(stemdir, voice, notepos, infile);
	if (!status) {
		return false;
	}
	insertStems(infile, stemdir);
	return true;
}
bool Tool_autostem :: autostem ( HumdrumFile & infile ) { vector < vector < int > > baseline ; getClefInfo ( baseline , infile ) ; vector < vector < vector < int > > > notepos ; getNotePositions ( notepos , baseline , infile ) ; if ( noteposQ ) { printNotePositions ( infile , notepos ) ; return true ; } vector < vector < int > > voice ; getVoiceInfo ( voice , infile ) ; if ( voiceQ ) { printVoiceInfo ( infile , voice ) ; return true ; } vector < vector < int > > stemdir ; bool status = assignStemDirections ( stemdir , voice , notepos , infile ) ; if ( ! status ) { return false ; } insertStems ( infile , stemdir ) ; return true ; }
Tool_autostem::autostem -- add an up/down stem on notes in **kern data
that do not already have stem information.
Tool_autostem :: autostem -- add an up / down stem on notes in ** kern data that do not already have stem information .
// get staff-line position of all notes: // get voice/layer number in track: // get stem directions: