Looking for software which detects the key of a MIDI file (or multiples)

Discussion in 'Software' started by thickchez, Sep 9, 2015.

  1. Graf

    Graf Platinum Record

    Joined:
    Jul 6, 2015
    Messages:
    437
    Likes Received:
    223
    Location:
    chair
    ahhh, yeah its a big problem for the 'jamming' style artist. we get into a groove, feet float up off the floor, eyes roll back..
    then someone says "what key are you in"

    hahaha, what key am I in.. umm.. key..

    my hats off to you for capturing those moments, awesome stuff. very laborious to adapt to song after-the-matter though.
    a couple of tools I use are:
    FL studios detect score scale. found under piano roll > helpers > (several functions here) detect score scale. ghost note. note grid. and ghost channels. ghost channels is really useful for working your midi file that you dropped into this channel, several ways. youtube it if this function looks like what you want, because the youtube instruction will be better than my description. this one if you like working in piano roll format

    another one is power tabs. PTB 1.7 had a built in score checker that was top shelf. and very light weight. at this point you've converted midi to score sheet, treble and bass clef if you like working in this format. which brings up scoring programs. which there are several great scoring programs, and they all will read your midi file

    best luck with those jam sessions
    Graf
     
  2. tommyzai

    tommyzai Platinum Record

    Joined:
    Feb 7, 2012
    Messages:
    775
    Likes Received:
    211
    I also think such an app would be useful, and I have a music background. The concept of "cheating" has become somewhat irrelevant. One could argue that using the internet and this forum is the "easy" way. Instead, I could sign up for additional music theory classes at the local college, buy all the textbooks, attend classes, study for the exams, and visit the professor during office hours.
     
  3. northcuttbeatz

    northcuttbeatz Ultrasonic

    Joined:
    Feb 11, 2015
    Messages:
    41
    Likes Received:
    20
    in logic pro x highlight the chord(s) in the piano roll and it will tell you the key in the top left hand corner of the piano roll.
     
  4. Zenarcist

    Zenarcist Audiosexual

    Joined:
    Jan 1, 2012
    Messages:
    4,251
    Likes Received:
    2,728
    Location:
    Planet Earth
    Actually I realized that I was getting into the same problem with midi AND audio files, so I decided to name my files and projects with the chord sequence included e.g. Blah-Blah-G-D-Em-C which I found helpful. I also keep a notebook now with relevant song data, motif tabs, obscure chord diagrams etc.
     
    Last edited: Sep 28, 2015
  5. DonCaballero

    DonCaballero Producer

    Joined:
    Feb 6, 2016
    Messages:
    166
    Likes Received:
    92
    Bumping this thread in case anyone's found an answer in the last 7 years! :dunno:

    Unfortunately it (still) doesn't. I've requested it, and it would be simple compared to audio, but most DJs aren't using MIDI so they probably don't see much demand for it.

    This is the best thing I've found. Very customizable but it's not free. Ideally there'd be a standalone app, but users of other DAWs could just install the non-expiring trial of Reaper to use the script.
    https://www.extremraym.com/en/downloads/reascripts-midi-key-finder/
     
  6. BlackHaze1986

    BlackHaze1986 Rock Star

    Joined:
    Jun 25, 2014
    Messages:
    743
    Likes Received:
    361
    Scaler2 (Drag Midi into Scaler2) or Autotune Auto-Key (Put it on Mixertrack and let it Listen to the Midi then it will show you the Scale) :winker:
     
  7. curtified

    curtified Rock Star

    Joined:
    Feb 3, 2015
    Messages:
    669
    Likes Received:
    449
    im going to plus 1 this with some support. Ive been looking for this for a while as well. It would be such a dope tool to have in our daw to go through midi packs and find chords or melodies that fit like we were choosing samples.

    its still clunky but what sexyman said is the best work around. You can have EZkey auto play the midi in key.

    The other workaround is loopcloud does add a key tag next to your midi files and also shows you what you need to transpose them to but there is not midi preview yet.

    I have been using chatGPT to help me code a solution.

    I will keep an eye on this thread with some optimism.
     
  8. clone

    clone Audiosexual

    Joined:
    Feb 5, 2021
    Messages:
    7,323
    Likes Received:
    3,225
    My Midi file White Whale is where you can audition files like we do with samples; but using (current selected daw) VST plugin and whatever its current sound is to playback files without dragging them around.
     
  9. aghori

    aghori Ultrasonic

    Joined:
    Nov 24, 2020
    Messages:
    94
    Likes Received:
    29
    Location:
    Libertalia
    'member when musicians used to practice & study several hours a day to get good?
    If you're too lazy to figure this basic step, idk, pick a new hobby?
     
  10. curtified

    curtified Rock Star

    Joined:
    Feb 3, 2015
    Messages:
    669
    Likes Received:
    449
    can you link to this please?
     
  11. curtified

    curtified Rock Star

    Joined:
    Feb 3, 2015
    Messages:
    669
    Likes Received:
    449
    [​IMG]

    there are many ways to skin a cat in the music making game. Even if we know the boomer ways to make music its fun and creative to get inspired in other ways and methods.
     
  12. DoubleTake

    DoubleTake Audiosexual

    Joined:
    Jul 16, 2017
    Messages:
    2,275
    Likes Received:
    1,226
    Remember when people used to read entire threads so they knew what the fuck they were commenting about?
    If you're too lazy to figure this basic step, idk, pick a new forum?
     
  13. Sinus Well

    Sinus Well Audiosexual

    Joined:
    Jul 24, 2019
    Messages:
    2,108
    Likes Received:
    1,626
    Location:
    Sanatorium
    Have you tried KeyFinder ?
     
    • Interesting Interesting x 1
    • List
  14. Sinus Well

    Sinus Well Audiosexual

    Joined:
    Jul 24, 2019
    Messages:
    2,108
    Likes Received:
    1,626
    Location:
    Sanatorium
    With over 1000 midi files the easiest method is probably the following:
    1. Render all midi files to audio (each audio file needs the same name as the corresponding midi file).
    2. Analyze all audio files with KeyFinder and let KeyFinder write the results as metadata tag.
    3. Use a batch-rename program to generate the new names of the midi files from the metadata of the audio files.
     
    • Interesting Interesting x 1
    • Creative Creative x 1
    • List
  15. curtified

    curtified Rock Star

    Joined:
    Feb 3, 2015
    Messages:
    669
    Likes Received:
    449
    you could possible do this with applescript.. here is a rough start on the code.. feel free to elaborate:

    Code:
    tell application "Finder"
        set selectedFiles to selection
        set midiFiles to {}
        repeat with aFile in selectedFiles
            if (kind of aFile) is "MIDI" then
                set end of midiFiles to aFile
            end if
        end repeat
    
        if midiFiles is not {} then
            -- Render midi files to audio
            tell application "QuickTime Player"
                repeat with midiFile in midiFiles
                    set midiFileName to name of midiFile
                    set audioFile to export midiFile to audioFile with properties {file name:midiFileName & ".m4a"}
                end repeat
            end tell
    
            -- Analyze audio files with KeyFinder
            tell application "KeyFinder"
                set audioFiles to {}
                repeat with midiFile in midiFiles
                    set midiFileName to name of midiFile
                    set audioFile to (midiFileName & ".m4a") as alias
                    set end of audioFiles to audioFile
                end repeat
    
                repeat with audioFile in audioFiles
                    analyze audioFile
                    set key of audioFile to result of analysis
                end repeat
            end tell
    
            -- Batch-rename midi files using metadata from audio files
            tell application "BatchRename"
                repeat with midiFile in midiFiles
                    set midiFileName to name of midiFile
                    set audioFile to (midiFileName & ".m4a") as alias
                    set newName to key of audioFile & " - " & midiFileName
                    rename midiFile to newName
                end repeat
            end tell
        else
            display dialog "No MIDI files selected. Please select at least one MIDI file." buttons {"OK"} default button 1
        end if
    end tell
    
    
     
  16. DonCaballero

    DonCaballero Producer

    Joined:
    Feb 6, 2016
    Messages:
    166
    Likes Received:
    92
    I don't know how v2 compares since it's only on Mac, but when I originally tried it I already had MixedInKey which was more user friendly.

    Plenty of programs can batch detect the key of audio, but the main point here is to avoid the whole converting to audio first part. Also, it's not hard to do individual files manually, but we're talking about thousands or tens of thousands of files.

    I might eventually just buy the Reaper script, but I hoped something might've popped up in the years since the thread was last active. :dunno:
     
  17. Kwissbeats

    Kwissbeats Audiosexual

    Joined:
    Mar 31, 2014
    Messages:
    1,566
    Likes Received:
    655
    Well no, a lot in notation is about intention. which is missing in a midi file.
     
  18. curtified

    curtified Rock Star

    Joined:
    Feb 3, 2015
    Messages:
    669
    Likes Received:
    449
    • Like Like x 1
    • Love it! Love it! x 1
    • List
  19. justsomerandomdude

    justsomerandomdude Rock Star

    Joined:
    Aug 24, 2020
    Messages:
    490
    Likes Received:
    322
  20. clone

    clone Audiosexual

    Joined:
    Feb 5, 2021
    Messages:
    7,323
    Likes Received:
    3,225
    I tested this bandmate function with a relatively complex audio file (with multiple mixed parts), and it worked great. I was very surprised by the results.
     
Loading...
Loading...