User prompt
yüksek skor ve komboyu gösteren yazıları küçült ve play tuşunun biraz üstüne olacak şekilde en tepeye yerleştir
User prompt
skor yazılarını küçült ve menüde sağ üst köşeye taşı
User prompt
skor yazılarını küçült ve sağ üst köşeye taşı
User prompt
skor yazılarını küçült ve diğer hiçbir öğeye değmeyecek şekilde sağ üst köşeye taşı
User prompt
oyuncunun en yüksek skor ve en yüksek kombo değerlerini ana menüde göstersin ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
akan notaların çıkış yerlerini dümdüz paralel olmasın dar bir alandan çıkıp aşağı doğru yayılsın, çıkış mevkilerini biraz daha daralt bu sayede sanki biraz uzaktan bana doğru yaklaşıyor gibi bir perspektif ilizyonu olsun
User prompt
hala daha düzelmedi çok dar bir alandan çıkmasını istemiyorum daha geniş bir perspektifle çıksın notalar dipdibe olmasın
User prompt
tüm notalar aynı noktadan spawn olmayacak o kadar dar değil yine yan yana olacak bunu düzelt
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading '0')' in or related to this line: 'pad.x = PAD_X_POSITIONS[PAD_TYPES[i]];' Line Number: 4930
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading '0')' in or related to this line: 'pad.x = LANE_DATA[laneIndex].end_x;' Line Number: 4930
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'kick')' in or related to this line: 'pad.setPadType(PAD_TYPES[i]);' Line Number: 4927
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'kick')' in or related to this line: 'var laneIndex = PAD_TYPE_TO_LANE[PAD_TYPES[i]];' Line Number: 4921
User prompt
gelen notaları eşit 5 kulvara koy merkezdeki tom notaları perspektifden dolayı düz inmeye devam edecek ona paralel şekilde, notalar perspektife uygun olarak eğimli insin. Notalar dümdüz aşağıya değil, her kulvarın açısına göre inerek 3 boyutlu bir görünüm oluştursun. Her kulvar yukarıda dar, aşağıda geniş. notaların aşağıda varacağı kısım aynı kalsın çünkü drum padlerin konumu zaten aynı noktada sadece başlangıç noktaları daha dar olacak.
User prompt
The background is a static image with 5 drum lanes, but the system does not recognize them automatically. So define each lane's path manually using pixel coordinates. Notes should fall in a straight line along the center of each lane. Use these lane centerlines: 1. KICK (Red): - Start (top): x = 75, y = 0 - End (bottom): x = 118, y = 720 2. SNARE (Blue): - Start: x = 140, y = 0 - End: x = 185, y = 720 3. TOM (Green): - Start: x = 215, y = 0 - End: x = 260, y = 720 4. HI-HAT (Yellow): - Start: x = 290, y = 0 - End: x = 335, y = 720 5. CRASH (Purple): - Start: x = 365, y = 0 - End: x = 410, y = 720 Each note must move linearly from its lane's start point to its end point. Do not rotate, skew, or offset the movement.
User prompt
Do NOT make all notes start from the same x-position. Each lane has its own angled path from top to bottom based on the background perspective. You must assign a different start x-position (at y = 0) for each lane so that the notes fall exactly along the center of their own lane, from top to bottom. Use these specific x-coordinates at the top of the screen (y = 0) to match the visual background: - KICK (Lane 1): x = 65 - SNARE (Lane 2): x = 125 - TOM (Lane 3): x = 195 - HI-HAT (Lane 4): x = 270 - CRASH (Lane 5): x = 345 Let each note move down in a straight line from that start x to the bottom pad center.
User prompt
Do NOT make all notes start from the same x-position. Each lane has its own angled path from top to bottom based on the background perspective. You must assign a different start x-position (at y = 0) for each lane so that the notes fall exactly along the center of their own lane, from top to bottom. Use these specific x-coordinates at the top of the screen (y = 0) to match the visual background: - KICK (Lane 1): x = 65 - SNARE (Lane 2): x = 125 - TOM (Lane 3): x = 195 - HI-HAT (Lane 4): x = 270 - CRASH (Lane 5): x = 345 Let each note move down in a straight line from that start x to the bottom pad center.
User prompt
The falling notes must follow the visual perspective of the lanes from top to bottom. The final landing positions (bottom pads) are correct, so only adjust the starting x-positions of the notes at the top of the screen. Use the following pixel positions for the x-coordinate of each lane at the top of the screen (y = 0): Kick (Lane 1, Red): x = 95 Snare (Lane 2, Blue): x = 160 Tom (Lane 3, Green): x = 240 Hi-Hat (Lane 4, Yellow): x = 325 Crash (Lane 5, Purple): x = 405 These positions are based on the visual lines in the background. The notes should move from these top positions (y = 0) down to their respective pad positions (centered on the buttons) following a straight line per lane. This will match the 3D perspective of the lanes.
User prompt
Make the falling drum notes follow the perspective lanes in the background. Each note should fall along the center line of its own lane, not straight down. The lanes are angled: they are narrower at the top and wider at the bottom, giving a 3D effect. Align each note with the visible lane it belongs to, matching the perspective angle of that lane. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
oyunun arkaplanını değiştirmem için bir asset ekle
User prompt
I wrote the notes myself, they are not all perfect :P yazısını şu şekilde değiştir: I wrote the notes by playing them myself ,they are not all perfect :P
User prompt
tips kısmını şuan ekranda gözükmüyor çok sağda kalıyor, ortala
User prompt
tips kısmını intro logonun biraz üstüne play butonunun ise altında kalacak şekilde yeniden konumlandır
Code edit (1 edits merged)
Please save this source code
User prompt
bu yazıların sırasını random yap ve aynı yazı arka arkaya denk gelmesin
User prompt
Giriş ekranında davul butonlarının altında kalacak şekilde bir öneriler kısmı ekle, tırnak içindeki bu yazılar küçük yazılar halinde kayarak döngü halinde geçsin: "You can creatively jam as you wish on the home screen." ,"Keep a consistent beat to increase the combo!", "I wrote the notes myself, they are not all perfect :P", "Still in development.", "I love Upit!", "Recommended to play on mobile device." , "S.a A.s", "I have no idea about software or coding", "Cat GBT is my best friend". ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // DrumPad: Interactive drum pad at the bottom var DrumPad = Container.expand(function () { var self = Container.call(this); // .padType: 'kick', 'snare', etc. (set after creation) self.padType = null; self.asset = null; // .isPressed: for visual feedback self.isPressed = false; // Set up asset self.setPadType = function (type) { self.padType = type; var assetId = type + 'Pad'; if (self.asset) { self.removeChild(self.asset); } var size = PAD_SIZES[type]; self.asset = self.attachAsset(assetId, { anchorX: 0.5, anchorY: 0.5, width: size ? size.w : undefined, height: size ? size.h : undefined }); }; // Visual feedback on press self.flash = function () { if (!self.asset) { return; } tween(self.asset, { alpha: 0.5 }, { duration: 60, onFinish: function onFinish() { tween(self.asset, { alpha: 1 }, { duration: 120 }); } }); }; return self; }); // Note: Falling note bar var Note = Container.expand(function () { var self = Container.call(this); // .noteType: 'kick', 'snare', etc. self.noteType = null; self.asset = null; self.hit = false; // If already hit self.setNoteType = function (type) { self.noteType = type; var assetId = type + 'Note'; if (self.asset) { self.removeChild(self.asset); } self.asset = self.attachAsset(assetId, { anchorX: 0.5, anchorY: 0.5 }); }; // Called every tick self.update = function () { // Store initial scale if not set if (self.initialScale === undefined) { self.initialScale = 0.6; // Start smaller than normal self.asset.scaleX = self.initialScale; self.asset.scaleY = self.initialScale; } // Calculate progress from spawn to target (0 to 1) var totalDistance = NOTE_TARGET_Y - NOTE_START_Y; var currentDistance = self.y - NOTE_START_Y; var progress = Math.max(0, Math.min(1, currentDistance / totalDistance)); // Scale from 0.6 to 1.8 (gradually growing larger) var targetScale = self.initialScale + 1.2 * progress; // 0.6 + (1.2 * progress) = 0.6 to 1.8 self.asset.scaleX = targetScale; self.asset.scaleY = targetScale; self.y += noteSpeed; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x181818 }); /**** * Game Code ****/ // Health bar visual assets // Drum pad sounds // Music track // Sounds for each drum // Note bars (falling notes) // Drum pads (kick, snare, hi-hat, tom1, tom2, crash1, crash2) // --- Game constants --- var PAD_TYPES = ['kick', 'snare', 'hihat', 'tom1', 'crash1']; var PAD_COLS = PAD_TYPES.length; var GAME_W = 2048, GAME_H = 2732; var PAD_Y = GAME_H - 320; // Y position for pads // --- Pad Sizing and Full-Width Layout --- // Each pad will be as wide as possible, with no side gaps, and all pads will be adjacent. var PAD_SIZES = {}; var PAD_X_POSITIONS = {}; var padWidth = GAME_W / PAD_COLS; var padCenterY = PAD_Y; for (var i = 0; i < PAD_COLS; i++) { var type = PAD_TYPES[i]; // Pad width: fill the column, pad height: keep previous aspect ratio (or max of previous) // We'll use the original aspect ratio for each pad type, but scale width to padWidth // Use original aspect ratios from previous PAD_SIZES var origSizes = { 'kick': { w: 420, h: 210 }, 'snare': { w: 340, h: 170 }, 'hihat': { w: 300, h: 150 }, 'tom1': { w: 320, h: 160 }, 'crash1': { w: 340, h: 170 } }; var aspect = origSizes[type].h / origSizes[type].w; var w = padWidth; var h = w * aspect; PAD_SIZES[type] = { w: w, h: h }; // Center of each pad: left edge + half width + i*padWidth PAD_X_POSITIONS[type] = i * padWidth + padWidth / 2; } // Swap hihat and tom1 X positions var tmpX = PAD_X_POSITIONS['hihat']; PAD_X_POSITIONS['hihat'] = PAD_X_POSITIONS['tom1']; PAD_X_POSITIONS['tom1'] = tmpX; // Note spawn area (top) var NOTE_START_Y = -60; var NOTE_TARGET_Y = PAD_Y - 80; // Where notes should be hit // Note speed (pixels per frame) var noteSpeed = 18; // Timing window (pixels): how close to NOTE_TARGET_Y is a "hit" var HIT_WINDOW = 100; // --- State --- // NOTE_OFFSET_TICKS: Delay (in ticks) to align first note with music start (positive = notes spawn later) var NOTE_OFFSET_TICKS = 0; // Default 0, adjust for perfect sync (e.g. try 20, 30, 40, ...) var pads = []; var notes = []; var score = 0; var combo = 0; var maxCombo = 0; var lastTick = 0; var noteIndex = 0; var isPlaying = false; var songStartTick = 0; // --- Health Bar State --- var health = 150; var maxHealth = 150; var healthBarContainer = null; var healthBarBg = null; var healthBarFg = null; // --- UI --- var scoreTxt = new Text2('0', { size: 120, fill: "#fff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var comboTxt = new Text2('', { size: 70, fill: 0xFFE066 }); comboTxt.anchor.set(0.5, 0); LK.gui.top.addChild(comboTxt); comboTxt.y = 130; // --- Song Data for all levels --- // Each entry: {tick: <when to spawn>, type: <padType>} // Level 1: MasterofUpit, original notes var LEVELS = [{ name: "Hard: Master of Upit", music: "MasterofUpit", notes: [{ tick: 1, type: 'kick' }, { tick: 1, type: 'crash1' }, { tick: 62, type: 'crash1' }, { tick: 63, type: 'kick' }, { tick: 78, type: 'crash1' }, { tick: 78, type: 'kick' }, { tick: 93, type: 'crash1' }, { tick: 93, type: 'kick' }, { tick: 193, type: 'crash1' }, { tick: 193, type: 'kick' }, { tick: 266, type: 'hihat' }, { tick: 283, type: 'hihat' }, { tick: 299, type: 'hihat' }, { tick: 316, type: 'hihat' }, { tick: 334, type: 'hihat' }, { tick: 351, type: 'hihat' }, { tick: 368, type: 'hihat' }, { tick: 386, type: 'hihat' }, { tick: 403, type: 'hihat' }, { tick: 420, type: 'hihat' }, { tick: 438, type: 'hihat' }, { tick: 451, type: 'kick' }, { tick: 452, type: 'crash1' }, { tick: 470, type: 'crash1' }, { tick: 471, type: 'kick' }, { tick: 490, type: 'hihat' }, { tick: 505, type: 'hihat' }, { tick: 522, type: 'hihat' }, { tick: 538, type: 'kick' }, { tick: 539, type: 'crash1' }, { tick: 556, type: 'crash1' }, { tick: 558, type: 'kick' }, { tick: 572, type: 'crash1' }, { tick: 572, type: 'kick' }, { tick: 590, type: 'hihat' }, { tick: 607, type: 'hihat' }, { tick: 625, type: 'hihat' }, { tick: 640, type: 'hihat' }, { tick: 658, type: 'hihat' }, { tick: 676, type: 'hihat' }, { tick: 694, type: 'hihat' }, { tick: 710, type: 'hihat' }, { tick: 725, type: 'crash1' }, { tick: 727, type: 'kick' }, { tick: 742, type: 'kick' }, { tick: 742, type: 'crash1' }, { tick: 758, type: 'hihat' }, { tick: 776, type: 'hihat' }, { tick: 795, type: 'hihat' }, { tick: 812, type: 'crash1' }, { tick: 812, type: 'kick' }, { tick: 829, type: 'crash1' }, { tick: 829, type: 'kick' }, { tick: 847, type: 'crash1' }, { tick: 847, type: 'kick' }, { tick: 863, type: 'hihat' }, { tick: 881, type: 'hihat' }, { tick: 899, type: 'hihat' }, { tick: 916, type: 'hihat' }, { tick: 933, type: 'hihat' }, { tick: 951, type: 'hihat' }, { tick: 969, type: 'hihat' }, { tick: 986, type: 'hihat' }, { tick: 1003, type: 'kick' }, { tick: 1003, type: 'crash1' }, { tick: 1020, type: 'crash1' }, { tick: 1021, type: 'kick' }, { tick: 1036, type: 'hihat' }, { tick: 1054, type: 'hihat' }, { tick: 1070, type: 'hihat' }, { tick: 1087, type: 'crash1' }, { tick: 1087, type: 'kick' }, { tick: 1104, type: 'crash1' }, { tick: 1105, type: 'kick' }, { tick: 1122, type: 'crash1' }, { tick: 1122, type: 'kick' }, { tick: 1155, type: 'snare' }, { tick: 1166, type: 'snare' }, { tick: 1173, type: 'snare' }, { tick: 1183, type: 'snare' }, { tick: 1189, type: 'snare' }, { tick: 1198, type: 'snare' }, { tick: 1206, type: 'snare' }, { tick: 1215, type: 'snare' }, { tick: 1223, type: 'snare' }, { tick: 1231, type: 'snare' }, { tick: 1239, type: 'snare' }, { tick: 1249, type: 'snare' }, { tick: 1257, type: 'snare' }, { tick: 1267, type: 'snare' }, { tick: 1275, type: 'snare' }, { tick: 1293, type: 'kick' }, { tick: 1293, type: 'crash1' }, { tick: 1500, type: 'crash1' }, { tick: 1500, type: 'kick' }, { tick: 1527, type: 'crash1' }, { tick: 1528, type: 'kick' }, { tick: 1549, type: 'crash1' }, { tick: 1549, type: 'kick' }, { tick: 1566, type: 'crash1' }, { tick: 1566, type: 'kick' }, { tick: 1775, type: 'crash1' }, { tick: 1776, type: 'kick' }, { tick: 1802, type: 'kick' }, { tick: 1802, type: 'crash1' }, { tick: 1825, type: 'crash1' }, { tick: 1826, type: 'kick' }, { tick: 1842, type: 'crash1' }, { tick: 1842, type: 'kick' }, { tick: 1856, type: 'hihat' }, { tick: 1860, type: 'snare' }, { tick: 1876, type: 'hihat' }, { tick: 1884, type: 'kick' }, { tick: 1892, type: 'hihat' }, { tick: 1892, type: 'snare' }, { tick: 1910, type: 'hihat' }, { tick: 1911, type: 'kick' }, { tick: 1927, type: 'snare' }, { tick: 1928, type: 'hihat' }, { tick: 1946, type: 'hihat' }, { tick: 1954, type: 'kick' }, { tick: 1961, type: 'hihat' }, { tick: 1963, type: 'snare' }, { tick: 1980, type: 'hihat' }, { tick: 1981, type: 'kick' }, { tick: 1996, type: 'snare' }, { tick: 1996, type: 'hihat' }, { tick: 2014, type: 'hihat' }, { tick: 2021, type: 'kick' }, { tick: 2028, type: 'hihat' }, { tick: 2031, type: 'snare' }, { tick: 2048, type: 'hihat' }, { tick: 2049, type: 'kick' }, { tick: 2066, type: 'hihat' }, { tick: 2066, type: 'snare' }, { tick: 2086, type: 'hihat' }, { tick: 2096, type: 'kick' }, { tick: 2102, type: 'crash1' }, { tick: 2105, type: 'kick' }, { tick: 2119, type: 'kick' }, { tick: 2119, type: 'crash1' }, { tick: 2165, type: 'hihat' }, { tick: 2168, type: 'snare' }, { tick: 2185, type: 'hihat' }, { tick: 2187, type: 'kick' }, { tick: 2202, type: 'snare' }, { tick: 2202, type: 'hihat' }, { tick: 2219, type: 'hihat' }, { tick: 2229, type: 'kick' }, { tick: 2235, type: 'hihat' }, { tick: 2237, type: 'snare' }, { tick: 2245, type: 'snare' }, { tick: 2252, type: 'snare' }, { tick: 2257, type: 'crash1' }, { tick: 2261, type: 'kick' }, { tick: 2273, type: 'snare' }, { tick: 2273, type: 'hihat' }, { tick: 2290, type: 'hihat' }, { tick: 2305, type: 'hihat' }, { tick: 2308, type: 'snare' }, { tick: 2324, type: 'crash1' }, { tick: 2325, type: 'kick' }, { tick: 2350, type: 'kick' }, { tick: 2350, type: 'crash1' }, { tick: 2376, type: 'crash1' }, { tick: 2376, type: 'kick' }, { tick: 2392, type: 'crash1' }, { tick: 2392, type: 'kick' }, { tick: 2407, type: 'hihat' }, { tick: 2409, type: 'snare' }, { tick: 2427, type: 'hihat' }, { tick: 2436, type: 'kick' }, { tick: 2442, type: 'hihat' }, { tick: 2444, type: 'snare' }, { tick: 2460, type: 'hihat' }, { tick: 2462, type: 'kick' }, { tick: 2479, type: 'hihat' }, { tick: 2479, type: 'snare' }, { tick: 2496, type: 'hihat' }, { tick: 2506, type: 'kick' }, { tick: 2511, type: 'hihat' }, { tick: 2515, type: 'snare' }, { tick: 2530, type: 'hihat' }, { tick: 2532, type: 'kick' }, { tick: 2546, type: 'hihat' }, { tick: 2546, type: 'snare' }, { tick: 2564, type: 'hihat' }, { tick: 2573, type: 'kick' }, { tick: 2581, type: 'hihat' }, { tick: 2584, type: 'snare' }, { tick: 2599, type: 'hihat' }, { tick: 2600, type: 'kick' }, { tick: 2615, type: 'snare' }, { tick: 2615, type: 'hihat' }, { tick: 2635, type: 'hihat' }, { tick: 2641, type: 'kick' }, { tick: 2651, type: 'snare' }, { tick: 2654, type: 'crash1' }, { tick: 2669, type: 'kick' }, { tick: 2671, type: 'hihat' }, { tick: 2686, type: 'snare' }, { tick: 2686, type: 'hihat' }, { tick: 2704, type: 'hihat' }, { tick: 2713, type: 'kick' }, { tick: 2719, type: 'hihat' }, { tick: 2724, type: 'kick' }, { tick: 2739, type: 'hihat' }, { tick: 2750, type: 'snare' }, { tick: 2759, type: 'snare' }, { tick: 2769, type: 'snare' }, { tick: 2773, type: 'snare' }, { tick: 2781, type: 'snare' }, { tick: 2792, type: 'tom1' }, { tick: 2808, type: 'crash1' }, { tick: 2809, type: 'kick' }, { tick: 2822, type: 'hihat' }, { tick: 2823, type: 'snare' }, { tick: 2840, type: 'hihat' }, { tick: 2848, type: 'kick' }, { tick: 2855, type: 'hihat' }, { tick: 2856, type: 'snare' }, { tick: 2873, type: 'crash1' }, { tick: 2873, type: 'kick' }, { tick: 2899, type: 'kick' }, { tick: 2899, type: 'crash1' }, { tick: 2921, type: 'crash1' }, { tick: 2924, type: 'kick' }, { tick: 2939, type: 'crash1' }, { tick: 2939, type: 'kick' }, { tick: 2964, type: 'crash1' }, { tick: 2965, type: 'kick' }, { tick: 2988, type: 'crash1' }, { tick: 2988, type: 'kick' }, { tick: 3006, type: 'crash1' }, { tick: 3006, type: 'kick' }, { tick: 3024, type: 'hihat' }, { tick: 3044, type: 'hihat' }, { tick: 3060, type: 'hihat' }, { tick: 3079, type: 'hihat' }, { tick: 3097, type: 'hihat' }, { tick: 3114, type: 'hihat' }, { tick: 3132, type: 'hihat' }, { tick: 3149, type: 'crash1' }, { tick: 3149, type: 'kick' }, { tick: 3165, type: 'hihat' }, { tick: 3165, type: 'snare' }, { tick: 3183, type: 'hihat' }, { tick: 3192, type: 'kick' }, { tick: 3198, type: 'hihat' }, { tick: 3200, type: 'snare' }, { tick: 3217, type: 'hihat' }, { tick: 3231, type: 'kick' }, { tick: 3235, type: 'hihat' }, { tick: 3239, type: 'snare' }, { tick: 3254, type: 'hihat' }, { tick: 3254, type: 'kick' }, { tick: 3269, type: 'hihat' }, { tick: 3269, type: 'snare' }, { tick: 3285, type: 'hihat' }, { tick: 3288, type: 'kick' }, { tick: 3303, type: 'hihat' }, { tick: 3304, type: 'snare' }, { tick: 3321, type: 'hihat' }, { tick: 3329, type: 'kick' }, { tick: 3336, type: 'hihat' }, { tick: 3337, type: 'snare' }, { tick: 3354, type: 'hihat' }, { tick: 3361, type: 'snare' }, { tick: 3362, type: 'crash1' }, { tick: 3381, type: 'crash1' }, { tick: 3381, type: 'kick' }, { tick: 3399, type: 'hihat' }, { tick: 3399, type: 'kick' }, { tick: 3415, type: 'hihat' }, { tick: 3416, type: 'snare' }, { tick: 3434, type: 'hihat' }, { tick: 3443, type: 'kick' }, { tick: 3449, type: 'hihat' }, { tick: 3452, type: 'snare' }, { tick: 3469, type: 'hihat' }, { tick: 3478, type: 'snare' }, { tick: 3485, type: 'snare' }, { tick: 3501, type: 'tom1' }, { tick: 3519, type: 'tom1' }, { tick: 3537, type: 'kick' }, { tick: 3539, type: 'crash1' }, { tick: 3553, type: 'snare' }, { tick: 3554, type: 'hihat' }, { tick: 3570, type: 'hihat' }, { tick: 3578, type: 'kick' }, { tick: 3585, type: 'hihat' }, { tick: 3587, type: 'snare' }, { tick: 3603, type: 'hihat' }, { tick: 3612, type: 'crash1' }, { tick: 3613, type: 'kick' }, { tick: 3630, type: 'crash1' }, { tick: 3630, type: 'kick' }, { tick: 3647, type: 'hihat' }, { tick: 3663, type: 'hihat' }, { tick: 3664, type: 'snare' }, { tick: 3681, type: 'hihat' }, { tick: 3690, type: 'kick' }, { tick: 3697, type: 'hihat' }, { tick: 3699, type: 'snare' }, { tick: 3721, type: 'snare' }, { tick: 3729, type: 'snare' }, { tick: 3748, type: 'snare' }, { tick: 3756, type: 'snare' }, { tick: 3765, type: 'tom1' }, { tick: 3772, type: 'tom1' }, { tick: 3782, type: 'crash1' }, { tick: 3782, type: 'kick' }, { tick: 3798, type: 'snare' }, { tick: 3798, type: 'hihat' }, { tick: 3815, type: 'hihat' }, { tick: 3826, type: 'kick' }, { tick: 3831, type: 'hihat' }, { tick: 3834, type: 'snare' }, { tick: 3850, type: 'crash1' }, { tick: 3859, type: 'crash1' }, { tick: 3859, type: 'kick' }, { tick: 3878, type: 'crash1' }, { tick: 3878, type: 'kick' }, { tick: 3896, type: 'kick' }, { tick: 3896, type: 'hihat' }, { tick: 3912, type: 'hihat' }, { tick: 3913, type: 'snare' }, { tick: 3930, type: 'hihat' }, { tick: 3942, type: 'kick' }, { tick: 3947, type: 'hihat' }, { tick: 3950, type: 'snare' }, { tick: 3964, type: 'hihat' }, { tick: 3973, type: 'snare' }, { tick: 3981, type: 'snare' }, { tick: 3998, type: 'snare' }, { tick: 4006, type: 'snare' }, { tick: 4012, type: 'snare' }, { tick: 4020, type: 'tom1' }, { tick: 4027, type: 'tom1' }, { tick: 4035, type: 'kick' }, { tick: 4036, type: 'crash1' }, { tick: 4051, type: 'snare' }, { tick: 4052, type: 'hihat' }, { tick: 4068, type: 'hihat' }, { tick: 4078, type: 'kick' }, { tick: 4083, type: 'hihat' }, { tick: 4086, type: 'snare' }, { tick: 4101, type: 'hihat' }, { tick: 4106, type: 'kick' }, { tick: 4112, type: 'kick' }, { tick: 4112, type: 'crash1' }, { tick: 4128, type: 'crash1' }, { tick: 4128, type: 'kick' }, { tick: 4145, type: 'hihat' }, { tick: 4163, type: 'hihat' }, { tick: 4163, type: 'snare' }, { tick: 4180, type: 'hihat' }, { tick: 4190, type: 'kick' }, { tick: 4196, type: 'hihat' }, { tick: 4200, type: 'snare' }, { tick: 4224, type: 'snare' }, { tick: 4233, type: 'snare' }, { tick: 4249, type: 'snare' }, { tick: 4258, type: 'snare' }, { tick: 4265, type: 'tom1' }, { tick: 4273, type: 'tom1' }, { tick: 4282, type: 'crash1' }, { tick: 4283, type: 'kick' }, { tick: 4299, type: 'hihat' }, { tick: 4300, type: 'snare' }, { tick: 4317, type: 'hihat' }, { tick: 4329, type: 'kick' }, { tick: 4333, type: 'hihat' }, { tick: 4336, type: 'snare' }, { tick: 4351, type: 'hihat' }, { tick: 4361, type: 'crash1' }, { tick: 4361, type: 'kick' }, { tick: 4378, type: 'crash1' }, { tick: 4379, type: 'kick' }, { tick: 4394, type: 'crash1' }, { tick: 4396, type: 'kick' }, { tick: 4411, type: 'hihat' }, { tick: 4412, type: 'snare' }, { tick: 4429, type: 'hihat' }, { tick: 4439, type: 'kick' }, { tick: 4445, type: 'hihat' }, { tick: 4449, type: 'snare' }, { tick: 4464, type: 'hihat' }, { tick: 4474, type: 'snare' }, { tick: 4481, type: 'snare' }, { tick: 4497, type: 'snare' }, { tick: 4506, type: 'snare' }, { tick: 4519, type: 'tom1' }, { tick: 4531, type: 'kick' }, { tick: 4531, type: 'crash1' }, { tick: 4548, type: 'snare' }, { tick: 4548, type: 'hihat' }, { tick: 4565, type: 'hihat' }, { tick: 4574, type: 'kick' }, { tick: 4580, type: 'hihat' }, { tick: 4583, type: 'snare' }, { tick: 4599, type: 'hihat' }, { tick: 4602, type: 'kick' }, { tick: 4609, type: 'crash1' }, { tick: 4610, type: 'kick' }, { tick: 4627, type: 'crash1' }, { tick: 4627, type: 'kick' }, { tick: 4642, type: 'hihat' }, { tick: 4660, type: 'hihat' }, { tick: 4661, type: 'snare' }, { tick: 4678, type: 'hihat' }, { tick: 4688, type: 'snare' }, { tick: 4694, type: 'hihat' }, { tick: 4699, type: 'snare' }, { tick: 4725, type: 'snare' }, { tick: 4732, type: 'snare' }, { tick: 4748, type: 'snare' }, { tick: 4756, type: 'snare' }, { tick: 4763, type: 'tom1' }, { tick: 4772, type: 'kick' }, { tick: 4779, type: 'kick' }, { tick: 4780, type: 'crash1' }, { tick: 4797, type: 'snare' }, { tick: 4797, type: 'hihat' }, { tick: 4814, type: 'hihat' }, { tick: 4823, type: 'kick' }, { tick: 4830, type: 'hihat' }, { tick: 4832, type: 'snare' }, { tick: 4849, type: 'crash1' }, { tick: 4850, type: 'kick' }, { tick: 4856, type: 'crash1' }, { tick: 4857, type: 'kick' }, { tick: 4874, type: 'kick' }, { tick: 4875, type: 'crash1' }, { tick: 4891, type: 'hihat' }, { tick: 4907, type: 'hihat' }, { tick: 4907, type: 'snare' }, { tick: 4924, type: 'hihat' }, { tick: 4932, type: 'kick' }, { tick: 4940, type: 'hihat' }, { tick: 4942, type: 'snare' }, { tick: 4958, type: 'hihat' }, { tick: 4968, type: 'snare' }, { tick: 4975, type: 'snare' }, { tick: 4993, type: 'snare' }, { tick: 5000, type: 'snare' }, { tick: 5007, type: 'tom1' }, { tick: 5015, type: 'tom1' }, { tick: 5026, type: 'kick' }, { tick: 5029, type: 'crash1' }, { tick: 5046, type: 'hihat' }, { tick: 5046, type: 'snare' }, { tick: 5063, type: 'hihat' }, { tick: 5074, type: 'kick' }, { tick: 5079, type: 'hihat' }, { tick: 5083, type: 'snare' }, { tick: 5096, type: 'hihat' }, { tick: 5105, type: 'kick' }, { tick: 5106, type: 'crash1' }, { tick: 5124, type: 'crash1' }, { tick: 5125, type: 'kick' }, { tick: 5140, type: 'kick' }, { tick: 5150, type: 'snare' }, { tick: 5159, type: 'snare' }, { tick: 5168, type: 'snare' }, { tick: 5177, type: 'snare' }, { tick: 5182, type: 'snare' }, { tick: 5190, type: 'snare' }, { tick: 5198, type: 'snare' }, { tick: 5210, type: 'crash1' }, { tick: 5210, type: 'kick' }, { tick: 5245, type: 'hihat' }, { tick: 5246, type: 'snare' }, { tick: 5262, type: 'snare' }, { tick: 5262, type: 'hihat' }, { tick: 5278, type: 'crash1' }, { tick: 5312, type: 'hihat' }, { tick: 5313, type: 'snare' }, { tick: 5330, type: 'snare' }, { tick: 5330, type: 'hihat' }, { tick: 5347, type: 'hihat' }, { tick: 5348, type: 'kick' }, { tick: 5367, type: 'kick' }, { tick: 5368, type: 'hihat' }, { tick: 5381, type: 'hihat' }, { tick: 5383, type: 'snare' }, { tick: 5400, type: 'hihat' }, { tick: 5400, type: 'snare' }, { tick: 5416, type: 'snare' }, { tick: 5424, type: 'snare' }, { tick: 5431, type: 'snare' }, { tick: 5440, type: 'snare' }, { tick: 5447, type: 'tom1' }, { tick: 5456, type: 'tom1' }, { tick: 5463, type: 'snare' }, { tick: 5471, type: 'snare' }, { tick: 5482, type: 'kick' }, { tick: 5483, type: 'crash1' }, { tick: 5516, type: 'hihat' }, { tick: 5519, type: 'snare' }, { tick: 5534, type: 'hihat' }, { tick: 5535, type: 'snare' }, { tick: 5551, type: 'crash1' }, { tick: 5554, type: 'kick' }, { tick: 5569, type: 'kick' }, { tick: 5582, type: 'kick' }, { tick: 5584, type: 'hihat' }, { tick: 5601, type: 'snare' }, { tick: 5602, type: 'hihat' }, { tick: 5617, type: 'crash1' }, { tick: 5619, type: 'kick' }, { tick: 5637, type: 'kick' }, { tick: 5647, type: 'kick' }, { tick: 5653, type: 'hihat' }, { tick: 5655, type: 'snare' }, { tick: 5671, type: 'snare' }, { tick: 5687, type: 'snare' }, { tick: 5696, type: 'snare' }, { tick: 5703, type: 'snare' }, { tick: 5713, type: 'snare' }, { tick: 5721, type: 'tom1' }, { tick: 5729, type: 'tom1' }, { tick: 5739, type: 'snare' }, { tick: 5747, type: 'snare' }, { tick: 5757, type: 'crash1' }, { tick: 5758, type: 'kick' }, { tick: 5777, type: 'kick' }, { tick: 5786, type: 'kick' }, { tick: 5793, type: 'hihat' }, { tick: 5794, type: 'snare' }, { tick: 5809, type: 'snare' }, { tick: 5825, type: 'hihat' }, { tick: 5827, type: 'kick' }, { tick: 5842, type: 'kick' }, { tick: 5851, type: 'kick' }, { tick: 5859, type: 'hihat' }, { tick: 5861, type: 'snare' }, { tick: 5877, type: 'snare' }, { tick: 5895, type: 'hihat' }, { tick: 5896, type: 'kick' }, { tick: 5913, type: 'kick' }, { tick: 5914, type: 'hihat' }, { tick: 5931, type: 'snare' }, { tick: 5934, type: 'hihat' }, { tick: 5947, type: 'snare' }, { tick: 5964, type: 'snare' }, { tick: 5981, type: 'snare' }, { tick: 5998, type: 'tom1' }, { tick: 6008, type: 'snare' }, { tick: 6017, type: 'snare' }, { tick: 6025, type: 'snare' }, { tick: 6034, type: 'crash1' }, { tick: 6035, type: 'kick' }, { tick: 6054, type: 'kick' }, { tick: 6063, type: 'kick' }, { tick: 6067, type: 'hihat' }, { tick: 6072, type: 'snare' }, { tick: 6086, type: 'hihat' }, { tick: 6086, type: 'snare' }, { tick: 6103, type: 'hihat' }, { tick: 6103, type: 'kick' }, { tick: 6121, type: 'kick' }, { tick: 6133, type: 'hihat' }, { tick: 6134, type: 'snare' }, { tick: 6151, type: 'hihat' }, { tick: 6151, type: 'snare' }, { tick: 6168, type: 'hihat' }, { tick: 6169, type: 'kick' }, { tick: 6184, type: 'kick' }, { tick: 6193, type: 'kick' }, { tick: 6201, type: 'hihat' }, { tick: 6202, type: 'snare' }, { tick: 6220, type: 'snare' }, { tick: 6220, type: 'hihat' }, { tick: 6237, type: 'snare' }, { tick: 6243, type: 'snare' }, { tick: 6248, type: 'snare' }, { tick: 6254, type: 'snare' }, { tick: 6273, type: 'tom1' }, { tick: 6290, type: 'tom1' }, { tick: 6310, type: 'kick' }, { tick: 6310, type: 'crash1' }, { tick: 6324, type: 'kick' }, { tick: 6324, type: 'crash1' }, { tick: 6374, type: 'crash1' }, { tick: 6374, type: 'kick' }, { tick: 6390, type: 'kick' }, { tick: 6390, type: 'crash1' }] }, { name: "Medium: Blast Funk-Wet Puppy", music: "BlastFunkWetPuppy", notes: [{ tick: 0, type: 'snare' }, { tick: 26, type: 'kick' }, { tick: 43, type: 'kick' }, { tick: 55, type: 'snare' }, { tick: 86, type: 'kick' }, { tick: 113, type: 'snare' }, { tick: 141, type: 'kick' }, { tick: 170, type: 'snare' }, { tick: 202, type: 'kick' }, { tick: 227, type: 'snare' }, { tick: 250, type: 'kick' }, { tick: 255, type: 'kick' }, { tick: 270, type: 'kick' }, { tick: 284, type: 'snare' }, { tick: 314, type: 'kick' }, { tick: 343, type: 'snare' }, { tick: 364, type: 'kick' }, { tick: 371, type: 'kick' }, { tick: 386, type: 'kick' }, { tick: 402, type: 'snare' }, { tick: 431, type: 'kick' }, { tick: 460, type: 'snare' }, { tick: 482, type: 'kick' }, { tick: 488, type: 'kick' }, { tick: 503, type: 'kick' }, { tick: 518, type: 'snare' }, { tick: 545, type: 'kick' }, { tick: 572, type: 'snare' }, { tick: 598, type: 'kick' }, { tick: 605, type: 'kick' }, { tick: 619, type: 'kick' }, { tick: 631, type: 'snare' }, { tick: 659, type: 'kick' }, { tick: 688, type: 'snare' }, { tick: 708, type: 'kick' }, { tick: 714, type: 'kick' }, { tick: 730, type: 'kick' }, { tick: 744, type: 'snare' }, { tick: 773, type: 'kick' }, { tick: 803, type: 'snare' }, { tick: 829, type: 'kick' }, { tick: 858, type: 'snare' }, { tick: 887, type: 'kick' }, { tick: 916, type: 'snare' }, { tick: 944, type: 'kick' }, { tick: 974, type: 'snare' }, { tick: 1005, type: 'kick' }, { tick: 1033, type: 'snare' }, { tick: 1061, type: 'kick' }, { tick: 1089, type: 'snare' }, { tick: 1117, type: 'kick' }, { tick: 1146, type: 'snare' }, { tick: 1176, type: 'kick' }, { tick: 1204, type: 'snare' }, { tick: 1233, type: 'kick' }, { tick: 1262, type: 'snare' }, { tick: 1291, type: 'kick' }, { tick: 1319, type: 'snare' }, { tick: 1348, type: 'kick' }, { tick: 1379, type: 'snare' }, { tick: 1407, type: 'kick' }, { tick: 1435, type: 'snare' }, { tick: 1466, type: 'kick' }, { tick: 1493, type: 'snare' }, { tick: 1522, type: 'kick' }, { tick: 1551, type: 'snare' }, { tick: 1580, type: 'kick' }, { tick: 1606, type: 'snare' }, { tick: 1635, type: 'kick' }, { tick: 1662, type: 'snare' }, { tick: 1693, type: 'kick' }, { tick: 1722, type: 'snare' }, { tick: 1744, type: 'kick' }, { tick: 1749, type: 'kick' }, { tick: 1764, type: 'kick' }, { tick: 1779, type: 'snare' }, { tick: 1809, type: 'kick' }, { tick: 1840, type: 'snare' }, { tick: 1868, type: 'kick' }, { tick: 1896, type: 'snare' }, { tick: 1924, type: 'kick' }, { tick: 1954, type: 'snare' }, { tick: 1981, type: 'kick' }, { tick: 2007, type: 'snare' }, { tick: 2039, type: 'kick' }, { tick: 2069, type: 'snare' }, { tick: 2100, type: 'kick' }, { tick: 2126, type: 'snare' }, { tick: 2154, type: 'kick' }, { tick: 2183, type: 'snare' }, { tick: 2209, type: 'kick' }, { tick: 2239, type: 'snare' }, { tick: 2270, type: 'kick' }, { tick: 2303, type: 'snare' }, { tick: 2327, type: 'kick' }, { tick: 2355, type: 'snare' }, { tick: 2384, type: 'kick' }, { tick: 2412, type: 'snare' }, { tick: 2434, type: 'kick' }, { tick: 2441, type: 'kick' }, { tick: 2454, type: 'kick' }, { tick: 2467, type: 'snare' }, { tick: 2496, type: 'kick' }, { tick: 2527, type: 'snare' }, { tick: 2554, type: 'kick' }, { tick: 2584, type: 'snare' }, { tick: 2611, type: 'kick' }, { tick: 2639, type: 'snare' }, { tick: 2660, type: 'kick' }, { tick: 2667, type: 'kick' }, { tick: 2682, type: 'kick' }, { tick: 2697, type: 'snare' }, { tick: 2728, type: 'kick' }, { tick: 2758, type: 'snare' }, { tick: 2783, type: 'kick' }, { tick: 2814, type: 'snare' }, { tick: 2842, type: 'kick' }, { tick: 2871, type: 'snare' }, { tick: 2901, type: 'kick' }, { tick: 2932, type: 'snare' }, { tick: 2958, type: 'kick' }, { tick: 2989, type: 'snare' }, { tick: 3015, type: 'kick' }, { tick: 3043, type: 'snare' }, { tick: 3074, type: 'kick' }, { tick: 3102, type: 'snare' }, { tick: 3132, type: 'kick' }, { tick: 3159, type: 'snare' }, { tick: 3191, type: 'kick' }, { tick: 3217, type: 'snare' }, { tick: 3240, type: 'kick' }, { tick: 3246, type: 'kick' }, { tick: 3260, type: 'kick' }, { tick: 3274, type: 'snare' }, { tick: 3302, type: 'kick' }, { tick: 3331, type: 'snare' }, { tick: 3353, type: 'kick' }, { tick: 3360, type: 'kick' }, { tick: 3374, type: 'kick' }, { tick: 3389, type: 'snare' }, { tick: 3420, type: 'kick' }, { tick: 3445, type: 'snare' }, { tick: 3473, type: 'kick' }, { tick: 3491, type: 'kick' }, { tick: 3505, type: 'snare' }, { tick: 3532, type: 'kick' }, { tick: 3562, type: 'snare' }, { tick: 3589, type: 'kick' }, { tick: 3605, type: 'kick' }, { tick: 3620, type: 'snare' }, { tick: 3647, type: 'kick' }, { tick: 3675, type: 'snare' }, { tick: 3704, type: 'kick' }, { tick: 3732, type: 'snare' }, { tick: 3763, type: 'kick' }, { tick: 3791, type: 'snare' }, { tick: 3820, type: 'kick' }, { tick: 3848, type: 'snare' }, { tick: 3877, type: 'kick' }, { tick: 3905, type: 'snare' }, { tick: 3934, type: 'kick' }, { tick: 3963, type: 'snare' }, { tick: 3992, type: 'kick' }, { tick: 4021, type: 'snare' }, { tick: 4042, type: 'kick' }, { tick: 4049, type: 'kick' }, { tick: 4063, type: 'kick' }, { tick: 4077, type: 'snare' }, { tick: 4108, type: 'kick' }, { tick: 4136, type: 'snare' }, { tick: 4166, type: 'kick' }, { tick: 4195, type: 'snare' }, { tick: 4224, type: 'kick' }, { tick: 4253, type: 'snare' }, { tick: 4282, type: 'kick' }, { tick: 4308, type: 'snare' }, { tick: 4338, type: 'kick' }, { tick: 4367, type: 'snare' }, { tick: 4396, type: 'kick' }, { tick: 4424, type: 'snare' }, { tick: 4452, type: 'kick' }, { tick: 4481, type: 'snare' }, { tick: 4503, type: 'kick' }, { tick: 4510, type: 'kick' }, { tick: 4524, type: 'kick' }, { tick: 4538, type: 'snare' }, { tick: 4567, type: 'kick' }, { tick: 4597, type: 'snare' }, { tick: 4624, type: 'kick' }, { tick: 4654, type: 'snare' }, { tick: 4683, type: 'kick' }, { tick: 4711, type: 'snare' }, { tick: 4741, type: 'kick' }, { tick: 4769, type: 'snare' }, { tick: 4797, type: 'kick' }, { tick: 4827, type: 'snare' }, { tick: 4856, type: 'kick' }, { tick: 4884, type: 'snare' }, { tick: 4914, type: 'kick' }, { tick: 4941, type: 'snare' }, { tick: 4962, type: 'kick' }, { tick: 4969, type: 'kick' }, { tick: 4983, type: 'kick' }, { tick: 4996, type: 'snare' }, { tick: 5027, type: 'kick' }, { tick: 5055, type: 'snare' }, { tick: 5079, type: 'kick' }, { tick: 5099, type: 'kick' }, { tick: 5115, type: 'snare' }, { tick: 5143, type: 'kick' }, { tick: 5171, type: 'snare' }, { tick: 5200, type: 'kick' }, { tick: 5229, type: 'snare' }, { tick: 5258, type: 'kick' }, { tick: 5286, type: 'snare' }, { tick: 5314, type: 'kick' }, { tick: 5341, type: 'snare' }, { tick: 5372, type: 'kick' }, { tick: 5399, type: 'snare' }, { tick: 5420, type: 'kick' }, { tick: 5427, type: 'kick' }, { tick: 5442, type: 'kick' }, { tick: 5457, type: 'snare' }, { tick: 5488, type: 'kick' }, { tick: 5517, type: 'snare' }, { tick: 5547, type: 'kick' }, { tick: 5573, type: 'snare' }, { tick: 5602, type: 'kick' }, { tick: 5630, type: 'snare' }, { tick: 5652, type: 'kick' }, { tick: 5658, type: 'kick' }, { tick: 5674, type: 'kick' }, { tick: 5689, type: 'snare' }, { tick: 5718, type: 'kick' }, { tick: 5747, type: 'snare' }, { tick: 5769, type: 'kick' }, { tick: 5775, type: 'kick' }, { tick: 5789, type: 'kick' }, { tick: 5804, type: 'snare' }, { tick: 5833, type: 'kick' }, { tick: 5861, type: 'snare' }, { tick: 5885, type: 'kick' }, { tick: 5904, type: 'kick' }, { tick: 5918, type: 'snare' }, { tick: 5945, type: 'kick' }, { tick: 5974, type: 'snare' }, { tick: 5995, type: 'kick' }, { tick: 6002, type: 'kick' }, { tick: 6018, type: 'kick' }, { tick: 6033, type: 'snare' }, { tick: 6062, type: 'kick' }, { tick: 6089, type: 'snare' }, { tick: 6110, type: 'kick' }, { tick: 6117, type: 'kick' }, { tick: 6132, type: 'kick' }, { tick: 6147, type: 'snare' }, { tick: 6176, type: 'kick' }, { tick: 6206, type: 'snare' }, { tick: 6228, type: 'kick' }, { tick: 6235, type: 'kick' }, { tick: 6250, type: 'kick' }, { tick: 6264, type: 'snare' }, { tick: 6289, type: 'kick' }, { tick: 6320, type: 'snare' }, { tick: 6344, type: 'kick' }, { tick: 6365, type: 'kick' }, { tick: 6380, type: 'snare' }, { tick: 6408, type: 'kick' }, { tick: 6437, type: 'snare' }, { tick: 6465, type: 'kick' }, { tick: 6494, type: 'snare' }, { tick: 6521, type: 'kick' }, { tick: 6551, type: 'snare' }, { tick: 6576, type: 'kick' }, { tick: 6583, type: 'kick' }, { tick: 6596, type: 'kick' }, { tick: 6610, type: 'snare' }, { tick: 6637, type: 'kick' }, { tick: 6665, type: 'snare' }, { tick: 6686, type: 'kick' }, { tick: 6692, type: 'kick' }, { tick: 6708, type: 'kick' }, { tick: 6724, type: 'snare' }, { tick: 6752, type: 'kick' }, { tick: 6779, type: 'snare' }, { tick: 6803, type: 'kick' }, { tick: 6809, type: 'kick' }, { tick: 6824, type: 'kick' }, { tick: 6839, type: 'snare' }, { tick: 6866, type: 'kick' }, { tick: 6895, type: 'snare' }, { tick: 6924, type: 'kick' }, { tick: 6950, type: 'snare' }, { tick: 6979, type: 'kick' }, { tick: 7010, type: 'snare' }, { tick: 7038, type: 'kick' }, { tick: 7067, type: 'snare' }, { tick: 7095, type: 'kick' }, { tick: 7126, type: 'snare' }, { tick: 7154, type: 'kick' }, { tick: 7172, type: 'kick' }, { tick: 7185, type: 'snare' }, { tick: 7213, type: 'kick' }, { tick: 7239, type: 'snare' }, { tick: 7264, type: 'kick' }, { tick: 7282, type: 'kick' }, { tick: 7287, type: 'kick' }, { tick: 7307, type: 'snare' }, { tick: 7360, type: 'snare' }, { tick: 7411, type: 'snare' }, { tick: 7442, type: 'kick' }, { tick: 7468, type: 'snare' }, { tick: 7492, type: 'kick' }, { tick: 7509, type: 'kick' }, { tick: 7517, type: 'kick' }, { tick: 7528, type: 'snare' }, { tick: 7555, type: 'kick' }, { tick: 7582, type: 'snare' }, { tick: 7605, type: 'kick' }, { tick: 7623, type: 'kick' }, { tick: 7631, type: 'kick' }, { tick: 7643, type: 'snare' }, { tick: 7671, type: 'kick' }, { tick: 7700, type: 'snare' }, { tick: 7724, type: 'kick' }, { tick: 7740, type: 'kick' }, { tick: 7746, type: 'kick' }, { tick: 7758, type: 'snare' }] }, { name: "Level 3", music: "MasterofUpit", notes: [ // Example: simple pattern for demo, replace with real notes for level 3 { tick: 0, type: 'hihat' }, { tick: 20, type: 'kick' }, { tick: 40, type: 'snare' }, { tick: 60, type: 'tom1' }, { tick: 80, type: 'crash1' }, { tick: 100, type: 'kick' }, { tick: 120, type: 'snare' }, { tick: 140, type: 'hihat' }] }]; // Current level index and songNotes reference var currentLevelIndex = 0; var songNotes = LEVELS[0].notes; var currentMusic = LEVELS[0].music; // --- Intro Screen UI --- var introContainer = new Container(); introContainer.x = 0; introContainer.y = 0; introContainer.visible = true; LK.gui.center.addChild(introContainer); // Background var introBg = LK.getAsset('introBg', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: LK.gui.center.width, height: LK.gui.center.height }); introContainer.addChild(introBg); // Center column layout for intro var introColumn = new Container(); introColumn.x = LK.gui.center.width / 2; introColumn.y = LK.gui.center.height / 2; introContainer.addChild(introColumn); // Logos - create all three and set up alternating var introLogo1 = LK.getAsset('introLogo', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, scaleX: 0.6, scaleY: 0.6 }); var introLogo2 = LK.getAsset('introLogo2', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, scaleX: 0.6, scaleY: 0.6 }); var introLogo3 = LK.getAsset('introLogo3', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, scaleX: 0.6, scaleY: 0.6 }); // Start with only first logo visible introLogo2.visible = false; introLogo3.visible = false; introColumn.addChild(introLogo1); introColumn.addChild(introLogo2); introColumn.addChild(introLogo3); // Set up alternating timer with cycling through all three logos var currentLogoIndex = 0; var logoSwitchTimer = LK.setInterval(function () { if (introContainer.visible) { // Hide all logos introLogo1.visible = false; introLogo2.visible = false; introLogo3.visible = false; // Show next logo in sequence currentLogoIndex = (currentLogoIndex + 1) % 3; if (currentLogoIndex === 0) { introLogo1.visible = true; } else if (currentLogoIndex === 1) { introLogo2.visible = true; } else { introLogo3.visible = true; } } }, 350); // Switch every 350ms // Play Button (moved to top) var playBtn = new Text2("Play", { size: 120, fill: "#fff", font: "Impact" }); playBtn.anchor.set(0.5, 0.5); playBtn.x = 0; playBtn.y = -LK.gui.center.height / 2 + 150 - 500; // Title Text var introTitle = new Text2("NOT QUITE MY TEMPO!!", { size: 140, fill: "#fff", font: "Impact" }); introTitle.anchor.set(0.5, 0.5); introTitle.x = 0; introTitle.y = introLogo1.y + introLogo1.height / 2 + 100 - 200; introColumn.addChild(introTitle); playBtn.interactive = true; playBtn.buttonMode = true; playBtn.bg = LK.getAsset('playButton', { anchorX: 0.5, anchorY: 0.5, x: playBtn.x, y: playBtn.y, width: 600, height: 180 }); introColumn.addChild(playBtn.bg); introColumn.addChild(playBtn); playBtn.down = function () { introContainer.visible = false; levelSelectContainer.visible = true; // Stop tip cycling when leaving intro if (tipDisplayTimer) { LK.clearInterval(tipDisplayTimer); } }; // --- Level Selection UI --- var levelSelectContainer = new Container(); levelSelectContainer.x = 0; levelSelectContainer.y = 0; levelSelectContainer.visible = false; LK.gui.center.addChild(levelSelectContainer); // Place the column at 30px from left, and vertically at 30px from the top (move further up by 20cm ≈ 720px) var levelSelectColumn = new Container(); // Move further up: 20cm ≈ 720px, so y = 30 - 720 = -690 levelSelectColumn.x = 30; levelSelectColumn.y = -690; levelSelectContainer.addChild(levelSelectColumn); // Title var levelSelectTitle = new Text2("Choose Level", { size: 120, fill: "#fff" }); levelSelectTitle.anchor.set(0.5, 0.5); levelSelectTitle.x = 0; levelSelectTitle.y = 0; levelSelectColumn.addChild(levelSelectTitle); // Level buttons, stacked vertically, centered below the title var levelButtons = []; var levelBtnSpacing = 220; var firstBtnY = levelSelectTitle.y + 180; for (var i = 0; i < LEVELS.length; i++) { (function (idx) { // Button background for touch area var btnBg = LK.getAsset('levelButton', { anchorX: 0.5, anchorY: 0.5, x: 0, y: firstBtnY + idx * levelBtnSpacing, width: 1000, height: 200 }); // Button text var btn = new Text2(LEVELS[idx].name, { size: 100, fill: "#fff", font: "Impact" }); btn.anchor.set(0.5, 0.5); btn.x = 0; btn.y = firstBtnY + idx * levelBtnSpacing; btn.interactive = true; btn.buttonMode = true; btn.down = function () { selectLevel(idx); }; levelSelectColumn.addChild(btnBg); levelSelectColumn.addChild(btn); levelButtons.push(btn); })(i); } // --- Recording UI and Logic --- var recordTxt = new Text2('KAYIT: KAPALI', { size: 70, fill: 0xFF6666 }); recordTxt.anchor.set(0.5, 0); LK.gui.top.addChild(recordTxt); recordTxt.x = LK.gui.top.width / 2; recordTxt.y = 220; // Hide gameplay UI until level is selected scoreTxt.visible = false; comboTxt.visible = false; recordTxt.visible = false; // Level selection handler function selectLevel(idx) { currentLevelIndex = idx; songNotes = LEVELS[idx].notes; currentMusic = LEVELS[idx].music; levelSelectContainer.visible = false; scoreTxt.visible = true; comboTxt.visible = true; recordTxt.visible = true; if (typeof TEST_MODE !== "undefined" && TEST_MODE) { // Update songTotalTicks for timeline songTotalTicks = songNotes.length > 0 ? songNotes[songNotes.length - 1].tick : 1; } startGame(); // Start the game after selecting a level } var isRecording = false; var recordedNotes = []; var recordStartTick = 0; // Toggle recording on tap of recordTxt recordTxt.interactive = true; recordTxt.buttonMode = true; recordTxt.down = function () { if (!isRecording) { // Start recording isRecording = true; recordedNotes = []; recordStartTick = LK.ticks; recordTxt.setText('KAYIT: AÇIK'); comboTxt.setText('KAYIT MODU'); } else { // Stop recording and save as new level isRecording = false; recordTxt.setText('KAYIT: KAPALI'); comboTxt.setText(''); // Convert recordedNotes to songNotes format if (recordedNotes.length > 0) { // Normalize ticks to start at 0 var minTick = recordedNotes.length > 0 ? recordedNotes[0].tick : 0; for (var i = 0; i < recordedNotes.length; i++) { recordedNotes[i].tick -= minTick; } songNotes = []; for (var i = 0; i < recordedNotes.length; i++) { songNotes.push({ tick: recordedNotes[i].tick, type: recordedNotes[i].type }); } // Print recorded notes as code in the console var codeStr = "var songNotes = [\n"; for (var i = 0; i < recordedNotes.length; i++) { codeStr += " { tick: " + recordedNotes[i].tick + ", type: '" + recordedNotes[i].type + "' },\n"; } codeStr += "];"; console.log(codeStr); // Restart game with new level startGame(); } } }; LK.gui.top.addChild(recordTxt); // --- Record pad hits if in recording mode --- function recordPadHit(padType) { if (isRecording) { var tick = LK.ticks - recordStartTick; recordedNotes.push({ tick: tick, type: padType }); } } // --- Create Drum Pads --- for (var i = 0; i < PAD_COLS; i++) { var pad = new DrumPad(); pad.setPadType(PAD_TYPES[i]); pad.x = PAD_X_POSITIONS[PAD_TYPES[i]]; pad.y = PAD_Y; pad.padIndex = i; pads.push(pad); game.addChild(pad); } // --- Pad Touch Handling --- var activePad = null; function getPadAt(x, y) { for (var i = 0; i < pads.length; i++) { var pad = pads[i]; var dx = x - pad.x, dy = y - pad.y; var rx = pad.asset.width / 2, ry = pad.asset.height / 2; if (dx * dx / (rx * rx) + dy * dy / (ry * ry) <= 1) { return pad; } } return null; } game.down = function (x, y, obj) { var pad = getPadAt(x, y); if (pad) { activePad = pad; handlePadHit(pad); } }; game.move = function (x, y, obj) { // For multi-touch, could be extended }; game.up = function (x, y, obj) { activePad = null; }; // --- Note Spawning --- function spawnNote(type) { var note = new Note(); note.setNoteType(type); note.x = PAD_X_POSITIONS[type]; note.y = NOTE_START_Y; note.noteType = type; note.hit = false; notes.push(note); game.addChild(note); } // --- Pad Hit Logic --- function handlePadHit(pad) { // Play sound var soundId = pad.padType + 'Sound'; var sound = LK.getSound(soundId); if (sound) { if (sound.stop) { sound.stop(); } // Stop if already playing to avoid overlap/delay sound.play(); } // Record pad hit if in recording mode recordPadHit(pad.padType); // Visual feedback pad.flash(); // Allow even earlier and later hits by expanding the hit windows further var HIT_WINDOW_EARLY = HIT_WINDOW * 2.2; // allow 120% earlier var HIT_WINDOW_LATE = HIT_WINDOW * 2.5; // allow 150% later - more tolerance for late hits // Find closest note of this type in expanded hit window var bestNote = null, bestDist = HIT_WINDOW_LATE; for (var i = 0; i < notes.length; i++) { var note = notes[i]; if (note.hit) { continue; } if (note.noteType !== pad.padType) { continue; } var dist = Math.abs(note.y - NOTE_TARGET_Y); // Accept if note is within early or late window if (note.y >= NOTE_TARGET_Y - HIT_WINDOW_EARLY && note.y <= NOTE_TARGET_Y + HIT_WINDOW_LATE && dist < bestDist) { bestDist = dist; bestNote = note; } } if (bestNote) { // Hit! bestNote.hit = true; LK.effects.flashObject(bestNote, 0xffffff, 120); tween(bestNote, { alpha: 0 }, { duration: 120, onFinish: function onFinish() { bestNote.destroy(); } }); notes.splice(notes.indexOf(bestNote), 1); score += 100; combo += 1; if (combo > maxCombo) { maxCombo = combo; } scoreTxt.setText(score); comboTxt.setText(combo > 1 ? combo + 'x' : ''); // Reset consecutiveMisses on successful hit if (typeof consecutiveMisses !== "undefined") { consecutiveMisses = 0; } // --- HEALTH BAR: Increase health by (1 * combo), clamp to maxHealth --- if (typeof health !== "undefined") { var addHealth = 1 * (combo > 0 ? combo : 1); health += addHealth; if (health > maxHealth) { health = maxHealth; } // Update health bar UI if (healthBarFg) { healthBarFg.width = health / maxHealth * healthBarBg.width; } } } else { // Miss! LK.effects.flashScreen(0xff0000, 200); // Track consecutive misses for combo reset if (typeof consecutiveMisses === "undefined") { consecutiveMisses = 0; } consecutiveMisses += 1; if (consecutiveMisses >= 2) { combo = 0; comboTxt.setText(''); consecutiveMisses = 0; } // --- HEALTH BAR: Decrease health by 2 (or more if many consecutive misses), clamp to 0 --- if (typeof health !== "undefined") { var missPenalty = 2; if (consecutiveMisses >= 3) { // For every group of 3 consecutive misses, double the penalty missPenalty = 2 * Math.pow(2, Math.floor(consecutiveMisses / 3)); } health -= missPenalty; if (health < 0) { health = 0; } if (healthBarFg) { healthBarFg.width = health / maxHealth * healthBarBg.width; } } } } // --- Game Update --- game.update = function () { if (!isPlaying) { return; } // If recording, do not spawn notes, do not check for misses, do not end game if (isRecording) { // Allow player to play freely, but do not process notes return; } // --- FAIL CHECK: If health is 0, fail the level and return to menu --- if (typeof health !== "undefined" && health <= 0 && isPlaying) { isPlaying = false; LK.stopMusic(); // Show "Failed" text in the center of the screen var failedTxt = new Text2("FAILED", { size: 220, fill: 0xFF4444 }); failedTxt.anchor.set(0.5, 0.5); failedTxt.x = GAME_W / 2; failedTxt.y = GAME_H / 2; game.addChild(failedTxt); // Hide gameplay UI scoreTxt.visible = false; comboTxt.visible = false; recordTxt.visible = false; if (healthBarContainer && healthBarContainer.parent) { healthBarContainer.parent.removeChild(healthBarContainer); } // After 1.2s, remove failed text and return to intro screen LK.setTimeout(function () { if (failedTxt && failedTxt.parent) { failedTxt.parent.removeChild(failedTxt); } levelSelectContainer.visible = false; introContainer.visible = true; }, 1200); return; } // Spawn notes according to songNotes, with NOTE_OFFSET_TICKS for sync var relTick = LK.ticks - songStartTick; while (noteIndex < songNotes.length && songNotes[noteIndex].tick <= relTick + NOTE_OFFSET_TICKS) { spawnNote(songNotes[noteIndex].type); noteIndex++; } // Update notes, check for misses for (var i = notes.length - 1; i >= 0; i--) { var note = notes[i]; note.update(); if (!note.hit && note.y > NOTE_TARGET_Y + HIT_WINDOW * 2.5) { // Missed note LK.effects.flashObject(note, 0xff0000, 120); tween(note, { alpha: 0 }, { duration: 120, onFinish: function onFinish() { note.destroy(); } }); notes.splice(i, 1); // Track consecutive misses for combo reset in update loop if (typeof consecutiveMisses === "undefined") { consecutiveMisses = 0; } consecutiveMisses += 1; if (consecutiveMisses >= 2) { combo = 0; comboTxt.setText(''); consecutiveMisses = 0; } // --- HEALTH BAR: Decrease health by 2 (or more if many consecutive misses), clamp to 0 --- if (typeof health !== "undefined") { var missPenalty = 2; if (consecutiveMisses >= 3) { // For every group of 3 consecutive misses, double the penalty missPenalty = 2 * Math.pow(2, Math.floor(consecutiveMisses / 3)); } health -= missPenalty; if (health < 0) { health = 0; } if (healthBarFg) { healthBarFg.width = health / maxHealth * healthBarBg.width; } } } // Remove notes that go off screen if (note.y > GAME_H + 100) { if (notes.indexOf(note) !== -1) { notes.splice(notes.indexOf(note), 1); } note.destroy(); } } // End of song if (noteIndex >= songNotes.length && notes.length === 0) { isPlaying = false; LK.stopMusic(); // Instead of showing win popup, return to intro screen levelSelectContainer.visible = false; scoreTxt.visible = false; comboTxt.visible = false; recordTxt.visible = false; if (healthBarContainer && healthBarContainer.parent) { healthBarContainer.parent.removeChild(healthBarContainer); } introContainer.visible = true; } }; // --- Start Game --- function startGame() { score = 0; combo = 0; maxCombo = 0; scoreTxt.setText('0'); comboTxt.setText(''); notes = []; noteIndex = 0; isPlaying = true; songStartTick = LK.ticks; consecutiveMisses = 0; // Hide tips during gameplay if (tipsContainer) { tipsContainer.visible = false; } // --- Health Bar Setup --- health = 150; maxHealth = 150; // Remove previous health bar if exists if (healthBarContainer && healthBarContainer.parent) { healthBarContainer.parent.removeChild(healthBarContainer); } healthBarContainer = new Container(); var barW = 900, barH = 60; // Use visual assets for health bar healthBarBg = LK.getAsset('healthBarBg', { anchorX: 0.5, anchorY: 0.5, width: barW, height: barH }); healthBarFg = LK.getAsset('healthBarFg', { anchorX: 0.5, anchorY: 0.5, width: barW, height: barH }); healthBarContainer.addChild(healthBarBg); healthBarContainer.addChild(healthBarFg); // Place at bottom center, above pads healthBarContainer.x = GAME_W / 2; healthBarContainer.y = GAME_H - 80; game.addChild(healthBarContainer); // Preload all drum sounds to reduce latency var preloadSounds = ['kickSound', 'snareSound', 'hihatSound', 'tom1Sound', 'crash1Sound']; for (var i = 0; i < preloadSounds.length; i++) { var s = LK.getSound(preloadSounds[i]); if (s && s.play) { // Play at zero volume to warm up, then stop immediately s.volume = 0; s.play(); if (s.stop) { s.stop(); } s.volume = 1; } } // Preload music to reduce latency var preloadMusic = LK.getMusic ? LK.getMusic('MasterofUpit') : null; if (preloadMusic && preloadMusic.play) { preloadMusic.volume = 0; preloadMusic.play(); if (preloadMusic.stop) { preloadMusic.stop(); } preloadMusic.volume = 1; } // Stop any currently playing music to ensure clean start LK.stopMusic(); // Play selected level's music with no fade, no loop, and start at full volume for best sync LK.playMusic(currentMusic, { loop: false, fade: { start: 1, end: 1, duration: 0 } }); } // --- Game Over Handling (missed notes or end of song) --- // Handled by LK.showYouWin() or LK.showGameOver() as needed // --- Responsive UI (center score) --- scoreTxt.x = LK.gui.top.width / 2; comboTxt.x = LK.gui.top.width / 2; // --- Tips Section --- var tipsContainer = new Container(); tipsContainer.x = 0; tipsContainer.y = PAD_Y + 150; // Position below drum pads game.addChild(tipsContainer); // Tips text array var tips = ["You can creatively jam as you wish on the home screen.", "Keep a consistent beat to increase the combo!", "I wrote the notes myself, they are not all perfect :P", "Still in development.", "I love Upit!", "Recommended to play on mobile device.", "S.a A.s", "I have no idea about software or coding", "Cat GBT is my best friend"]; var tipText = new Text2(tips[0], { size: 45, fill: "#fff" }); tipText.anchor.set(0.5, 0.5); tipText.x = GAME_W / 2; tipText.y = 0; tipsContainer.addChild(tipText); // Current tip index and animation state var currentTipIndex = 0; var tipAnimationTimer = null; var tipDisplayTimer = null; // Function to show next tip with sliding animation function showNextTip() { var nextTipIndex = (currentTipIndex + 1) % tips.length; // Slide out current tip to the left tween(tipText, { x: -GAME_W }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { // Change text and position off-screen right tipText.setText(tips[nextTipIndex]); tipText.x = GAME_W * 1.5; // Slide in new tip from the right tween(tipText, { x: GAME_W / 2 }, { duration: 800, easing: tween.easeInOut }); currentTipIndex = nextTipIndex; } }); } // Start the cycling animation only when intro screen is visible function startTipCycling() { if (tipDisplayTimer) { LK.clearInterval(tipDisplayTimer); } tipDisplayTimer = LK.setInterval(function () { if (introContainer.visible && !levelSelectContainer.visible) { showNextTip(); } }, 3000); // Change tip every 3 seconds } // Hide tips container when not on intro screen function updateTipsVisibility() { tipsContainer.visible = introContainer.visible && !levelSelectContainer.visible; } // Start tip cycling startTipCycling(); // --- TEST MODE: Show timeline and tick counter for sync debugging --- var TEST_MODE = true; // Set to true to enable timeline and tick counter var timelineBar = null; var tickCounterTxt = null; if (TEST_MODE) { // Timeline bar (shows song progress) timelineBar = new Container(); var barBg = LK.getAsset('crash1Pad', { anchorX: 0, anchorY: 0, width: LK.gui.top.width - 200, height: 24 }); barBg.alpha = 0.18; timelineBar.addChild(barBg); var barFg = LK.getAsset('hihatPad', { anchorX: 0, anchorY: 0, width: 0, height: 24 }); barFg.alpha = 0.7; timelineBar.addChild(barFg); timelineBar.x = 100; timelineBar.y = LK.gui.top.height - 60; LK.gui.top.addChild(timelineBar); // Tick counter tickCounterTxt = new Text2('Tick: 0', { size: 48, fill: "#fff" }); tickCounterTxt.anchor.set(0, 0.5); tickCounterTxt.x = 100; tickCounterTxt.y = LK.gui.top.height - 100; LK.gui.top.addChild(tickCounterTxt); // Update timeline and tick counter every frame var lastTimelineUpdateTick = -1; var songTotalTicks = songNotes.length > 0 ? songNotes[songNotes.length - 1].tick : 1; game.update = function (origUpdate) { return function () { if (origUpdate) { origUpdate.apply(this, arguments); } if (isPlaying && TEST_MODE) { // Update songTotalTicks in case level changed songTotalTicks = songNotes.length > 0 ? songNotes[songNotes.length - 1].tick : 1; var relTick = LK.ticks - songStartTick; // Timeline bar var progress = Math.min(1, (relTick + NOTE_OFFSET_TICKS) / songTotalTicks); barFg.width = (LK.gui.top.width - 200) * progress; // Tick counter tickCounterTxt.setText('Tick: ' + relTick); } // Update tips visibility updateTipsVisibility(); }; }(game.update); }
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
// DrumPad: Interactive drum pad at the bottom
var DrumPad = Container.expand(function () {
var self = Container.call(this);
// .padType: 'kick', 'snare', etc. (set after creation)
self.padType = null;
self.asset = null;
// .isPressed: for visual feedback
self.isPressed = false;
// Set up asset
self.setPadType = function (type) {
self.padType = type;
var assetId = type + 'Pad';
if (self.asset) {
self.removeChild(self.asset);
}
var size = PAD_SIZES[type];
self.asset = self.attachAsset(assetId, {
anchorX: 0.5,
anchorY: 0.5,
width: size ? size.w : undefined,
height: size ? size.h : undefined
});
};
// Visual feedback on press
self.flash = function () {
if (!self.asset) {
return;
}
tween(self.asset, {
alpha: 0.5
}, {
duration: 60,
onFinish: function onFinish() {
tween(self.asset, {
alpha: 1
}, {
duration: 120
});
}
});
};
return self;
});
// Note: Falling note bar
var Note = Container.expand(function () {
var self = Container.call(this);
// .noteType: 'kick', 'snare', etc.
self.noteType = null;
self.asset = null;
self.hit = false; // If already hit
self.setNoteType = function (type) {
self.noteType = type;
var assetId = type + 'Note';
if (self.asset) {
self.removeChild(self.asset);
}
self.asset = self.attachAsset(assetId, {
anchorX: 0.5,
anchorY: 0.5
});
};
// Called every tick
self.update = function () {
// Store initial scale if not set
if (self.initialScale === undefined) {
self.initialScale = 0.6; // Start smaller than normal
self.asset.scaleX = self.initialScale;
self.asset.scaleY = self.initialScale;
}
// Calculate progress from spawn to target (0 to 1)
var totalDistance = NOTE_TARGET_Y - NOTE_START_Y;
var currentDistance = self.y - NOTE_START_Y;
var progress = Math.max(0, Math.min(1, currentDistance / totalDistance));
// Scale from 0.6 to 1.8 (gradually growing larger)
var targetScale = self.initialScale + 1.2 * progress; // 0.6 + (1.2 * progress) = 0.6 to 1.8
self.asset.scaleX = targetScale;
self.asset.scaleY = targetScale;
self.y += noteSpeed;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x181818
});
/****
* Game Code
****/
// Health bar visual assets
// Drum pad sounds
// Music track
// Sounds for each drum
// Note bars (falling notes)
// Drum pads (kick, snare, hi-hat, tom1, tom2, crash1, crash2)
// --- Game constants ---
var PAD_TYPES = ['kick', 'snare', 'hihat', 'tom1', 'crash1'];
var PAD_COLS = PAD_TYPES.length;
var GAME_W = 2048,
GAME_H = 2732;
var PAD_Y = GAME_H - 320; // Y position for pads
// --- Pad Sizing and Full-Width Layout ---
// Each pad will be as wide as possible, with no side gaps, and all pads will be adjacent.
var PAD_SIZES = {};
var PAD_X_POSITIONS = {};
var padWidth = GAME_W / PAD_COLS;
var padCenterY = PAD_Y;
for (var i = 0; i < PAD_COLS; i++) {
var type = PAD_TYPES[i];
// Pad width: fill the column, pad height: keep previous aspect ratio (or max of previous)
// We'll use the original aspect ratio for each pad type, but scale width to padWidth
// Use original aspect ratios from previous PAD_SIZES
var origSizes = {
'kick': {
w: 420,
h: 210
},
'snare': {
w: 340,
h: 170
},
'hihat': {
w: 300,
h: 150
},
'tom1': {
w: 320,
h: 160
},
'crash1': {
w: 340,
h: 170
}
};
var aspect = origSizes[type].h / origSizes[type].w;
var w = padWidth;
var h = w * aspect;
PAD_SIZES[type] = {
w: w,
h: h
};
// Center of each pad: left edge + half width + i*padWidth
PAD_X_POSITIONS[type] = i * padWidth + padWidth / 2;
}
// Swap hihat and tom1 X positions
var tmpX = PAD_X_POSITIONS['hihat'];
PAD_X_POSITIONS['hihat'] = PAD_X_POSITIONS['tom1'];
PAD_X_POSITIONS['tom1'] = tmpX;
// Note spawn area (top)
var NOTE_START_Y = -60;
var NOTE_TARGET_Y = PAD_Y - 80; // Where notes should be hit
// Note speed (pixels per frame)
var noteSpeed = 18;
// Timing window (pixels): how close to NOTE_TARGET_Y is a "hit"
var HIT_WINDOW = 100;
// --- State ---
// NOTE_OFFSET_TICKS: Delay (in ticks) to align first note with music start (positive = notes spawn later)
var NOTE_OFFSET_TICKS = 0; // Default 0, adjust for perfect sync (e.g. try 20, 30, 40, ...)
var pads = [];
var notes = [];
var score = 0;
var combo = 0;
var maxCombo = 0;
var lastTick = 0;
var noteIndex = 0;
var isPlaying = false;
var songStartTick = 0;
// --- Health Bar State ---
var health = 150;
var maxHealth = 150;
var healthBarContainer = null;
var healthBarBg = null;
var healthBarFg = null;
// --- UI ---
var scoreTxt = new Text2('0', {
size: 120,
fill: "#fff"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
var comboTxt = new Text2('', {
size: 70,
fill: 0xFFE066
});
comboTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(comboTxt);
comboTxt.y = 130;
// --- Song Data for all levels ---
// Each entry: {tick: <when to spawn>, type: <padType>}
// Level 1: MasterofUpit, original notes
var LEVELS = [{
name: "Hard: Master of Upit",
music: "MasterofUpit",
notes: [{
tick: 1,
type: 'kick'
}, {
tick: 1,
type: 'crash1'
}, {
tick: 62,
type: 'crash1'
}, {
tick: 63,
type: 'kick'
}, {
tick: 78,
type: 'crash1'
}, {
tick: 78,
type: 'kick'
}, {
tick: 93,
type: 'crash1'
}, {
tick: 93,
type: 'kick'
}, {
tick: 193,
type: 'crash1'
}, {
tick: 193,
type: 'kick'
}, {
tick: 266,
type: 'hihat'
}, {
tick: 283,
type: 'hihat'
}, {
tick: 299,
type: 'hihat'
}, {
tick: 316,
type: 'hihat'
}, {
tick: 334,
type: 'hihat'
}, {
tick: 351,
type: 'hihat'
}, {
tick: 368,
type: 'hihat'
}, {
tick: 386,
type: 'hihat'
}, {
tick: 403,
type: 'hihat'
}, {
tick: 420,
type: 'hihat'
}, {
tick: 438,
type: 'hihat'
}, {
tick: 451,
type: 'kick'
}, {
tick: 452,
type: 'crash1'
}, {
tick: 470,
type: 'crash1'
}, {
tick: 471,
type: 'kick'
}, {
tick: 490,
type: 'hihat'
}, {
tick: 505,
type: 'hihat'
}, {
tick: 522,
type: 'hihat'
}, {
tick: 538,
type: 'kick'
}, {
tick: 539,
type: 'crash1'
}, {
tick: 556,
type: 'crash1'
}, {
tick: 558,
type: 'kick'
}, {
tick: 572,
type: 'crash1'
}, {
tick: 572,
type: 'kick'
}, {
tick: 590,
type: 'hihat'
}, {
tick: 607,
type: 'hihat'
}, {
tick: 625,
type: 'hihat'
}, {
tick: 640,
type: 'hihat'
}, {
tick: 658,
type: 'hihat'
}, {
tick: 676,
type: 'hihat'
}, {
tick: 694,
type: 'hihat'
}, {
tick: 710,
type: 'hihat'
}, {
tick: 725,
type: 'crash1'
}, {
tick: 727,
type: 'kick'
}, {
tick: 742,
type: 'kick'
}, {
tick: 742,
type: 'crash1'
}, {
tick: 758,
type: 'hihat'
}, {
tick: 776,
type: 'hihat'
}, {
tick: 795,
type: 'hihat'
}, {
tick: 812,
type: 'crash1'
}, {
tick: 812,
type: 'kick'
}, {
tick: 829,
type: 'crash1'
}, {
tick: 829,
type: 'kick'
}, {
tick: 847,
type: 'crash1'
}, {
tick: 847,
type: 'kick'
}, {
tick: 863,
type: 'hihat'
}, {
tick: 881,
type: 'hihat'
}, {
tick: 899,
type: 'hihat'
}, {
tick: 916,
type: 'hihat'
}, {
tick: 933,
type: 'hihat'
}, {
tick: 951,
type: 'hihat'
}, {
tick: 969,
type: 'hihat'
}, {
tick: 986,
type: 'hihat'
}, {
tick: 1003,
type: 'kick'
}, {
tick: 1003,
type: 'crash1'
}, {
tick: 1020,
type: 'crash1'
}, {
tick: 1021,
type: 'kick'
}, {
tick: 1036,
type: 'hihat'
}, {
tick: 1054,
type: 'hihat'
}, {
tick: 1070,
type: 'hihat'
}, {
tick: 1087,
type: 'crash1'
}, {
tick: 1087,
type: 'kick'
}, {
tick: 1104,
type: 'crash1'
}, {
tick: 1105,
type: 'kick'
}, {
tick: 1122,
type: 'crash1'
}, {
tick: 1122,
type: 'kick'
}, {
tick: 1155,
type: 'snare'
}, {
tick: 1166,
type: 'snare'
}, {
tick: 1173,
type: 'snare'
}, {
tick: 1183,
type: 'snare'
}, {
tick: 1189,
type: 'snare'
}, {
tick: 1198,
type: 'snare'
}, {
tick: 1206,
type: 'snare'
}, {
tick: 1215,
type: 'snare'
}, {
tick: 1223,
type: 'snare'
}, {
tick: 1231,
type: 'snare'
}, {
tick: 1239,
type: 'snare'
}, {
tick: 1249,
type: 'snare'
}, {
tick: 1257,
type: 'snare'
}, {
tick: 1267,
type: 'snare'
}, {
tick: 1275,
type: 'snare'
}, {
tick: 1293,
type: 'kick'
}, {
tick: 1293,
type: 'crash1'
}, {
tick: 1500,
type: 'crash1'
}, {
tick: 1500,
type: 'kick'
}, {
tick: 1527,
type: 'crash1'
}, {
tick: 1528,
type: 'kick'
}, {
tick: 1549,
type: 'crash1'
}, {
tick: 1549,
type: 'kick'
}, {
tick: 1566,
type: 'crash1'
}, {
tick: 1566,
type: 'kick'
}, {
tick: 1775,
type: 'crash1'
}, {
tick: 1776,
type: 'kick'
}, {
tick: 1802,
type: 'kick'
}, {
tick: 1802,
type: 'crash1'
}, {
tick: 1825,
type: 'crash1'
}, {
tick: 1826,
type: 'kick'
}, {
tick: 1842,
type: 'crash1'
}, {
tick: 1842,
type: 'kick'
}, {
tick: 1856,
type: 'hihat'
}, {
tick: 1860,
type: 'snare'
}, {
tick: 1876,
type: 'hihat'
}, {
tick: 1884,
type: 'kick'
}, {
tick: 1892,
type: 'hihat'
}, {
tick: 1892,
type: 'snare'
}, {
tick: 1910,
type: 'hihat'
}, {
tick: 1911,
type: 'kick'
}, {
tick: 1927,
type: 'snare'
}, {
tick: 1928,
type: 'hihat'
}, {
tick: 1946,
type: 'hihat'
}, {
tick: 1954,
type: 'kick'
}, {
tick: 1961,
type: 'hihat'
}, {
tick: 1963,
type: 'snare'
}, {
tick: 1980,
type: 'hihat'
}, {
tick: 1981,
type: 'kick'
}, {
tick: 1996,
type: 'snare'
}, {
tick: 1996,
type: 'hihat'
}, {
tick: 2014,
type: 'hihat'
}, {
tick: 2021,
type: 'kick'
}, {
tick: 2028,
type: 'hihat'
}, {
tick: 2031,
type: 'snare'
}, {
tick: 2048,
type: 'hihat'
}, {
tick: 2049,
type: 'kick'
}, {
tick: 2066,
type: 'hihat'
}, {
tick: 2066,
type: 'snare'
}, {
tick: 2086,
type: 'hihat'
}, {
tick: 2096,
type: 'kick'
}, {
tick: 2102,
type: 'crash1'
}, {
tick: 2105,
type: 'kick'
}, {
tick: 2119,
type: 'kick'
}, {
tick: 2119,
type: 'crash1'
}, {
tick: 2165,
type: 'hihat'
}, {
tick: 2168,
type: 'snare'
}, {
tick: 2185,
type: 'hihat'
}, {
tick: 2187,
type: 'kick'
}, {
tick: 2202,
type: 'snare'
}, {
tick: 2202,
type: 'hihat'
}, {
tick: 2219,
type: 'hihat'
}, {
tick: 2229,
type: 'kick'
}, {
tick: 2235,
type: 'hihat'
}, {
tick: 2237,
type: 'snare'
}, {
tick: 2245,
type: 'snare'
}, {
tick: 2252,
type: 'snare'
}, {
tick: 2257,
type: 'crash1'
}, {
tick: 2261,
type: 'kick'
}, {
tick: 2273,
type: 'snare'
}, {
tick: 2273,
type: 'hihat'
}, {
tick: 2290,
type: 'hihat'
}, {
tick: 2305,
type: 'hihat'
}, {
tick: 2308,
type: 'snare'
}, {
tick: 2324,
type: 'crash1'
}, {
tick: 2325,
type: 'kick'
}, {
tick: 2350,
type: 'kick'
}, {
tick: 2350,
type: 'crash1'
}, {
tick: 2376,
type: 'crash1'
}, {
tick: 2376,
type: 'kick'
}, {
tick: 2392,
type: 'crash1'
}, {
tick: 2392,
type: 'kick'
}, {
tick: 2407,
type: 'hihat'
}, {
tick: 2409,
type: 'snare'
}, {
tick: 2427,
type: 'hihat'
}, {
tick: 2436,
type: 'kick'
}, {
tick: 2442,
type: 'hihat'
}, {
tick: 2444,
type: 'snare'
}, {
tick: 2460,
type: 'hihat'
}, {
tick: 2462,
type: 'kick'
}, {
tick: 2479,
type: 'hihat'
}, {
tick: 2479,
type: 'snare'
}, {
tick: 2496,
type: 'hihat'
}, {
tick: 2506,
type: 'kick'
}, {
tick: 2511,
type: 'hihat'
}, {
tick: 2515,
type: 'snare'
}, {
tick: 2530,
type: 'hihat'
}, {
tick: 2532,
type: 'kick'
}, {
tick: 2546,
type: 'hihat'
}, {
tick: 2546,
type: 'snare'
}, {
tick: 2564,
type: 'hihat'
}, {
tick: 2573,
type: 'kick'
}, {
tick: 2581,
type: 'hihat'
}, {
tick: 2584,
type: 'snare'
}, {
tick: 2599,
type: 'hihat'
}, {
tick: 2600,
type: 'kick'
}, {
tick: 2615,
type: 'snare'
}, {
tick: 2615,
type: 'hihat'
}, {
tick: 2635,
type: 'hihat'
}, {
tick: 2641,
type: 'kick'
}, {
tick: 2651,
type: 'snare'
}, {
tick: 2654,
type: 'crash1'
}, {
tick: 2669,
type: 'kick'
}, {
tick: 2671,
type: 'hihat'
}, {
tick: 2686,
type: 'snare'
}, {
tick: 2686,
type: 'hihat'
}, {
tick: 2704,
type: 'hihat'
}, {
tick: 2713,
type: 'kick'
}, {
tick: 2719,
type: 'hihat'
}, {
tick: 2724,
type: 'kick'
}, {
tick: 2739,
type: 'hihat'
}, {
tick: 2750,
type: 'snare'
}, {
tick: 2759,
type: 'snare'
}, {
tick: 2769,
type: 'snare'
}, {
tick: 2773,
type: 'snare'
}, {
tick: 2781,
type: 'snare'
}, {
tick: 2792,
type: 'tom1'
}, {
tick: 2808,
type: 'crash1'
}, {
tick: 2809,
type: 'kick'
}, {
tick: 2822,
type: 'hihat'
}, {
tick: 2823,
type: 'snare'
}, {
tick: 2840,
type: 'hihat'
}, {
tick: 2848,
type: 'kick'
}, {
tick: 2855,
type: 'hihat'
}, {
tick: 2856,
type: 'snare'
}, {
tick: 2873,
type: 'crash1'
}, {
tick: 2873,
type: 'kick'
}, {
tick: 2899,
type: 'kick'
}, {
tick: 2899,
type: 'crash1'
}, {
tick: 2921,
type: 'crash1'
}, {
tick: 2924,
type: 'kick'
}, {
tick: 2939,
type: 'crash1'
}, {
tick: 2939,
type: 'kick'
}, {
tick: 2964,
type: 'crash1'
}, {
tick: 2965,
type: 'kick'
}, {
tick: 2988,
type: 'crash1'
}, {
tick: 2988,
type: 'kick'
}, {
tick: 3006,
type: 'crash1'
}, {
tick: 3006,
type: 'kick'
}, {
tick: 3024,
type: 'hihat'
}, {
tick: 3044,
type: 'hihat'
}, {
tick: 3060,
type: 'hihat'
}, {
tick: 3079,
type: 'hihat'
}, {
tick: 3097,
type: 'hihat'
}, {
tick: 3114,
type: 'hihat'
}, {
tick: 3132,
type: 'hihat'
}, {
tick: 3149,
type: 'crash1'
}, {
tick: 3149,
type: 'kick'
}, {
tick: 3165,
type: 'hihat'
}, {
tick: 3165,
type: 'snare'
}, {
tick: 3183,
type: 'hihat'
}, {
tick: 3192,
type: 'kick'
}, {
tick: 3198,
type: 'hihat'
}, {
tick: 3200,
type: 'snare'
}, {
tick: 3217,
type: 'hihat'
}, {
tick: 3231,
type: 'kick'
}, {
tick: 3235,
type: 'hihat'
}, {
tick: 3239,
type: 'snare'
}, {
tick: 3254,
type: 'hihat'
}, {
tick: 3254,
type: 'kick'
}, {
tick: 3269,
type: 'hihat'
}, {
tick: 3269,
type: 'snare'
}, {
tick: 3285,
type: 'hihat'
}, {
tick: 3288,
type: 'kick'
}, {
tick: 3303,
type: 'hihat'
}, {
tick: 3304,
type: 'snare'
}, {
tick: 3321,
type: 'hihat'
}, {
tick: 3329,
type: 'kick'
}, {
tick: 3336,
type: 'hihat'
}, {
tick: 3337,
type: 'snare'
}, {
tick: 3354,
type: 'hihat'
}, {
tick: 3361,
type: 'snare'
}, {
tick: 3362,
type: 'crash1'
}, {
tick: 3381,
type: 'crash1'
}, {
tick: 3381,
type: 'kick'
}, {
tick: 3399,
type: 'hihat'
}, {
tick: 3399,
type: 'kick'
}, {
tick: 3415,
type: 'hihat'
}, {
tick: 3416,
type: 'snare'
}, {
tick: 3434,
type: 'hihat'
}, {
tick: 3443,
type: 'kick'
}, {
tick: 3449,
type: 'hihat'
}, {
tick: 3452,
type: 'snare'
}, {
tick: 3469,
type: 'hihat'
}, {
tick: 3478,
type: 'snare'
}, {
tick: 3485,
type: 'snare'
}, {
tick: 3501,
type: 'tom1'
}, {
tick: 3519,
type: 'tom1'
}, {
tick: 3537,
type: 'kick'
}, {
tick: 3539,
type: 'crash1'
}, {
tick: 3553,
type: 'snare'
}, {
tick: 3554,
type: 'hihat'
}, {
tick: 3570,
type: 'hihat'
}, {
tick: 3578,
type: 'kick'
}, {
tick: 3585,
type: 'hihat'
}, {
tick: 3587,
type: 'snare'
}, {
tick: 3603,
type: 'hihat'
}, {
tick: 3612,
type: 'crash1'
}, {
tick: 3613,
type: 'kick'
}, {
tick: 3630,
type: 'crash1'
}, {
tick: 3630,
type: 'kick'
}, {
tick: 3647,
type: 'hihat'
}, {
tick: 3663,
type: 'hihat'
}, {
tick: 3664,
type: 'snare'
}, {
tick: 3681,
type: 'hihat'
}, {
tick: 3690,
type: 'kick'
}, {
tick: 3697,
type: 'hihat'
}, {
tick: 3699,
type: 'snare'
}, {
tick: 3721,
type: 'snare'
}, {
tick: 3729,
type: 'snare'
}, {
tick: 3748,
type: 'snare'
}, {
tick: 3756,
type: 'snare'
}, {
tick: 3765,
type: 'tom1'
}, {
tick: 3772,
type: 'tom1'
}, {
tick: 3782,
type: 'crash1'
}, {
tick: 3782,
type: 'kick'
}, {
tick: 3798,
type: 'snare'
}, {
tick: 3798,
type: 'hihat'
}, {
tick: 3815,
type: 'hihat'
}, {
tick: 3826,
type: 'kick'
}, {
tick: 3831,
type: 'hihat'
}, {
tick: 3834,
type: 'snare'
}, {
tick: 3850,
type: 'crash1'
}, {
tick: 3859,
type: 'crash1'
}, {
tick: 3859,
type: 'kick'
}, {
tick: 3878,
type: 'crash1'
}, {
tick: 3878,
type: 'kick'
}, {
tick: 3896,
type: 'kick'
}, {
tick: 3896,
type: 'hihat'
}, {
tick: 3912,
type: 'hihat'
}, {
tick: 3913,
type: 'snare'
}, {
tick: 3930,
type: 'hihat'
}, {
tick: 3942,
type: 'kick'
}, {
tick: 3947,
type: 'hihat'
}, {
tick: 3950,
type: 'snare'
}, {
tick: 3964,
type: 'hihat'
}, {
tick: 3973,
type: 'snare'
}, {
tick: 3981,
type: 'snare'
}, {
tick: 3998,
type: 'snare'
}, {
tick: 4006,
type: 'snare'
}, {
tick: 4012,
type: 'snare'
}, {
tick: 4020,
type: 'tom1'
}, {
tick: 4027,
type: 'tom1'
}, {
tick: 4035,
type: 'kick'
}, {
tick: 4036,
type: 'crash1'
}, {
tick: 4051,
type: 'snare'
}, {
tick: 4052,
type: 'hihat'
}, {
tick: 4068,
type: 'hihat'
}, {
tick: 4078,
type: 'kick'
}, {
tick: 4083,
type: 'hihat'
}, {
tick: 4086,
type: 'snare'
}, {
tick: 4101,
type: 'hihat'
}, {
tick: 4106,
type: 'kick'
}, {
tick: 4112,
type: 'kick'
}, {
tick: 4112,
type: 'crash1'
}, {
tick: 4128,
type: 'crash1'
}, {
tick: 4128,
type: 'kick'
}, {
tick: 4145,
type: 'hihat'
}, {
tick: 4163,
type: 'hihat'
}, {
tick: 4163,
type: 'snare'
}, {
tick: 4180,
type: 'hihat'
}, {
tick: 4190,
type: 'kick'
}, {
tick: 4196,
type: 'hihat'
}, {
tick: 4200,
type: 'snare'
}, {
tick: 4224,
type: 'snare'
}, {
tick: 4233,
type: 'snare'
}, {
tick: 4249,
type: 'snare'
}, {
tick: 4258,
type: 'snare'
}, {
tick: 4265,
type: 'tom1'
}, {
tick: 4273,
type: 'tom1'
}, {
tick: 4282,
type: 'crash1'
}, {
tick: 4283,
type: 'kick'
}, {
tick: 4299,
type: 'hihat'
}, {
tick: 4300,
type: 'snare'
}, {
tick: 4317,
type: 'hihat'
}, {
tick: 4329,
type: 'kick'
}, {
tick: 4333,
type: 'hihat'
}, {
tick: 4336,
type: 'snare'
}, {
tick: 4351,
type: 'hihat'
}, {
tick: 4361,
type: 'crash1'
}, {
tick: 4361,
type: 'kick'
}, {
tick: 4378,
type: 'crash1'
}, {
tick: 4379,
type: 'kick'
}, {
tick: 4394,
type: 'crash1'
}, {
tick: 4396,
type: 'kick'
}, {
tick: 4411,
type: 'hihat'
}, {
tick: 4412,
type: 'snare'
}, {
tick: 4429,
type: 'hihat'
}, {
tick: 4439,
type: 'kick'
}, {
tick: 4445,
type: 'hihat'
}, {
tick: 4449,
type: 'snare'
}, {
tick: 4464,
type: 'hihat'
}, {
tick: 4474,
type: 'snare'
}, {
tick: 4481,
type: 'snare'
}, {
tick: 4497,
type: 'snare'
}, {
tick: 4506,
type: 'snare'
}, {
tick: 4519,
type: 'tom1'
}, {
tick: 4531,
type: 'kick'
}, {
tick: 4531,
type: 'crash1'
}, {
tick: 4548,
type: 'snare'
}, {
tick: 4548,
type: 'hihat'
}, {
tick: 4565,
type: 'hihat'
}, {
tick: 4574,
type: 'kick'
}, {
tick: 4580,
type: 'hihat'
}, {
tick: 4583,
type: 'snare'
}, {
tick: 4599,
type: 'hihat'
}, {
tick: 4602,
type: 'kick'
}, {
tick: 4609,
type: 'crash1'
}, {
tick: 4610,
type: 'kick'
}, {
tick: 4627,
type: 'crash1'
}, {
tick: 4627,
type: 'kick'
}, {
tick: 4642,
type: 'hihat'
}, {
tick: 4660,
type: 'hihat'
}, {
tick: 4661,
type: 'snare'
}, {
tick: 4678,
type: 'hihat'
}, {
tick: 4688,
type: 'snare'
}, {
tick: 4694,
type: 'hihat'
}, {
tick: 4699,
type: 'snare'
}, {
tick: 4725,
type: 'snare'
}, {
tick: 4732,
type: 'snare'
}, {
tick: 4748,
type: 'snare'
}, {
tick: 4756,
type: 'snare'
}, {
tick: 4763,
type: 'tom1'
}, {
tick: 4772,
type: 'kick'
}, {
tick: 4779,
type: 'kick'
}, {
tick: 4780,
type: 'crash1'
}, {
tick: 4797,
type: 'snare'
}, {
tick: 4797,
type: 'hihat'
}, {
tick: 4814,
type: 'hihat'
}, {
tick: 4823,
type: 'kick'
}, {
tick: 4830,
type: 'hihat'
}, {
tick: 4832,
type: 'snare'
}, {
tick: 4849,
type: 'crash1'
}, {
tick: 4850,
type: 'kick'
}, {
tick: 4856,
type: 'crash1'
}, {
tick: 4857,
type: 'kick'
}, {
tick: 4874,
type: 'kick'
}, {
tick: 4875,
type: 'crash1'
}, {
tick: 4891,
type: 'hihat'
}, {
tick: 4907,
type: 'hihat'
}, {
tick: 4907,
type: 'snare'
}, {
tick: 4924,
type: 'hihat'
}, {
tick: 4932,
type: 'kick'
}, {
tick: 4940,
type: 'hihat'
}, {
tick: 4942,
type: 'snare'
}, {
tick: 4958,
type: 'hihat'
}, {
tick: 4968,
type: 'snare'
}, {
tick: 4975,
type: 'snare'
}, {
tick: 4993,
type: 'snare'
}, {
tick: 5000,
type: 'snare'
}, {
tick: 5007,
type: 'tom1'
}, {
tick: 5015,
type: 'tom1'
}, {
tick: 5026,
type: 'kick'
}, {
tick: 5029,
type: 'crash1'
}, {
tick: 5046,
type: 'hihat'
}, {
tick: 5046,
type: 'snare'
}, {
tick: 5063,
type: 'hihat'
}, {
tick: 5074,
type: 'kick'
}, {
tick: 5079,
type: 'hihat'
}, {
tick: 5083,
type: 'snare'
}, {
tick: 5096,
type: 'hihat'
}, {
tick: 5105,
type: 'kick'
}, {
tick: 5106,
type: 'crash1'
}, {
tick: 5124,
type: 'crash1'
}, {
tick: 5125,
type: 'kick'
}, {
tick: 5140,
type: 'kick'
}, {
tick: 5150,
type: 'snare'
}, {
tick: 5159,
type: 'snare'
}, {
tick: 5168,
type: 'snare'
}, {
tick: 5177,
type: 'snare'
}, {
tick: 5182,
type: 'snare'
}, {
tick: 5190,
type: 'snare'
}, {
tick: 5198,
type: 'snare'
}, {
tick: 5210,
type: 'crash1'
}, {
tick: 5210,
type: 'kick'
}, {
tick: 5245,
type: 'hihat'
}, {
tick: 5246,
type: 'snare'
}, {
tick: 5262,
type: 'snare'
}, {
tick: 5262,
type: 'hihat'
}, {
tick: 5278,
type: 'crash1'
}, {
tick: 5312,
type: 'hihat'
}, {
tick: 5313,
type: 'snare'
}, {
tick: 5330,
type: 'snare'
}, {
tick: 5330,
type: 'hihat'
}, {
tick: 5347,
type: 'hihat'
}, {
tick: 5348,
type: 'kick'
}, {
tick: 5367,
type: 'kick'
}, {
tick: 5368,
type: 'hihat'
}, {
tick: 5381,
type: 'hihat'
}, {
tick: 5383,
type: 'snare'
}, {
tick: 5400,
type: 'hihat'
}, {
tick: 5400,
type: 'snare'
}, {
tick: 5416,
type: 'snare'
}, {
tick: 5424,
type: 'snare'
}, {
tick: 5431,
type: 'snare'
}, {
tick: 5440,
type: 'snare'
}, {
tick: 5447,
type: 'tom1'
}, {
tick: 5456,
type: 'tom1'
}, {
tick: 5463,
type: 'snare'
}, {
tick: 5471,
type: 'snare'
}, {
tick: 5482,
type: 'kick'
}, {
tick: 5483,
type: 'crash1'
}, {
tick: 5516,
type: 'hihat'
}, {
tick: 5519,
type: 'snare'
}, {
tick: 5534,
type: 'hihat'
}, {
tick: 5535,
type: 'snare'
}, {
tick: 5551,
type: 'crash1'
}, {
tick: 5554,
type: 'kick'
}, {
tick: 5569,
type: 'kick'
}, {
tick: 5582,
type: 'kick'
}, {
tick: 5584,
type: 'hihat'
}, {
tick: 5601,
type: 'snare'
}, {
tick: 5602,
type: 'hihat'
}, {
tick: 5617,
type: 'crash1'
}, {
tick: 5619,
type: 'kick'
}, {
tick: 5637,
type: 'kick'
}, {
tick: 5647,
type: 'kick'
}, {
tick: 5653,
type: 'hihat'
}, {
tick: 5655,
type: 'snare'
}, {
tick: 5671,
type: 'snare'
}, {
tick: 5687,
type: 'snare'
}, {
tick: 5696,
type: 'snare'
}, {
tick: 5703,
type: 'snare'
}, {
tick: 5713,
type: 'snare'
}, {
tick: 5721,
type: 'tom1'
}, {
tick: 5729,
type: 'tom1'
}, {
tick: 5739,
type: 'snare'
}, {
tick: 5747,
type: 'snare'
}, {
tick: 5757,
type: 'crash1'
}, {
tick: 5758,
type: 'kick'
}, {
tick: 5777,
type: 'kick'
}, {
tick: 5786,
type: 'kick'
}, {
tick: 5793,
type: 'hihat'
}, {
tick: 5794,
type: 'snare'
}, {
tick: 5809,
type: 'snare'
}, {
tick: 5825,
type: 'hihat'
}, {
tick: 5827,
type: 'kick'
}, {
tick: 5842,
type: 'kick'
}, {
tick: 5851,
type: 'kick'
}, {
tick: 5859,
type: 'hihat'
}, {
tick: 5861,
type: 'snare'
}, {
tick: 5877,
type: 'snare'
}, {
tick: 5895,
type: 'hihat'
}, {
tick: 5896,
type: 'kick'
}, {
tick: 5913,
type: 'kick'
}, {
tick: 5914,
type: 'hihat'
}, {
tick: 5931,
type: 'snare'
}, {
tick: 5934,
type: 'hihat'
}, {
tick: 5947,
type: 'snare'
}, {
tick: 5964,
type: 'snare'
}, {
tick: 5981,
type: 'snare'
}, {
tick: 5998,
type: 'tom1'
}, {
tick: 6008,
type: 'snare'
}, {
tick: 6017,
type: 'snare'
}, {
tick: 6025,
type: 'snare'
}, {
tick: 6034,
type: 'crash1'
}, {
tick: 6035,
type: 'kick'
}, {
tick: 6054,
type: 'kick'
}, {
tick: 6063,
type: 'kick'
}, {
tick: 6067,
type: 'hihat'
}, {
tick: 6072,
type: 'snare'
}, {
tick: 6086,
type: 'hihat'
}, {
tick: 6086,
type: 'snare'
}, {
tick: 6103,
type: 'hihat'
}, {
tick: 6103,
type: 'kick'
}, {
tick: 6121,
type: 'kick'
}, {
tick: 6133,
type: 'hihat'
}, {
tick: 6134,
type: 'snare'
}, {
tick: 6151,
type: 'hihat'
}, {
tick: 6151,
type: 'snare'
}, {
tick: 6168,
type: 'hihat'
}, {
tick: 6169,
type: 'kick'
}, {
tick: 6184,
type: 'kick'
}, {
tick: 6193,
type: 'kick'
}, {
tick: 6201,
type: 'hihat'
}, {
tick: 6202,
type: 'snare'
}, {
tick: 6220,
type: 'snare'
}, {
tick: 6220,
type: 'hihat'
}, {
tick: 6237,
type: 'snare'
}, {
tick: 6243,
type: 'snare'
}, {
tick: 6248,
type: 'snare'
}, {
tick: 6254,
type: 'snare'
}, {
tick: 6273,
type: 'tom1'
}, {
tick: 6290,
type: 'tom1'
}, {
tick: 6310,
type: 'kick'
}, {
tick: 6310,
type: 'crash1'
}, {
tick: 6324,
type: 'kick'
}, {
tick: 6324,
type: 'crash1'
}, {
tick: 6374,
type: 'crash1'
}, {
tick: 6374,
type: 'kick'
}, {
tick: 6390,
type: 'kick'
}, {
tick: 6390,
type: 'crash1'
}]
}, {
name: "Medium: Blast Funk-Wet Puppy",
music: "BlastFunkWetPuppy",
notes: [{
tick: 0,
type: 'snare'
}, {
tick: 26,
type: 'kick'
}, {
tick: 43,
type: 'kick'
}, {
tick: 55,
type: 'snare'
}, {
tick: 86,
type: 'kick'
}, {
tick: 113,
type: 'snare'
}, {
tick: 141,
type: 'kick'
}, {
tick: 170,
type: 'snare'
}, {
tick: 202,
type: 'kick'
}, {
tick: 227,
type: 'snare'
}, {
tick: 250,
type: 'kick'
}, {
tick: 255,
type: 'kick'
}, {
tick: 270,
type: 'kick'
}, {
tick: 284,
type: 'snare'
}, {
tick: 314,
type: 'kick'
}, {
tick: 343,
type: 'snare'
}, {
tick: 364,
type: 'kick'
}, {
tick: 371,
type: 'kick'
}, {
tick: 386,
type: 'kick'
}, {
tick: 402,
type: 'snare'
}, {
tick: 431,
type: 'kick'
}, {
tick: 460,
type: 'snare'
}, {
tick: 482,
type: 'kick'
}, {
tick: 488,
type: 'kick'
}, {
tick: 503,
type: 'kick'
}, {
tick: 518,
type: 'snare'
}, {
tick: 545,
type: 'kick'
}, {
tick: 572,
type: 'snare'
}, {
tick: 598,
type: 'kick'
}, {
tick: 605,
type: 'kick'
}, {
tick: 619,
type: 'kick'
}, {
tick: 631,
type: 'snare'
}, {
tick: 659,
type: 'kick'
}, {
tick: 688,
type: 'snare'
}, {
tick: 708,
type: 'kick'
}, {
tick: 714,
type: 'kick'
}, {
tick: 730,
type: 'kick'
}, {
tick: 744,
type: 'snare'
}, {
tick: 773,
type: 'kick'
}, {
tick: 803,
type: 'snare'
}, {
tick: 829,
type: 'kick'
}, {
tick: 858,
type: 'snare'
}, {
tick: 887,
type: 'kick'
}, {
tick: 916,
type: 'snare'
}, {
tick: 944,
type: 'kick'
}, {
tick: 974,
type: 'snare'
}, {
tick: 1005,
type: 'kick'
}, {
tick: 1033,
type: 'snare'
}, {
tick: 1061,
type: 'kick'
}, {
tick: 1089,
type: 'snare'
}, {
tick: 1117,
type: 'kick'
}, {
tick: 1146,
type: 'snare'
}, {
tick: 1176,
type: 'kick'
}, {
tick: 1204,
type: 'snare'
}, {
tick: 1233,
type: 'kick'
}, {
tick: 1262,
type: 'snare'
}, {
tick: 1291,
type: 'kick'
}, {
tick: 1319,
type: 'snare'
}, {
tick: 1348,
type: 'kick'
}, {
tick: 1379,
type: 'snare'
}, {
tick: 1407,
type: 'kick'
}, {
tick: 1435,
type: 'snare'
}, {
tick: 1466,
type: 'kick'
}, {
tick: 1493,
type: 'snare'
}, {
tick: 1522,
type: 'kick'
}, {
tick: 1551,
type: 'snare'
}, {
tick: 1580,
type: 'kick'
}, {
tick: 1606,
type: 'snare'
}, {
tick: 1635,
type: 'kick'
}, {
tick: 1662,
type: 'snare'
}, {
tick: 1693,
type: 'kick'
}, {
tick: 1722,
type: 'snare'
}, {
tick: 1744,
type: 'kick'
}, {
tick: 1749,
type: 'kick'
}, {
tick: 1764,
type: 'kick'
}, {
tick: 1779,
type: 'snare'
}, {
tick: 1809,
type: 'kick'
}, {
tick: 1840,
type: 'snare'
}, {
tick: 1868,
type: 'kick'
}, {
tick: 1896,
type: 'snare'
}, {
tick: 1924,
type: 'kick'
}, {
tick: 1954,
type: 'snare'
}, {
tick: 1981,
type: 'kick'
}, {
tick: 2007,
type: 'snare'
}, {
tick: 2039,
type: 'kick'
}, {
tick: 2069,
type: 'snare'
}, {
tick: 2100,
type: 'kick'
}, {
tick: 2126,
type: 'snare'
}, {
tick: 2154,
type: 'kick'
}, {
tick: 2183,
type: 'snare'
}, {
tick: 2209,
type: 'kick'
}, {
tick: 2239,
type: 'snare'
}, {
tick: 2270,
type: 'kick'
}, {
tick: 2303,
type: 'snare'
}, {
tick: 2327,
type: 'kick'
}, {
tick: 2355,
type: 'snare'
}, {
tick: 2384,
type: 'kick'
}, {
tick: 2412,
type: 'snare'
}, {
tick: 2434,
type: 'kick'
}, {
tick: 2441,
type: 'kick'
}, {
tick: 2454,
type: 'kick'
}, {
tick: 2467,
type: 'snare'
}, {
tick: 2496,
type: 'kick'
}, {
tick: 2527,
type: 'snare'
}, {
tick: 2554,
type: 'kick'
}, {
tick: 2584,
type: 'snare'
}, {
tick: 2611,
type: 'kick'
}, {
tick: 2639,
type: 'snare'
}, {
tick: 2660,
type: 'kick'
}, {
tick: 2667,
type: 'kick'
}, {
tick: 2682,
type: 'kick'
}, {
tick: 2697,
type: 'snare'
}, {
tick: 2728,
type: 'kick'
}, {
tick: 2758,
type: 'snare'
}, {
tick: 2783,
type: 'kick'
}, {
tick: 2814,
type: 'snare'
}, {
tick: 2842,
type: 'kick'
}, {
tick: 2871,
type: 'snare'
}, {
tick: 2901,
type: 'kick'
}, {
tick: 2932,
type: 'snare'
}, {
tick: 2958,
type: 'kick'
}, {
tick: 2989,
type: 'snare'
}, {
tick: 3015,
type: 'kick'
}, {
tick: 3043,
type: 'snare'
}, {
tick: 3074,
type: 'kick'
}, {
tick: 3102,
type: 'snare'
}, {
tick: 3132,
type: 'kick'
}, {
tick: 3159,
type: 'snare'
}, {
tick: 3191,
type: 'kick'
}, {
tick: 3217,
type: 'snare'
}, {
tick: 3240,
type: 'kick'
}, {
tick: 3246,
type: 'kick'
}, {
tick: 3260,
type: 'kick'
}, {
tick: 3274,
type: 'snare'
}, {
tick: 3302,
type: 'kick'
}, {
tick: 3331,
type: 'snare'
}, {
tick: 3353,
type: 'kick'
}, {
tick: 3360,
type: 'kick'
}, {
tick: 3374,
type: 'kick'
}, {
tick: 3389,
type: 'snare'
}, {
tick: 3420,
type: 'kick'
}, {
tick: 3445,
type: 'snare'
}, {
tick: 3473,
type: 'kick'
}, {
tick: 3491,
type: 'kick'
}, {
tick: 3505,
type: 'snare'
}, {
tick: 3532,
type: 'kick'
}, {
tick: 3562,
type: 'snare'
}, {
tick: 3589,
type: 'kick'
}, {
tick: 3605,
type: 'kick'
}, {
tick: 3620,
type: 'snare'
}, {
tick: 3647,
type: 'kick'
}, {
tick: 3675,
type: 'snare'
}, {
tick: 3704,
type: 'kick'
}, {
tick: 3732,
type: 'snare'
}, {
tick: 3763,
type: 'kick'
}, {
tick: 3791,
type: 'snare'
}, {
tick: 3820,
type: 'kick'
}, {
tick: 3848,
type: 'snare'
}, {
tick: 3877,
type: 'kick'
}, {
tick: 3905,
type: 'snare'
}, {
tick: 3934,
type: 'kick'
}, {
tick: 3963,
type: 'snare'
}, {
tick: 3992,
type: 'kick'
}, {
tick: 4021,
type: 'snare'
}, {
tick: 4042,
type: 'kick'
}, {
tick: 4049,
type: 'kick'
}, {
tick: 4063,
type: 'kick'
}, {
tick: 4077,
type: 'snare'
}, {
tick: 4108,
type: 'kick'
}, {
tick: 4136,
type: 'snare'
}, {
tick: 4166,
type: 'kick'
}, {
tick: 4195,
type: 'snare'
}, {
tick: 4224,
type: 'kick'
}, {
tick: 4253,
type: 'snare'
}, {
tick: 4282,
type: 'kick'
}, {
tick: 4308,
type: 'snare'
}, {
tick: 4338,
type: 'kick'
}, {
tick: 4367,
type: 'snare'
}, {
tick: 4396,
type: 'kick'
}, {
tick: 4424,
type: 'snare'
}, {
tick: 4452,
type: 'kick'
}, {
tick: 4481,
type: 'snare'
}, {
tick: 4503,
type: 'kick'
}, {
tick: 4510,
type: 'kick'
}, {
tick: 4524,
type: 'kick'
}, {
tick: 4538,
type: 'snare'
}, {
tick: 4567,
type: 'kick'
}, {
tick: 4597,
type: 'snare'
}, {
tick: 4624,
type: 'kick'
}, {
tick: 4654,
type: 'snare'
}, {
tick: 4683,
type: 'kick'
}, {
tick: 4711,
type: 'snare'
}, {
tick: 4741,
type: 'kick'
}, {
tick: 4769,
type: 'snare'
}, {
tick: 4797,
type: 'kick'
}, {
tick: 4827,
type: 'snare'
}, {
tick: 4856,
type: 'kick'
}, {
tick: 4884,
type: 'snare'
}, {
tick: 4914,
type: 'kick'
}, {
tick: 4941,
type: 'snare'
}, {
tick: 4962,
type: 'kick'
}, {
tick: 4969,
type: 'kick'
}, {
tick: 4983,
type: 'kick'
}, {
tick: 4996,
type: 'snare'
}, {
tick: 5027,
type: 'kick'
}, {
tick: 5055,
type: 'snare'
}, {
tick: 5079,
type: 'kick'
}, {
tick: 5099,
type: 'kick'
}, {
tick: 5115,
type: 'snare'
}, {
tick: 5143,
type: 'kick'
}, {
tick: 5171,
type: 'snare'
}, {
tick: 5200,
type: 'kick'
}, {
tick: 5229,
type: 'snare'
}, {
tick: 5258,
type: 'kick'
}, {
tick: 5286,
type: 'snare'
}, {
tick: 5314,
type: 'kick'
}, {
tick: 5341,
type: 'snare'
}, {
tick: 5372,
type: 'kick'
}, {
tick: 5399,
type: 'snare'
}, {
tick: 5420,
type: 'kick'
}, {
tick: 5427,
type: 'kick'
}, {
tick: 5442,
type: 'kick'
}, {
tick: 5457,
type: 'snare'
}, {
tick: 5488,
type: 'kick'
}, {
tick: 5517,
type: 'snare'
}, {
tick: 5547,
type: 'kick'
}, {
tick: 5573,
type: 'snare'
}, {
tick: 5602,
type: 'kick'
}, {
tick: 5630,
type: 'snare'
}, {
tick: 5652,
type: 'kick'
}, {
tick: 5658,
type: 'kick'
}, {
tick: 5674,
type: 'kick'
}, {
tick: 5689,
type: 'snare'
}, {
tick: 5718,
type: 'kick'
}, {
tick: 5747,
type: 'snare'
}, {
tick: 5769,
type: 'kick'
}, {
tick: 5775,
type: 'kick'
}, {
tick: 5789,
type: 'kick'
}, {
tick: 5804,
type: 'snare'
}, {
tick: 5833,
type: 'kick'
}, {
tick: 5861,
type: 'snare'
}, {
tick: 5885,
type: 'kick'
}, {
tick: 5904,
type: 'kick'
}, {
tick: 5918,
type: 'snare'
}, {
tick: 5945,
type: 'kick'
}, {
tick: 5974,
type: 'snare'
}, {
tick: 5995,
type: 'kick'
}, {
tick: 6002,
type: 'kick'
}, {
tick: 6018,
type: 'kick'
}, {
tick: 6033,
type: 'snare'
}, {
tick: 6062,
type: 'kick'
}, {
tick: 6089,
type: 'snare'
}, {
tick: 6110,
type: 'kick'
}, {
tick: 6117,
type: 'kick'
}, {
tick: 6132,
type: 'kick'
}, {
tick: 6147,
type: 'snare'
}, {
tick: 6176,
type: 'kick'
}, {
tick: 6206,
type: 'snare'
}, {
tick: 6228,
type: 'kick'
}, {
tick: 6235,
type: 'kick'
}, {
tick: 6250,
type: 'kick'
}, {
tick: 6264,
type: 'snare'
}, {
tick: 6289,
type: 'kick'
}, {
tick: 6320,
type: 'snare'
}, {
tick: 6344,
type: 'kick'
}, {
tick: 6365,
type: 'kick'
}, {
tick: 6380,
type: 'snare'
}, {
tick: 6408,
type: 'kick'
}, {
tick: 6437,
type: 'snare'
}, {
tick: 6465,
type: 'kick'
}, {
tick: 6494,
type: 'snare'
}, {
tick: 6521,
type: 'kick'
}, {
tick: 6551,
type: 'snare'
}, {
tick: 6576,
type: 'kick'
}, {
tick: 6583,
type: 'kick'
}, {
tick: 6596,
type: 'kick'
}, {
tick: 6610,
type: 'snare'
}, {
tick: 6637,
type: 'kick'
}, {
tick: 6665,
type: 'snare'
}, {
tick: 6686,
type: 'kick'
}, {
tick: 6692,
type: 'kick'
}, {
tick: 6708,
type: 'kick'
}, {
tick: 6724,
type: 'snare'
}, {
tick: 6752,
type: 'kick'
}, {
tick: 6779,
type: 'snare'
}, {
tick: 6803,
type: 'kick'
}, {
tick: 6809,
type: 'kick'
}, {
tick: 6824,
type: 'kick'
}, {
tick: 6839,
type: 'snare'
}, {
tick: 6866,
type: 'kick'
}, {
tick: 6895,
type: 'snare'
}, {
tick: 6924,
type: 'kick'
}, {
tick: 6950,
type: 'snare'
}, {
tick: 6979,
type: 'kick'
}, {
tick: 7010,
type: 'snare'
}, {
tick: 7038,
type: 'kick'
}, {
tick: 7067,
type: 'snare'
}, {
tick: 7095,
type: 'kick'
}, {
tick: 7126,
type: 'snare'
}, {
tick: 7154,
type: 'kick'
}, {
tick: 7172,
type: 'kick'
}, {
tick: 7185,
type: 'snare'
}, {
tick: 7213,
type: 'kick'
}, {
tick: 7239,
type: 'snare'
}, {
tick: 7264,
type: 'kick'
}, {
tick: 7282,
type: 'kick'
}, {
tick: 7287,
type: 'kick'
}, {
tick: 7307,
type: 'snare'
}, {
tick: 7360,
type: 'snare'
}, {
tick: 7411,
type: 'snare'
}, {
tick: 7442,
type: 'kick'
}, {
tick: 7468,
type: 'snare'
}, {
tick: 7492,
type: 'kick'
}, {
tick: 7509,
type: 'kick'
}, {
tick: 7517,
type: 'kick'
}, {
tick: 7528,
type: 'snare'
}, {
tick: 7555,
type: 'kick'
}, {
tick: 7582,
type: 'snare'
}, {
tick: 7605,
type: 'kick'
}, {
tick: 7623,
type: 'kick'
}, {
tick: 7631,
type: 'kick'
}, {
tick: 7643,
type: 'snare'
}, {
tick: 7671,
type: 'kick'
}, {
tick: 7700,
type: 'snare'
}, {
tick: 7724,
type: 'kick'
}, {
tick: 7740,
type: 'kick'
}, {
tick: 7746,
type: 'kick'
}, {
tick: 7758,
type: 'snare'
}]
}, {
name: "Level 3",
music: "MasterofUpit",
notes: [
// Example: simple pattern for demo, replace with real notes for level 3
{
tick: 0,
type: 'hihat'
}, {
tick: 20,
type: 'kick'
}, {
tick: 40,
type: 'snare'
}, {
tick: 60,
type: 'tom1'
}, {
tick: 80,
type: 'crash1'
}, {
tick: 100,
type: 'kick'
}, {
tick: 120,
type: 'snare'
}, {
tick: 140,
type: 'hihat'
}]
}];
// Current level index and songNotes reference
var currentLevelIndex = 0;
var songNotes = LEVELS[0].notes;
var currentMusic = LEVELS[0].music;
// --- Intro Screen UI ---
var introContainer = new Container();
introContainer.x = 0;
introContainer.y = 0;
introContainer.visible = true;
LK.gui.center.addChild(introContainer);
// Background
var introBg = LK.getAsset('introBg', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0,
width: LK.gui.center.width,
height: LK.gui.center.height
});
introContainer.addChild(introBg);
// Center column layout for intro
var introColumn = new Container();
introColumn.x = LK.gui.center.width / 2;
introColumn.y = LK.gui.center.height / 2;
introContainer.addChild(introColumn);
// Logos - create all three and set up alternating
var introLogo1 = LK.getAsset('introLogo', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 0,
scaleX: 0.6,
scaleY: 0.6
});
var introLogo2 = LK.getAsset('introLogo2', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 0,
scaleX: 0.6,
scaleY: 0.6
});
var introLogo3 = LK.getAsset('introLogo3', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 0,
scaleX: 0.6,
scaleY: 0.6
});
// Start with only first logo visible
introLogo2.visible = false;
introLogo3.visible = false;
introColumn.addChild(introLogo1);
introColumn.addChild(introLogo2);
introColumn.addChild(introLogo3);
// Set up alternating timer with cycling through all three logos
var currentLogoIndex = 0;
var logoSwitchTimer = LK.setInterval(function () {
if (introContainer.visible) {
// Hide all logos
introLogo1.visible = false;
introLogo2.visible = false;
introLogo3.visible = false;
// Show next logo in sequence
currentLogoIndex = (currentLogoIndex + 1) % 3;
if (currentLogoIndex === 0) {
introLogo1.visible = true;
} else if (currentLogoIndex === 1) {
introLogo2.visible = true;
} else {
introLogo3.visible = true;
}
}
}, 350); // Switch every 350ms
// Play Button (moved to top)
var playBtn = new Text2("Play", {
size: 120,
fill: "#fff",
font: "Impact"
});
playBtn.anchor.set(0.5, 0.5);
playBtn.x = 0;
playBtn.y = -LK.gui.center.height / 2 + 150 - 500;
// Title Text
var introTitle = new Text2("NOT QUITE MY TEMPO!!", {
size: 140,
fill: "#fff",
font: "Impact"
});
introTitle.anchor.set(0.5, 0.5);
introTitle.x = 0;
introTitle.y = introLogo1.y + introLogo1.height / 2 + 100 - 200;
introColumn.addChild(introTitle);
playBtn.interactive = true;
playBtn.buttonMode = true;
playBtn.bg = LK.getAsset('playButton', {
anchorX: 0.5,
anchorY: 0.5,
x: playBtn.x,
y: playBtn.y,
width: 600,
height: 180
});
introColumn.addChild(playBtn.bg);
introColumn.addChild(playBtn);
playBtn.down = function () {
introContainer.visible = false;
levelSelectContainer.visible = true;
// Stop tip cycling when leaving intro
if (tipDisplayTimer) {
LK.clearInterval(tipDisplayTimer);
}
};
// --- Level Selection UI ---
var levelSelectContainer = new Container();
levelSelectContainer.x = 0;
levelSelectContainer.y = 0;
levelSelectContainer.visible = false;
LK.gui.center.addChild(levelSelectContainer);
// Place the column at 30px from left, and vertically at 30px from the top (move further up by 20cm ≈ 720px)
var levelSelectColumn = new Container();
// Move further up: 20cm ≈ 720px, so y = 30 - 720 = -690
levelSelectColumn.x = 30;
levelSelectColumn.y = -690;
levelSelectContainer.addChild(levelSelectColumn);
// Title
var levelSelectTitle = new Text2("Choose Level", {
size: 120,
fill: "#fff"
});
levelSelectTitle.anchor.set(0.5, 0.5);
levelSelectTitle.x = 0;
levelSelectTitle.y = 0;
levelSelectColumn.addChild(levelSelectTitle);
// Level buttons, stacked vertically, centered below the title
var levelButtons = [];
var levelBtnSpacing = 220;
var firstBtnY = levelSelectTitle.y + 180;
for (var i = 0; i < LEVELS.length; i++) {
(function (idx) {
// Button background for touch area
var btnBg = LK.getAsset('levelButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: firstBtnY + idx * levelBtnSpacing,
width: 1000,
height: 200
});
// Button text
var btn = new Text2(LEVELS[idx].name, {
size: 100,
fill: "#fff",
font: "Impact"
});
btn.anchor.set(0.5, 0.5);
btn.x = 0;
btn.y = firstBtnY + idx * levelBtnSpacing;
btn.interactive = true;
btn.buttonMode = true;
btn.down = function () {
selectLevel(idx);
};
levelSelectColumn.addChild(btnBg);
levelSelectColumn.addChild(btn);
levelButtons.push(btn);
})(i);
}
// --- Recording UI and Logic ---
var recordTxt = new Text2('KAYIT: KAPALI', {
size: 70,
fill: 0xFF6666
});
recordTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(recordTxt);
recordTxt.x = LK.gui.top.width / 2;
recordTxt.y = 220;
// Hide gameplay UI until level is selected
scoreTxt.visible = false;
comboTxt.visible = false;
recordTxt.visible = false;
// Level selection handler
function selectLevel(idx) {
currentLevelIndex = idx;
songNotes = LEVELS[idx].notes;
currentMusic = LEVELS[idx].music;
levelSelectContainer.visible = false;
scoreTxt.visible = true;
comboTxt.visible = true;
recordTxt.visible = true;
if (typeof TEST_MODE !== "undefined" && TEST_MODE) {
// Update songTotalTicks for timeline
songTotalTicks = songNotes.length > 0 ? songNotes[songNotes.length - 1].tick : 1;
}
startGame(); // Start the game after selecting a level
}
var isRecording = false;
var recordedNotes = [];
var recordStartTick = 0;
// Toggle recording on tap of recordTxt
recordTxt.interactive = true;
recordTxt.buttonMode = true;
recordTxt.down = function () {
if (!isRecording) {
// Start recording
isRecording = true;
recordedNotes = [];
recordStartTick = LK.ticks;
recordTxt.setText('KAYIT: AÇIK');
comboTxt.setText('KAYIT MODU');
} else {
// Stop recording and save as new level
isRecording = false;
recordTxt.setText('KAYIT: KAPALI');
comboTxt.setText('');
// Convert recordedNotes to songNotes format
if (recordedNotes.length > 0) {
// Normalize ticks to start at 0
var minTick = recordedNotes.length > 0 ? recordedNotes[0].tick : 0;
for (var i = 0; i < recordedNotes.length; i++) {
recordedNotes[i].tick -= minTick;
}
songNotes = [];
for (var i = 0; i < recordedNotes.length; i++) {
songNotes.push({
tick: recordedNotes[i].tick,
type: recordedNotes[i].type
});
}
// Print recorded notes as code in the console
var codeStr = "var songNotes = [\n";
for (var i = 0; i < recordedNotes.length; i++) {
codeStr += " { tick: " + recordedNotes[i].tick + ", type: '" + recordedNotes[i].type + "' },\n";
}
codeStr += "];";
console.log(codeStr);
// Restart game with new level
startGame();
}
}
};
LK.gui.top.addChild(recordTxt);
// --- Record pad hits if in recording mode ---
function recordPadHit(padType) {
if (isRecording) {
var tick = LK.ticks - recordStartTick;
recordedNotes.push({
tick: tick,
type: padType
});
}
}
// --- Create Drum Pads ---
for (var i = 0; i < PAD_COLS; i++) {
var pad = new DrumPad();
pad.setPadType(PAD_TYPES[i]);
pad.x = PAD_X_POSITIONS[PAD_TYPES[i]];
pad.y = PAD_Y;
pad.padIndex = i;
pads.push(pad);
game.addChild(pad);
}
// --- Pad Touch Handling ---
var activePad = null;
function getPadAt(x, y) {
for (var i = 0; i < pads.length; i++) {
var pad = pads[i];
var dx = x - pad.x,
dy = y - pad.y;
var rx = pad.asset.width / 2,
ry = pad.asset.height / 2;
if (dx * dx / (rx * rx) + dy * dy / (ry * ry) <= 1) {
return pad;
}
}
return null;
}
game.down = function (x, y, obj) {
var pad = getPadAt(x, y);
if (pad) {
activePad = pad;
handlePadHit(pad);
}
};
game.move = function (x, y, obj) {
// For multi-touch, could be extended
};
game.up = function (x, y, obj) {
activePad = null;
};
// --- Note Spawning ---
function spawnNote(type) {
var note = new Note();
note.setNoteType(type);
note.x = PAD_X_POSITIONS[type];
note.y = NOTE_START_Y;
note.noteType = type;
note.hit = false;
notes.push(note);
game.addChild(note);
}
// --- Pad Hit Logic ---
function handlePadHit(pad) {
// Play sound
var soundId = pad.padType + 'Sound';
var sound = LK.getSound(soundId);
if (sound) {
if (sound.stop) {
sound.stop();
} // Stop if already playing to avoid overlap/delay
sound.play();
}
// Record pad hit if in recording mode
recordPadHit(pad.padType);
// Visual feedback
pad.flash();
// Allow even earlier and later hits by expanding the hit windows further
var HIT_WINDOW_EARLY = HIT_WINDOW * 2.2; // allow 120% earlier
var HIT_WINDOW_LATE = HIT_WINDOW * 2.5; // allow 150% later - more tolerance for late hits
// Find closest note of this type in expanded hit window
var bestNote = null,
bestDist = HIT_WINDOW_LATE;
for (var i = 0; i < notes.length; i++) {
var note = notes[i];
if (note.hit) {
continue;
}
if (note.noteType !== pad.padType) {
continue;
}
var dist = Math.abs(note.y - NOTE_TARGET_Y);
// Accept if note is within early or late window
if (note.y >= NOTE_TARGET_Y - HIT_WINDOW_EARLY && note.y <= NOTE_TARGET_Y + HIT_WINDOW_LATE && dist < bestDist) {
bestDist = dist;
bestNote = note;
}
}
if (bestNote) {
// Hit!
bestNote.hit = true;
LK.effects.flashObject(bestNote, 0xffffff, 120);
tween(bestNote, {
alpha: 0
}, {
duration: 120,
onFinish: function onFinish() {
bestNote.destroy();
}
});
notes.splice(notes.indexOf(bestNote), 1);
score += 100;
combo += 1;
if (combo > maxCombo) {
maxCombo = combo;
}
scoreTxt.setText(score);
comboTxt.setText(combo > 1 ? combo + 'x' : '');
// Reset consecutiveMisses on successful hit
if (typeof consecutiveMisses !== "undefined") {
consecutiveMisses = 0;
}
// --- HEALTH BAR: Increase health by (1 * combo), clamp to maxHealth ---
if (typeof health !== "undefined") {
var addHealth = 1 * (combo > 0 ? combo : 1);
health += addHealth;
if (health > maxHealth) {
health = maxHealth;
}
// Update health bar UI
if (healthBarFg) {
healthBarFg.width = health / maxHealth * healthBarBg.width;
}
}
} else {
// Miss!
LK.effects.flashScreen(0xff0000, 200);
// Track consecutive misses for combo reset
if (typeof consecutiveMisses === "undefined") {
consecutiveMisses = 0;
}
consecutiveMisses += 1;
if (consecutiveMisses >= 2) {
combo = 0;
comboTxt.setText('');
consecutiveMisses = 0;
}
// --- HEALTH BAR: Decrease health by 2 (or more if many consecutive misses), clamp to 0 ---
if (typeof health !== "undefined") {
var missPenalty = 2;
if (consecutiveMisses >= 3) {
// For every group of 3 consecutive misses, double the penalty
missPenalty = 2 * Math.pow(2, Math.floor(consecutiveMisses / 3));
}
health -= missPenalty;
if (health < 0) {
health = 0;
}
if (healthBarFg) {
healthBarFg.width = health / maxHealth * healthBarBg.width;
}
}
}
}
// --- Game Update ---
game.update = function () {
if (!isPlaying) {
return;
}
// If recording, do not spawn notes, do not check for misses, do not end game
if (isRecording) {
// Allow player to play freely, but do not process notes
return;
}
// --- FAIL CHECK: If health is 0, fail the level and return to menu ---
if (typeof health !== "undefined" && health <= 0 && isPlaying) {
isPlaying = false;
LK.stopMusic();
// Show "Failed" text in the center of the screen
var failedTxt = new Text2("FAILED", {
size: 220,
fill: 0xFF4444
});
failedTxt.anchor.set(0.5, 0.5);
failedTxt.x = GAME_W / 2;
failedTxt.y = GAME_H / 2;
game.addChild(failedTxt);
// Hide gameplay UI
scoreTxt.visible = false;
comboTxt.visible = false;
recordTxt.visible = false;
if (healthBarContainer && healthBarContainer.parent) {
healthBarContainer.parent.removeChild(healthBarContainer);
}
// After 1.2s, remove failed text and return to intro screen
LK.setTimeout(function () {
if (failedTxt && failedTxt.parent) {
failedTxt.parent.removeChild(failedTxt);
}
levelSelectContainer.visible = false;
introContainer.visible = true;
}, 1200);
return;
}
// Spawn notes according to songNotes, with NOTE_OFFSET_TICKS for sync
var relTick = LK.ticks - songStartTick;
while (noteIndex < songNotes.length && songNotes[noteIndex].tick <= relTick + NOTE_OFFSET_TICKS) {
spawnNote(songNotes[noteIndex].type);
noteIndex++;
}
// Update notes, check for misses
for (var i = notes.length - 1; i >= 0; i--) {
var note = notes[i];
note.update();
if (!note.hit && note.y > NOTE_TARGET_Y + HIT_WINDOW * 2.5) {
// Missed note
LK.effects.flashObject(note, 0xff0000, 120);
tween(note, {
alpha: 0
}, {
duration: 120,
onFinish: function onFinish() {
note.destroy();
}
});
notes.splice(i, 1);
// Track consecutive misses for combo reset in update loop
if (typeof consecutiveMisses === "undefined") {
consecutiveMisses = 0;
}
consecutiveMisses += 1;
if (consecutiveMisses >= 2) {
combo = 0;
comboTxt.setText('');
consecutiveMisses = 0;
}
// --- HEALTH BAR: Decrease health by 2 (or more if many consecutive misses), clamp to 0 ---
if (typeof health !== "undefined") {
var missPenalty = 2;
if (consecutiveMisses >= 3) {
// For every group of 3 consecutive misses, double the penalty
missPenalty = 2 * Math.pow(2, Math.floor(consecutiveMisses / 3));
}
health -= missPenalty;
if (health < 0) {
health = 0;
}
if (healthBarFg) {
healthBarFg.width = health / maxHealth * healthBarBg.width;
}
}
}
// Remove notes that go off screen
if (note.y > GAME_H + 100) {
if (notes.indexOf(note) !== -1) {
notes.splice(notes.indexOf(note), 1);
}
note.destroy();
}
}
// End of song
if (noteIndex >= songNotes.length && notes.length === 0) {
isPlaying = false;
LK.stopMusic();
// Instead of showing win popup, return to intro screen
levelSelectContainer.visible = false;
scoreTxt.visible = false;
comboTxt.visible = false;
recordTxt.visible = false;
if (healthBarContainer && healthBarContainer.parent) {
healthBarContainer.parent.removeChild(healthBarContainer);
}
introContainer.visible = true;
}
};
// --- Start Game ---
function startGame() {
score = 0;
combo = 0;
maxCombo = 0;
scoreTxt.setText('0');
comboTxt.setText('');
notes = [];
noteIndex = 0;
isPlaying = true;
songStartTick = LK.ticks;
consecutiveMisses = 0;
// Hide tips during gameplay
if (tipsContainer) {
tipsContainer.visible = false;
}
// --- Health Bar Setup ---
health = 150;
maxHealth = 150;
// Remove previous health bar if exists
if (healthBarContainer && healthBarContainer.parent) {
healthBarContainer.parent.removeChild(healthBarContainer);
}
healthBarContainer = new Container();
var barW = 900,
barH = 60;
// Use visual assets for health bar
healthBarBg = LK.getAsset('healthBarBg', {
anchorX: 0.5,
anchorY: 0.5,
width: barW,
height: barH
});
healthBarFg = LK.getAsset('healthBarFg', {
anchorX: 0.5,
anchorY: 0.5,
width: barW,
height: barH
});
healthBarContainer.addChild(healthBarBg);
healthBarContainer.addChild(healthBarFg);
// Place at bottom center, above pads
healthBarContainer.x = GAME_W / 2;
healthBarContainer.y = GAME_H - 80;
game.addChild(healthBarContainer);
// Preload all drum sounds to reduce latency
var preloadSounds = ['kickSound', 'snareSound', 'hihatSound', 'tom1Sound', 'crash1Sound'];
for (var i = 0; i < preloadSounds.length; i++) {
var s = LK.getSound(preloadSounds[i]);
if (s && s.play) {
// Play at zero volume to warm up, then stop immediately
s.volume = 0;
s.play();
if (s.stop) {
s.stop();
}
s.volume = 1;
}
}
// Preload music to reduce latency
var preloadMusic = LK.getMusic ? LK.getMusic('MasterofUpit') : null;
if (preloadMusic && preloadMusic.play) {
preloadMusic.volume = 0;
preloadMusic.play();
if (preloadMusic.stop) {
preloadMusic.stop();
}
preloadMusic.volume = 1;
}
// Stop any currently playing music to ensure clean start
LK.stopMusic();
// Play selected level's music with no fade, no loop, and start at full volume for best sync
LK.playMusic(currentMusic, {
loop: false,
fade: {
start: 1,
end: 1,
duration: 0
}
});
}
// --- Game Over Handling (missed notes or end of song) ---
// Handled by LK.showYouWin() or LK.showGameOver() as needed
// --- Responsive UI (center score) ---
scoreTxt.x = LK.gui.top.width / 2;
comboTxt.x = LK.gui.top.width / 2;
// --- Tips Section ---
var tipsContainer = new Container();
tipsContainer.x = 0;
tipsContainer.y = PAD_Y + 150; // Position below drum pads
game.addChild(tipsContainer);
// Tips text array
var tips = ["You can creatively jam as you wish on the home screen.", "Keep a consistent beat to increase the combo!", "I wrote the notes myself, they are not all perfect :P", "Still in development.", "I love Upit!", "Recommended to play on mobile device.", "S.a A.s", "I have no idea about software or coding", "Cat GBT is my best friend"];
var tipText = new Text2(tips[0], {
size: 45,
fill: "#fff"
});
tipText.anchor.set(0.5, 0.5);
tipText.x = GAME_W / 2;
tipText.y = 0;
tipsContainer.addChild(tipText);
// Current tip index and animation state
var currentTipIndex = 0;
var tipAnimationTimer = null;
var tipDisplayTimer = null;
// Function to show next tip with sliding animation
function showNextTip() {
var nextTipIndex = (currentTipIndex + 1) % tips.length;
// Slide out current tip to the left
tween(tipText, {
x: -GAME_W
}, {
duration: 800,
easing: tween.easeInOut,
onFinish: function onFinish() {
// Change text and position off-screen right
tipText.setText(tips[nextTipIndex]);
tipText.x = GAME_W * 1.5;
// Slide in new tip from the right
tween(tipText, {
x: GAME_W / 2
}, {
duration: 800,
easing: tween.easeInOut
});
currentTipIndex = nextTipIndex;
}
});
}
// Start the cycling animation only when intro screen is visible
function startTipCycling() {
if (tipDisplayTimer) {
LK.clearInterval(tipDisplayTimer);
}
tipDisplayTimer = LK.setInterval(function () {
if (introContainer.visible && !levelSelectContainer.visible) {
showNextTip();
}
}, 3000); // Change tip every 3 seconds
}
// Hide tips container when not on intro screen
function updateTipsVisibility() {
tipsContainer.visible = introContainer.visible && !levelSelectContainer.visible;
}
// Start tip cycling
startTipCycling();
// --- TEST MODE: Show timeline and tick counter for sync debugging ---
var TEST_MODE = true; // Set to true to enable timeline and tick counter
var timelineBar = null;
var tickCounterTxt = null;
if (TEST_MODE) {
// Timeline bar (shows song progress)
timelineBar = new Container();
var barBg = LK.getAsset('crash1Pad', {
anchorX: 0,
anchorY: 0,
width: LK.gui.top.width - 200,
height: 24
});
barBg.alpha = 0.18;
timelineBar.addChild(barBg);
var barFg = LK.getAsset('hihatPad', {
anchorX: 0,
anchorY: 0,
width: 0,
height: 24
});
barFg.alpha = 0.7;
timelineBar.addChild(barFg);
timelineBar.x = 100;
timelineBar.y = LK.gui.top.height - 60;
LK.gui.top.addChild(timelineBar);
// Tick counter
tickCounterTxt = new Text2('Tick: 0', {
size: 48,
fill: "#fff"
});
tickCounterTxt.anchor.set(0, 0.5);
tickCounterTxt.x = 100;
tickCounterTxt.y = LK.gui.top.height - 100;
LK.gui.top.addChild(tickCounterTxt);
// Update timeline and tick counter every frame
var lastTimelineUpdateTick = -1;
var songTotalTicks = songNotes.length > 0 ? songNotes[songNotes.length - 1].tick : 1;
game.update = function (origUpdate) {
return function () {
if (origUpdate) {
origUpdate.apply(this, arguments);
}
if (isPlaying && TEST_MODE) {
// Update songTotalTicks in case level changed
songTotalTicks = songNotes.length > 0 ? songNotes[songNotes.length - 1].tick : 1;
var relTick = LK.ticks - songStartTick;
// Timeline bar
var progress = Math.min(1, (relTick + NOTE_OFFSET_TICKS) / songTotalTicks);
barFg.width = (LK.gui.top.width - 200) * progress;
// Tick counter
tickCounterTxt.setText('Tick: ' + relTick);
}
// Update tips visibility
updateTipsVisibility();
};
}(game.update);
}
birebir aynısı sadece SNARE yerine TOM yazsın ve butonunun rengi yeşil olsun. ve yazı paralel bir şekilde düz hizada olsun Transparent background. Blank background.
butonun altını gri yap ve yazıyı birazcık daha büyült
birebir aynısı sadece HI_HAT yerine CRASH yazsın ve butonunun rengi açık mor lila olsun. Transparent background. Blank background.
ortadaki ışıktan yukarı doğru hafif soluk ısık hüzmeleri çıksın
mavi versiyonunu yap
yeşil versiyonunu yap
sarı versiyonunu yap
lil rengi versiyonunu yap
make hand signs smaller but more crowded lightly blended into the background flu
transparent blank background
he is holding drumstick
make the next frame when he is hitting the drums while grin smile with one's teeth showing, his hands are down and drumstick are on the drums
add drum sticks held on both sides
no perspective all parralel lines from birdswiew
Game title text