One button controller with Arduino nano

Hi guys,
I'm a newbie. I would like to make a really simple one button box that could trigger a thing in Ableton live (midi). Can I use a Nano to do this without adding a female midi port? I found many projects using UNO but for one button...

THANKS FOR YOUR TIME!!!
PASY

What kind of plug does the Ableton device have? If it has a MIDI plug then you're obligated to put a MIDI socket on your device.

Remember most people here are Arduino experts, not Ableton or MIDI experts. Any time you mention those kinds of devices, you will need to explain them a bit more than just giving their names.

All I know about midi is that it's a specific protocol, which makes me guess that you will need some Arduino - midi converter. I'm sure the Arduino midi tutorial explains it quite well.

The difference between the UNO and the Nano is that the UNO has an ATmega16U2 microcontroller that handles the Serial-to-USB communication. It is a general purpose, programmable microcontroller, so you can flash MIDI USB firmware to it.
The Nano has a single-purpose FTDI chip for Serial-to-USB. It only does Serial (CDC), no MIDI.

I’d recommend to get an Arduino Micro, it supports MIDI over USB natively, without having to flash custom firmware.

If you really want to use the Nano, you can use a software tool like Hairless MIDI<–> Serial.

Read more here: MIDI_controller/wiki/MIDI-over-USB


The code for a single MIDI button is really easy:

[color=#5e6d03]#include[/color] [color=#434f54]<[/color][b][color=#d35400]MIDI_Controller[/color][/b][color=#434f54].[/color][color=#000000]h[/color][color=#434f54]>[/color] [color=#434f54]// Include the library[/color]

[color=#00979c]const[/color] [color=#00979c]uint8_t[/color] [color=#000000]velocity[/color] [color=#434f54]=[/color] [color=#000000]0b1111111[/color][color=#000000];[/color] [color=#434f54]// Maximum velocity (0b1111111 = 0x7F = 127)[/color]
[color=#00979c]const[/color] [color=#00979c]uint8_t[/color] [color=#000000]C4[/color] [color=#434f54]=[/color] [color=#000000]60[/color][color=#000000];[/color]              [color=#434f54]// Note number 60 is defined as middle C in the MIDI specification[/color]

[color=#434f54]// Create a new instance of the class 'Digital', called 'button', on pin 2, that sends MIDI messages with note 'C4' (60) on channel 1, with velocity 127[/color]
[b][color=#d35400]Digital[/color][/b] [color=#000000]button[/color][color=#000000]([/color][color=#000000]2[/color][color=#434f54],[/color] [color=#000000]C4[/color][color=#434f54],[/color] [color=#000000]1[/color][color=#434f54],[/color] [color=#000000]velocity[/color][color=#000000])[/color][color=#000000];[/color]

[color=#00979c]void[/color] [color=#5e6d03]setup[/color][color=#000000]([/color][color=#000000])[/color] [color=#000000]{[/color][color=#000000]}[/color]

[color=#00979c]void[/color] [color=#5e6d03]loop[/color][color=#000000]([/color][color=#000000])[/color] [color=#000000]{[/color]
  [color=#434f54]// Refresh the button (check whether the button's state has changed since last time, if so, send it over MIDI)[/color]
  [b][color=#d35400]MIDI_Controller[/color][/b][color=#434f54].[/color][color=#d35400]refresh[/color][color=#000000]([/color][color=#000000])[/color][color=#000000];[/color]
[color=#000000]}[/color]

Using the MIDI_Controller library.

Pieter