【问题标题】:Play midi with Core Midi on device在设备上使用 Core Midi 播放 midi
【发布时间】:2013-07-12 10:37:21
【问题描述】:

我一直在使用 CoreMidi 连接 USB 设备和/或 WiFi 主机。它工作正常并发送我的 midi 事件。

我想将它们发送到设备本身进行播放。喜欢 MusicPlayer,但我不想发送 MIDI 文件,只发送我自己的 MIDI 事件。

我该怎么办?我尝试连接到第一个可用的目的地 (MIDIGetNumberOfDestinations),但没有成功。

【问题讨论】:

标签: ios coremidi


【解决方案1】:

现在我更好地理解了这个问题,一个更正的答案。

我的一个项目的示例。

    // Setup MIDI input port
    MIDIClientRef client = NULL;
    MIDIPortRef inport = NULL;
    CheckError (MIDIClientCreate(CFSTR("MyApplication"), 
                                 NULL, 
                                 NULL, 
                                 &client),
                "Couldn't create MIDI client");
    CheckError (MIDIInputPortCreate(client,
                                     CFSTR("MyApplication Input port"), 
                                     &inport),
                "Couldn't create input port");

    [self setInputPort:inport];
    [self setMidiClient:client];
    [self setDestinationEndpoint:[[self midiSession] destinationEndpoint]];

【讨论】:

  • 我已经做过了,但它只是说明了我认为我已经做过的事情。
  • 刚刚增强了我的答案,希望对您有所帮助
  • 问题是,为了从设备本身播放数据到哪个CoreMIDI端点,还带有声音字体。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-08-14
  • 2019-02-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多