# The MidiOutput::openDevice always return null

**URL:** <https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040>\
**Category:** Windows\
**Created:** [March 30, 2016, 7:02am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040 "2016-03-30T07:02:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zp\_w](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@zp\_w](https://forum.juce.com/u/zp_w)\
**Post date:** [March 30, 2016, 7:02am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/1 "2016-03-30T07:02:41Z")

</div>

Hey

I'm trying to open a MIDI device use MidiOutput::openDevice(0).

what's the prm?​blen

Thanks!

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [March 30, 2016, 7:58am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/2 "2016-03-30T07:58:47Z")

</div>

You didn't actually initialise your device manager!

---

<div class="post-metadata">

**Author:** ![zp\_w](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@zp\_w](https://forum.juce.com/u/zp_w)\
**Post date:** [March 30, 2016, 8:33am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/3 "2016-03-30T08:33:00Z")

</div>

Thanks for your reply!

What&nbsp;i can do?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [March 30, 2016, 8:55am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/4 "2016-03-30T08:55:47Z")

</div>

> What&nbsp;i can do?

Well, it's not initialised, so perhaps initialising&nbsp;it would be a good idea...!

There's plenty of example code and tutorials that involve the audiodevicemanager class&nbsp;- maybe start from that if you're new to this kind of thing.

---

<div class="post-metadata">

**Author:** ![zp\_w](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@zp\_w](https://forum.juce.com/u/zp_w)\
**Post date:** [March 30, 2016, 9:18am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/5 "2016-03-30T09:18:38Z")

</div>

Thank you!

I want to make a console application that can use midi, but there is no such example.

---

<div class="post-metadata">

**Author:** ![zp\_w](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@zp\_w](https://forum.juce.com/u/zp_w)\
**Post date:** [March 30, 2016, 9:21am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/6 "2016-03-30T09:21:05Z")

</div>

Thank you!

I want to make a console application that can use midi, but there is no such example

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [March 30, 2016, 9:40am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/7 "2016-03-30T09:40:06Z")

</div>

Sure, but the classes are all the same regardless of the type of app.

---

<div class="post-metadata">

**Author:** ![zp\_w](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@zp\_w](https://forum.juce.com/u/zp_w)\
**Post date:** [March 31, 2016, 1:50am UTC](https://forum.juce.com/t/the-midioutput-opendevice-always-return-null/17040/8 "2016-03-31T01:50:49Z")

</div>

Thank you！
