Click here to Skip to main content
15,884,176 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
W Balboos, GHB9-Jul-20 5:01
W Balboos, GHB9-Jul-20 5:01 
GeneralRe: Thought of the Day Pin
jeron19-Jul-20 5:11
jeron19-Jul-20 5:11 
GeneralRe: Thought of the Day Pin
Andre Oosthuizen9-Jul-20 20:19
mveAndre Oosthuizen9-Jul-20 20:19 
GeneralRe: Thought of the Day Pin
jeron110-Jul-20 4:36
jeron110-Jul-20 4:36 
GeneralEyeSpyPi Pin
#realJSOP9-Jul-20 3:39
mve#realJSOP9-Jul-20 3:39 
GeneralRe: EyeSpyPi Pin
Jacquers9-Jul-20 3:52
Jacquers9-Jul-20 3:52 
GeneralRe: EyeSpyPi Pin
Mike Hankey9-Jul-20 5:44
mveMike Hankey9-Jul-20 5:44 
GeneralDoes anyone here know any formal music theory? Pin
honey the codewitch9-Jul-20 3:20
mvahoney the codewitch9-Jul-20 3:20 
I don't. It's sad I know, esp considering I just delivered a MIDI library unto the world.

Anyway, I have a question for a music nerd, and it has to do with key signatures.

Googling led me to some confusion.

Basically I'm getting my key signature back as an int and a bool together, where the int is range -7 to 7 and the bool indicates minor or major.

The int indicates the number of flats (int is negative) or the number of sharps (int is positive) or C if it's 0.

Regarding the int, I'm not sure if I'm translating it correctly in code.

C#
const string FLATS = "FBEADGC";
const string SHARPS = "GDEABFC";

if (0 == scode)
	return "C " + (IsMinor ? "minor" : "major");
if(0>scode)
	return FLATS[((-scode)-1)].ToString() + "b " + (IsMinor ? "minor" : "major"); 
else // if(0<scode)
	return SHARPS[(scode - 1)].ToString() + "# " + (IsMinor ? "minor" : "major");


scode is the aforementioned int.
Real programmers use butterflies

GeneralRe: Does anyone here know any formal music theory? Pin
Greg Utas9-Jul-20 3:24
professionalGreg Utas9-Jul-20 3:24 
GeneralRe: Does anyone here know any formal music theory? Pin
honey the codewitch9-Jul-20 3:28
mvahoney the codewitch9-Jul-20 3:28 
GeneralRe: Does anyone here know any formal music theory? Pin
kalberts9-Jul-20 3:50
kalberts9-Jul-20 3:50 
GeneralRe: Does anyone here know any formal music theory? Pin
Greg Utas9-Jul-20 3:57
professionalGreg Utas9-Jul-20 3:57 
GeneralRe: Does anyone here know any formal music theory? Pin
jsc429-Jul-20 6:40
professionaljsc429-Jul-20 6:40 
GeneralRe: Does anyone here know any formal music theory? Pin
Greg Utas9-Jul-20 6:42
professionalGreg Utas9-Jul-20 6:42 
GeneralRe: Does anyone here know any formal music theory? Pin
honey the codewitch9-Jul-20 4:20
mvahoney the codewitch9-Jul-20 4:20 
GeneralRe: Does anyone here know any formal music theory? Pin
kalberts9-Jul-20 4:47
kalberts9-Jul-20 4:47 
GeneralRe: Does anyone here know any formal music theory? Pin
Greg Utas9-Jul-20 4:57
professionalGreg Utas9-Jul-20 4:57 
GeneralRe: Does anyone here know any formal music theory? Pin
kalberts9-Jul-20 7:46
kalberts9-Jul-20 7:46 
GeneralRe: Does anyone here know any formal music theory? Pin
Greg Utas9-Jul-20 10:32
professionalGreg Utas9-Jul-20 10:32 
GeneralRe: Does anyone here know any formal music theory? Pin
honey the codewitch9-Jul-20 6:19
mvahoney the codewitch9-Jul-20 6:19 
GeneralRe: Does anyone here know any formal music theory? Pin
Jim Kolb10-Jul-20 5:39
Jim Kolb10-Jul-20 5:39 
GeneralRe: Does anyone here know any formal music theory? Pin
kalberts10-Jul-20 8:14
kalberts10-Jul-20 8:14 
GeneralRe: Does anyone here know any formal music theory? Pin
Greg Utas9-Jul-20 4:54
professionalGreg Utas9-Jul-20 4:54 
GeneralRe: Does anyone here know any formal music theory? Pin
giulicard10-Jul-20 0:33
giulicard10-Jul-20 0:33 
GeneralRe: Does anyone here know any formal music theory? Pin
kalberts9-Jul-20 23:20
kalberts9-Jul-20 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.