Jump to content

The 'why don't we have one' engineering / product thread.


JoeSchmuckatelli

Recommended Posts

  • 2 weeks later...

Why don't we have an program that can transcribe music from a keyboard (piano-style or even computer keyboard)? It'd make it really, really easy for people to bang out pieces or songs that are in their heads quickly and it'd be a lot more efficient. If you're using a computer keyboard, you could even be able to let other instrumentalists use their own instrument's layouts! For example, if in this program you set your instrument to piano and had the A key as the A note, you could type this string (and typing this string would feel decently like playing it on a piano) and get Twinkle: "aaggyyg ffrrssa". Obviously those letters don't correspond to twinkle, but if you looked at the physical keyboard and used the A key as a starting point, you'd get Twinkle Twinkle Little Star.

Edit: In fact, it's easy enough that I coded a uber-simple prototype just now! the main problem is that it outputs a list rather than a PDF file, but I don't know how to solve that. Maybe I could make it write to a text file and use dashes, ⬤s, and ◯s... that'd be pretty cool.

code:

Spoiler

If you don't know how to run this, paste it into the left half of this website then press "run".

The code itself:

Spoiler

noteDictPiano = {
    # the letters on the left are the letters that get pressed on
    # the keyboard, and those on the right are the note names.
    'a':'c',
    'w':'c#',
    's':'d',
    'e':'eflat',
    'd':'e',
    'f':'f',
    't':'f#',
    'g':'g',
    'y':'g#',
    'h':'a',
    'u':'bflat',
    'j':'b',
    'k':'c'
    }

uInput = 'this will be replaced'
outputList = []
print('Use the computer keyboard as a piano keyboard. The a key on the computer keyboard is equilavent to the c key on a piano. The top row are the black keys, and the w key is c#. Press Enter after each note. Type "End" to see what you typed.')
while True:
    uInput = input('type note as on piano: ')
    if uInput == 'End':
        break
    outputList.append(noteDictPiano[uInput])
print('What you played: '+str(outputList))

I just realised this might have some commercial value, so you're not allowed to use this idea/code unless what you're making is free.

 

Edited by LHACK4142
added code
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...