Freedrum SDK (high level interface to manipulate sensors' params)


#1

Hi,

The first question I’d like to ask is regarding some kind of Freedrum SDK. I’ll try not to go into specific programming language details or syntax, just will try to summarise what would be nice to have available in the SDK to make it convenient to develop 3rd party apps for Freedrum. At the moment we have the MIDI commands available, and the UUIDs for services, but it still requires a lot of “know-how” to actually do something with it. So I will just write down what I would expect from the SDK if let’s say it would already exist :slight_smile:

  1. Service to discover FD Sensors. E.g.
onSensorDiscovered(FDSensor: sensor) {
    sensor.connect();
    sensor.doStuff();
    ...
    sensor.saveChanges();
    sensor.disconnect();
}
FDService.startScan(onSensorDiscovered);
  1. Sensor class. Might have methods to connect/disconnect, set any params that is already exposed now via MIDI CC messages. E.g.

zones = sensor.getZones(); // get horizontal zones
zone = zones[0];
zone.setLedColor(#00FF00);
zone.setStartAngle(0);
zone.setEndAngle(30); // in case of overlapping, one zone takes priority over another by order for example
pads = zone.getPads(); // get vertical pads
highPad = pads[1];
highPad.setMidiNote(49);

Also would be cool to add zones in a generic way, currently they’re hardcoded, but I guess it doesn’t make difference for a sensor about how many zones are there? It just gets an angles, then finds a matching zone within angle limits? Then it will allow to add any number of custom horizontal zones and vertical levels (of course with some common sense angle limits, nobody has a crash cymbal 360 degree behind). E.g.

zone = new FDZone();
zone.setStartAngle(0);
zone.setEndAngle(30);

padLow = new FDPad();
padLow.setYAngle(0);
padLow.setMidiNote(38); // snare
padHigh = new FDPad();
padHigh.setYAngle(30);
padHigh.setMidiNote(48); // high tom
pads = [padLow, padHigh];

zone.setPads(pads);
zones = [zone]; // only one zone for example

sensor.setZones(zones); // or mergeZones to not override current ones
sensor.saveChanges();

I’m pretty sure you guys already thought about something like this, just wanted to put some thoughts together and also hear your opinion about how does it fit into your vision of giving others controls over what they can do with the sensors and what should be restricted to not brake something. Just for me the current interface with MIDI CC messages and manually connecting to sensors with Bluetooth services looks a bit too low level, maybe I just need to dive deeper into the technical aspect of MIDI and BT communications, but the idea of SDK is exactly to abstract these kind of low level things while providing an understandable high level interface to manipulate things. Maybe this topic is also related to “Feature requests”, but I though since it’s more about programming - it belongs to this category.


#2

Our intention is to release public SDK’s. However, right now we have been focusing on “getting stuff done” before we go public with any source code.

But i can tell you that most of what you have in your list is already there. And much more…:slight_smile:


#3

Alright, here a first shot at a public sdk: https://bitbucket.org/freedrum/freedrum_android_sdk
The docs are a bit… sparse and not all the things you want is there, but at least it’s something to try out :slight_smile:


#4

Woohoo! Thank you, will try it out tomorrow :slight_smile: