midi note on for beginner
midi note on for beginner
- Subject: midi note on for beginner
- From: Vadim Kupriyanov <email@hidden>
- Date: Sat, 8 Apr 2006 12:53:05 +0400
Hello!
My question CoreMidi related:
Where I can see example code of simple sending out of midi note on?
I has search in mailing archives, but not find COMPLETE standalone
working example...
I try to do it, but my code is not working...
#import <Cocoa/Cocoa.h>
#include <stdio.h>
#include <CoreMIDI/MIDIServices.h>
int main()
{
MIDIPacketList packetList;
MIDIPacket *packetPtr = MIDIPacketListInit(&packetList);
char midiData[3];
midiData[0] = 0x90 + 1;//midi channel
midiData[1] = 0x7A;//midi note number
midiData[2] = 0x7A;//midi note velocity
packetPtr = MIDIPacketListAdd(&packetList, sizeof packetList,
packetPtr, AudioGetCurrentHostTime(), 3, (const Byte *)&midiData);
MIDISend(1, 1, &packetList);
}
Best regards,
Vadim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden