Technobear's Eigenharp developer blog

EigenLite

(mostly interesting to @Kai for ECMappers. but potentially others)

EigenLite is the foundation of all this stuff, its my API, that talks to all Eigenharps, and integrates into ‘3rd party apps’.

this does have its own topic, which needs updating :laughing:

in context of this blog, I thought id update a little whats going on it it…

I work on EigenLite in parallel to a ‘client project’, so things like EigenHost. usually, because these expose a better way for the api to work.

I, currently, don’t really version / release EigenLite in the way you do an app, because its for developers, and so they basically see a snapshot of it when they are actively working with it. they can update when they want (or not).
this is a pragmatic approach, which Im happy to change if needed…

anyways, the interesting bit is about recent changes…

Lifecycle callback

this was introduced to help apps have ‘manager’ classes that are responsible for knowing the state of eigenharps connected, and then delegate the actual processing to other ‘connection’ classes

I’m still not 100% happy about the whole device filtering etc.
I may push this further at some point so the Callback is for a particular device, to ease further the burden of apps having to track devices.

Testing - Capture/Replay API

Currently, EigenLite does not have any unit tests, these are within EigenHost.
(though possibly some of these could/should be moved?! need to review!)

However, EigenLite now has an new additional api to aid testing.
a ‘replay/capture’ api.
the idea is very simple, with this api - you can capture an eigenharps messages (at eigenapi level), store in ‘capture file’ (.elcf format), and then later replay them.

this means that you are able to record an Eigenharp being connecting, sending notes, etc - and then use this capture file to drive units test for your app to test/retest functionality etc.

example:
EigenHost has unit tests that check that the midi created for a particular capture file is correct.

Also, Im able to use this to create unit tests that ensure EigenApi itself is acting as I expect it too, that Ive not introduce a new bug etc.

AI usage

I’ve mentioned previously, Ive been exploring the use of AI for quite a long time now… not for ‘vibe’ coding, but rather, exploring how it can be used as a tool for experienced developer.
as a ‘fresh’’ project EigenHost has allowed me, for good n’ bad, to do this at a a new level (as I was not concerned with ‘tainting existing code’)

two areas, Ive found really useful (and how replay api got created)

  • documentation
    very few developers are working on any of these code, so time investment documenting is pretty ‘poor value’.
    but AI can really help this area , I don’t need to write, and can rather just generate and then review (for correctness), and its easy to update!
  • unit testing
    similar to documentation, unit testing has a pretty large overhead, even though its very beneficial it can be hard to justify the extra effort. AI can help reduce the overhead.

note:
I should say in both cases. this is not ‘free’ (in $ or time investment), its a tool - it doesn’t magically do the work, you have to work with it, review it, refine it, and also often ‘step in’ to get it going in the right direction…
This is kind of cool, it does not replace experience, rather it leverages it!

Future : Headphone / Microphone support

@Kai recently did some cool work in this area to add support for this for ECMapper.
It’s a bit of a change in direction for EigenApi which I wanted to be ‘lightweight’ and not require an audio dsp loop - but it is definitely a cool and useful addition.
my plan is to review this, and see we can get this into the api :slight_smile:

1 Like