# Multiple Instances—what to watch out for?

**URL:** <https://forum.bome.com/t/multiple-instances-what-to-watch-out-for/5059>\
**Category:** Bome Products\
**Tags:** midi-translator\
**Created:** [March 31, 2023, 9:43am UTC](https://forum.bome.com/t/multiple-instances-what-to-watch-out-for/5059 "2023-03-31T09:43:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [March 31, 2023, 1:00pm UTC](https://forum.bome.com/t/multiple-instances-what-to-watch-out-for/5059/2 "2023-03-31T13:00:04Z")

</div>

> [@mdac356](#):
>
> I’d like to expand some of the functionality of a Bome app I’m writing but am running out of global variables. I’d like to use another instance of Bome to get access to additional global variables.

There are 780 available global variables. I’m surprised you are running out but if you are, you are. Maybe you should, however look at a strategy to reduce the number of global variables. For instance, I use bitmapping for simple on/off state. With this I can map up to 32 toggle button functions with a single global variable. A variable is 32 bits.

> [@mdac356](#):
>
> Will multiple instances decrease the stability of Bome (crashes, unexpected results, etc…)?

I have not had any stability problems and I run multiple instance all of the time. I use a APC-MINI to control voicemeeter while my Win 10 PC is powered up. Then I do support on a separate instance. Sometimes I have to run 2 instances for support using one as an emualator and the other as a test target. I have heard recommendations against multiple instances but maybe these are based on older version of MT Pro as I have not ever tripped over any stability issues.

> [@mdac356](#):
>
> Both instances of Bome will need to use Bome Virtual MIDI ports. Any issues with that?

Not if they are using different virtual ports. On Windows, a given port (virtual or otherwise) can only be opened by a single application or device at a given time. You have up to 18 virtual ports on MT Pro (9 in and 9 out). If you need more, you would need to purchases [Unlimited Named MIDI Ports](https://www.bome.com/shop/unlimited-named-midi-ports).

> [@mdac356](#):
>
> Any best practices I should follow when running multiple instances in terms of programming?

Beyond using different virtual port, I would say watch out for keystroke and mouse sequences and make sure they are different on each instance as they are not differentiated between instances.

[Here](https://forum.bome.com/t/bitwise-operations-and-reference/1862) is a reference to bitwise operations if you are interested in exploring better use of global variables. As I say, I am currently using 2 global variables to control 64 LED’s on my APC-MINI to track Voicemeeter channel status.

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

_[View the full topic](https://forum.bome.com/t/multiple-instances-what-to-watch-out-for/5059)._
