crazedpsyc
Yep, sounds right.

I actually have a goodie which does this already:

Code:
Query: C minor chord
  You entered: C minor chord

DDG::ZeroClickInfo  {
    Parents       WWW::DuckDuckGo::ZeroClickInfo
    public methods (1) : new
    private methods (0)
    internals: {
        answer        "C Minor scale: C, D, D# (Eb), F, G, G# (Ab), A# (Bb), C ~ Relative Major: Eb Major ~ C minor Chord: C, D#, G",
        answer_type   "chords",
        html          "C Minor scale: C, D, D# (Eb), F, G, G# (Ab), A# (Bb), C ~ Relative Major: Eb Major ~ C minor Chord: C, D#, G<br/><img alt='keyboard' src='data:image/gif;base64,...image...' style='display:inline;'/><script type='text/javascript'>function loadJS(path, callback){var element=nrj(path,false);YAHOO.util.Event.addListener(element,"load",callback);return element}
loadJS("/share/goodie/chords/SoundManager2/script/soundmanager2-nodebug-jsmin.js", function() {
    soundManager.setup({
        url: '/share/goodie/chords/SoundManager2/swf/',
        preferFlash: false,
        onready: function() { 
            soundManager.createSound('C', '/share/goodie/chords/C4.mp3');
soundManager.createSound('D#', '/share/goodie/chords/D#4.mp3');
soundManager.createSound('G', '/share/goodie/chords/G4.mp3');
        }
})});
function play_chord(notes) { notes.forEach(function(note){soundManager.play(note)}) /* TODO: Add delay between notes */ }
</script>",
        is_cached     1,
        is_unsafe     0
    }
}


This is not live yet, because I'm still waiting on an internal change to allow serving files (mp3 files for each note) from goodies. The code is here, though, if you want to take a look: https://github.com/duckduckgo/zeroclicki...
posted by crazedpsyc 4 years and 8 months ago Link

crazedpsyc
To clarify, this is not using a local collection of chords/scales. It uses the definitions (intervals) of each type of scale and does the math itself.
posted by crazedpsyc 4 years and 8 months ago Link
seanheaton
Very cool. Nice work on this.
posted by seanheaton 4 years and 8 months ago Link