melody_dist: Melody distance

Description Usage Arguments Value Note

Description

Computes the distance traversed by the top voice in a chord transition.

Usage

1
melody_dist(contexts, continuation)

Arguments

contexts

A list of chords corresponding to the first chord in the transition. Each chord should be represented as a numeric vector of MIDI note numbers, without duplicates, sorted in ascending order. The function is vectorized over this argument.

continuation

The second chord in the transition, represented as a numeric vector of MIDI note numbers, without duplicates, sorted in ascending order.

Value

An integer vector, vectorized over contexts, providing the unsigned distance traversed by the highest voice in the transition between the ith element of contexts and continuation.

Note

This is a voicer feature suitable for passing to the features argument of voice_opt.


pmcharrison/voicer documentation built on Dec. 17, 2020, 1:09 p.m.