src/tool-autostem.cpp
int Tool_autostem::getVoice(HumdrumFile& infile, int row, int col) {
	int output = 0;
	int tcount = 0;
	int track = infile.token(row, col)->getTrack();
	int j;
	int testtrack;
	for (j=0; j<infile[row].getFieldCount(); j++) {
		testtrack = infile.token(row, j)->getTrack();
		if (testtrack == track) {
			tcount++;
		}
		if (col == j) {
			output = tcount;
		}
	}
	if (tcount == 1) {
		output = 0;
	}
	return output;
}
//////////////////////////////
//
// Tool_autostem::getVoice -- return 0 if the only spine in primary track, otherwise, return
// the nth column offset from 1 in the primary track.
//
:getVoice -- return 0 if the only spine in primary track, otherwise, return
the nth column offset from 1 in the primary track.
: getVoice -- return 0 if the only spine in primary track otherwise return the nth column offset from 1 in the primary track .
int Tool_autostem::getVoice(HumdrumFile& infile, int row, int col) {
	int output = 0;
	int tcount = 0;
	int track = infile.token(row, col)->getTrack();
	int j;
	int testtrack;
	for (j=0; j<infile[row].getFieldCount(); j++) {
		testtrack = infile.token(row, j)->getTrack();
		if (testtrack == track) {
			tcount++;
		}
		if (col == j) {
			output = tcount;
		}
	}
	if (tcount == 1) {
		output = 0;
	}
	return output;
}
int Tool_autostem :: getVoice ( HumdrumFile & infile , int row , int col ) { int output = 0 ; int tcount = 0 ; int track = infile . token ( row , col ) -> getTrack ( ) ; int j ; int testtrack ; for ( j = 0 ; j < infile [ row ] . getFieldCount ( ) ; j ++ ) { testtrack = infile . token ( row , j ) -> getTrack ( ) ; if ( testtrack == track ) { tcount ++ ; } if ( col == j ) { output = tcount ; } } if ( tcount == 1 ) { output = 0 ; } return output ; }
Tool_autostem::getVoice -- return 0 if the only spine in primary track, otherwise, return
the nth column offset from 1 in the primary track.
Tool_autostem :: getVoice -- return 0 if the only spine in primary track otherwise return the nth column offset from 1 in the primary track .