One Knob MIDI controller with USB


I’m completely new with aduino, (I mean reaaally noob) so this is my problem.

I’m trying to use a single knob to send MIDI informations to ableton via USB (using hairless-midiserial).
I want to be able to map this knob to anything on ableton live 8.

Hardware connection is more than simple, potentiometer connected on analog pin A0, I managed to get the data from analog pin A0 on the arduino console to observe numbers from 0 to 127 turning that knob.
Now how to send these number to a knob on ableton ???

I’ve been working on buttons to control MIDI notes and a potentiometer to control the pitch of the note or the pitchbend command, it’s working pretty good, but I want my knob being able to be mapped to whatever I want. HOW DO I DO THAT ?

It’s been a long time now I’m trying to figure something out by myself but nothing is helping me…
Is that so complicated for JUST ONE KNOB ???

I’m using a Arduino UNO R3, and the software Hairless MIDIserial for midi communication between arduino and Ableton.

Does anybody can help me to write this code ? you get any answer for this? Do u accomplish to convert to midi messages?

Thanks in Advance