'Titel: Free projections 'Onderdelen: '1 Introduzione '2 Omaggio '3 Maastricht 22.9.7 '4 Spring '5 Paris 8.3.9 '------------------------ 'Opgedragen (Free projections) aan: G.-W. Raes en K. Lauwers '------------------------ 'Titel: Introduzione 'Free projections, deel 1 '------------------------ 'Opgedragen aan: T. Allegaert (vanuit jazzy oogpunt) '------------------------ 'Debug: 'SetDlgItemText gh.cockpit, %GMT_msg1, [STR$()] 'warning "[]" '------------------------ 'Opmerkingen: 'Eerst werden meerdere taken gebruikt, elk op een ander tempo en een ander instrument gelijke pulsen gaven. Deze taken startten telkens een voor een, ' en stopten ook een voor een. Uiteindelijk was het resultaat niet denderend geslaagd: de vele timers zorgden zelfs voor computerproblemen ... ' Uiteindelijk werd dit concept weggelaten, en worden deze delen vanuit de hoofdtaak gespeeld. '------------------------ DECLARE SUB intro_hoofd DECLARE SUB intro_jazz DECLARE SUB get_intro_val(i AS BYTE, i1 AS BYTE, i2 AS BYTE, f1 AS BYTE, f2 AS BYTE) DECLARE SUB tikken '------------------------- TYPE intro_type instrum AS musician hoogte AS BYTE freq AS BYTE 'patroon(1 TO 8) AS STRING * 16 vel AS BYTE tik_eind AS DWORD tik_freq AS BYTE END TYPE '------------------------- GLOBAL intro AS intro_type GLOBAL glo_vol AS SINGLE GLOBAL glo_freq AS SINGLE '------------------------- SUB intro_hoofd STATIC time AS DWORD GLOBAL taaim2 AS DWORD STATIC starttime AS DWORD DIM tijdst(1 TO 100) AS STATIC DWORD DIM patroon1(1 TO 16) AS STATIC BYTE DIM patroon2(1 TO 16) AS STATIC BYTE DIM patroon3(1 TO 16) AS STATIC BYTE DIM patroon4(1 TO 16) AS STATIC BYTE DIM patroon5(1 TO 16) AS STATIC BYTE DIM patroon6(1 TO 16) AS STATIC BYTE DIM patroon7(1 TO 16) AS STATIC BYTE DIM patroon8(1 TO 16) AS STATIC BYTE STATIC xtoggle AS BYTE STATIC i AS BYTE STATIC j AS BYTE STATIC teller AS BYTE STATIC schuif AS SINGLE IF ISFALSE task(%intro_hoofd).tog THEN starttime = timegettime progchange troms.channel, 122 'selects lookup table controller snar.channel, 11, 127 'snar on progchange snar.channel, 122 'selects lookup table controller thunderwood.channel, 66, 127 'thunderwood on progchange thunderwood.channel, 122 'selects lookup table progchange simba.channel, 122 'selects lookup table progchange casta2.channel, 122 'selects lookup table controller vibi.channel, 66, 127 'on controller vibi.channel, 22, 60 'vibrato motors controller vibi.channel, 24, 1 'damping mode progchange piano.channel, 122 'selects lookup table ARRAY ASSIGN tijdst() = 0, 5716, _ 953, 4764, _ 1905, 3811, _ 2858, 3358, _ _ 5716, 11431, _ 6669, 9527, _ 7621, 8574, _ 8574, 10480, _ _ 11431, 22862, _ 12574, 21719, _ 13718, 20575, _ 14861, 19432, _ 16005, 18288, _ 17148, 17648, _ _ 22862, 34294, _ 24005, 32006, _ 25149, 30863, _ 26292, 29719, _ 27436, 28579, _ 28579, 33150, _ _ 34294, 45725, _ 35723, 45725, _ 37152, 45725, _ 38581, 45725, _ 40010, 45725, _ 41438, 45725, _ 42867, 45725, _ 44296, 45725, _ _ 47749, 48761, _ 51797, 52809, _ 53821, 54833, _ 57868, 58880, _ 59892, 60904, _ 63940, 64952, _ 65964, 69000, _ 67988, 69000, _ _ 69000, 74074, _ _ 74074, 91650, _ _ 91650, 105825, _ _ 105825, 106325, _ 105825, 107006, _ 105825, 108187, _ 105825, 109369, _ 105825, 110550, _ _ 110550, 115275, _ 111731, 112912, _ 112912, 114094, _ _ 115275, 120000, _ 116456, 118819, _ 117637, 118137 task(%intro_hoofd).tog = %true xtoggle = 1 EXIT SUB END IF time = timegettime - starttime taaim2 = time IF tijdst(1) < time AND time <= tijdst(2) THEN schuif = (SIN((((time-tijdst(1))/((tijdst(2)-tijdst(1))/10))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif get_intro_val(1,1,6,10,40) task(%intro_hoofd).freq = intro.freq*glo_freq END IF IF tijdst(9) < time AND time <= tijdst(10) THEN schuif = (SIN((((time-tijdst(9))/((tijdst(10)-tijdst(9))/10))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif IF xtoggle = 1 THEN intro.tik_eind = tijdst(10) : intro.tik_freq = 40 : starttask %tikken : xtoggle = 0 task(%intro_hoofd).freq = 30 END IF IF tijdst(17) < time AND time <= tijdst(18) THEN schuif = (SIN((((time-tijdst(17))/((tijdst(18)-tijdst(17))/10))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif get_intro_val(1,7,12,20,60) task(%intro_hoofd).freq = intro.freq*glo_freq END IF IF tijdst(29) < time AND time <= tijdst(30) THEN schuif = (SIN((((time-tijdst(29))/((tijdst(30)-tijdst(29))/10))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif IF xtoggle = 0 THEN intro.tik_eind = tijdst(30) : intro.tik_freq = 45 : starttask %tikken : xtoggle = 1 task(%intro_hoofd).freq = 30 END IF IF tijdst(41) < time AND time <= tijdst(42) THEN schuif = (SIN((((time-tijdst(41))/((tijdst(42)-tijdst(41))/5))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif get_intro_val(1,1,18,30,80) task(%intro_hoofd).freq = intro.freq*glo_freq END IF IF tijdst(57) < time AND time <= tijdst(72) THEN schuif = (SIN((((time-tijdst(57))/((tijdst(72)-tijdst(57))/5))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif IF xtoggle = 1 THEN intro.tik_eind = tijdst(72) : intro.tik_freq = 50 : starttask %tikken : xtoggle = 0 task(%intro_hoofd).freq = 30 END IF IF tijdst(73) < time AND time <= tijdst(74) THEN schuif = (SIN((((time-tijdst(73))/((tijdst(74)-tijdst(73))/5))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif IF xtoggle = 0 THEN starttask %intro_jazz : xtoggle = 1 task(%intro_hoofd).freq = 30 END IF IF tijdst(75) < time AND time <= tijdst(76) THEN schuif = (SIN(((((time-tijdst(75))/((tijdst(76)-tijdst(75))/5)-5))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif IF xtoggle = 1 THEN xtoggle = 0 teller = 0 ARRAY ASSIGN patroon1() = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ARRAY ASSIGN patroon2() = 1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0 ARRAY ASSIGN patroon3() = 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0 ARRAY ASSIGN patroon4() = 0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0 ARRAY ASSIGN patroon5() = 0,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1 ARRAY ASSIGN patroon6() = 0,1,0,1,0,1,0,0,0,0,1,0,0,0,0,0 ARRAY ASSIGN patroon7() = 0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1 ARRAY ASSIGN patroon8() = 1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0 END IF IF patroon1(teller) = 1 THEN play simba.channel, 80, 45*glo_vol IF patroon2(teller) = 1 THEN play simba.channel, 72, 45*glo_vol IF patroon3(teller) = 1 THEN play thunderwood.channel, 6, 50*glo_vol IF patroon4(teller) = 1 THEN play thunderwood.channel, 10, 50*glo_vol IF patroon5(teller) = 1 THEN play thunderwood.channel, 13, 50*glo_vol IF patroon6(teller) = 1 THEN play simba.channel, 60, 45*glo_vol IF patroon7(teller) = 1 THEN play troms.channel, 36, 30*glo_vol IF patroon8(teller) = 1 THEN play troms.channel, 28, 30*glo_vol INCR teller IF teller => 16 THEN teller = 0 task(%intro_hoofd).freq = 8 END IF IF tijdst(77) < time AND time <= tijdst(78) THEN IF xtoggle = 0 THEN xtoggle = 1 i=0 END IF schuif = (SIN(((((time-tijdst(77))/((tijdst(78)-tijdst(77))/5)-5))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif get_intro_val(1,1,18,80,80) task(%intro_hoofd).freq = intro.freq*glo_freq END IF IF tijdst(79) < time AND time <= tijdst(88) THEN schuif = (SIN(((((time-tijdst(79))/((tijdst(88)-tijdst(79))/5)-5))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif get_intro_val(1,7,12,20,60) task(%intro_hoofd).freq = intro.freq*glo_freq END IF IF tijdst(89) < time AND time <= tijdst(90) THEN schuif = (SIN((((time-tijdst(89))/((tijdst(90)-tijdst(89))/10))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif IF xtoggle = 1 THEN intro.tik_eind = tijdst(90) : intro.tik_freq = 40 : starttask %tikken : xtoggle = 0 task(%intro_hoofd).freq = 30 END IF IF tijdst(95) < time AND time <= tijdst(96) THEN schuif = (SIN((((time-tijdst(95))/((tijdst(96)-tijdst(95))/10))-(2.5122))/1.585)+3)/3 : glo_vol = schuif : glo_freq = schuif get_intro_val(1,1,6,10,40) task(%intro_hoofd).freq = intro.freq*glo_freq END IF IF time > tijdst(96) THEN task(%intro_hoofd).freq = 30 IF time > tijdst(100)+5000 THEN stoptask %intro_hoofd END SUB '------------------------- SUB tikken()'tik_eind en tik_freq meegeven STATIC teller AS BYTE STATIC freq AS SINGLE STATIC note AS BYTE STATIC note2 AS BYTE IF ISFALSE task(%tikken).tog THEN teller = 0 task(%tikken).tog = %true controller qt.channel, 66, 127 controller ake.channel, 66, 127 controller qt.channel, 7, 0 controller ake.channel, 7, 0 END IF IF teller = 0 THEN note = RND(36,108) note2 = RND(49,94) play qt.channel, note, 120 play ake.channel, note, 120 ELSE noteoff qt.channel, note noteoff ake.channel, note END IF INCR teller IF teller => 2 THEN teller = 0 freq = (((-1)*(taaim2/intro.tik_eind))+1)*intro.tik_freq freq = MAX(MIN(freq,30),1) task(%tikken).freq = freq*2 IF taaim2 => intro.tik_eind THEN mm_qt_off %mm_notes mm_ake_off %mm_notes stoptask %tikken END IF END SUB '------------------------- SUB get_intro_val(i AS BYTE, i1 AS BYTE, i2 AS BYTE, f1 AS BYTE, f2 AS BYTE) STATIC tempval AS BYTE STATIC tempfreq AS SINGLE IF i1 > i2 THEN SWAP i1, i2 IF i1 = i2 THEN tempval = i1 ELSE tempval = RND(i1, i2) tempval = MAX(MIN(tempval, 12), 1) IF f1 > f2 THEN SWAP f1, f2 IF f1 = f2 THEN tempfreq = f1 ELSE tempfreq = RND(f1, f2) tempfreq = MAX(MIN(f1, 200), 1) intro.freq = tempfreq/2.5 IF tempval = 1 THEN play troms.channel, 28, 30*glo_vol IF tempval = 2 THEN play troms.channel, 32, 30*glo_vol IF tempval = 3 THEN play troms.channel, 36, 30*glo_vol IF tempval = 4 THEN play snar.channel, 70, 45*glo_vol IF tempval = 5 THEN play troms.channel, 39, 30*glo_vol IF tempval = 6 THEN play troms.channel, 42, 30*glo_vol IF tempval = 7 THEN play troms.channel, 44, 30*glo_vol IF tempval = 8 THEN play troms.channel, 46, 30*glo_vol IF tempval = 9 THEN play thunderwood.channel, 1, 50*glo_vol IF tempval = 10 THEN play thunderwood.channel, 6, 50*glo_vol IF tempval = 11 THEN play thunderwood.channel, 10, 50*glo_vol IF tempval = 12 THEN play thunderwood.channel, 13, 50*glo_vol IF tempval = 13 THEN play simba.channel, 77, 45*glo_vol IF tempval = 14 THEN play simba.channel, 60, 45*glo_vol IF tempval = 15 THEN play simba.channel, 65, 45*glo_vol IF tempval = 16 THEN play simba.channel, 72, 45*glo_vol IF tempval = 17 THEN play simba.channel, 80, 45*glo_vol IF tempval = 18 THEN play casta2.channel, 120, 45*glo_vol END SUB '------------------------- SUB intro_jazz 'blinde taak: wordt gestart en stopt vanzelf DIM jazz(1 TO 14*5) AS STATIC SINGLE STATIC teller AS BYTE STATIC onoff AS BYTE IF ISFALSE task(%intro_jazz).tog THEN ARRAY ASSIGN jazz() = 77, 81, 84, 88, 38,_ 91, 0 , 0 , 0 , 0 ,_ 80, 83, 88, 0 , 43,_ 87, 0 , 0 , 0 , 0 ,_ 76, 79, 86, 0 , 36,_ 75, 0 , 0 , 0 , 0 ,_ 73, 77, 84, 0 , 33,_ 82, 0 , 0 , 0 , 0 ,_ 72, 76, 81, 0 , 38,_ 83, 0 , 0 , 0 , 0 ,_ 71, 81, 0 , 0 , 31,_ 70, 0 , 0 , 0 , 0 ,_ 69, 72, 79, 0 , 36,_ 71, 0 , 0 , 0 , 0 task(%intro_jazz).tog = %true teller = 1 onoff = 0 EXIT SUB END IF mm_piano_off %mm_notes SELECT CASE onoff CASE 0 IF jazz(teller) <> 0 THEN play vibi.channel, jazz(teller), 64*glo_vol IF jazz(teller+1) <> 0 THEN play vibi.channel, jazz(teller+1), 64*glo_vol IF jazz(teller+2) <> 0 THEN play vibi.channel, jazz(teller+2), 64*glo_vol IF jazz(teller+3) <> 0 THEN play vibi.channel, jazz(teller+3), 64*glo_vol IF jazz(teller+4) <> 0 THEN play piano.channel,jazz(teller+4), 64*glo_vol teller = teller +5 CASE 2 IF jazz(teller) <> 0 THEN play vibi.channel, jazz(teller), 40*glo_vol teller = teller +5 END SELECT IF teller => 14*5 THEN mm_piano_off %mm_notes : stoptask %intro_jazz INCR onoff IF onoff => 3 THEN onoff = 0 task(%intro_jazz).freq = 3+(2*glo_freq) '~100bpm, figuren als trioolkwart-trioolachtste END SUB