Click here to Skip to main content
14,743,934 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: LinkedIn announces LinkedIn Learning, a new online learning platform to develop skills and talent Pin
Duncan Edwards Jones23-Sep-16 0:04
professionalDuncan Edwards Jones23-Sep-16 0:04 
GeneralRe: LinkedIn announces LinkedIn Learning, a new online learning platform to develop skills and talent Pin
Dan Neely23-Sep-16 3:36
MemberDan Neely23-Sep-16 3:36 
GeneralRe: LinkedIn announces LinkedIn Learning, a new online learning platform to develop skills and talent Pin
Kent Sharkey23-Sep-16 5:00
staffKent Sharkey23-Sep-16 5:00 
NewsTypeScript 2.0 is now available! Pin
Kent Sharkey22-Sep-16 8:58
staffKent Sharkey22-Sep-16 8:58 
NewsMIDI Enhancements in Windows 10 Pin
Kent Sharkey21-Sep-16 13:16
staffKent Sharkey21-Sep-16 13:16 
GeneralRe: MIDI Enhancements in Windows 10 Pin
MacSpudster21-Sep-16 13:39
professionalMacSpudster21-Sep-16 13:39 
GeneralRe: MIDI Enhancements in Windows 10 Pin
Ron Anders21-Sep-16 15:30
MemberRon Anders21-Sep-16 15:30 
GeneralRe: MIDI Enhancements in Windows 10 PinPopular
Pete Brown21-Sep-16 20:26
MemberPete Brown21-Sep-16 20:26 
Hi All

I'm the author of the blog post here. Through the wonders of the web, I've found you all referencing it. Smile | :)

Some clarification for you:
  • We've had (and still have) two previous MIDI APIs: DirectMusic and MME. Both of those are still available, but only work on desktop PCs. They're also not flexible enough to easily handle new transports like Bluetooth in a way we were happy with.
  • We did fix some minor MIDI Jitter and timing in Windows 10 RTM when we created this API. In the end, however, you're at the mercy of USB which, given how it routes, is going to add a very small amount of jitter and latency. Those amounts are still less than the DIN MIDI wire speed, though. Of course, Bluetooth has higher latency and jitter and depends on quality of space in the room. We're competitive with what Apple does there (and compatible with them), but it's not as tight as USB. For that reason, many people tend to use Bluetooth MIDI for secondary controls, not for banging our riffs on a keyboard. You can, but IMO, it's not the best experience.
  • The way DAWs typically deal with latency and jitter is to schedule MIDI messages. We don't have that yet, but it's on the backlog for consideration.
  • In our own testing, the wrapper doesn't add any meaningful latency; it's working at function call speeds. The UWP MIDI APIs were always accessible to desktop applications (not true of all UWP APIs) but some companies felt the ceremony required to call from a Win32 app was a bit ... opaque. I agree, so had this work done by a colleague on the team. Feel free to take a look at the code on GitHub and try it out. We're happy to consider pull requests if you have suggestions.
void winrt_midi_out_port_send(WinRTMidiOutPortPtr port, const unsigned char* message, unsigned int nBytes)
{
    MidiOutPortWrapper* wrapper = (MidiOutPortWrapper*)port;
    wrapper->getPort()->Send(message, nBytes);
}

...

void WinRTMidiOutPort::Send(const unsigned char* message, unsigned int nBytes)
{
    // check if preallocated IBuffer is big enough and reallocate if needed
    if (nBytes > mBuffer->Capacity)
    {
        mBuffer = ref new Buffer(nBytes);
        mBufferData = getIBufferDataPtr(mBuffer);
    }

    memcpy_s(mBufferData, nBytes, message, nBytes);
    mBuffer->Length = nBytes;
    mMidiOutPort->SendBuffer(mBuffer);
}

Beyond that, it's worth pointing out that many have been using MIDI wrapper libraries since the dawn of time. It's never really been a problem.

The C# helper library I wrote is for people more familiar with that language. In that, I'm trying to make it simple to implement MIDI functionality in apps, including somewhat esoteric stuff like NRPN and RPN.

If performance is a primary concern, I'd use the C version. If it's an enormous concern, the source is available so that you can incorporate the calls directly in your app and do things like reuse buffers if you want. In practice, this hasn't been necessary, but we don't want to force the final word there.

Hope that helps.

Pete
Pete Brown - Microsoft
Twitter: @pete_brown
SoundCloud: https://soundcloud.com/psychlist1972
YouTube: https://www.youtube.com/Psychlist1972

GeneralRe: MIDI Enhancements in Windows 10 Pin
Pete O'Hanlon21-Sep-16 22:32
mvePete O'Hanlon21-Sep-16 22:32 
GeneralRe: MIDI Enhancements in Windows 10 Pin
Pete Brown21-Sep-16 22:43
MemberPete Brown21-Sep-16 22:43 
GeneralRe: MIDI Enhancements in Windows 10 Pin
Midi_Mick22-Sep-16 5:08
professionalMidi_Mick22-Sep-16 5:08 
GeneralRe: MIDI Enhancements in Windows 10 Pin
Pete Brown22-Sep-16 7:26
MemberPete Brown22-Sep-16 7:26 
News5 reasons architect and developers argue Pin
Kent Sharkey21-Sep-16 13:11
staffKent Sharkey21-Sep-16 13:11 
GeneralRe: 5 reasons architect and developers argue Pin
MacSpudster21-Sep-16 13:46
professionalMacSpudster21-Sep-16 13:46 
GeneralRe: 5 reasons architect and developers argue Pin
Joe Woodbury21-Sep-16 13:49
professionalJoe Woodbury21-Sep-16 13:49 
GeneralRe: 5 reasons architect and developers argue Pin
MacSpudster21-Sep-16 13:54
professionalMacSpudster21-Sep-16 13:54 
GeneralRe: 5 reasons architect and developers argue Pin
Marc Clifton21-Sep-16 14:51
mvaMarc Clifton21-Sep-16 14:51 
GeneralRe: 5 reasons architect and developers argue Pin
raddevus22-Sep-16 10:56
mvaraddevus22-Sep-16 10:56 
GeneralRe: 5 reasons architect and developers argue Pin
raddevus22-Sep-16 10:51
mvaraddevus22-Sep-16 10:51 
NewsGoogle has rejoined the messaging wars with its artificially intelligent app, Allo Pin
Kent Sharkey21-Sep-16 12:47
staffKent Sharkey21-Sep-16 12:47 
GeneralRe: Google has rejoined the messaging wars with its artificially intelligent app, Allo Pin
Dan Neely22-Sep-16 3:40
MemberDan Neely22-Sep-16 3:40 
NewsMark Zuckerberg and Priscilla Chan announce $3 billion initiative to ‘cure all diseases’ Pin
Kent Sharkey21-Sep-16 11:59
staffKent Sharkey21-Sep-16 11:59 
GeneralRe: Mark Zuckerberg and Priscilla Chan announce $3 billion initiative to ‘cure all diseases’ Pin
MacSpudster21-Sep-16 13:44
professionalMacSpudster21-Sep-16 13:44 
GeneralRe: Mark Zuckerberg and Priscilla Chan announce $3 billion initiative to ‘cure all diseases’ Pin
Joe Woodbury21-Sep-16 13:52
professionalJoe Woodbury21-Sep-16 13:52 
GeneralRe: Mark Zuckerberg and Priscilla Chan announce $3 billion initiative to ‘cure all diseases’ Pin
Sander Rossel21-Sep-16 22:19
professionalSander Rossel21-Sep-16 22:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.