views:

499

answers:

6

I have both Fruityloops and Propellerheads Reason software synths on my Windows PC.

Any way I can get at and script these from either Visual Basic or Python? Or at least send Midi messages to the synths from code?

Update : attempts to use something like a "midi-mapper" (thanks for link MusiGenesis) don't seem to work. I don't think Reason or FL Studio act like standard GM Midi synths.

Update 2 : If you're interested in this question, check out this too.

+2  A: 

I think both FL Studio and Reason can be configured as the default MIDI playback device. To send MIDI messages to either from VB.NET, you'll need to PInvoke the midiOutOpen, midiOutShortMsg and midiOutClose API calls. Here's a link to code samples:

http://www.answers.com/topic/midioutopen

They're for VB6, but they should be easy to translate to VB.NET.

I know FL Studio can be "driven" from a plugin authored for FL (or a VSTx plugin), but I think these are always written in C or C++.

Edit: I just learned that Windows Vista dropped the MIDI Mapper (which would have made setting up FL or Reason as the default MIDI device simple). Amazing. Here is a link I found with an alternative solution:

http://akkordwechsel.de/15-windows-vista-und-der-midi-mapper/

I just tried it out (it's just a *.CPL file that you double-click to run) and it appears to work (although the GM Synth is the only option available on my laptop, so I'm not sure if it will pick up FL or Reason as choices).

MusiGenesis
any idea how to configure this. I'm using FL Studio 7 and can't seem to find any option to make it receive Midi from either my VB or Python programs which seem to go straight to the Windows GM synth.
interstar
I assume you're using Vista, which I just learned doesn't have the MIDI mapper anymore. Amazing - another hidden reason why Vista sucks so horribly. See my edit for a link to deal with the problem.
MusiGenesis
yeah ... no MidiMapper sucks
interstar
thanks for that Vista Midi mappper ... saddly it doesn't seem to work in this case. Not sure that either Fruity or Reason register themselves as Windows midi synths.
interstar
+2  A: 

Note: This answer doesn't exactly answer the question you asked but it might achieve the result you want :)

You can author a VST plugin in Java using jVSTWrapper (http://jvstwrapper.sourceforge.net/). If you really wanted to use Python you could use Jython to interface to java and do it that way. Alternatively you could just write the plugin in Java or another scripting language for the JVM like Groovy.

Peter Kelley
A: 

When it comes to Reason, you can do with it to much because of it's closed architecture - you can use VST plugins (or any other type like DirectX ones) - your only option is to use MIDI.

Regarding Fruity Loops, you could write a VST plugin that can take an input from a scripting language (VB, Python or whatever) but in order to write such thing you would have to use Delphi or C++.

Alternatively, you can check out MAX made by Cycling74 - it's something like a IDE for music ;-) - and I'm pretty sure you can use Python with it.

Luka Beatz
A: 

You could write a Rewire host. Though, you will have to get a license (the license is free, but your application must be proprietary, so no open source).

Alternatively, you could interface through MIDI messages.

Finally, you could implement a dummy audio device which would route the audio to/from wherever you want or process it in some way. I imagine all of these would be reasonably difficult. MIDI is probably the easiest of the three (I have no idea how easy or hard the Rewire protocol is to use).

Dan
You could write a VST plugin too, but Reason does not support them, AFAIK.
Dan
A: 

Both applications support MIDI. It's just that they don't see each other.

In order to send messages via MIDI between applications, you need to install a virtual midi port.

There are several freely available, but this one works: http://www.midiox.com/zip/MidiYokeSetup.msi

You'll get a virtual MIDI output port that you can write to as if it's a normal MIDI device. In Fruity Loops or Rebirth you choose that port as the input. That's all you need to do to connect the programs.

It'll work like this:

Your Application --> Virtual MIDI Port --> FruityLoops

Wouter van Nifterick
+1  A: 

What you need is a VST MIDI scripter / scripting plugin to create a logic of MIDI events that can be sent to any MIDI channel. You would need to set a MIDI channel in FL for the VST instrument/effect you need to tweak its values. Google for it there are some plugins around and please share them back here if you find anything useful :)

stagas
SuperMidiScripter: http://azertopia.free.fr/Supermidiscripter.htmland there is also VstLua which looks nice but I can't find a download link since the original author's site is down. Share if you find it please or if anyone has it please upload it somewhere for us.
stagas