Symphony in C++
Every now and then I can’t keep my classical music and science nerd parts apart.
Today was one of those days.
I present: A Symphony in C++:
key get_secondary_key(key home_key){ if (home_key.minor == TRUE){ secondary_key=relative_major(home_key); }else{ secondary_key=home_key+5; } } void sonata_form(key home_key,tempo base_tempo){ //Calculate secondary key secondary_key=get_secondary_key(home_key); //First get people in the mood intro.play(home_key,base_tempo--); //start exposition, introduce the two main themes theme_1.play(home_key); transition.play(home_key,secondary_key); theme_2.play(secondary_key); codetta.play(); //development, mix the themes up for(int i=0;i<development_length;i++){ combine_themes(theme_1,theme_2,key=rand()).play() } //Recapitulation: repeat the themes but in the home key theme_1.play(home_key); transition.play(home_key,home_key); theme_2.play(home_key); //Finish up if(composer == "beethoven"){ coda.length_in_min=10 }else{ coda.length_in_min=1 } coda.play(); }
Want to learn more about classical music but without the code? Go to getintoclassical.com.
Eugh, I know the feeling…
via Reddit. Anyone know where it originally comes from?
Choose Your Own Damn Mahler Adventure
Do you love Mahler? Do you want to marry him and have his babies? Well it’s a bit late for that, but it’s not too late to participate in Deutsche Grammophon and Decca’s latest foray into the classical music social media scene. They’ve done a bang-up job arranging this one.
The idea is that they are putting together a new Mahler boxset. “But Ben! Those are a dime a dozen — well maybe a grand a dozen, but you can definitely buy 12″ I can hear you verbosely shouting at me through the internet. Well yes, but the difference here is that every symphony in the set is from a different conductor and orchestra, and it’s the voting public who get to decide which ones go in the set. “But Ben! I don’t own every single boxset, how will I compare renditions without shelling out thousands of dollars?” comes your next, sensibly thrifty proclamation.
Well that’s the best bit: you can stream — for free! — what appears to be their entire Mahler catalog, in order to confirm your decision.
Not quite dead yet
Holy crap! Check this out! TEXT!
Yeah, writing is mysteriously appearing in this space, and that’s because despite all the stuff that’s been happening recently my fingers have not completely broken up their relationship with the keyboard. And what “stuff” could have been happening? Well as an e.g., in an unrelated order of importance…
- Various forays to various weddings
- Diverse friends moving away from here forever
- My Ph.D. defense
- My own getting married
See? Told you “stuff” was going down.
The last two of that list were done on the sly. We did a stealth, ninja-type wedding, and my supervisor likes to spring graduation on her students within weeks of the anticipated date. I’m still going to carry on doing pretty much the same thing for a bit though, I need to finish stuff up, and postponing the job search isn’t an entirely unattractive option. For now I’ll do a mini post-doc.



