Jump to content


Photo

New Tool (3.0): Midi Convert


  • Please log in to reply
116 replies to this topic

#1 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 31 January 2011 - 21:00

:clownstep:/>

Midi Convert Tool

This tool will put "MIDI Export..." in the "Tools" menu.

  • http://tools.renoise.com/tools/midi-convert

Trotch on.

Edited by Conner_Bw, 27 June 2014 - 21:16.

  • taktik, Beatslaughter, RANSOM and 3 others like this

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#2 Ledger

Ledger

    Guruh Motha Fakka Knows More About Renoise Than Taktik

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3409 posts
  • Gender:Male

Posted 31 January 2011 - 21:03

:yeah: got up to "track in pattern" a while ago but got distracted with ticky roll and others. From reading your other threads on this it seems this should be pretty comprehensive when finished.

Great Stuff!

--> Lua For Beginners <--
--> Lua for newbies <--

My Scripts On Forum

Top Tip!

 

cpu : Xeon 1231 v3, os : Win 7 64bit, audio: Audient iD4
posts as 4tune @ KvR and some other music related sites


#3 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6722 posts
  • Gender:Male
  • Location:Borneo

Posted 31 January 2011 - 21:19

Cheers Conner, will check out!

#4 Thomas

Thomas

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 190 posts

Posted 31 January 2011 - 21:52

Sounds really usefull :)
It would be great to import and export tracks of a pattern to midi and vica versa.
Acctually it would be cool if I could drag and drop midi tracks in a song i'm working on.
Will it be something like this eventually??

Edited by Thomas, 31 January 2011 - 21:55.


#5 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6722 posts
  • Gender:Male
  • Location:Borneo

Posted 31 January 2011 - 21:54

Sounds really usefull :)
Is there a midi import function too?


just double click a .mid file in the disk-op

edit:

unfortunately you can't open a .mid file into an existing track.

Edited by Jonas, 31 January 2011 - 21:55.


#6 Guest_Bantai_*

Guest_Bantai_*
  • Guests

Posted 31 January 2011 - 21:56

* The old PHP version makes use of MIDI channels, I'm not yet sure why.


The idea was to somehow port the concept of Renoise instruments to MIDI. Multi-timbral MIDI devices use channels to distinguish instruments. Each Renoise instrument was already grouped into having its own MIDI track. Thus, every MIDI track got to have its own channel.

However, there is a 16 channel limitation in MIDI and there are frequently more than 16 instruments in a Renoise song. The solution used in XRNS2MIDI was to start over with channel 1 after running out of channels.

In the end the use of channels was more or less an arbitrary convention. Dunno if it made things easier or actually harder.

#7 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 31 January 2011 - 22:01

Sounds really usefull :)
It would be great to import and export tracks of a pattern to midi and vica versa.
Actually it would be cool if I could drag and drop midi tracks in a song i'm working on.
Will it be something like this eventually??


Right now the script only does Export.

My long term goal is to replace the Renoise Import procedure with this script, so that hackers can modify it without annoying the core developers.

So ideally before I die, yes it should be possible.

Is it possible now? No.

The idea was to somehow port the concept of Renoise instruments to MIDI. Multi-timbral MIDI devices use channels to distinguish instruments. Each Renoise instrument was already grouped into having its own MIDI track. Thus, every MIDI track got to have its own channel.

However, there is a 16 channel limitation in MIDI and there are frequently more than 16 instruments in a Renoise song. The solution used in XRNS2MIDI was to start over with channel 1 after running out of channels.

In the end it was more or less an arbitrary convention. Dunno if the use of channels made things easier or actually harder.


Ok. thanks.

PS: I'll also add your name to "Authors" in the manifest. Didn't do it out of laziness and forgetfullness. Will do it now and commit.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#8 s-n-s

s-n-s

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2029 posts
  • Gender:Male

Posted 31 January 2011 - 22:26

awesome stuff,cant wait to check it out

Subbase - Danish Dark DnB


#9 Guest_Bantai_*

Guest_Bantai_*
  • Guests

Posted 31 January 2011 - 22:33

