owmidiconverter icon indicating copy to clipboard operation
owmidiconverter copied to clipboard

Multiple midi insertion and list

Open osmancitci opened this issue 6 months ago • 0 comments

Now I made some adjustments but I can add multiple midi but when I activate it the server crashes. What is the reason for this? I used Alo's Cursor Menu and listed the songs

subroutines
{
    0: endSong
    1: decompressArray
    2: basla
	3: sarki1
	4: sarki2
	126: cm_Lock
	127: cm_Unlock

}


rule("sarki 1")
{
    event
    {

        Subroutine;
        sarki1;
    }


	
    actions
    {

    Global.maxBots = 11;
    Global.maxArraySize = 1000;
    Global.isCompressionEnabled = true;
    Global.compressedElementLength = 7;
    Global.compressionInfo = Array(Array(3,7,7),Array(2,4,2));
	
Global.pitchArrays[0] = Array(2452194, 8432445, 1753532, 1452423, 4757572, 3572155, 2353245, 2484543, 4324521, 9484324, 4517535, 3214524, 1943431, 9432145, 2347482, 4482440, 1936312, 4331741, 4121332, 4233545, 4523452, 1432341, 2440363, 3313124, 4019363, 1243317, 4141213, 3241931, 3119312, 1332335, 3624404, 348);
	
Global.timeArrays[0] = Array(0000080, 4053502, 6802680, 2680268, 0401013, 4013406, 7005360, 2680267, 0268053, 6026805, 3602670, 2680268, 1072026, 7080405, 3602680, 2670268, 0268040, 2013401, 3406690, 5360536, 0268026, 8026702, 6802680, 2680536, 1607080, 3053602, 6802680, 2680268, 0401013, 4013406, 7005360, 2670268, 0268053, 6026805, 3502680, 2680268, 1071026, 8080405, 3602670, 2680268, 0268040, 2013401, 3406690, 5360536, 0267026, 8026802, 6802680, 2680535);
	
Global.chordArrays[0] = Array(0202010, 1010101, 0101010, 1020101, 0202020, 2010101, 0102020, 1010101, 0101010, 1010201, 0101020, 2010101, 0202010, 1010101, 0101010, 1020101, 0202020, 2010101, 0102020, 1010101, 0101010, 1010201, 0101020, 2010103);
    }
}


