使用 VB 或 Python 编写 Fruityloops 或 propellerheads 推理脚本?

发布于 2024-07-09 10:24:11 字数 369 浏览 10 评论 0原文

我的 Windows PC 上同时安装了 Fruityloops 和 Propellerheads Reason 软件合成器。

我可以通过 Visual Basic 或 Python 获取这些内容并编写脚本吗? 或者至少从代码发送 Midi 消息到合成器?

更新:尝试使用“midi-mapper”之类的东西(感谢链接 MusiGenesis)似乎不起作用。 我认为 Reason 或 FL Studio 不像标准 GM Midi 合成器。

更新 2:如果您对此问题感兴趣,请也查看一下

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

━╋う一瞬間旳綻放 2024-07-16 10:24:11

这两个应用程序都支持 MIDI。 只是他们见不到对方而已。

为了通过 MIDI 在应用程序之间发送消息,您需要安装虚拟 MIDI 端口

有几个免费可用的,但这个有效: http://www.midiox.com/zip /MidiYokeSetup.msi

您将获得一个虚拟 MIDI 输出端口,您可以像普通 MIDI 设备一样对其进行写入。 在 Fruity Loops 或 Rebirth 中,您选择该端口作为输入。 这就是连接程序所需要做的全部工作。

它将像这样工作:

您的应用程序 --> 虚拟 MIDI 端口 --> 水果循环

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

沉鱼一梦 2024-07-16 10:24:11

注意:这个答案并不能完全回答您提出的问题,但它可能会达到您想要的结果:)

您可以使用 jVSTWrapper (http://jvstwrapper.sourceforge.net/)。 如果您确实想使用 Python,您可以使用 Jython 与 java 接口并以这种方式实现。 或者,您也可以使用 Java 或其他适用于 JVM 的脚本语言(例如 Groovy)编写插件。

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.

雨的味道风的声音 2024-07-16 10:24:11

我认为 FL Studio 和 Reason 都可以配置为默认的 MIDI 播放设备。 要从 VB.NET 向其中任何一个发送 MIDI 消息,您需要 PInvoke midiOutOpen、midiOutShortMsg 和 midiOutClose API 调用。 以下是代码示例的链接:

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

它们适用于 VB6,但应该很容易转换为 VB.NET。

我知道 FL Studio 可以由为 FL 编写的插件(或 VSTx 插件)“驱动”,但我认为这些插件总是用 C 或 C++ 编写的。

编辑:我刚刚了解到 Windows Vista 放弃了 MIDI 映射器(这将使将 FL 或 Reason 设置为默认 MIDI 设备变得简单)。 惊人的。 这是我找到的替代解决方案的链接:

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

我刚刚尝试了一下(它只是一个双击运行的 *.CPL 文件),它似乎可以工作(尽管GM Synth 是我的笔记本电脑上唯一可用的选项,因此我不确定它是否会选择 FL 或 Reason 作为选择)。

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).

潜移默化 2024-07-16 10:24:11

您需要的是一个 VST MIDI 脚本编写器/脚本插件来创建可以发送到任何 MIDI 通道的 MIDI 事件逻辑。 您需要在 FL 中为 VST 乐器/效果设置一个 MIDI 通道,您需要调整其值。 谷歌一下,有一些插件,如果您发现任何有用的东西,请在此处分享它们:)

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

少女的英雄梦 2024-07-16 10:24:11

您可以编写一个 Rewire 主机。 不过,您必须获得许可证(许可证是免费的,但您的应用程序必须是专有的,因此没有开源)。

或者,您可以通过 MIDI 消息进行交互。

最后,您可以实现一个虚拟音频设备,它将音频路由到您想要的任何地方/从任何您想要的地方路由或以某种方式处理它。
我想所有这些都会相当困难。 MIDI 可能是三者中最简单的(我不知道 Rewire 协议使用起来有多容易或多难)。

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).

始终不够 2024-07-16 10:24:11

当谈到 Reason 时,您可以使用它做很多事情,因为它是封闭的架构 - 您可以使用 VST 插件(或任何其他类型,如 DirectX 插件) - 您唯一的选择是使用 MIDI。

关于 Fruity Loops,您可以编写一个 VST 插件,它可以从脚本语言(VB、Python 或其他语言)获取输入,但为了编写这样的东西,您必须使用 Delphi 或 C++。

或者,您可以查看 Cycling74 制作的 MAX - 它类似于音乐 IDE ;-) - 以及我很确定你可以使用 Python。

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.

丘比特射中我 2024-07-16 10:24:11

有一个名为 Frinika 的开源音乐工作站,您可以用 Javascript 编写脚本。 (插入/删除音符,更改音调轮等 MIDI 效果)它可以导入/导出常规 MIDI 文件,因此它将与 Fruity Loop 或您拥有的任何其他内容一起使用。

// Insert New

song.newLane("MyMidiLane", type("Midi"));
lane = song.getLane("MyMidiLane");

part = lane.newPart( time("10.0:000"), time("4.0:000") );