PS: I'll also add your name to "Authors" in the manifest.


Cool. :)

* Scan for LPB changes, convert them to BPM for ease of implementation.


It's the easiest approach, but it may become a problem when the imported MIDI file is used together with MIDI devices (or musicians) that rely on the original BPM (metronome).

* Panning? Does MIDI even have panning?


Yes, but it's a channel parameter. In Renoise there is also note panning, but AFAIK there is no generic MIDI equivalent.

* Groove settings?


Maybe export a separate groove template instead, for example, in the form of an additional small MIDI file that can be imported along with the converted song.

#10 Guest_68000_*

Guest_68000_*
  • Guests

Posted 01 February 2011 - 00:19

holy shit, this is gonna be huge! :yeah:

#11 hotelsinus

hotelsinus

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Hungary
  • Interests:Sound Design music Sound Creatin and how they born.

Posted 02 February 2011 - 23:08

oh yes!!!!!!!!!!
cna wait to try out, with my e-mu command station

+NICE NICE NICE+

#12 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 04 February 2011 - 22:03

Check the first post for a new version (0.3).

-- TODO:
-- LBP procedure is flawed, for example:
-- Note pos:1, LBP changed pos:3, LBP changed pos:5, Note pos:7
-- Current algorithm only detects LBP on pos:5
-- But, pos:3 will affect the timeline?

-- TODO:
-- Panning? Groove settings?

-- TODO:
-- NNA and a more realistic note duration could, in theory,
-- be calculated with the length of the sample and the instrument
-- ADSR properties.

-- TODO:
-- Import module.

Patches welcome.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#13 kazakore

kazakore

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6140 posts
  • Gender:Male

Posted 04 February 2011 - 22:10

Check the first post for a new version (0.3).

[code=auto:0]
-- TODO:
-- LBP procedure is flawed, for example:
-- Note pos:1, LBP changed pos:3, LBP changed pos:5, Note pos:7
-- Current algorithm only detects LBP on pos:5
-- But, pos:3 will affect the timeline?



Remember LPB changes will only make any difference to notes play between that line and the next LPB change. If you had no notes between pos.3 and pos.5 in the above example then the change of LPB isn't going to make any difference to output. Unfortunately you haven't provided with an example including notes on lines etc...

#14 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 04 February 2011 - 22:15

Remember LPB changes will only make any difference to notes play between that line and the next LPB change. If you had no notes between pos.3 and pos.5 in the above example then the change of LPB isn't going to make any difference to output.


If this is true, then the code should work, and I won't need to change anything. Of course, test cases and plain old bugs are bound to happen. This is where I hand it off to the community; patches welcome! :)

As an aside, I write tempo changes to the tempo track like the MIDI specification states, but I use GarageBand to test and it doesn't support multiple tempos, so I have no idea if it works.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#15 kazakore

kazakore

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6140 posts
  • Gender:Male

Posted 04 February 2011 - 22:26

EDIT: Sorry I'm going mad and getting myself confused between LPB and TPL settings. Been a long day!

Um... Changes to LPB will make a difference. If you export with your example above with and without the LPB change at pos.3 and the files come out exactly the same then I agree there is something fishy.


(Will leave my original rambling in anyway though...)


-----


If this is true, then the code should work, and I won't need to change anything. Of course, test cases and plain old bugs are bound to happen. This is where I hand it off to the community; patches welcome! :)


Well TPL does not change the length of a line does it, only how many of subdivisions it's made of. Therefore it will only affect commands sent within the changed period and that rely on the old Tick system (Dx command for example.) Also automations and LFOs within Renoise but I'm not sure if you've even tackled that yet and MIDI would want to stay at the PPQ96 anyway (and as the Renoise file may only have two points saved you'd have to do the interpolation yourself so guessing this may be an omission.) Basically by changing TPL you are changing Renoise's internal PPQ, your outputted MIDI file stays at a constant PPQ, thus you'll only see a difference on commands that rely on Ticks for timing.

This is unless it was a typo for BPM.

