spetrovi / songbook

GNU General Public License v3.0
2 stars 0 forks source link

Song editor #4

Open spetrovi opened 11 months ago

spetrovi commented 11 months ago

So we want the user to be able to create new song, therefore we need song editor.

We don't want the user to work with lytex code, just provide dropdown menus and knobs to set up the documen't key, rhytm etc. Freeform text will contain the music encoded, so there will be some learning curve, but otherwise we'll try to make it as friendly as possible.

spetrovi commented 10 months ago

This is very far in the future, but it would be great to have at least some basic functionality. Maybe use htmx to refresh the png/pdf on change?

spetrovi commented 10 months ago

We shoukd power this with abjad

spetrovi commented 1 week ago

Reiterating on this idea, we could have a bunch of raw material stored somewhere (like a mounted folder on the server)

Then upon opening Transcription module, user gets served with one png randomly (can press next to get different one)

Then, we'd have fields for various metadata that could be filled in, then verses free-form for verses and then side-by-side frescobaldi style lilypond editor, whereas most of the code would be unchangeable - like preamble, layout/midi generation, etc. key/time/ etc would be radioed in and htmx/javascript would swap the correct tags. On text change, we would htmx-request (500ms delay) and update the png.

Then we could submit for review.

Database wise we would need the partial songs to be saveable for the future, so we would need a new column at Song that would be user and user_id, I think? Source could be some hidden UserTranscripted source

spetrovi commented 5 days ago

So far we have: Admin view with all the folders, with ability to assign the jpg's for transcription or bulk assign the whole folder.

Then we have the song editor, one column is three cards (metadata, lytex, verses), right column is the original, which sticks to the top on scrolling.

Metadata is a bunch of fields that can be filled in, could be nicer and better, but its functional for now, the same for verses.

Lytex editor is a form that listens for change (the same for metadata and verses). Upon change, we fire htmx request to update database, regenerate the png/midi. When htmx finished event is emited, we swap the png for the new one in javascript. This means we immediately see what we changed on the resulting png.