KinskyPronto Developer's Guide

Overview

This shows how to use the supplied linnControl.js ProntoScript (PS) library with a 3rd party Pronto module to permit the activity to also control a Linn preamp (or DS internal preamp). The library module provides the ability to select a specified input source, and control Volume, Mute, Power and LipSync delay within the 3rd party module (such as TV control).

Assumed familiarity: Pronto Developer Certification Level 2

Installation

linnControl.js is a standalone library source file which will be installed in the standard ProntoEdit Pro library location by the KinskyPronto installer. Once installed, the library module will be available for inclusion in any PS activity by dragging it from the Building Blocks -> ProntoScript Libraries window to the Activity Properties -> PS Libraries window



API

function linnControl.initialise(ipAddress, preAmpType, inputNumber);

This function MUST must be called first when using this library.

  • ipAddress: the IP address of the Linn device to be controlled.
  • preAmpType: preamp type - takes one of the following constants
    • linnControl.PREAMP_TYPE.EXTERNAL: external Linn Preamp connected by RS-232.
    • linnControl.PREAMP_TYPE.INTERNAL: internal preamp in DS (eg. Majik DS-I)
  • inputNumber: the number of the source input to be selected, indexed from 1


function linnControl.enableBasicLipsync(preset);

Enable lipsync control using specified preset. NOTE that video attributes must be enabled on the DS source (using Konfig) before this will function

  • preset: number of lipsync preset to activate and use (1->5).


function linnControl.powerOff();

function linnControl.powerOn();

Take the DS (and Preamp) into and out of standby

function linnControl.volumeInc();

function linnControl.volumeDec();

Increment and decrements the volume by one unit (1dB)

function linnControl.mute();

function linnControl.unMute();

Mute and Unmute volume

function linnControl.lipsyncInc();

function linnControl.lipsyncDec();

Increment and decrement lipsync delay by one unit (10ms)

Example

This example shows embedding the linnControl library in a TV activity. Here the DS is on 192.168.1.64 and is using an external preamp. When TV activity is selected this will cause

  • Preamp to wake from standby
  • Preamp input #1 selected
//
// linnDemo.js
//

System.print("Starting linnDemo");

////
//
// You will need to change from below here:
//
linnControl.initialise("192.168.1.64", linnControl.PREAMP_TYPE.EXTERNAL, 1);
linnControl.powerOn();

To add volume control to the activity the following code snippet needs to be associated with the volume buttons. This shows the code for volume up - similar code snippets can be associated with volume down, mute and lipsync buttons or softkeys

linnControl.volumeInc();

// onHold function must be declared within the button scope.
onHold = function (){
  linnControl.volumeInc();
}

onHoldInterval = 75; // msec



Functional Demonstartion

A fully functional demonstration is included in the provided Watch TV activity. This selects the Toslink1 input on a Majik DS-I, and demonstrates volume and lipsync control on this input. Controls can be operated by touch screen, soft keys or (in case of volume) hard keys.