New Tool (3.0): Midi Convert

A small update has arrived:

https://www.renoise.com/tools/midi-convert

0.95
- Adds support for MIDI-CC Commands

This works for the MIDI CC pattern command, so any M0 xxyy style commands are now exported too.

As usual: if you should encounter an issue, this is the place for reporting it.

Thanks goes to reaby (who did the coding)

Great tool. Useful for moving tunes between DAWs. Thanks for making it. :slight_smile:

Hello,

I am having errors trying to export a track. After enabling scripting as told in message #60, I get the following message:

*** .\export.lua:246: attempt to index field ‘?’ (a nil value)
*** stack traceback:
*** .\export.lua:246: in function ‘export_build_data’
*** .\export.lua:590: in function ‘export_build’
*** .\export.lua:582: in function ‘export_procedure’
*** main.lua:48: in function main.lua:46

I am using Renoise 3.1 and MIDI Export 0.95. It’s the first time I encounter a problem. Deleting a certain number of (random) tracks allows the export.

Thanks for your help !

I am having errors trying to export a track.

Hi, I guess there’s something specific in the song that makes this happen.

Since I’m the one maintaining this tool - could I somehow get to take a look at the song (.xrns)? Better than trying to guess what the problem might be.

You can send me a PM if you don’t feel like sharing it with everyone. Also, you can choose Edit > Delete All Instruments to make it smaller / even more secret :ph34r:

PM sent, thanks!

A new version has arrived. Download it from the tool page.

Thanks to @clairobscur for sharing his project with me. It would have been much harder to fix this issue without it.

What’s new in v0.96

- Proper support for Renoise LPB commands 
- Allow MIDI-CC Commands without accompanying note
- Allow notes spanning multiple patterns

The MidiConvert tool has now got ‘proper’ LPB support - which, while only tested with a few different files, seems to do the job.

Previously, changing the LPB during a song could wreak havoc on the exported MIDI - the implementation was basically flawed.

Also, the tool should now be a bit more friendly towards ‘standalone’ MIDI CC commands (without an accompanying note), and pattern-spanning notes.

Enjoy!

A new version has arrived. Download it from the tool page.

Thanks to @clairobscur for sharing his project with me. It would have been much harder to fix this issue without it.

Yay ! :slight_smile: I am very grateful to danoise for fixing the issues ! Thanks a lot !

As he suggested, I am posting my request for an extra feature : it would be very useful to be able to export just one track (or a selection of tracks) to MID. Maybe with an option in the Track context menu ?

It would be very useful to be able to export just one track (or a selection of tracks) to MID.

Agreed - it really wouldn’t be hard to add additional “scopes”.

While testing the tool I also missed the ability to make a selection in the pattern sequence and export only that part.

Hey guys (and girls), I tried this tool wich seems very useful but doesn’t work here.

When I start to convert I have this message:

‘C:\Users-------\AppData\Roaming\Renoise\V3.1.1\Scripts\Tools\com.renoise.MidiConvert.xrnx\main.lua’ failed in one of its notifiers.
The notifier will be disabled to prevent further errors.

Please contact the author (Dac Chartrand, Marvin Tjon, Bjorn Nesby, reaby) for assistance…

Unknown Lua interpreter error occurred!

I use the latest version tho.

I think exeq if you maybe post a link to the xrns you are trying to export to midi (and any other special instructions) would be helpful for people to try to recreate the error?

Thanks for your reply 4tey.
I tried to export many CC within the song, wich obvioulsy was the data that brought the error message. It was the first time I used this tools so I just didn’t think about it but after trying to export just few notes, it worked well.

The types of data were some hardware controlling midi data, so with this kind of structure:

M0 F8 51 39

M0 C7 48 52

If you are interested I can share the xrns files but my issue is resovled.

Smashing, but if you could drop a link to the xrns (not necessarily for me btw.) The reason I think it maybe important is because of the error that you got:

Unknown Lua interpreter error occurred!

That is probably a slightly deeper internal lua error, so possibly @danoise (Bjorn) or anyone else writing tools would maybe be interested for reference and debugging purposes. That is all I was thinking :slight_smile:

The other thing probably worth mentioning is if you have any other tools installed, and what those tools are.

FYI, I added some stuff for the export part, it should add the following:

  • correct lpb
  • midi pitchbend support
  • sequence slot mute support
  • sequence slot mute -> note off support

Somehow my text editor messed up indenting…

2 Likes

Hi,

since Bitwig still not yet supports midi pitchbend import :badteeth:, the below export.lua version now also writes the midi pitchbend to midi cc #20, so you can then copy-paste it to a newly created midi pitchbend automation lane within Bitwig. Keep in mind that Bitwig interpolates (draws lines in between) the pitchbend automation points, while Renoise doesn’t interpolate pitchbend written to the pattern.

If I would repeat the last pitchbend value before a new one while the automation creation, you would get a similar if not worse (not really wanted) stepping midi pitchbend as in Renoise. In other words, you still need to correct the pitchbend automation by hand afterwards, flattening out all unwanted interpolation. If you have a better idea how to handle this, please let me know :slight_smile:

export.lua.zip

Btw. I cannot attach zip files here…

1 Like

Here is a new version of export.lua. All new features:

  • midi control device automation support -> MIDI CC 21 - 31 (max. 10 parameters)
  • instr. automation device support -> MIDI CC 103 - 113 (max. 10 parameters)
  • pattern midi pitchbend
  • pattern midi pitchbend -> MIDI CC 20 (for DAWs not supporting pitchbend import…)
  • pattern channel aftertouch -> MIDI CC 102
  • sequence slot mute support
  • sequence slot mute -> note off support
  • corrected LPB

You can copy the automation from the imported MIDI CC lane to the correct VSTi’s automation lane then. Try to end all notes with note-off somewhere at least. You also can use a following muted slot.

Keep in mind the following limitations:

  • Only use one instrument per track, if you use midi control / instr. automation devices
  • Always use only one midi control device and one instr. automation device per instrument
  • Put the devices always onto the track where the instrument plays
  • Max. 10 automated parameters in automation devices, position doesn’t matter

export-midi-automation.lua.zip

2 Likes

Is probably just a question of the tool running as a separate process (coroutine). This prevents the tool from timing out and showing those annoying dialog boxes, but has the side effect of not providing much information when something goes wrong.

The main.lua can easily be modified. Change this line

COROUTINE_MODE = true

into this:

COROUTINE_MODE = false

Save and restart.

@ffx: Whew, a lot of changes.

  • Matrix mute slot support: great idea, makes sense!
  • MIDI pitch bend: Do you have a test case (a Renoise song) that I can use for verifying the output?
  • Correct LPB: What do you mean by this? it would be helpful if you could explain the problem because I have a hard time figuring out what you did from the diff (too many changes)

Oh, no public example currently I am afraid. But I tested it in Ableton with a pitchbended lead line, and it matched 1:1. Also in Bitwig (which I am targeting for) the song convert so far runs 100% (also the copying of pitchbend from midi cc 20 to the actual pitchbend automation, and also channel aftertouch), but did one complete project only for now.

Maybe one point to keep in mind: Currently the imported midi tracks use an increasing midi channel, starting with 1, next track midi channel 2 and so on. In the Renoise project all instruments run on midi channel 1. I so far did not check, if this is caused by Bitwig’s import or by the export script itself.

at github now

1 Like

Is there any chance you can add program change support?

Using the instrument MIDI settings for program change to automatically make a track have that? Or add an FX?

Is this even possible? If so, I can try to create the feature and submit a PR to your tool repo?