TR Algorithms



The above block diagram shows how TR sequences a piece for playing on the Internet.  The composer creates a series of .ogg files from one to three staffs in a notation program.  The .ogg files are created in 2 or 3 minute segments, edited for length on the beat and uploaded to TR with coordinate names.

Up the three sets of segmented files can be designated for sequencing – the above example shows two staffs worth – and the sequencing program copies the segments in an order determined by the algorithm used.  There are currently six algorithm choices in the TR configuration menu:

  • Random
  • Traffic 1
  • Traffic 2
  • Weather 1
  • Weather 2
  • Weather 3

This article will describe how each algorithm works to sequence the files uploaded to the LP server.


The Random algorithm simply uses random numbers to order and assign segments to the final track.  The program generates a random number between 0 and the maximum number of files for each staff, and converts to a binary value.  This becomes the basis of the name of the file copied and for each segment needed in the final track a random segment file is selected and copied.

For this algorithm choice you can upload any number number of files per stave  allowed in the configuration screen (1 to 8).  Although this algorithm does not use any Internet data to sequence the piece, it has the advantage of being faster to run and more varied in the segment selections than some of the other algorithms.  A good algorithm to use for testing.

Traffic 1:

The Traffic 1 algorithm uses the status of traffic advisory reports from MapQuest for the 50 largest US metropolitan areas.  The size of the advisory report is compared to historically high and low report lengths for that city.   A binary coordinate is generated between 000 and 111 where a value of 000 indicates a large traffic advisory list – and lower average roadway speeds – and a value of 111 indicates an historically short report and faster travel times.  These coordinates are used to determine the placement of composition segments in the final mix of the piece.  Note that this algorithm works only with 8 segments for each of three staffs – a total of 24 source segments.

This algorithm takes a while to run – typically two and a half hours – and it tends to produce similar coordinates depending on the time of the local rush hour.Cities from all four US time zones are included and the list is arranged from largest metropolitan area to smaller ones.

Traffic 2:

Traffic 2 is similar to Traffic 1 in the way the coordinates are generated, but the list of cities in Traffic 2 are grouped by time zone.  This tends to highlight the traffic patterns in cities that have a common rush hour time.

Weather 1:

Weather 1 uses the current temperature in degrees F, the humidity in percent and the wind velocity in MPH from 15 selected US cities to determine the coordinates of the .ogg files in the final mix.  The temperatures are scaled according to the number of files per staff, but a coordinate of 0 is assigned to a temperature reading below 0 F and the maximum coordinate value is assigned to a temperature reading above 100 F.  The intermediate coordinate values are scaled between these accordingly.  A similar process is used to scale the humidity and wind velocity data into binary coordinates.

There are no limitations as to the number of files per stave that can be sequenced with this algorithm (1 to 8).  This algorithm will tend to provide more variety in the fall and winter than in the summer.

The cities used for generating Weather 1 coordinates are:

Seattle, San Francisco, Los Angeles, Denver, Chicago, Houston, Atlanta, Miami, Boston, New York, St. Louis,
Nashville, Albuquerque, Anchorage, Honolulu and Cleveland,

Weather 2:

This algorithm generates the coordinates in a similar manner to Weather 1, but weather data  from 15 cities in North and South America are used to determine the coordinates.   In this way the final piece will take on a somewhat more varied character as some of the cities are tropical and the seasons are opposite in the two hemispheres.


The cities used for Weather 2 are:

Fairbanks,  Manaus, Edmonton, Rio de Janeiro, Toronto, Buenos Aires, New York Santiago, Chicago,                  La Paz, San Francisco, Caracas, Houston, Mexico City, Bogota and Lima.


Weather 3:

Weather 3 uses data from  15 European cities to the coordinates.  Weather 3 uses current temperature, wind velocity and humidity to generate the coordinates for each staff file.  As with the stock sequencing programs, 2, 4 or 8 files per staff are used.  The 16 European cities are:

Bremen, Tirana, Oslo, Messina, Berlin, Marseilles, Warsaw, Monaco, Vienna, Lisbon, Prague, Athens, Paris, Rome, Budapest, Madrid


%d bloggers like this: