Helper function for generating hammer on and pull off syntax.

hp(...)

Arguments

...

character, note durations. Numeric is allowed for lists of single inputs. See examples.

Value

character.

Details

This is especially useful for repeated instances. This function applies to general slur notation as well. Multiple input formats are allowed. Total number of note durations must be even because all slurs require start and stop points.

Examples

hp(16, 16)
#> [1] "16( 16)"
hp("16 16")
#> [1] "16( 16)"
hp("16 8 16", "8 16 8")
#> [1] "16( 8) 16( 8) 16( 8)"