rule("sarki 2")
{
    event
    {
        Subroutine;
        sarki2;
    }

    actions
    {

    Global.maxBots = 11;
    Global.maxArraySize = 1000;
    Global.isCompressionEnabled = true;
    Global.compressedElementLength = 7;
    Global.compressionInfo = Array(Array(6,6,3), Array(2,4,2));
	
	Global.pitchArrays[0] = Array(2431364, 3243624, 3624273, 6392429, 3641243, 1364324, 3624362, 4273639, 2429364, 1243136, 4324362, 4362427, 3639242, 9364124, 3136432, 4362436, 2427363, 9242936, 4124283, 1364043, 2428364, 0242836, 4024283, 6402428, 2936404, 1242831, 3640432, 4283640, 2428364, 0242836, 4024282, 9364041, 2428313, 6404324, 2836402, 4283640, 2428364, 0242829, 3640412, 4283136, 4043242, 8364024, 2836402, 4283640, 2428293, 6404112, 1931121, 9121912, 1912192, 4121912, 1912191, 2192729, 1219311, 2191219, 1219241, 2191219, 2712192, 9192638, 1926311, 9263419, 2636192, 6381926, 3119263, 4192636, 1926381, 9263119, 2634192, 6361926, 3819263, 1192634, 1926362, 2292229, 2229222, 9222922, 2922292, 2292227, 2926222, 9222922, 2922292, 2292229, 2229172, 4273626, 1724291, 7243317, 2434172, 4361724, 2917243, 3172434, 1724361, 7242917, 2433172, 4341724, 3617242, 9172433, 1724341, 9311212, 1219241, 2121219, 2729123, 1121219, 2412122, 7122926, 3819311, 9341936, 2638193, 1193419, 3626381, 9311934, 1936263, 8193119, 3419362, 9222222, 2229222, 2222729, 2622292, 2222229, 2222222, 4273626, 1724291, 7331734, 2436172, 9173317, 3424361, 7291733, 1734243, 6172917, 3317341, 2193143, 1219241, 2192712, 1929121, 9243136, 1219241, 2192712, 1929121, 9273139, 2941121, 9243143, 1219271, 2192912, 1924313, 6121924, 1219273, 9121929, 4119263, 8192631, 1926341, 9263619, 2638192, 6311926, 3419263, 6192638, 1926311, 9263419, 2636192, 6381926, 3119263, 4192636, 2229412, 2293422, 2938222, 9392229, 3441222, 9342229, 3822293, 9222629, 3841222, 9342739, 2229382, 2293922, 2629384, 1222934, 2234222, 9382229, 3917243, 6172429, 1724331, 7243417, 2436172, 4291724, 3317243, 4172436, 1724291, 7243317, 2434172, 4361724, 2917243, 3172434, 2027482, 0273920, 2720274, 4202746, 2027482, 0273920, 2720274, 6202748, 1522461, 5223915, 2215224, 3152244, 1522461, 5223915, 2215224, 3152217, 2436441, 7243617, 2417244, 1172443, 1724441, 7243617, 2417244, 3172444, 1219431, 2193612, 1912193, 9121941, 1219431, 2193612, 1912194, 3121941, 2027323, 9202732, 2027202, 7362027, 3820273, 9202732, 2027202, 7382027, 3915223, 9152234, 1522152, 2381522, 3914223, 8411422, 3114221, 4223614, 2238121, 9434812, 1943121, 9121944, 1219461, 2194812, 1943121, 9121944, 1219461, 2194812, 1943121, 9121944, 1219461, 2194812, 1943121, 9121944, 1219462, 0274820, 2739202, 7202744, 2027462, 0274820, 2739202, 7202746, 2027481, 5224615, 2239152, 2152243, 1522441, 5224615, 2239152, 2152243, 1522172, 4364417, 2436172, 4172441, 1724431, 7244417, 2436172, 4172443, 1724441, 2194312, 1936121, 9121939, 1219411, 2194312, 1936121, 9121943, 1219412, 0273239, 2027322, 0272027, 3620273, 8202739, 2027322, 0272027, 3820273, 9152239, 1522341, 5221522, 3815223, 9142238, 1422311, 4221422, 3614223, 8121936, 4812194, 3121912, 1944121, 9461219, 4812194, 3121912, 1944121, 9461219, 4812194, 3121912, 1944121, 9461219, 4812194, 3121912, 1944121, 9461219, 4843444, 6484344, 4648434, 4464843, 444648);
	
	Global.timeArrays[0] = Array(0000035, 3017601, 7701760, 1770353, 0176017, 7017601, 7703530, 1760177, 0176017, 6035301, 7701760, 1770176, 0353017, 7017601, 7701760, 3530177, 0176017, 6017703, 5301760, 1770176, 0177035, 3017601, 7701760, 1770353, 0352017, 7017603, 5303530, 1770176, 0177017, 6035301, 7701760, 3530353, 0176017, 7035303, 5301760, 1770353, 0353017, 6017703, 5203530, 1770176, 0353035, 3017701, 7603530, 3530177, 0176035, 3035301, 7601770, 1760177, 0353017, 6017703, 5303530, 1760176, 0177017, 6035301, 7701760, 3530353, 0177017, 6035303, 5301760, 1770353, 0353017, 6017703, 5303530, 1760177, 0353035, 2017701, 7601770, 1760353, 0177017, 6035303, 5301770, 1760353, 0353017, 6017703, 5303530, 1760177, 0353035, 3017601, 7703520, 3530177, 0176035, 3035301, 7701760, 3530353, 0177017, 6017601, 7703530, 1760177, 0353035, 3017601, 7701760, 1770353, 0176017, 6035303, 5301770, 1760353, 0353017, 7017603, 5303530, 1760177, 0353035, 3017601, 7703530, 3530176, 0177017, 6017703, 5201770, 1760353, 0353017, 7017603, 5303530, 1770176, 0353035, 3017601, 7703530, 3530176, 0177035, 3035301, 7601770, 3520353, 0177017, 6035303, 5301770, 1760353, 0177017, 6017701, 7603530, 1760177, 0176017, 7035303, 5301760, 1770353, 0353017, 6017603, 5303530, 1770176, 0353035, 3017701, 7603530, 1760177, 0176017, 7035301, 7601770, 1760177, 0353017, 6017701, 7601770, 3520177, 0176017, 7017603, 5301770, 1760177, 0176035, 3017701, 7601770, 1760353, 0176017, 7017601, 7703530, 1760177, 0176017, 7035301, 7601770, 1760176, 0353017, 7017601, 7701760, 3530177, 0176017, 7017603, 5301770, 1760176, 0177035, 3017601, 7701760, 1770353, 0176017, 7017601, 7703530, 1760176, 0177017, 6035301, 7701760, 1770176, 0353017, 7017601, 7701760, 3530176, 0177017, 6017703, 5301760, 1770176, 0177035, 3017601, 7701760, 1770352, 0177017, 6017701, 7603530, 1770176, 0177017, 6035301, 7701760, 1770176, 0353017, 6017701, 7601770, 3530176, 0177017, 6017703, 5301760, 1770176, 0176035, 3017701, 7601770, 1760353, 0177017, 6017701, 7603530, 1770176, 0176017, 7035301, 7601770, 1760177, 0353017, 6017701, 7601770, 3530176, 0176017, 7017603, 5303530, 1770176, 0353035, 3017701, 7603530, 3530176, 0177035, 3035301, 760177);
	
	Global.chordArrays[0] = Array(0402020, 4040402, 0204040, 4020204, 0404020, 2040406, 0404040, 6060404, 0406060, 4040406, 0604040, 4060302, 0202030, 2020203, 0103020, 2030203, 0303030, 3030303, 0303030, 3030303, 0303030, 2020202, 0202020, 2030102, 0202020, 2020204, 0103030, 3030303, 0303030, 3030303, 0303020, 1010102, 0101010, 2010201, 0102010, 2020202, 0202020, 2020202, 0202020, 2020202, 0101010, 1020101, 0102010, 2010102, 0101010, 3010302, 0202020, 2020202, 0202020, 2020204, 0303030, 5030303, 0502050, 3030503, 0404030, 3030303, 0303030, 3030303, 0303030, 3030303, 0304030, 3030503, 0203030, 5030203, 0303030, 3030303, 0303030, 3030303, 0303030, 3030203, 0303030, 2030303, 0302030, 3030302, 0302040, 3020303, 0303020, 3030303, 0203030, 3030203, 0304030, 2030303, 0302030, 3030302, 0303040, 3020303, 0403020, 3030303, 0203030, 3030203, 0303030, 2030303, 0302030, 3030302, 0303030, 3020303, 0303020, 3020403, 0203030, 3030203, 0303030, 2030303, 0302030, 3040302, 0303030, 3020303, 0303020, 3030303, 0203030, 4030203, 0303030, 2030303, 0302030, 3030302, 0303030, 1010101, 0101010, 1010101, 0101010, 101);
    }
}

