Monday, May 1, 2023

How to invent musical notation, without even trying.

 I have a problem.
conceptual model --> computer model --> user interface

I've revived my "Liquid Notes" musical phrase recorder.  My question
is one of determining user intent when there is no data, which
probably means that I have to use the context. It's a musical context
and therefore complex, but I've been trying to adhere to a very simple
data model. I was seeing this as a tape recorder and I view this as an
experiment in brutal simplicity. A simple data model will yield a
simple user interface. I have no: grid, bar lines, beats. This is
intentional. I have only events.

"What happens after the last event?"

The problem shows up when you record a phrase and then play it
back. It defaults to repeating the (assumed fairly short) phrase.  How
do I determine the pause time between the end of the last note and the
start of the first note? There are currently two pieces of data
available, they are time values, and they are both wrong for this.

Press RECORD (time 0)
pre-gap
Play some notes, hit some pedals, etc. (times 1 - n)
post-gap
Press STOP (time n+1)

It sort of looks like one could use either the pre-gap or the post-gap
as the gap between the last and first notes when repeating, but
neither are correct enough. Both of those values have egonomic slop to
them. It may be my own lack of discipline that I am not pressing STOP
exactly on the next beat, but I assume I'm not that much worse than
typical non-professionals.


Proposal:
Discard the pre-gap. The code basically does this now. It's probably right.
There's really no musical intent to be had there. Oh, egad, this post just paid for itself.
In the case of creating a multi-track loop, the pre-gap IS musical itent.
Back to the drawing board....

What I wanted was a way to guess what the post-gap should be, in order
to provide a sensible default. I'm going to assign a knob to adjust
this value for experimentation.

It appears that the underlying data model will have to be complex. I'm
guessing that the gap between note 1 and note 2, in the phrase, is
owned by note 1, because we know note 2's arrival time, and it
shouldn't need to know anything about note 1. The gap could be a rest-like pause event of some kind. It complexifies my player function, but perhaps not much.