OscSend xmit; xmit.setHost("localhost",6666); 30 => float frameRate; 189 => int NUM_SHOWS; 1866.6962 => float YEAR_START; 2019.2204 => float YEAR_END; YEAR_END-YEAR_START => float YEAR_GAP; 120 => int LISA_MAX_VOICES; 60::second => dur PIECE_LENGTH; PIECE_LENGTH/NUM_SHOWS => dur TIME_PER; ["The Black Crook", "Adonis", "El Capitan", "The Belle of New York", "An Arabian Girl and 40 Thieves", "Cyrano de Bergerac", "Chris and the Wonderful Lamp", "The Casino Girl", "The Blonde in Black", "Babes in Toyland", "Babette", "The Baroness Fiddlesticks", "Abyssinia", "About Town", "Bandanna Land", "The Candy Shop", "A Broken Idol", "Alma, Where Do You Live?", "Baron Track", "All Aboard", "Adele", "Chin Chin", "The Blue Paradise", "Alone at List", "Buddies", "Bombo", "The Blue Kitten", "The Chocolate Dandies", "Big Boy", "Captain Jinks", "The Cocoanuts", "Castles in the Air", "A Connecticut Yankee", "Chee-Chee", "Billie", "Animal Crackers", "Babes in Toyland (Revival)", "America's Sweetheart", "The Cat and the Fiddle", "As Thousands Cheer", "Anything Goes", "Africana", "Babes in Arms", "The Cradle Will Rock", "Between the Devil", "The Boys from Syracuse", "Cabin in the Sky", "Best Foot Forward", "Banjo Eyes", "By Jupiter", "A Connecticut Yankee (Revival)", "Carmen Jones", "Bloomer Girl", "Carousel", "Carib Song", "Are You With It?", "Billion Dollar Baby", "Around the World", "Annie Get Your Gun", "Beggar's Holiday", "Brigadoon", "Barefoot Boy Creek", "Allegro", "The Cradle Will Rock (Revival)", "As the Girls Go", "Arms and the Girl", "Brigadoon (First Revival)", "Call Me Madam", "Can-Can", "Carnival in Flanders", "By The Beautiful Sea", "Ankles Aweigh", "Bells Are Ringing", "Candide", "Brigadoon (Second Revival)", "Carousel (Revival)", "Copper and Brass", "The Body Beautiful", "Bye Bye Birdie", "Christine", "Camelot", "The Conquering Hero", "Carnival!", "All American", "Bravo Giovanni", "Brigadoon (Third Revival)", "Anyone Can Whistle", "Ben Franklin in Paris", "Bajour", "Baker Street", "Anya", "Annie Get Your Gun (Revival)", "The Apple Tree", "Caberet", "Celebration", "Come Summer", "Coco", "Applause", "Cry for Us All", "Company", "Ain't Supposed to Die a Natural Death", "Ambassador", "Cyrano", "Candide (Revival)", "A Chorus Line", "Chicago", "Annie", "The Act", "Angel", "The Best Little Whorehouse in Texas", "Ballroom", "Carmelina", "Barnum", "Camelot (Revival)", "Brigadoon (Fourth Revival)", "Bring Back Birdie", "La Cage aux Folles", "Amen Corner", "Baby", "Big River", "Anything Goes (Revival)", "Caberet (Revival)", "Carrie", "City of Angels", "Crazy for You", "Cyrano - The Musical", "Carousel (Second Revival)", "Beauty and the Beast", "The Best Little Whorehouse Goes Public", "Chronicle of a Death Foretold", "Company (Revival)", "Big", "Chicago (Revival)", "Annie (Revival)", "Candide (Second Revival)", "The Capeman", "Caberet (Second Revival)", "Annie Get Your Gun (Second Revival)", "The Civil War", "Aida", "Contact", "A Class Act", "The Adventures of Tom Sawyer", "The Boys from Syracuse (Revival)", "Amour", "Big River (Revival)", "Avenue Q", "The Boy from Oz", "Caroline, or Change", "Brooklyn", "La Cage aux Folles (Revival)", "The Color Purple", "A Chorus Line (Revival)", "Company (Second Revival)", "The Apple Tree (Revival)", "Curtains", "A Catered Affair", "Cry-Baby", "Bye Bye Birdie (Revival)", "The Addams Family", "La Cage aux Folles (Second Revival)", "American Idiot", "The Book of Mormon", "Anything Goes (Second Revival)", "Catch Me If You Can", "Baby It's You!", "Bring It On", "Chaplin", "Annie (Second Revival)", "A Christmas Story", "Cinderella", "Big Fish", "Beautiful: The Carol King Musical", "Bronx Bombers", "The Bridges of Madison County", "Aladdin", "Caberet (Third Revival)", "An American In Paris", "Amazing Grace", "Allegiance", "The Color Purple (Revival)", "The Band's Visit", "Bright Star", "A Bronx Tail", "Come From Away", "Anastasia", "Amelie", "Bandstand Land", "Carousel (Third Revival)"] @=> string names[]; [1866.6962, 1884.6747, 1896.3011, 1897.7392, 1899.3253, 1899.7124, 1900.0000, 1900.2151, 1903.4355, 1903.7823, 1903.8737, 1904.8871, 1906.1344, 1906.6613, 1908.0887, 1909.3199, 1909.6237, 1910.7339, 1912.1935, 1913.4274, 1913.6559, 1914.8011, 1915.5941, 1915.7984, 1919.7930, 1921.7634, 1922.0323, 1924.6667, 1925.0161, 1925.6855, 1925.8172, 1926.6801, 1927.8387, 1928.7312, 1928.7500, 1928.8091, 1929.9758, 1931.1075, 1931.7876, 1933.7446, 1934.8871, 1934.8871, 1937.2849, 1937.4570, 1937.9731, 1938.8925, 1940.8145, 1941.7500, 1941.9812, 1942.4220, 1943.8763, 1943.9194, 1944.7608, 1945.2984, 1945.7366, 1945.8575, 1945.9704, 1946.3495, 1946.3737, 1946.9839, 1947.1989, 1947.2554, 1947.7742, 1947.9839, 1948.8656, 1950.0860, 1950.3360, 1950.7796, 1953.3495, 1953.6855, 1954.2688, 1955.2957, 1956.9086, 1956.9167, 1957.2715, 1957.6935, 1957.7930, 1958.0591, 1960.2849, 1960.3226, 1960.9220, 1961.0403, 1961.2796, 1962.2151, 1962.3817, 1963.0780, 1964.2581, 1964.8199, 1964.8925, 1965.1237, 1965.9086, 1966.4140, 1966.7500, 1966.8844, 1969.0565, 1969.2124, 1969.9624, 1970.2446, 1970.2688, 1970.3172, 1971.8011, 1972.8817, 1973.3656, 1974.1909, 1975.2876, 1975.4220, 1977.3038, 1977.8253, 1978.3414, 1978.4651, 1978.9516, 1979.2688, 1980.3280, 1980.5188, 1980.7903, 1981.1774, 1983.6371, 1983.8575, 1983.9247, 1985.3145, 1987.7984, 1987.8065, 1988.3629, 1989.9435, 1992.1317, 1993.9971, 1994.2285, 1994.2957, 1994.3575, 1995.4543, 1995.7608, 1996.3226, 1996.8683, 1997.2016, 1997.3253, 1998.0753, 1998.2151, 1999.1747, 1999.3065, 2000.2258, 2000.2446, 2001.1935, 2001.3172, 2002.6290, 2002.8011, 2003.5645, 2003.5806, 2003.7903, 2004.3360, 2004.8038, 2004.9382, 2005.9167, 2006.7608, 2006.9086, 2006.9516, 2007.2231, 2008.2930, 2008.3226, 2009.6909, 2010.2688, 2010.2957, 2010.3011, 2011.1452, 2011.2661, 2011.2742, 2011.3199, 2012.6667, 2012.6909, 2012.8522, 2012.8817, 2013.1720, 2013.7634, 2014.0296, 2014.0968, 2014.1344, 2014.2177, 2014.3118, 2015.2796, 2015.5403, 2015.8522, 2015.9409, 2016.1022, 2016.2285, 2016.9167, 2017.1962, 2017.2258, 2017.2554, 2017.3172, 2018.2796] @=> float opening[]; float startTime[NUM_SHOWS]; for (0 => int i; i startTime[i]; } [474.0, 603.0, 112.0, 064.0, 033.0, 028.0, 058.0, 145.0, 035.0, 192.0, 059.0, 025.0, 048.0, 085.0, 089.0, 049.0, 040.0, 232.0, 040.0, 108.0, 196.0, 295.0, 356.0, 180.0, 259.0, 219.0, 140.0, 096.0, 176.0, 167.0, 276.0, 160.0, 421.0, 031.0, 112.0, 191.0, 032.0, 135.0, 395.0, 400.0, 420.0, 003.0, 289.0, 131.0, 093.0, 235.0, 156.0, 326.0, 126.0, 427.0, 135.0, 503.0, 657.0, 890.0, 036.0, 264.0, 220.0, 075.0,1147.0, 111.0, 581.0, 108.0, 315.0, 034.0, 420.0, 134.0, 024.0, 644.0, 892.0, 006.0, 270.0, 176.0, 924.0, 073.0, 047.0, 024.0, 036.0, 060.0, 670.0, 012.0, 873.0, 008.0, 719.0, 080.0, 076.0, 016.0, 009.0, 215.0, 232.0, 311.0, 016.0, 078.0, 463.0,1165.0, 109.0, 007.0, 329.0, 896.0, 009.0, 705.0, 325.0, 029.0, 049.0, 740.0,6137.0, 936.0,2377.0, 233.0, 005.0,1584.0, 116.0, 017.0, 854.0, 056.0, 133.0, 004.0,1761.0, 028.0, 241.0,1005.0, 784.0, 261.0, 005.0, 879.0,1622.0, 137.0, 337.0,5461.0, 028.0, 037.0, 060.0, 193.0,9293.0, 239.0, 104.0, 068.0,2377.0,1045.0, 061.0,1852.0, 1010.0,105.0, 021.0, 073.0, 017.0, 067.0,2534.0, 365.0, 136.0, 284.0, 229.0, 910.0, 759.0, 246.0, 099.0, 511.0, 116.0, 068.0, 117.0, 722.0, 433.0, 421.0,3349.0, 521.0, 170.0, 148.0, 173.0, 136.0, 487.0, 051.0, 770.0, 098.0,2170.0, 029.0, 137.0,2095.0, 388.0, 623.0, 116.0, 111.0, 450.0, 589.0, 109.0, 700.0, 851.0, 794.0, 056.0, 166.0, 181.0] @=> float shows[]; int rep[NUM_SHOWS]; for (0 => int i; i rep[i]; } 0 => int TOTAL_SHOWS; 0 => int TOTAL_REPS; for (0 => int i; i TOTAL_SHOWS; <<>>; TOTAL_REPS + rep[i] => TOTAL_REPS; } [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 1.0, 0.0, 0.0, 4.0, 5.0, 0.0, 1.0, 0.0, 0.0, 8.0, 0.0, 5.0, 0.0, 7.0, 0.0, 0.0, 0.0, 1.0, 0.0, 2.0, 4.0, 0.0, 2.0, 7.0,11.0, 0.0, 0.0, 7.0,10.0, 0.0,14.0, 7.0, 0.0, 2.0, 7.0,12.0, 11.0,9.0, 6.0, 0.0, 7.0, 8.0, 0.0,10.0, 2.0, 0.0, 0.0, 9.0, 0.0, 7.0,10.0, 9.0, 4.0, 0.0,11.0, 9.0, 0.0, 5.0, 9.0, 0.0, 3.0, 2.0, 5.0, 8.0, 1.0, 4.0, 0.0,10.0, 3.0, 2.0, 5.0, 7.0, 5.0, 0.0, 0.0, 5.0, 3.0, 6.0, 5.0, 6.0, 0.0, 4.0,11.0, 2.0, 3.0, 1.0, 8.0, 3.0, 4.0, 0.0, 0.0, 11.0,3.0,14.0, 9.0, 4.0, 1.0, 2.0, 1.0, 2.0, 3.0, 9.0, 0.0, 7.0, 0.0, 4.0, 5.0, 2.0,11.0, 0.0, 0.0, 4.0,11.0, 5.0, 0.0, 7.0, 2.0, 0.0, 2.0,11.0] @=> float noms[]; float rate[NUM_SHOWS]; for (0 => int i; i rate[i]; } [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 2, 0, 0, 1, 0, 0, 4, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 8, 0, 0, 2, 4, 0, 6, 0, 0, 1, 4, 9, 0, 6, 1, 0, 2, 1, 0, 3, 0, 0, 0, 6, 0, 0, 7, 3, 0, 0, 6, 3, 0, 5, 8, 0, 0, 0, 0, 6, 0, 1, 0, 4, 2, 0, 4, 4, 0, 0, 0, 0, 1, 3, 1, 1, 0, 2, 1, 0, 1, 0, 1, 0, 0, 0, 0, 3, 2, 9, 3, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2, 1, 0, 4, 0, 0, 2,10, 0, 0, 1, 0, 0, 1, 2] @=> int wins[]; LiSa lisa; lisa.maxVoices(LISA_MAX_VOICES); record(lisa); //0 => float x; for (0 => int i; i<3; i++) { xmit.addInt(NUM_SHOWS); xmit.addInt(TOTAL_SHOWS); xmit.addInt(TOTAL_REPS); xmit.startMsg("start, i i i"); } <<>>; 0.1 => float GRF; for (0 => int i; i dur grainLen; spork ~ grain(lisa, startTime[i], grainLen, grainLen*GRF, grainLen*GRF, rate[i], rep[i], i); } PIECE_LENGTH*1.5 => now; fun void record(LiSa lisa) { adc => lisa => NRev r1 => dac; lisa.maxVoices(LISA_MAX_VOICES); 0 => r1.mix; PIECE_LENGTH => lisa.duration; lisa.record(1); PIECE_LENGTH => now; lisa.record(0); } fun void grain( LiSa @ lisa, float start, dur grainLen, dur rampUp, dur rampDown, float rate, int rep, int num) { start*PIECE_LENGTH => dur pos; // get a voice to use pos => now; shows[num] $ int => int numShows; xmit.addFloat(start); xmit.addInt(numShows); xmit.addInt(rep); xmit.addFloat(noms[num]); xmit.addInt(wins[num]); xmit.addString(names[num]); xmit.startMsg("show, f i i f i s"); lisa.getVoice() => int voice; //<<>>; // if available if( voice > -1 ) { for (0 => int i; i float gain; //<<>>; lisa.voiceGain( voice, gain ); // set rate lisa.rate( voice, rate ); // set playhead lisa.playPos( voice, pos ); // ramp up lisa.rampUp( voice, rampUp ); // wait (grainLen - rampUp) => now; // ramp down lisa.rampDown( voice, rampDown ); // wait rampDown => now; } } }