Skip to content
Tom Conti-Leslie edited this page Jul 31, 2020 · 8 revisions

Setting up ThatChord

Depending on your intended use of ThatChord, you may wish to set it up in different ways. The settings.yml file allows you to customise exactly how removed you want to be from the code of the program. For example, the input: how option allows you to choose whether you will pass the algorithm's input:

  • Directly from the file, i.e. you have to open and edit thatchord.py and then run it every time you want to find a chord diagram;
  • From the Python console, i.e. you can run thatchord.py from your favourite terminal or Python interpreter and have a prompt ask you for the chord you want;
  • As a command line parameter, i.e. you can run ThatChord from the command line by typing python3 thatchord.py Cm7. This approach is well-suited to automation via an alias in your .bashrc or .zshrc, for example.

Similar distinctions exist for the way in which ThatChord outputs, and potentially saves, the result. See the dedicated Settings wiki page for more information on changing the settings.

If you have little to no experience using git, python and the command line, there is a step by step guide here to painlessly setting up ThatChord so you don't have to think about it again.

If you have more experience, the best approach may be to clone this repository and then tweak the settings to your liking. Although the paths can be updated manually, your best bet is to clone the repo into a subdirectory of your Documents folder:

cd ~/Documents
git clone https://github.com/tomcontileslie/ThatChord.git ThatChord

Running ThatChord is then a matter of executing the main file, thatchord.py. The following Python packages are considered as prerequisites:

  • re
  • os
  • sys, but only if you have chosen TERMINAL as your input format (chosen by default).
  • Pillow, but only if you have chosen image (rather than plaintext) output in settings.py. This is chosen by default.
  • PyYAML, for reading the settings.yml file.

The only modules which are likely not to already be installed are Pillow and PyYAML. Install them as follows:

python3 -m pip install --upgrade Pillow
python3 -m pip install --upgrade pyyaml

Information on configuring the settings and what to write in the ThatChord prompt is available on other wiki pages.

Clone this wiki locally