|
This seems like the SD card file picker on my cheap 3D printer. Use a rotary knob to scroll thru the list of files and push to select. Except you can only show one line of text on your display.
Can you read one row/file at a time, or possibly two? Then keep current, prev, and next in memory and ignore the rest until the user scrolls.
Can you count the number of clicks on the rotator knob so you know how many indexes to scroll forward/back so the user can "spin the wheel" to get through a long list?
Do you have a FAT or equivalent to use as if it were an ISAM index so you don't have to read each file whilst scrolling?
|
|
|
|
|
I read all the filenames and basic information about the files into memory before I display the selection screen.
It is this portion that takes the time. The reason being is that I pre-validate and scan every file for corruption first.
The reason I do that is because musicians equipment seems to fail more often than what I'm used to and corrupt MIDIs are just a thing to be dealt with. Furthermore musicians are not tech savvy as a rule, so I'd rather not show the file in the list. So I don't.
When I display the files, it's one at a time
sonata.mid
4 tracks
tempo varies
or
sabotage.mid
11 tracks
tempo 175.0 BPM
with the name of the file being blue for type 1 and type 0 files, otherwise black for type 2 files (which are most suited for this gadget)
The rotary encoder spins the files plenty fast enough.
The only issue is after about a dozen midi files is where things start to get just on the other side of breezy and it goes downhill from there.
To err is human. Fortune favors the monsters.
|
|
|
|
|
With your one-item display and the need for immediate response, I would read the directory, sort the names into the desired order and display the first one without any information (say -checking- perhaps).
Update it when it's been examined.
Check the rest of the files as a background task after that.
If the user scrolls to a new uninspected one, drop the inspection of the first one and give the new one priority. Keep partial results if you can.
Allow selection and use before the check is finished, because it will nearly always be alright.
Display corrupted ones anyway, and show that as the track information. It's better than having your user be sure "it was on one of these SD cards here somewhere".
|
|
|
|
|
Agree with others on preload if possible.
Insert list in sorted order. That way they can title sets 1. Xxx, 2. Yyy, etc
Consider “Begin of List” and “End of List” entries or indicators.(independently)
|
|
|
|
|
kinky alien porn is unsurpassed (9)
modified 18-May-22 7:31am.
|
|
|
|
|
How many letters?
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wonder how many actually use this word...
“Real stupidity beats artificial intelligence every time.”
― Terry Pratchett, Hogfather
|
|
|
|
|
I've only ever seen this word used in crosswords
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Archaic French, so probably still used in Quebec.
|
|
|
|
|
And Rees Mogg speeches.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
He said alien porn, not tractor porn.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
OK, I'll bite. nonpareil
scrambling the letters of alien porn to define unsurpassed
|
|
|
|
|
YAUT!
kinky (anagram)
alien porn (letters)
is unsurpassed (definition)
|
|
|
|
|
She wants to enter her Covid LFT result but her tablet is not playing ball, so she has been screaming at it for not turning on.
Finally, I go to investigate the problem, and ... the battery is at "0%" ...
At least it's easy to fix!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Quote: At least it's easy to fix! by taking some other tablets
|
|
|
|
|
RickZeeland wrote: by taking some other's tablet FTFY
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Mine too. Only she would go back to quill pens and calligraphy if it were possible.
Ed
|
|
|
|
|
Herself uses them for jigsaw puzzles, so the cat can't upset them.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Slow Eddie wrote: Only she would go back to quill pens and calligraphy if it were possible. If I only could ... My wife (then) was the editor of a small magazine published by our local historical society, I was the computer typesetting consultant. This guy that regularly made headlines for some articles, as well as the the front page, did use a real quill pen for his calligraphy. He was so unsatisfied with the ink he could buy here in Norway that he traveled to the Netherlands for the sole purpose of buying the right ingredients to mix his own ink of proper quality. Note that he did not buy Dutch ink, just the ingredients so that he could control all aspects of the ink composition!
But gee, if I could have had a handwriting like his! Every word he wrote was a graphical piece of art.
Looking at my own handwriting, I feel ashamed. I have always been ashamed of it. So from day one of my playing around with computers, I let them handle all of my writing. My upbringing had taught me that personal letters always should be hand written, never typed. I have consistently been misbehaving for more than forty six years now. Not a single letter has been in my handwriting since 1975. I do believe that the readers of my letters are happy with it.
Still, I wish that I really knew how to do calligraphy with a real quill pen.
|
|
|
|
|
Oh, just wait until she has to use 2FA to sign into her tablet, then puzzle site, etc.
Herself: I need my phone to do my puzzles on my tablet!?! (launches nuclear missiles) 🚀🚀🚀🚀
2FA drives me nuts.
Here's my contribution to the 2FA discussion[^]. It's star wars based so it should go over really well here.
|
|
|
|
|
I really hate those code reviewer who say "oh your variable name is too short, or too long, or I don't like like it, blah, blah"... but I realize I somewhat became what I hate meself... Thankfully I still don't care about the length, or abbreviation, or single letter variables... But when one used a concatenation of multiple full words, what really grates me is... spelling mistakes! :/
like
- m_SomethingManger, argh.. it's manager, 2 "a" you dyslexic moppet!
- currentTransation, what's a transation? did you forget a "c"?
anyhow, no biggie. What I noticed though, is when I say "spelling please", my comment is ignored I guess while you can't unsee it once you see it, you probably can't see it, until someone.. mmm.. spell it out! (pun intended )
|
|
|
|
|
Plural variables are my issue. Tons instead of ton, etc. Higher probability of a single letter spelling error.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
What do you do about arrays? Singular or plural?
Plural looks better in declaration:
int apples[5]; Singular looks better in other statements:
if (apple[3] != rotten) …
I know it sounds silly, but I’m an adept of literate programming and somehow care about these little details.
Mircea
|
|
|
|
|
Exactly. I agree. Avoid plural names, but seek collective nouns.
|
|
|
|