As an aside, I write tempo changes to the tempo track like the MIDI specification states, but I use GargageBand to test and it doesn't support multiple tempos, so I have no idea if it works.


Although you imply you wouldn't be able to check if you've worked that correctly.

Edited by kazakore, 04 February 2011 - 22:33.


#16 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 04 February 2011 - 22:37

Also automations and LFOs within Renoise but I'm not sure if you've even tackled that


No, I will not be doing this.

Although you imply you wouldn't be able to check if you've worked that correctly.


A contraire, I'm implying that there's 2000+ lines of code in there. I've obviously tested several files and am happy with the results. For every math snippet, there's a hundred lines of other stuff.

At this point, baring any unforeseen bugs, this version is on par with the current PHP and .NET versions out there.

For me, that's mission accomplished.

If you test it, and find it works *worse* than the PHP version, and can provide an example XRNS, i'll probably look at it.

Otherwise, I'm more interested in patches in the form of code from this point on.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#17 kazakore

kazakore

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6140 posts
  • Gender:Male

Posted 04 February 2011 - 22:44

Just a bump in case you missed my edit above where I realised I was getting myself confused.

Very good work though mate! Something a lot of people have wanted a long time and you've put a lot of effort with seemingly good results so far :)

#18 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 04 February 2011 - 22:50

Just a bump in case you missed my edit above where I realised I was getting myself confused.


Yeah, I saw that. Thanks! I'm gonna leave it as a ??? for now.

I'm pretty sure there are problems, but I don't know if anyone will encounter them in practical situations. Renoise to MIDI, from the get go, is conceptually imperfect since the two paradigms are sort of the anti of the other. Test cases and "I actually want this to work" will come into play, I think. I mean me personally I will never use this tool? it's hard to test something you will never use. Know what I mean? I have to rely on proof of concepts and community help for the stuff I don't personally care about.

Very good work though mate! Something a lot of people have wanted a long time and you've put a lot of effort with seemingly good results so far :)


Cheers.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#19 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 05 February 2011 - 17:54

Published v 0.3.1 to the Tools page.

http://tools.renoise...ls/midi-convert

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#20 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 06 February 2011 - 19:49

Updated to version 0.32:

Fix delay calculations, added more yield() calls because I was having problems with some songs and it should also help with slower computers, don't print to terminal unless dbug_mode is set to true.

http://tools.renoise...ls/midi-convert

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#21 maes

maes

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 952 posts
  • Gender:Male
  • Location:.se
  • Interests:musics

Posted 07 February 2011 - 10:59

good job!

#22 hotelsinus

hotelsinus

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Hungary
  • Interests:Sound Design music Sound Creatin and how they born.

Posted 07 February 2011 - 12:17

it is work for me.
save and load back to cubase! nice! :yeah:
- midi track names maybe the same like the renoise song track names. don't you?

cant wait for some future updates..
thank yuo mate!!!!

#23 gentleclockdivider

gentleclockdivider

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2554 posts
  • Gender:Male
  • Location:something like a sea or a river...just moving
  • Interests:slacking

Posted 07 February 2011 - 13:22

thanks conner , verry usefull

THERE IS NO RELIGION SUPERIOR TO THE TRUTH


THERE IS NO TRUTH SUPERIOR TO THE ONE I CHOOSE

C'EST MIEUX D'ETRE BELLE ET REBELLE


QUE MOCHE ET REMOCHE



RUBIO RABIA

 


#24 101010

101010

    Chief Above Chief Member

  • Normal Members
  • PipPipPipPipPipPip
  • 372 posts
  • Gender:Male

Posted 10 February 2011 - 19:54

I noticed something about it's format, causes other programs like VLC to reject it.
However in Renoise it works quite nicely, Thanks.

#25 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7097 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 26 February 2011 - 20:21

v0.33 now available:

http://tools.renoise...ls/midi-convert

Changes:
Conversion algorithm *much* faster now, changed extension from .midi to .mid, improvements to dbug mode

Explanation:
I copied the algorithm from the PHP version of the XRNS2MIDI script, when in fact I don't need to scan each instrument individually. Duh. This change speeds things up, tons!

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »