Pre-release

@maditnerd maditnerd released this May 22, 2017

Assets 3

Source:
alexmacrae/SamplerBox
master:0e54884

Windows version

You will need miniconda and an python2.7 environnement

conda create -n samplerbox python=2.7
activate samplerbox

Requirements

pip install numpy
pip install pyinstaller
pip install configparser
pip install psutil
pip install sounddevice
pip install pyserial

Samplerbox_audio

Needed : http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

SET VS90COMNTOOLS=%VS140COMNTOOLS%
python setup.py install

Install rtmidi2

In order to make our Arduino understands MIDI we will use rtmidi2 for python,
this library will allow us to easily makes instruments with Arduino.

You will need Visual Studio to compile rtmidi2.

In the command line go to rtmidi2 folder
Type

pip install cython
python setup.py install

Compile to exe

pyinstaller samplerbox.py --distpath windows

libportaudio64.bit

You will need a folder with _sounddevice_data/libportaudio64.dll in dist/
https://github.com/spatialaudio/portaudio-binaries

(if Microsoft visual c++ compiler for python2.7 doesn't works)

Modification in globalvars.py

if path.basename(sys.modules['__main__'].__file__) == "samplerbox.py":
        CONFIG_FILE_PATH = "/boot/samplerbox/config.ini"
        print '>>>> CONFIG: Looking for config.ini in /boot/samplerbox/'
        if not os.path.isfile("samplerbox.py"):
            CONFIG_FILE_PATH = "../config.ini"
            print '>>>> CONFIG: looking for config.ini in /windows'
        else:
            if not os.path.exists(CONFIG_FILE_PATH):
                CONFIG_FILE_PATH = "./config.ini"
                print '>>>> CONFIG: looking for config.ini in /SamplerBox/'
                # try:
                #     file = open(CONFIG_FILE_PATH, 'r') # test if exists
                # except:
                #     file = open(CONFIG_FILE_PATH,'w')
                #     config_exists = False
                #     print 'Creating empty config.ini'
                # file.close()
        print '>>>> CONFIG used: %s' % CONFIG_FILE_PATH
else:
    CONFIG_FILE_PATH = "../config.ini"
    print '>>>> CONFIG: using config.ini in ../'
Jul 1, 2015

v1.0

Update README.md