chrisjbaik / psalted

Chords/lyrics songsheet management application.
psalted.com
5 stars 0 forks source link

Have songs print sequentially for band songbook #31

Open chrisjbaik opened 9 years ago

jchenggggg commented 9 years ago

Sequentially by what? Alphabetical by title? By first line of the song?

chrisjbaik commented 9 years ago

I think alphabetical by title is fine. Actually, more accurately, I'd like to use the song_code attribute (only visible if you have the band role enabled). We have to be careful about lexicographic order (e.g. B9 comes before B10).

But I don't think what order matters so much as the fact that you can fix the order?

jchenggggg commented 9 years ago

Alright, so it sounds like the ui for rearranging will be the bulk of this story

Do we care about saving work? Should we be able to save our print order as a setlist or something? A few use cases:

Could we implement this by saving it in a setlist? I guess it depends on how we're currently handling associating setlists to users so I'll take a look I guess

chrisjbaik commented 9 years ago

I think that there should be a global ordering dictated by the Song Codes that is somewhat fixed and stable, so that everytime the songbook is printed it's consistent. When new songs are added, they are appended with later song codes. Whether that's automatically assigned or manually inputted, I think it should be hard-coded into the song as a unique id of sorts.

Currently, I don't think setlists have any fixed ordering in the database or anything. Also, take a look at the /band/letters route to give you a little bit of an idea of what I was thinking..

On Fri, Jul 10, 2015 at 12:27 AM chengsta notifications@github.com wrote:

Alright, so it sounds like the ui for rearranging will be the bulk of this story

Do we care about saving work? Should we be able to save our print order as a setlist or something? A few use cases:

  • When we want to print the songbook again
  • If we're rearranging and someone hits the back button or the computer dies or something

Could we implement this by saving it in a setlist? I guess it depends on how we're currently handling associating setlists to users so I'll take a look I guess

— Reply to this email directly or view it on GitHub https://github.com/chrisjbaik/psalted/issues/31#issuecomment-120221954.

  • Chris
varoot commented 9 years ago

Not sure what you guys are talking about, but I remember when I was working on printing chord sheets, I made a functionality to output something like that and I also sort it, I think. Already forgot what it was (it was like you can pass a custom function to the numbering). You can try looking into it, or I can look into it if you can't find.

varoot commented 9 years ago

Oh here, found it: https://github.com/varoot/chordsify-php/blob/master/Chordsify/SongSheet.php#L234

Pass a callback as "autonumber" option, this function will be called with 3 arguments: (order in the sheet, column number, song obj)

Basically you can make use of this function to generate custom numbering, like pulling out first letter from song title, etc.

jchenggggg commented 9 years ago

@chrisjbaik Wait so... the songbook will always be printed in Song Code order, is that correct? When you say "we need to be able to change the order", do you mean "if the app doesn't put the songs in correct song code order then we need to manually be able to", or do you mean "we might want to print the songbook NOT in song code order"

Would it mess anything up if we ask the people who input song codes to input them with leading zeros? or if we format the song code string before storing it into the database? e.g. when the user enters A7 we make that into A007, and A12 into A012 etc

chrisjbaik commented 9 years ago

@chengsta you're correct, the songbook should always be printed in Song Code order. I think it's fine to format the song code string to A007 before storing in the database; personally think A7 is easier to read than A007 so on the user end if we could trim leading zeroes that might be nice.

@varoot, for the "autonumber" option, so does the system first order the songs on the songsheet and then assign numbers, or does it assign numbers then order them in the songsheet?

chrisjbaik commented 8 years ago

Just kidding, not printing sequentially. It will reorder things if they don't fit well and then swap numbers somehow.. We need to adjust the fit function in SongsheetFitter somehow, but it's not so easily apparent what to do...