Skip to content

Commit

Permalink
Fix penalty keyword argument in align_midi.py
Browse files Browse the repository at this point in the history
djitw.dtw changed the name of the penalty keyword argument to
additive_penalty in
craffel/djitw@15b1634
  • Loading branch information
craffel committed Mar 16, 2017
1 parent 16b7a81 commit 7d12554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/align_midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def align(midi_object, audio_data, fs, hop, note_start, n_notes, penalty):
penalty = distance_matrix.mean()
# Compute lowest-cost path through distance matrix
p, q, score = djitw.dtw(
distance_matrix, gully=.98, penalty=penalty)
distance_matrix, gully=.98, additive_penalty=penalty)
# Adjust the timing of the MIDI object according to the alignment
midi_object.adjust_times(midi_times[p], audio_times[q])

Expand Down

0 comments on commit 7d12554

Please sign in to comment.