• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transpose up or down of ABC sections
#1
A while ago when I used the transpose feature I had the choice to decide if MobileSheets transposed up or down. Using the left arrow < transposed downwards, the right arrow > transposed upwards.
Somewhere in the process of improving and correcting the transpose feature this choice has been lost. Imho it is really important in some cases. Can we please get it back?
I noticed that in this real-life example: I have a song in G that I need to be transposed to D. 
The song is transposed down, no matter if I use the right arrow or the left arrow. Even worse: transposing down leads to the situation that a part of the ABC section is notated in bass clef which makes it hard to read.
       


Attached Files
.pro   IslandInTheSun_G_ABC.pro (Size: 463 bytes / Downloads: 2)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#2
So I transposed the source to be really notated in D to get what I want.
When I transpose that D version with MobileSheets to G it is always transposed upwards. No unwanted bass clef in this case, but many ledger lines that I would prefer to be avoided.
       


Attached Files
.pro   IslandInTheSun_D_ABC.pro (Size: 464 bytes / Downloads: 2)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#3
I can't easily add it back. The algorithm used for transposing just doesn't work that way anymore (it's not transposing by steps, it's transposing based on the keys). However, you can just insert {transpose: } statements into your ChordPro file if want to force transposing by steps instead (it's doing this by calculating the desired key based on the offset from the current key). This will be incorrect from a music theory perspective but can force it to work in a similar fashion to the old implementation. The reason I can't easily have this be some form of optional behavior at the moment is that the data stored in the database is incompatible between the two approaches. I'm not saving transpose steps in the database now - I'm saving key information only. I'd have to add completely different fields into the database to track steps, and if users switched between the two, it would basically reset the transposing back to the last known value of one or the other. Even if I take care of all of that, I then have to go through and all of the UI code, update all the transposing code to handle one or the other, etc. So I can put this on the backlog for a future update at some point, but it's going to be lower on my priority list as there is a workaround for now.

Mike
Reply
#4
Also, what you are facing here is not a problem with the transposing algorithm in MobileSheets - it's the issue that's been described elsewhere on the forum where the transposing options with ABC files are frustratingly difficult to use. I'm currently using the option to transpose by steps - this doesn't always work well as you have seen. I should be using the option to transpose from the source key to the destination key, but as I described in a different thread, when I tried to get that to work properly, it was nearly impossible to have it work as desired in every situation. Sometimes it would just jump up an entire octave, because you have to be very careful about lowercase vs uppercase letters when transposing, and there wasn't an easy way for me to calculate when I should use lowercase vs upper.

Take a look at the transpose command here: http://moinejf.free.fr/abcm2ps-doc/index.html

The example shows %%transpose c_B. Please tell me if you can come up with an algorithm that always chooses the correct casing for source and destination for all possible combinations so that the wrong octave is not used. If you can, that might alleviate the problems you are facing. I haven't had time to revisit this yet.

Mike
Reply
#5
One last thought - one thing I may have to rework is, I still track the source and destination keys, but I may need to track the octave based on whether the user is pressing the right or left arrows. So as you cycle through, you would be moving up or down, and while this wouldn't impact the transposing for ChordPro files, it would affect the transposing for ABC files, and would allow me to control what letters are used for the %%transpose command (uppercase vs lower). However I then need to provide some way for the user to choose what octave the source key is (upper or lowercase).

Mike
Reply
#6
The description of the transpose command says
"note1 and note2 are notes as found in tune bodies" (note1 specifies the source key, note2 specifies the destination key)
command syntax can be one of 
%%transpose <note1><note2>
score=<note1><note2> transposes the typeset score according to the specified interval (the playback is not affected)
sound=<note1><note2> transposes the playback according to the specified interval (the typeset score is not affected)
shift=<note1><note2> transposes the typeset score and the playback according to the specified interval
as long as MobileSheets doesn't support sound output, so sound= is irrelevant, shift= and score= should be equal

"provide some way for the user to choose what octave the source key is (upper or lowercase)"
seems the wrong question for me, the source key doesn't have something like an octave

I played around using a list of "notes as found in tune bodies" 
it seems I need two octaves (sharps and flats not considered yet)
C D E F G A B c d e f g a b

and applied %%transpose to my sample ABC code in G IslandInTheSun_G_ABC.pro and found 
%%transpose gd
%%transpose GD
transpose down like MobileSheets, using gd or GD creates identical results
%%transpose Gd
transposes up as I want

so the algorithm seems to be something like
for transposing up:
- find the source key in the left half of the list of notes

- find the destination key in the list of notes to the right of the source key
for transposing down:
- find the source key in the right half of the list of notes
- find the destination key in the list of notes to the left of the source key

- combine the notes you found into a %%transpose ,  score= or shift= command
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#7
Here's the list of ABC note names
I tried inserting some of them into a %%transpose directive and all work as assumed
   


Attached Files
.abc   ABCNoteNames.abc (Size: 512 bytes / Downloads: 0)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#8
I don't track "down" or "up" right now, so that once again require a different implementation to handle that concept. I just track source key and transpose key and plug those into the algorithm that was provided on the forum. So this is going to require quite a few changes. This also only matters for ABC files, so it only impacts users transposing those files or using ABC inside ChordPro.

Mike
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2026 MyBB Group.