write_midi: Write MIDI file.

Description Usage Arguments Examples

View source: R/write_midi.R

Description

Takes a hexadecimal MIDI sequence and writes it to the harddrive.

Usage

1
write_midi(midi_hex, path)

Arguments

midi_hex

This is a hexadecimal string, output from the create_midi function.

path

The name of the file.

Examples

1
2
3
4
# Saves a MIDI sequence as a .mid file called example_midi.mid

drum_machine(hh = 1:16, kick = seq(1, 16, by = 4), snare = c(5, 13)) %>%
create_midi() %>% write_midi(., "example_midi.mid")

datadiarist/midiR documentation built on April 1, 2020, 4:29 a.m.