MIDI ports for lensing and I/O are currently expressed as port IDs. These aren't even virtual IDs, they are low-level ALSA IDs. Let's not do this. Human-readable names are better.
Why
Most importantly, this is the kind of ephemeral, cryptic, machine-specific gobbledygook that means doodly squat to humans and runs directly counter to the pigeons design goals. We want to get (very) nerdy but this is the wrong kind of nerdy.
Secondly, these port numbers change all the time. Get real crazy with plugging and unplugging, restart your norns, and you'll find the port IDs have utterly changed. No bueno.
Considerations
There is already (temporary/debugging) code in startup to enumerate the names of these ports. Adapting this code is probably the path of least resistance.
The tokenizer (expr_to_table) treats all whitespace as a delimiter between tokens. I have considered tweaking the tokenizer to convert underscores to spaces for string tokens, and this would be a good use case. This would likely be just about the last tokenizing step. Naturally, anything accepting user input to select such a port would require the opposite conversion (space to underscore) for serialization to plisp.
A plisp function to return a low-level port number based on a named port number would be fine, and probably the easiest approach based on where the ball lies today.
Summary
MIDI ports for lensing and I/O are currently expressed as port IDs. These aren't even virtual IDs, they are low-level ALSA IDs. Let's not do this. Human-readable names are better.
Why
Most importantly, this is the kind of ephemeral, cryptic, machine-specific gobbledygook that means doodly squat to humans and runs directly counter to the pigeons design goals. We want to get (very) nerdy but this is the wrong kind of nerdy.
Secondly, these port numbers change all the time. Get real crazy with plugging and unplugging, restart your norns, and you'll find the port IDs have utterly changed. No bueno.
Considerations
expr_to_table
) treats all whitespace as a delimiter between tokens. I have considered tweaking the tokenizer to convert underscores to spaces for string tokens, and this would be a good use case. This would likely be just about the last tokenizing step. Naturally, anything accepting user input to select such a port would require the opposite conversion (space to underscore) for serialization to plisp.