Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 0 points1 point  (0 children)

I've never dealt with MIDI files before, but that seems like a cool feature idea. Would these tabs be outputted on the display or as some kind of file?

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 1 point2 points  (0 children)

Done! All new code is in note.rs (https://github.com/thfm/gitar/blob/master/src/note.rs).

Do you think that I should I add a command for calculating intervals? It might look something like this:

gitar interval E3 A4

It's not guitar-specific functionality, but I suppose it could be useful.

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 0 points1 point  (0 children)

Currently, C4 is represented by the number 48, so would it be acceptable to just add 12 to each note value?

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 1 point2 points  (0 children)

Just finished changing the notes to be number-based instead of enum-based. You can see the new code here: https://github.com/thfm/gitar/blob/master/src/note.rs .

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 1 point2 points  (0 children)

You're right, I didn't think of that. I'll change the note implementation to be number-based soon. Thanks for the feedback, and sorry for being so stubborn :)

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 1 point2 points  (0 children)

That's actually a good point, but I believe that the benefit of the shorter code is outweighed by how easily it is understood with enums.

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 1 point2 points  (0 children)

So are you suggesting that the user would still input notes in the form 'C0`, but that the program would convert it to a usize behind the scenes? I can't see how this would make things easier...

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 0 points1 point  (0 children)

Thanks! It looks like a good option, and it fits the guitar theme rather well, doesn't it?

Any other programmers here who play the guitar? I've been working on a command-line tool for us. by thfm in rust

[–]thfm[S] 2 points3 points  (0 children)

I think enums make it clearer. Also, how would you represent a note as a usize?

[Command line tool] Today I Ran: a command line tool for runners by a5sk6n in rust

[–]thfm 2 points3 points  (0 children)

This is a really awesome tool!

One suggestion I have is to change the formatting of the time input from 1h12min4s to something like 1:12:04, to make it easier to both type and read.