Skip to content

Commit

Permalink
Remove output values for unvoiced frame.
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviliz committed Sep 2, 2024
1 parent b631343 commit 77e1594
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/algorithms/tonal/pitch2midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ void Pitch2Midi::compute()
_noteOff = true;
updateDnote();
setOutputs(dnote, 0.0, _minNoteChangePeriod);
//E_INFO("offset(unvoiced frame)");
_unvoicedFrameCounter = 0;
_offsetCheckCounter = 0;
_onsetCheckCounter = 0;
Expand Down
6 changes: 2 additions & 4 deletions test/src/unittests/tonal/test_audio2midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ def testZero(self):
self.assertEqual(pitch, 0)
self.assertEqual(loudness, 0.0)
self.assertEqual(message_type, [])
self.assertEqual(midi_note.tolist(), array([0.0, 0.0], dtype=float32).tolist())
self.assertEqual(
time_compensation.tolist(), array([0.0, 0.0], dtype=float32).tolist()
)
self.assertEqual(midi_note.tolist(), array([], dtype=float32).tolist())
self.assertEqual(time_compensation.tolist(), array([], dtype=float32).tolist())

def assessNoteList(
self,
Expand Down

0 comments on commit 77e1594

Please sign in to comment.