Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in debug output: was skipping every other phoneme #3

Merged
merged 3 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/parser/parse1.es6
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function wild_match (sign1) {
*
* input holds the string of phonemes, each two bytes wide
* signInputTable1[] holds the first character of each phoneme
* signInputTable2[] holds te second character of each phoneme
* signInputTable2[] holds the second character of each phoneme
* phonemeIndex[] holds the indexes of the phonemes after parsing input[]
*
* The parser scans through the input[], finding the names of the phonemes
Expand Down
1 change: 0 additions & 1 deletion src/parser/parser.es6
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ function PrintPhonemes (phonemeindex, phonemeLength, stress) {
pad(phonemeLength[i]),
pad(stress[i])
);
i++;
}
console.log('==================================');
}
8 changes: 4 additions & 4 deletions src/renderer/create-frames.es6
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
} from './tables.es6';
import {PHONEME_PERIOD, PHONEME_QUESTION} from '../parser/constants.es6';

const RISING_INFLECTION = 1;
const FALLING_INFLECTION = 255;
const RISING_INFLECTION = 255;
const FALLING_INFLECTION = 1;

/**
* Create a rising or falling inflection 30 frames prior to index X.
Expand Down Expand Up @@ -75,9 +75,9 @@ export default function CreateFrames (
// get the phoneme at the index
let phoneme = tuples[i][0];
if (phoneme === PHONEME_PERIOD) {
AddInflection(RISING_INFLECTION, X, pitches);
} else if (phoneme === PHONEME_QUESTION) {
AddInflection(FALLING_INFLECTION, X, pitches);
} else if (phoneme === PHONEME_QUESTION) {
AddInflection(RISING_INFLECTION, X, pitches);
}

// get the stress amount (more stress = higher pitch)
Expand Down