# Pitchbend

**URL:** <https://forum.electra.one/t/pitchbend/1149>\
**Category:** General discussion\
**Created:** [November 26, 2021, 8:10pm UTC](https://forum.electra.one/t/pitchbend/1149 "2021-11-26T20:10:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobinC](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@RobinC](https://forum.electra.one/u/RobinC)\
**Post date:** [November 26, 2021, 8:10pm UTC](https://forum.electra.one/t/pitchbend/1149/1 "2021-11-26T20:10:30Z")

</div>

Is it possible to set up a control to send out pitchbend data. I know the editor doesn’t currently support this but can I edit a json to do this ?

---

<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:** [November 27, 2021, 5:47am UTC](https://forum.electra.one/t/pitchbend/1149/2 "2021-11-27T05:47:14Z")

</div>

I hear you @RobinC 🙂 I will try to get pitchbend and aftertouch to the next firmware version. I need to coordinate it with @Tomas as the changes will be needed in both the firmware and the editor.

---

<div class="post-metadata">

**Author:** ![petruccigp](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/petruccigp/32/554_2.png) [@petruccigp](https://forum.electra.one/u/petruccigp)\
**Post date:** [November 27, 2021, 7:05pm UTC](https://forum.electra.one/t/pitchbend/1149/3 "2021-11-27T19:05:26Z")

</div>

For the time being - @RobinC I do that with a Lua function:

```auto
function handle_slider (valueObject, value)
	    local control = valueObject:getControl()
        local id = control:getId()
        local channel = id % 6
        local pitch = math.floor( (value * 16383)/100 ) - 8192
        midi.sendPitchBend (PORT_1, channel, pitch)
end

```

Then assign `handle_slider` to a virtual parameter slider set values 0 to 100. Maybe this can help you.

---

<div class="post-metadata">

**Author:** ![RobinC](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@RobinC](https://forum.electra.one/u/RobinC)\
**Post date:** [November 29, 2021, 7:14pm UTC](https://forum.electra.one/t/pitchbend/1149/4 "2021-11-29T19:14:03Z")

</div>

thanks for the tip. I’ll see if I can adapt it to what I want

---

<div class="post-metadata">

**Author:** ![RobinC](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@RobinC](https://forum.electra.one/u/RobinC)\
**Post date:** [December 1, 2021, 7:29pm UTC](https://forum.electra.one/t/pitchbend/1149/5 "2021-12-01T19:29:46Z")

</div>

Pretty much works though I’m missing the bit when pitchbend is sent to the electra to update the control. I’ll see if I can get lua to handle that

thanks for the tip though
