public string getMappedLyric(string lyric, int note_number) { if (configs_.ContainsKey(note_number)) { var config = configs_[note_number]; return config.prefix_ + lyric + config.suffix_; } else { return lyric; } } }
public void test() { var prefixmap = new PrefixMap("./fixture/utau_voice_db/prefix.map"); var actual = prefixmap.getMappedLyric("は", 61); Assert.AreEqual(@"A\は↑", actual); Assert.AreEqual("あ", prefixmap.getMappedLyric("あ", 60)); }