Midi.Lua Generic Class + Midiconvert Placeholder


I’ve written a class that deals with MIDI (binary files) and MF2T (text files)

The class is based on:


If you are looking for documentation on the methods, just read the above URL. This is a Lua port of the class, minus methods I didn’t find useful.

This is part of a tool I’m working on named MidiConvert. I estimate this class to be 2/5 of the total work needed. It’s a rewrite of XRNS2MIDI, but I also want to deal with importing to solve problems like this one.

I’m posting the class here to avoid duplicate efforts. If you want to help out, or just want to use the Midi class for your own ideas, well here it is.

Example usage:

require "Midi"  
local example = Midi()  
-- rprint(example.tracks)  

Supported methods are:

  • open
  • setTempo
  • getTempo
  • setBpm
  • getBpm
  • setTimebase
  • getTimebase
  • newTrack
  • getTrack
  • getMsgCount
  • addMsg
  • insertMsg
  • getMsg
  • deleteMsg
  • deleteTrack
  • getTrackCount
  • soloTrack
  • transpose
  • transposeTrack
  • importTxt
  • importTrackTxt
  • getTxt
  • getTrackTxt
  • importMid
  • getMid
  • saveMidFile


Thanks looks interesting!

Did I post this in the wrong forum? I was aiming for “XRNX Tool Announcements & Discussion.”

That’s TEC stuff, not really feature, tool brainstorming, so it should got the Dev forum -> https://forum.renoise.com/c/renoise-tool-development

Moved back ;)

I’m bumping this thread to indicate progress. Also, I’m trying to amalgamate my flooding of two separate topics.

[The code in SVN](https://code.google.com/p/xrnx/source/browse/trunk/Tools/ in+progress /com.renoise.MidiConvert.xrnx/).

MIDI files can now be saved. That means a working version now exists, horray! But, and it’s a Sir Mix-A-Lot, there’s more than a few of cases that it doesn’t work as expected.

This is basically a proof of concept that’s reasonable to expand on. I hope to do it in the upcoming weeks.


The midi class looks quite some work! I hope some folks would join you on this journey.