# Keeps sending CC values as long as the knob is touched.

**URL:** <https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717>\
**Category:** General discussion\
**Created:** [February 29, 2024, 7:07pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717 "2024-02-29T19:07:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![polyshaft](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/polyshaft/32/2815_2.png) [@polyshaft](https://forum.electra.one/u/polyshaft)\
**Post date:** [February 29, 2024, 7:07pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/1 "2024-02-29T19:07:19Z")

</div>

Hello.  
The MIDI specifications do not transmit unless there is a change in the CC value.

Is it possible to use the Elektra One touch sense knob to transmit even if there is no change in the CC value at regular intervals while the knob is touched?

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [February 29, 2024, 8:11pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/2 "2024-02-29T20:11:54Z")

</div>

short answer is yes - probably using a combination of the events.onPotTouch(). and timer() functionality  
you can start something in the onPotTouch() until you release the knob and use the timer.onTick() to do things at regular intervals

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [March 1, 2024, 6:06am UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/3 "2024-03-01T06:06:16Z")

</div>

As @oldgearguy suggested, use combination of a timer and pot touch callback:

example preset can be found at: [Timer CC](https://app.electra.one/preset/b0H5kJkbQ2ST0hpPReHY).

This example sends CC#5 in 100msecs interval as long as the user touches the control or whenever the value is changed.

---

<div class="post-metadata">

**Author:** ![polyshaft](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/polyshaft/32/2815_2.png) [@polyshaft](https://forum.electra.one/u/polyshaft)\
**Post date:** [March 1, 2024, 2:19pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/4 "2024-03-01T14:19:19Z")

</div>

The preset you made worked and I figured out how to send different CCs and ports.

However, while trying this and that, I probably got into a loop of While statements and Electra one froze at the startup screen and would not connect to chrome.

I have pressed the reset button and it does not come back.

Is there any way to restore it?  
MK1 and firmware is 3.5.4.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [March 1, 2024, 4:46pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/5 "2024-03-01T16:46:15Z")

</div>

an infinite loop in the timer can be tricky. The reason is that timer.onTick() runs with a very high priority. If it does not “leave”, other things like buttons, touch, just keep waiting. I am trying to find some way how to make this more error-prone.

for now, restart E1 to the bootloader mode. (bottom-right button pressed) when powering the controller on. In bootloader, enable the USB Disk mode. USB storage device Electra will show up on your computer. Go to the ctrlv2/slots directory and remove the preset / lua files:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/2X/c/c88b64e2a8513978b36e81721682a677bbb503a7.jpeg)

If you know what preset slot the preset sits in, you can delete just that specific .epr and .lua files.

Let me know if it helped.

---

<div class="post-metadata">

**Author:** ![polyshaft](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/polyshaft/32/2815_2.png) [@polyshaft](https://forum.electra.one/u/polyshaft)\
**Post date:** [March 2, 2024, 6:12am UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/6 "2024-03-02T06:12:57Z")

</div>

Hi martin,

I was able to start the system by following this procedure.  
[https://docs.electra.one/troubleshooting/defaultpreset.html](https://docs.electra.one/troubleshooting/defaultpreset.html)  
Thank you.

I am very bad at programming. 🥴  
I will take this opportunity to work on LUA.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [March 2, 2024, 7:50am UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/7 "2024-03-02T07:50:00Z")

</div>

> [@polyshaft](#):
>
> I am very bad at programming. 🥴  
> I will take this opportunity to work on LUA.

Do not get intimidated. As you saw, it is easy to recover. I am thinking of adding some high-priority button combo to stop/terminate Lua. That would make things even easier.

---

<div class="post-metadata">

**Author:** ![polyshaft](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/polyshaft/32/2815_2.png) [@polyshaft](https://forum.electra.one/u/polyshaft)\
**Post date:** [March 2, 2024, 12:29pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/8 "2024-03-02T12:29:21Z")

</div>

It is still very difficult.  
I want to implement TIMER CC on all the faders on the page.  
Is there any other way than writing “Configure the message and identify the control” one by one?

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [March 2, 2024, 12:51pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/9 "2024-03-02T12:51:24Z")

</div>

I understand when you need now. I will try to extend the example. I think I will have a moment for it tomorrow.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [March 3, 2024, 1:37pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/10 "2024-03-03T13:37:28Z")

</div>

I made edits to the preset so that it keeps sending CC messages in given time interval for any CC control used in the preset. Here’s the updated version: [Timer CC](https://app.electra.one/preset/b0H5kJkbQ2ST0hpPReHY).

I have added different controls on two pages to show that any CC control will be picked up. I tested it on mk2 with v3.5.4. Should work on mk1 too. I hope 😉

---

<div class="post-metadata">

**Author:** ![polyshaft](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/polyshaft/32/2815_2.png) [@polyshaft](https://forum.electra.one/u/polyshaft)\
**Post date:** [March 3, 2024, 2:15pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/11 "2024-03-03T14:15:49Z")

</div>

Thank you.  
It takes me a while to decipher how this is happening.  
I was able to port it to my other presets and see that it is enabled on all knobs no matter what page I am on.  
It’s like magic.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [March 3, 2024, 2:22pm UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/12 "2024-03-03T14:22:38Z")

</div>

I can imagine you might have some knobs where that action is not needed. For those, you can add a list with controls to exclude.

---

<div class="post-metadata">

**Author:** ![polyshaft](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/polyshaft/32/2815_2.png) [@polyshaft](https://forum.electra.one/u/polyshaft)\
**Post date:** [March 9, 2024, 6:13am UTC](https://forum.electra.one/t/keeps-sending-cc-values-as-long-as-the-knob-is-touched/2717/13 "2024-03-09T06:13:51Z")

</div>

Is it possible to reflect the same MIDI port, channel, and CC set on a knob from MIDI In in real time while not touching the knob with touch sense?  
My goal is to combine this with Timer CC:)
