# MIDI2KSP - announcing a new KSP utility



## Reegs (Dec 20, 2010)

Hi everyone,

I've been getting my feet wet in C++. As a small project that I thought would be of use to more people than just me, I created a utility program that will read MIDI files and translate them into code the KSP processor can read. Basically, you can now import MIDI files to play, in both instrument and multi scripts.

You might say: But Reegs, you can use a make_persistent array to record them in, directly from your sequencer! There's even an example from NI that does this...

That's true, but what that sequencer doesn't do is provide sync of the entire file with host tempo without some tweaking and guesswork of the input tempo. And if you have a set of continuously changing tempos, you're pretty much up the creek. This little utility can handle those circumstances very easily. :D 

Currently the limit of KSP controls the size of the playback, and I have it set up to play through once you activate it. For the next version, I'll be building in KSP Sequencer-style support, which should let you use an if-statement to control the callback flow better and theoretically increase the size of the files it can handle. But, give version 1 a try!

See it in action here:


and download here:
http://peteroregan.com/scripts.html

_(Windows only at the moment because I don't have a mac to compile it on.)_

Thanks for reading!

Reegs


----------



## gh (Dec 20, 2010)

Hi Reegs!

What a nice tool! Thank you for sharing.

You can overcome the line limitation by embedding blocks in IF statements.

Something like:

if 1 = 1
{4000 lines}
end if

I have no idea how many lines KONTAKT can handle but Benjamin reported recently that he has a project with 20.000 lines.

Cheers
gh


----------



## Reegs (Dec 20, 2010)

Hi gh,

Thanks for the suggestion! It shouldn't be too hard to integrate that, I don't think.

20,000 lines of real (not MIDI-translated) code. Wow!

Reegs


----------



## chimuelo (Dec 20, 2010)

Is there a limitation with file size...?
I think this a great idea.
Thanks So Much.


----------

