New Tool (0.1): Renoise Simple Midi File Support

Renoise Simple Midi File Support

General idea

Renoise has built-in support for midi files importing. It works by creating a new midi instrument and adds new dedicated tracks in existing patterns.

This plugin will reuse existing instrument and will only update existing tracks with notes from the file.

Current implementation

  • reads midi files with .xrmid extension,
  • prints notes and file information in Scripting Terminal.
  • adds midi note events (note, volume, delay) to selected pattern track.
  • 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.

General plugin structure has been significantly inspired by Additional File Format Import Support code by Martin Bealby.

Thanks!

Licence

This tool is available on GitHub and is released under Apache License Version 2.0.

Download

10 Likes

Damn!!!

I’VE BEEN WAITING FOR SOMETHING LIKE THIS FOR YEAAAAAAARS;

YOU ARE A LEGEND!!

The whole renoise community says: thank you so much!

1 Like

Hi Rpnz.

You set the bar pretty high :slight_smile: 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? :laughing: 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 :grin:

Thanks!

1 Like

sure! i will join!

email me at roppenzo at gmail dot com

Awesome! We are two men army now :laughing:

Version 0.2

  • added an option to skip note volume information (Options - Include velocity = false).
  • fixed an issue with old notes cleanup when pattern was too short but had hidden notes in it (outside of pattern lines range).
  • fixed an issue with tool crashing on trying to add notes outside of the Renoise max 512 pattern lines length.
  • skipped setting note volume for midi notes with maximum velocity (127).
  • added note-off commands for first line of the track.

Batch file copy / rename

To create a copy of all .mid files in current (.) and all nested directories execute the following command:

find . -type f -name '*.mid' -print0 | xargs --null -I{} cp -v {} {}.xrmi

In a similar way, to rename all .mid files execute:

find . -type f -name '*.mid' -print0 | xargs --null -I{} mv -v {} {}.xrmi

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.

Updated readme

Download

1 Like

this should be a native behaviour ! @taktik adding new patterns is just silly.

.

1 Like

nice ! updates already!!

Based on @Roppenzo feedback:

Version 0.3

  • added a file browser that accepts both .mid and .xrmid files in Tools - Renoise Simple Midi File Support - Select file.
  • fixed an issue with tool crashing on trying to add more than 12 note columns.
  • set volume and delay columns as always visible.

Updated readme

Download

2 Likes

this is getting better and better and better!

Last update in this month.

Version 0.4

  • redesigned tools options flow for file loading and removed Select file button.
  • added submenus to Tools - Renoise Simple Midi File Support
    • Options - opens tool options.
    • Import midi file - opens file browser.
  • added Import midi file context menu for pattern track (right click).

Updated readme

Download

strange behaviour in windows explorer:

1
2

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.

2 Likes

we have a new super script-hero-tool-maker on the forums! :sunglasses:

1 Like

When will be v0.5. released ? :slight_smile:

1 Like

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).
  • added tooltips for options.
  • reviewed, corrected and updated readme.

Updated readme

Download

1 Like

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!

1 Like

This is the best tool. Thank you.

1 Like

@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:

Screen Shot 2022-10-23 at 8.08.46 AM

1 Like

Thanks for feedback! @yoshino, I am glad that it works for you :+1:

@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 :grin: Until then I think that we are stuck with workarounds like this tool…

4 Likes