Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在设备上使用核心midi播放midi_Ios_Coremidi - Fatal编程技术网

Ios 在设备上使用核心midi播放midi

Ios 在设备上使用核心midi播放midi,ios,coremidi,Ios,Coremidi,我一直在使用CoreMidi连接USB设备和/或WiFi主机。它工作正常,并发送我的midi事件 我想将它们发送到设备本身进行播放。喜欢MusicPlayer,但我不想发送midi文件,只想发送我自己的midi事件 我该怎么办?我尝试连接到第一个可用的目的地(MIDIGetNumberOfDestinations),但没有成功。现在我更好地理解了这个问题,这是一个正确的答案 我的一个项目的样本 // Setup MIDI input port MIDIClientRef clie

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

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


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

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

我的一个项目的样本

    // 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端点要将数据发送到哪个CoreMIDI端点,以便从设备本身播放,同时还要使用soundfont。