LinnStrument Source Code

LinnStrument and LinnStrument 128 use the same source code and firmware. Both are based on the popular Arduino development platform, and specifically on the 84 mHz ARM Arduino Due circuit.  More information on Arduino can be found at www.arduino.cc.  The firmware for the LinnStrument is also open-source.  Modifying the source code for the LinnStrument firmware can be done simply by using the Arduino IDE.

 

Downloading the LinnStrument Firmware

• The LinnStrument firmware is available on Github.  Visit the Roger Linn Design company page on Github:

     https://github.com/rogerlinndesign/linnstrument-firmware/

• Click "Clone or Download" then "Download Zip" then place the zip file wherever you wish on computer. After unzipping, rename the top-level folder from 'linnstrument-firmware-master' to 'linnstrument-firmware'.

 

Downloading and setting up the Arduino IDE (Integrated Development Environment)

• Visit http://www.arduino.cc/downloads and follow the instructions for downloading the latest Arduino IDE.

• Launch Arduino.app

• Go to Tools / Board / Boards Manager..., then Install Arduino SAM Boards 1.6.11, then close the Boards Manager.

• Go to File / Open... and select the file "linnstrument-firmware.ino" in the "linnStrument-firmware" directory that you downloaded above.

• Close any other Arduino project windows that may be open.

• With the linnstrument-firmware window selected, go to Tools / Board and select "Arduino Due (Programming Port)" from the bottom of the menu.

• Go to Sketch / Include Library / "Add .ZIP Library...".

• Select (don't double-click) the DueFlashStorage folder inside the libraries folder of the "linnstrument-firmware" directory. Then click "Choose" at the bottom right.

• In the "linnstrument-firmware" window, click the top-left check mark icon (Verify) to compile the code. If you receive compilation errors or warnings, check the above steps.

• Connect your LinnStrument via USB, then turn on UPDATE OS mode (Global Settings > Actions column).

• Go to Tools / Port and select your LinnStrument from there. (It starts with /dev/cu.usbmodem followed by a number.)

Note: You can now simply click the Upload button (right-facing arrow) in the IDE to upload your code to LinnStrument, but this will reset LinnStrument's sequencer data, stored panel settings, and sensor calibration data to defaults, requiring you to perform a subsequent 'Global Settings > Calibration' after the upload. To avoid losing this data, do the following additional steps:

• Compile your LinnStrument firmware as above by clicking the Arduino IDE's "Verify" button (the checkmark button in upper left corner).

• In the IDE's Output pane, select and copy the file path that will appear similar to this, starting with "/var" and ending with ".bin":

(Click to enlarge)

• On mac, open a finder window, press Shift + Command G, paste the line you just copied and press Enter. This will take you to the location of the newly-compiled OS file. On Windows, go to the directories indicated by the file path.

• From the LinnStrument Support page, click the "Update OS" page and download the latest version of the LinnStrument OS, which consists of the updater application and the OS file. Replace this OS file with the new OS file you compiled (and found at the above file path). Now start the Updater App to update your LinnStrument. By using this method to load your edited source code, your LinnStrument's settings will be preserved.

Roger Linn Design

Los Altos, CA