part.insertNote(note("c#3"), time("11.2:000"), time("2:0"), 120 );
part.insertNote(note("f3"), time("11.3:000"), time("1:0"), 100 );
part.insertNote(note("g#3"), time("11.3:000"), time("1:0"), 100 );
part.insertNote(note("b3"), time("11.3:000"), time("0:64"), 100 );
part.removeNote(note("f3"), time("11.3:000"));

part = song.newLane("MyTextLane",
type("Text")).newPart(time("24.0:000"), time("10.0:000"));
part.text = "This is the test text to be inserted.";
part.lane.parts[0].remove(); // remove initially inserted text-part 

阅读/更改笔记的另一个示例:

lane = song.getLane("MyMidiLane");
// a lane has a fixed instrument assigned


lane.parts[0].notes[0].duration=64
lane.parts[0].notes[1].duration=32
lane.parts[0].notes[1].startTick=120
// Parts are blocks of notes that you can drag around together in the Frinika GUI.
// They're like patterns in trackers.
for (i in lane.parts[0].notes){
  println("i: "+i+", n: "+noteName(lane.parts[0].notes[i].note));
  println("i: "+i+", dur: "+lane.parts[0].notes[i].duration);
  println("i: "+i+", startT: "+lane.parts[0].notes[i].startTick);
} 

http://frinika.appspot.com/
它还有一个 Java Webstart 启动器,因此您甚至不必
安装。

它也曾经捆绑 Javadoc 文档,但对于某些
因为他们最新的下载不包含该内容。 很遗憾,因为
这是记录 Javascript 绑定的地方。 所以,现在你有
浏览源代码或自行构建 Javadoc。 (它有一些可以从脚本窗口访问的内置示例,您应该首先检查它们。我的第一个示例来自那里。)

这是源文件,您可以在其中找到 Javascript 文档:

frinika Javascript doc/source

但还有其他选项。 您也可以查看 mingus,它是一个用于音乐理论和 midi 文件处理的 Python 库。 它需要 Fluidsynth,演示应用程序也需要 GamePython,因此设置比 Frinika 稍微复杂一些。

附:
Frinika 有一个特殊的错误:当拖动相邻音符时,有些音符可能听起来长度不正确。 您可以通过前后移调连续音符(在钢琴卷帘视图中相当快)或前后拖动包含音符的部分来帮助实现此目的。 重新启动 Frinika 也会有所帮助,但这是较慢的方法。 所以这个错误不会影响保存的文件,也不会影响 MIDI 导出。

There's an opensource music workstation, called Frinika, and you can script that in Javascript. (Insert / delete notes , change midi effects like pitch wheel etc.) It can import / export regular midi files, so it will work with Fruity loops or whatever else you have.

// Insert New

song.newLane("MyMidiLane", type("Midi"));
lane = song.getLane("MyMidiLane");

part = lane.newPart( time("10.0:000"), time("4.0:000") );

part.insertNote(note("c#3"), time("11.2:000"), time("2:0"), 120 );
part.insertNote(note("f3"), time("11.3:000"), time("1:0"), 100 );
part.insertNote(note("g#3"), time("11.3:000"), time("1:0"), 100 );
part.insertNote(note("b3"), time("11.3:000"), time("0:64"), 100 );
part.removeNote(note("f3"), time("11.3:000"));

part = song.newLane("MyTextLane",
type("Text")).newPart(time("24.0:000"), time("10.0:000"));
part.text = "This is the test text to be inserted.";
part.lane.parts[0].remove(); // remove initially inserted text-part 

Another example for reading/changing notes:

lane = song.getLane("MyMidiLane");
// a lane has a fixed instrument assigned


lane.parts[0].notes[0].duration=64
lane.parts[0].notes[1].duration=32
lane.parts[0].notes[1].startTick=120
// Parts are blocks of notes that you can drag around together in the Frinika GUI.
// They're like patterns in trackers.
for (i in lane.parts[0].notes){
  println("i: "+i+", n: "+noteName(lane.parts[0].notes[i].note));
  println("i: "+i+", dur: "+lane.parts[0].notes[i].duration);
  println("i: "+i+", startT: "+lane.parts[0].notes[i].startTick);
} 

http://frinika.appspot.com/
It has a Java Webstart launcher as well, so you don't even have to
install.

It used to bundle the Javadoc documentation as well, but for some
reason their latest downloads don't include that. It's a pity, because
that's where the Javascript bindings are documented. So, now you have
to browse the source or build the Javadoc yourself. (It has some built-in examples that are accessible from the scripting window, you should check them out first. My first example is from there.)

Here is the sourcefile where you'll find the Javascript docs:

frinika Javascript doc/source

But there are other options as well. You can check out mingus too, which is a Python library for music theory and midi file handling. It requires Fluidsynth, and the demo apps require GamePython too, so it's a bit more complicated to setup than Frinika.

P.S.:
Frinika has a particular bug: when dragging around neighbouring notes, some might not sound the right length. You can help that by transposing forth and back the consecutive notes (fairly fast in piano roll view), or dragging the part that contains the notes forth and back. Restarting Frinika will also help, but that's the slower way. So this bug won't affect saved files, neither midi export.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文