• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keys not changing to flats
#20
It's not quite that simple for me to apply the # or b to C because I don't currently store the value of that toggle anywhere. If you bring up the transpose dialog with a key of C, change the toggle to flat, tap OK, then bring up the dialog again, you will see the toggle switch go right back to sharp again, as I dynamically determine whether to select sharp or flat based upon the currently selected transpose key. All of my logic is optimized using lookup tables so that I can very quickly figure out what keys to use when transposing based upon the number of steps. I also have a lookup table for determining if a given transpose key should use sharps or flats. That lookup table assumes each key has just one index, so that makes it impossible for C to be both sharp and flat when I perform my lookup. So in order to handle this special case for the key of C, I need to add a new flag to the database which determines if the song should use sharps or flats while transposing, and that flag will be driven by the toggle switch on the transpose dialog. I then need to pass that flag down into the sections of code that actually transform the chords while transposing so that I can either just use that flag to determine sharp versus flat, or add a special case for C that uses the flag instead of the lookup table (using the flag for every transformation probably makes sense).

Changing the database like that means I need to update both the tablet, companion app and Windows 10 version, and every user will be required to update both the tablet and companion app at the same time. I'm fine with doing all this, I just wanted to explain why it's not a 30 second fix Smile
Reply


Messages In This Thread
Keys not changing to flats - by LD Jackson - 10-31-2016, 09:13 AM
RE: Keys not changing to flats - by GraemeJ - 10-31-2016, 10:40 AM
RE: Keys not changing to flats - by sciurius - 10-31-2016, 07:15 PM
RE: Keys not changing to flats - by LD Jackson - 10-31-2016, 07:51 PM
RE: Keys not changing to flats - by itsme - 11-02-2016, 10:14 PM
RE: Keys not changing to flats - by sciurius - 11-03-2016, 02:25 AM
RE: Keys not changing to flats - by LD Jackson - 11-02-2016, 11:08 PM
RE: Keys not changing to flats - by Zubersoft - 11-03-2016, 02:54 AM
RE: Keys not changing to flats - by sciurius - 11-03-2016, 04:30 AM
RE: Keys not changing to flats - by LD Jackson - 11-03-2016, 04:46 AM
RE: Keys not changing to flats - by LD Jackson - 11-03-2016, 09:33 AM
RE: Keys not changing to flats - by Zubersoft - 11-03-2016, 12:32 PM
RE: Keys not changing to flats - by LD Jackson - 11-04-2016, 06:00 PM
RE: Keys not changing to flats - by Zubersoft - 11-04-2016, 06:44 PM
RE: Keys not changing to flats - by Zubersoft - 11-06-2016, 09:57 AM
RE: Keys not changing to flats - by sciurius - 11-06-2016, 07:09 PM
RE: Keys not changing to flats - by LD Jackson - 11-06-2016, 11:51 PM
RE: Keys not changing to flats - by Zubersoft - 11-07-2016, 02:18 AM
RE: Keys not changing to flats - by itsme - 11-07-2016, 03:15 AM
RE: Keys not changing to flats - by Zubersoft - 11-07-2016, 03:50 AM
RE: Keys not changing to flats - by itsme - 11-07-2016, 06:04 AM
RE: Keys not changing to flats - by sciurius - 11-07-2016, 07:04 AM
RE: Keys not changing to flats - by Skip - 11-07-2016, 07:58 AM
RE: Keys not changing to flats - by itsme - 11-07-2016, 08:41 AM



Users browsing this thread:
1 Guest(s)


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