Whilst it is possible to compile Impulse into a Windows or Mac executable bundle it is a time consuming process which ends up being a heavy 300 MB file, instead it is in many ways neater and faster to work directly with the Python script. It is a much smaller file and easy to do if you know how, so let me write a step by step instruction.
Step 1 - Install Python
Go to the official web site to download the latest stable version of Python 3.12.1 as I am writing this. Avoid the pre-releases as they may still have some bugs. Unzip the file and install it as you would with any other program. Python by itself doesn't do anything so there is no need to launch it or expect it to do anything fancy, it is essentially a translator between Python and whatever operating system you use.
Download here: https://www.python.org/downloads/
Step 2 - Download Impulse from github
For those of you who are not familiar with coding, github.com is a platform where programmers collaborate on code. You don't need to create an account just for downloading my code.
Download zip file here: https://github.com/ssesselmann/impulse Step 3 - Unzip the file and move it to your preferred directory
Once you unzip it you will see a folder called impulse-main, this means it is from the main branch, you can leave the -main extension or remove it if you like.
Unzip the folder directly to your preferred directory or move it there after unzipping. Something like ~/python/impulse/ would be a logical choice.
Once you open the directory you will see a bunch of files like this... Most of these files you don't never need to worry about.
Step 4 - Open the terminal CMD 😱
For some of you this might be the scariest part, but frankly it's not so scary. When you open the terminal window it usually defaults to the home directory, you can confirm this by typing "dir" on windows or "ls -il" on Mac or Linux.
The only other command you need is "cd" for change directory.
Lets start by checking if Python has been installed correctly.
Code: Select all
C:\Users\user > python --version
Code: Select all
python 3.12.1
Now we need to install a directory of all libraries called "pip", we do this with the following command.
Code: Select all
C:\Users\user > python -m pip install --upgrade pip
Now use the command prompt "cd" to navigate to the "impulse-main" directory. If impulse-main is in your home folder it should just be..
Code: Select all
C:\Users\user > cd python\impulse-main
Code: Select all
C:\Users\user\python\impulse-main > dir
total 168
59371268 -rw-r--r--@ 1 stevensesselmann staff 35129 5 Jan 2023 LICENSE
124499055 -rw-r--r-- 1 stevensesselmann staff 6252 22 Jan 21:33 README.md
63713191 drwxr-xr-x 33 stevensesselmann staff 1056 28 Jan 22:15 code
133678292 -rw-r--r-- 1 stevensesselmann staff 159 25 Jan 18:12 requirements_mac.txt
133678293 -rw-r--r-- 1 stevensesselmann staff 152 25 Jan 18:12 requirements_pc.txt
home/impulse %
Code: Select all
C:\Users\user\python\impulse-main > pip install -r requirements.txt
Once it has completed, you are ready to launch impulse.
On Windows it's just...
Code: Select all
C:\Users\user\python\impulse-main > python code/impulse.py
Code: Select all
C:\Users\user\python\impulse-main > python3 code/impulse.py
Troubleshooting
Sometimes a library or module may not install properly for whatever reason, so read the error messages on the command line and if you don't understand what it means copy it into google and there will usually be a million others with the same error and hopefully a solution.
"pyaudio" is the module most likely to cause a problem, so try installing it manually with;
Code: Select all
pip install pyaudio
Happy spectrometising...
Steven