rule("baslat")
{
    event
    {
        Subroutine;
        basla;
    }

    actions
    {
        "States:\n0: song not playing\n1: Preparing to play, creating bots\n2: song playing" 
        Global.songPlayingState = 1;
        Global.i = 11;
        While(Count Of(Global.bots) < Global.maxBots && Global.i > 0);
            If(!Entity Exists(Players In Slot(Global.i, All Teams)));
                Create Dummy Bot(Hero(Symmetra), Team 1, Global.i, Global.botSpawn, Vector(0, 0, 0));
                Modify Global Variable(bots, Append To Array, Last Created Entity);
            End;
            Global.i -= 1;
            Wait(0.016, Ignore Condition);
        End;
        Wait(1, Ignore Condition);
        Global.songPlayingState = 2;
    }
}


rule("[CM] Add Buttons ★")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		"BUTTON DATA REFERENCES\n\n0 - Page (0 = All)\n1 - ID [positive integer]\n2 - Label\n3 - Type (0 = Label Only, 1 = Clickable)\n4 - X Coordinate [-100 to 100]\n5 - Y Coordinate [-100 to 100]\n6 - Default Scale [1 to 4]"
		End;
		"7 - Hover Scale [1 to 4]\n8 - Default Color [color or custom color]\n9 - Hover Color [color or custom color]\n10 - Cursor Tooltip\n11 - Cursor Tooltip Color [color or custom color]\n12 - Visible [true/false]"
		End;
		Global.cm_Buttons[0] = Array(Null, 1, Custom String("Track 1"), True, 0, 7, 3.500, 3.700, Custom Color(225, 225, 225,
			255), Color(White), Custom String(""), Color(Yellow), True);
		Global.cm_Buttons[1] = Array(Null, 2, Custom String("Track 2"), True, 0, -7, 3.500, 3.700, Custom Color(225, 225, 225, 255),
			Color(Lime Green), Null, Null, True);
	}
}

rule("'Track 1' Clicked")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.cm_CurrentClick == 1;

	}

	actions
	{
	
	Global.timeArrays = 0;
	Global.pitchArrays = 0;
	Global.chordArrays = 0;
	Global.maxBots = 0;
	Global.maxArraySize = 0;
	Global.isCompressionEnabled = 0;
	Global.compressedElementLength = 0;
	Global.compressionInfo = 0;
	Call Subroutine(sarki1);
	Call Subroutine(basla);


	}
}

rule("'Track 2' Clicked")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.cm_CurrentClick == 2;


	}

	actions
	{
	Global.timeArrays = 0;
	Global.pitchArrays = 0;
	Global.chordArrays = 0;
	Global.maxBots = 0;
	Global.maxArraySize = 0;
	Global.isCompressionEnabled = 0;
	Global.compressedElementLength = 0;
	Global.compressionInfo = 0;
	Global.compressionInfo = 0;


			Call Subroutine(sarki2);
Call Subroutine(basla);

	}
}

11

22

osmancitci avatar Aug 07 '24 14:08 osmancitci