adjusts number of pattern lines and visible note columns to match the midi file.
Capabilities and limitations
This is my first Renoise tool and first code in Lua. I am also new to the midi file format and midi events. The use case implemented here is very simple and might be limited to my specific need. It is not meant to be a replacement for the built-in midi files import nor a general purpose midi file to Renoise song converter.
It is not possible to override midi files import procedure so the midi files need to be renamed to have .xrmid extension. E.g. my-file.mid needs to be renamed to my-file.xrmid.
Currently, it only interprets note-on and note-off midi events. All notes will use currently selected instrument. On import, currently select track will be cleared and extended if needed. Only midi channel 1 will be read.
It will not work well for multi-instrument or percussion midi files.
Usage
Double click any .xrmid file in songs or instruments file browser. Currently selected track in currently selected pattern will be replaced with the notes from the file.
Feedback
This tool works well enough for the collection of midi files I have. I haven’t tested it enough on other midi files available on the internet, hence the version 0.1. Any suggestions on other use cases that it should support is much appreciated. Example midi files for testing are welcomed.
Credits
MIDI file import is done with MIDI.lua by Peter J Billam. It was released under MIT/X11 licence and has been included here without any changes in the code.
You set the bar pretty high I saw that this is a long-time missing feature. Dunno why. Anyway, this is like 1-2 days of codding so it is far from being perfect. I am beginning to test it on random midi files from sheet music websites and will fix the issues on a case by case basis.
Would you like to join my official design and testing team? What kind of features it is missing? What does not work as expected? On what kind of files it fails? You know, two heads are better than one
Newly created files will be suffixed with .xrmi extension. E.g. my-file.mid will be copied or renamed to my-file.mid.xrmid.
It works in GNU/Linux environment and should work on macOS/OSX. On Windows use Total Commander’s built-in Multi-rename tool or anything else with a similar capability.
Thanks! I do not have a Windows box to test it. It worked fine in XFCE on Linux. I have fixed this by skipping the *.mid, *.xrmid file filter. All files will be visible by default. If the file being loaded is not *.mid or *.xrmid then a status message will be show and file will not be loaded. This will be release in v0.5.
I have also tested it on some drum kits and it works fine. Added some new options for fine tuning.
Hi. The code was ready but I was busy with some other stuff. I don’t have many ideas on what else could we add to this tool. Maybe import to phrases instead of only to patterns depending on which screen you are currently on. What do you think?
Version 0.5
changed file browser to show all files instead of .mid and .xrmid to a fix an issue on Windows (thanks, Roppenzo).
improved the workflow for file browser to first select the file and then show Options dialog if Options - Show for each file is enabled.
added an option to skip note delay information (Options - Include delay = false).
added an option to skip note-off (OFF) events (Options - Include note-off = false).
added an option to correct note start or end position if delay is higher than FD (disabled by default) (Options - Correct positions = true).
This tool works GREAT! I use Ripchord and export the MIDI file from it, but could not use it in Renoise. With the capability of Renoise Simple Midi File Support (RSMFS), I can use my various chords from Ripchord by simply renaming the suffix to .xrmid.
One day, I hope to bypass this, and just be able to drag/drop the actual .mid file without changing the suffix. Still a way cool Tool to get the more complex chords into Renoise without typing them in. Thanks, @nil.caream!
@nil.caream I do have a request for this Tool. May we have the capability of entering more than one chord in the same pattern?
If I put in one chord at the very beginning, but want to put in another chord a few steps after the first one, it simply replaces the original chord. If I’m using more than one chord in a pattern, I have to create a NEW pattern, then add the next chord. If I want them to be together, then I have to join the patterns. It’s a few extra steps that I’d love to be able to bypass. Would this be possible?
This image is how I put them in, and in this window, there is no option to keep the chords in the same pattern:
Thanks for feedback! @yoshino, I am glad that it works for you
@Neuro_No_Neuro What do you think about adding an extra checkbox in the configuration dialog like “Insert notes at cursor position”? This way when you move the cursor to a particular line number and note column then your midi file would be inserted at this very place instead. The whole track would not be automatically cleared in such case.
If it makes sense I could work on it this week and release within few days. Let me know.
And yes, I also wish that it all would not be needed and we could simply drag and drop midis directly into the pattern or phrases editor. Maybe one day Until then I think that we are stuck with workarounds like this tool…