# Voice control

**URL:** <https://forum.juce.com/t/voice-control/16734>\
**Category:** General JUCE discussion\
**Created:** [February 19, 2016, 5:17pm UTC](https://forum.juce.com/t/voice-control/16734 "2016-02-19T17:17:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navira](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@Navira](https://forum.juce.com/u/Navira)\
**Post date:** [February 19, 2016, 5:17pm UTC](https://forum.juce.com/t/voice-control/16734/1 "2016-02-19T17:17:51Z")

</div>

I compared my synth with others.  
Each MIDI message launches new voice. how to restart the voice?

For example:

My synthesizer

```
press C4 ->start new voice **:** press C4 ->start new voice **:** press C4 ->start new voice : etc
```

other synthesizers

```
press C4 ->start new voice **:** press C4 ->if playing set env state Attack (dont start new) **:** press C4 ->if playing set env state Attack (dont start new): etc
```

How can I control the launch of new voices?

&nbsp;

---

<div class="post-metadata">

**Author:** ![mashu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mashu/32/579_2.png) [@mashu](https://forum.juce.com/u/mashu)\
**Post date:** [February 20, 2016, 10:43am UTC](https://forum.juce.com/t/voice-control/16734/2 "2016-02-20T10:43:53Z")

</div>

Umm. Your question contains its own answer. If the note is playing, restart the attack.  
So, just make an array of bools like playing[128], and check that.

---

<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:** [February 20, 2016, 10:52am UTC](https://forum.juce.com/t/voice-control/16734/3 "2016-02-20T10:52:04Z")

</div>

An array of bools if probably not good advice!

Are you trying to build a mono synth? If so all you need to do is&nbsp;give it one voice, so that it will have to re-use it.

---

<div class="post-metadata">

**Author:** ![mashu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mashu/32/579_2.png) [@mashu](https://forum.juce.com/u/mashu)\
**Post date:** [February 20, 2016, 11:27am UTC](https://forum.juce.com/t/voice-control/16734/4 "2016-02-20T11:27:03Z")

</div>

I assumed it was for a polysynth

---

<div class="post-metadata">

**Author:** ![Navira](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@Navira](https://forum.juce.com/u/Navira)\
**Post date:** [February 20, 2016, 12:05pm UTC](https://forum.juce.com/t/voice-control/16734/5 "2016-02-20T12:05:31Z")

</div>

> Umm. Your question contains its own answer. If the note is playing, restart the attack.  
> So, just make an array of bools like playing[128], and check that.

thanks for the answer, I knew it&nbsp;

but the default Synthesizer::findFreeVoice returns only free voices.  
Overdrive this function solved the problem thank you.  
&nbsp;
