********************************************************
* Strumpy Server - Supporting Strumpy 'Live Play' Mode *
*                                                      *
*             (smiffs4u@hotmail.com)                   *
*                                                      *
********************************************************

Installation setup details

Step 1 - Get A Java Runtime Environment (JRE)
-------------------------------------------

Download and install a Java runtime environment (jre)
from the Oracle website (jre6 or above). Recommend
using jre6 as the author has tested with that version,
however it should work with later versions unless
facilities used by the software are removed from the
java environment. Any problems, email the author.

Should work equally well on windows and any flavours of Unix
that support java (e.g linux), however command files to launch the
server tools have only been supplied for windows. If you can't
figure out how to create corresponding command files on a unix
setup the author can probably help you out. 

Apologies, no Apple support.

Get the Java Standard Runtime Environment (Jave SE jre)
from the following link.

http://www.oracle.com/technetwork/java/javase/downloads/jre-6u25-download-346243.html

Other jre versions are available by following links from the link below.

http://www.oracle.com/technetwork/java/javase/downloads/index.html



Step 2 - Install the Strumpy Server Software
-------------------------------------------

Simply unzip the strumpyserver.zip file into a new 
directory to house the strumpy software, associated support files
and downloaded midi files.


Step 3 - Edit command files to specify the jre location
------------------------------------------------------

Open the command files in the 'run' directory and replace
the value of the java path to the java run time environment.

e.g. @set java=c:\program files\java\jre6\bin 

The path must point to the 'bin' directory


Step 4 - Configure the server software
-------------------------------------

The server software must be configured before first use so that 
it is able to receive play and stop requests from the android
device you will be using to run Strumpy.

In the run directory execute the following file.

configserver.cmd

This fires up the configuration software which will request the following
pieces of information.

1. The midi device through which you will playback uploaded midi files

2. Choice regarding the stripping (or not) of the program change midi event
   message embedded in downloaded midi files
   
3. The port number on which the server will listen for incoming Strumpy
   requests. This also has to be configured on your Strumpy device and
   they both must correspond for successful communication to take place.       
   
Simply follow the on screen prompts and respond to the prompts. You can exit 
at any time (x) resulting in none of your changes being stored. You must complete
all the response for changes to be saved.

Before prompting for a midi device to use the software searches 
the environment to find available midi devices. Each computer is different
so the range of midi devices can vary widely. The devices shown will
depend on any midi related hardware and software you have installed.
 
It is assumed that if you are using this software you already have some some
degree of midi configuration understanding, if not there are plenty of 
resources on the web to help.

You will need to choose an appropriate midi output device from the list
shown. Sometimes the names are not obvious but with access to the 
documentation that may have accompanied any midi related hardware
and/or software you have installed you should be able to choose
a suitable device. If not, it's down to trial and error. 

When the configuration utility displays the available midi devices you will
see output that looks as follows for each located midi device.

n. Java Sound Synthesizer mxr=-1 mxt=0

mxr indicates the number of midi receivers supported by the device with
-1 indicating an unrestricted number (i.e. no restriction, will support an 
unrestricted number of connected concurrent midi transmitters).

mxt indicates the number of midi transmitters supported by the device in the
same way as the midi receivers indicator above.

For a successful configuration you must only choose mxr devices with
a displayed value of -1 or a value that is greater than zero. These
are devices that will support a connection from a sequencer (transmitter)
such as the Strumpy server. This could be a midi output port device
physically plugged into your computer where its associated operating
system sound driver advertises it as a midi receiver. 


The configuration facility simply creates a StrumpyServer.properties file in 
the run directory containing the supplied parameters in the required format
required by the software. You can edit these manually once you are confident
in doing so to avoid the need to invoke the configserver command.


Step 5 - Start the server and start Live Playing!
-------------------------------------------------

Having configured the server all you need to do now
is fire up the server. Run the following command to start the server.

startserver.cmd

Ths starts a new operating system process that will listen for
incoming Strumpy requests. The first time you run the command it will
create a new sub directory under the run directory which it will use to
store uploaded midi files from your Strumpy device (midifiles).

The server display the port it is listening on and then the process
blocks until you stop it. When you have finished a Strumpy 'Live Play' session
you can simply kill, the process using ctrl+c on windows and answering Y to the
prompt to end the session. This is the desired method of shutting it down
although you can get away with just closing the command shell window.

When you request to play a project in Strumpy Live Play' mode Strumpy
sends a midi file representation of your project to the server software
which it stores (overwrites) in the midifiles directory. It then passes 
a request to play the midi file to the java environment's built in
midi sequencer. This in turn generates a stream of midi events from the
midi file to the midi device you configured earlier. If this is an external
midi port on your computer the events are relayed to the midi device you
have connected to that midi output port and you should then hear the effect.

You may have an internal midi instrument on the installed device that offers a
virtual output midi port and if chosen the midi stream can be directed to this
local (software) sound synthesizer.


Advanced Midi Usage
-------------------

Users with extensive home recording setups may prefer to play Strumpy projects
through their Digital Audio Workstation (DAW) setup where there is access
to a variety of software instruments and therefore a wealth of guitar 
patches to use, far more than say on an externally attached keyboard instrument
attached to a midi output port.

To achieve this requires some clever tricks as it requires a midi loopback
mechanism to redirect midi events destined for some midi receiver device
(external or internal within the OS) to be redirected so that they
appear to any software running on the same computer as though they were
sourced from a midi input device. In this way your DAW can respond to
the events and redirect them to any software instrument available in that
software. It could even redirect the events to a device connected to the
computers attached midi output port. This give a tremendous amount of
control over where your Strumpy projects are played. Having used this facility
the author can say that it is brilliant and its amazing how your 
Strumpy phrases can sound played live in this way without having to import
a midi file into a track in your DAW first.

You could even record your Strumpy phrases live where the slight timing delays
can add to the creative feel and knocking the edge off the strictly 'on the beat' 
accuracy of the raw midi files generated by the software. Of course
both options have their merits. 

The clever tricks necessary to implement the midi loopback mechanism described
above are beyond the author's knowledge however their are a number of 
midi loopback software tools available out there.

The author has used a free virtual midi driver from....

http://nerds.de/en/loopbe1.html

The driver is called loopBE1 and is free to use for no commercial purposes so 
is ideal for home recording hobbyists.

Just install the software and it wil, appear as a midi device when you run the 
strumpy server configuration tool. Choose this device as your output for the strumpy
server. Make sure your DAW is also configured to receive input from this device
and then off you go. You can now direct your Strumpy 'Live Plays' wherever you like
using the full range of instruments available within your home studio.

Further details on Live Play can be found in the Strumpy user guide which is available
to download from the website (link on the google play store entry for the Strumpy application).       

Hope you get as much enjoyment out of using this faciity as I had getting it working.

There's nothing better than configuring your midi strumming guitar clips in Strumpy on a tablet
device over a wireless network and then being able to hear the results in real time using any guitar 
sound you have at your disposal. Look ma, no hands!

Happy Strumpying!!!!

