Skip to content

Instantly share code, notes, and snippets.

@aclissold
Created August 24, 2014 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aclissold/c6dcdee3838f23cee7cd to your computer and use it in GitHub Desktop.
Save aclissold/c6dcdee3838f23cee7cd to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
keys = {
'C4': 'q', 'C#4': 'a', 'Db4': 'a', 'D4': 'z',
'G4': 'd',
'E5': 'h',
'C5': 't',
'G5': 'j',
}
with open(sys.argv[1]) as f:
for line in f:
for note in line.split(' '):
note = note.strip()
print(keys[note], end='')
print()
E5 E5 E5 C5 E5 G5 G4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment