Go Down

Topic: Controlling Ableton Live with a ping sensor (Read 262 times) previous topic - next topic

RudeGullit

Hey everyone,

I am trying to use the Ableton live connection kit with this sensor:

https://www.conrad.nl/nl/ultrasoundsensor-velleman-vma306-geschikt-voor-arduino-boards-arduino-1-stuks-96823.html?WT.mc_id=gshop&insert=8J&gclid=Cj0KCQjwgb3OBRDNARIsAOyZbxDmH-weNfccqt0x33bv5G9wCt6S9tUeqaVOwAb5ea-5SPlcfY2HpCYaAl0aEALw_wcB&tid=932746031_46757557135_pla-296303633664&WT.srch=1

I got the sensor working fine, but am struggling with the connection to ableton.

This is probably because the digital pins in itself don't transmit useful information, they just provide the variables to calculate the distance, which is done in the Arduino.

When I use the serial monitor in Arduino, I can see the distance to the sensor in cm.

Is there a way to send the distance that is calculated by the arduino to the connection kit plugin in Ableton?

slipstick

Probably but I suspect very few of us know anything about the "connection kit plugin in Ableton" so if you can provide details about what sort of communication it accepts (links to documentation perhaps) then it might be easier to help.

Steve

RudeGullit

Ah, ok, thanks!

The connection kit works as a plugin in Ableton and it reads the pins on the arduino, so you can use the output values to directly control anything in Ableton.

So what I need is that an output pin on the arduino sends data to Ableton which relates to the distance of an object to the sensor.

Hope this clarifies things, if not, here is a link to the connection kit:

https://www.ableton.com/en/packs/connection-kit/

Grumpy_Mike

#3
Oct 02, 2017, 06:54 am Last Edit: Oct 02, 2017, 07:01 am by Grumpy_Mike
It seems like that connection kit will not do what you want. Some sort of software must be running on the Arduino and I suspect it is Firmata. All that will do is to read specific pins on the Arduino. It will not do what you want to do.

In order to do what you want, which is quite easy, involves a bit of programming.
First you want to decide what interface you want.
1) You could use ethernet / wi-fi but then you would need a shield on your Arduino for this. You then simply send your distance parameter under OSC and pick it up with your kit.

2) Use a MIDI interface and talk to Ableton over MIDI using CC messages.
Their are three ways of doing this:-
a) Build or buy a conventional 5 pin DIN MIDI interface, you will also need a cheap MIDI to USB cable.

b) Have a helper application like "Hairless" running on your computer to convert serial USB from the Arduino into a virtual MIDI input port.

c) Use an Arduino Leonardo or Micro, and program it to "look like" a MIDI HID USB device to your
computer.

3) This is a harder option but can be done. Hack the Arduino Firmata code, so that when it sees a specific request, like for one of the analogue pins, the code goes and takes the measurement and returns the value as if it were from the analogue pin.

RudeGullit

Thanks for the reply!

I actually investigated other methods and found sensors that have chips in them that convert distance into values to send over the arduino pins (through ultraviolet light).

like this one:
sharp sensor

It works fine and the serial monitor reads the values from the sensor. I acutally use two sensors right now, and the serial monitor displays both values.

But I've come across a new problem. Which is quite unexpected. While everything described above works fine, when I use the Ableton connection kit, it only registers pin A0. Everything works on pin a0, but when I switch to A3 for example, no data is received by ableton.

I want to use multiple sensors, so this is a problem. And I have no idea how to solve this.

Any thoughts?

Grumpy_Mike

Quote
(through ultraviolet light).
No it is IR.

Quote
Any thoughts?
It would have saved me wasting a lot of time if you would have mentioned this to begin with.

Quote
Everything works on pin a0, but when I switch to A3 for example, no data is received by ableton.
So check the other analogue pins as well. Then check that the analog pins on your Arduino actually work by writing a small sketch to print out the values it see on it.

Then contact the writers of that code to tell them it dosn't work.

RudeGullit

oh, pardon me, it was not my intention to waste your time, at all.

I've checked the other analog pins via the serial monitor and they work perfectly fine.

So I'll contact the writers of the code, but any other input is very welcome.

Go Up