Is it wrong F# include in key of Db instead of Gb?
Usually, yes. The fourth degree of the D♭ scale is G♭, and it is incorrect to spell it as F♯.
However, F♯ is the raised third degree of the D♭ scale, and if your source is very chromatic, it might legitimately use the raised third degree, in which case the correct result in D♭ would be F♯. This is unlikely, but possible. To be clear, the source pitch would have to be one of the following:
| Key |
Pitch |
| C |
E♯ |
| D |
F♯♯ |
| E♭ |
G♯ |
| E |
G♯♯ |
| F |
A♯ |
| F♯ |
A♯♯ |
| G♭ |
B |
| G |
B♯ |
| A♭ |
C♯ |
| A |
C♯♯ |
| B♭ |
D♯ |
| B |
D♯♯ |
As you might guess by the number of keys in which this pitch is something-double-sharp, it is not common.
There is a simple rule for this. When you transpose, two things must change identically for every note: the distance in letters and the distance in half steps. If you go from C to D, all the letters must increase by one (for G, this means changing to A) and all the pitches must move by two half steps. If you go from C to D♭, the letters are still increasing by one, but the pitches are increasing by only one half step.
Unfortunately, a lot of music notation software gets this wrong, or perhaps the people using it get it wrong. Regardless, you can find a lot of horribly misspelled scores out there on the internet. I was looking for a particularly chromatic passage from Mozart's Requiem a few weeks ago, and the first score of it that I found on YouTube was self-engraved by someone who didn't know what they were doing, and it was a disaster.
So make sure you're using reputable sources for your transpositions, and stick to the "letter first, then half steps" rule, and you should be fine.