Class Writer

Manages to join all tracks and features output methods.

See also:

Info:

  • License: MIT
  • Author: Pedro Alves Valentim

Functions

Writer:new (tracks) Creates a new Writer

Methods

Writer:add_tracks (new_tracks) Adds one or more tracks to Writer
Writer:build_file () Concatenates everything to an array.
Writer:stdout (show_index) Prints the array produced by Writer:build_file().
Writer:save_MIDI (title[, directory]) Writes MIDI file.


Functions

Writer:new (tracks)
Creates a new Writer

Parameters:

  • tracks a track object or a table of tracks

Returns:

    new Writer object

See also:

Methods

Writer:add_tracks (new_tracks)
Adds one or more tracks to Writer

Parameters:

  • new_tracks a track object or a table of tracks to be added

See also:

Writer:build_file ()
Concatenates everything to an array. This array is must be unpacked and translated to binary to produce a MIDI file.

Note: This method should not be called by the user. It's accessible for debugging purposes.

Returns:

    builded array

See also:

Writer:stdout (show_index)
Prints the array produced by Writer:build_file().

Note: The user doesn't need to call this method. It's purpose is debugging LuaMidi.

Parameters:

  • show_index bool if true, shows elements index

See also:

Writer:save_MIDI (title[, directory])
Writes MIDI file.

Parameters:

  • title string file's title
  • directory string a directory path to save the file (optional)
generated by LDoc 1.4.6 Last updated 2020-02-28 01:36:33