def note_to_sb(self, note): r_string = "" tab_times = [] note_in = int(note.t - (60000 / self.bpm * (4 / self.scroll))) playfield_length = int(findsetting("PlayfieldLength")) for i in range(self.begin, self.end, 20): z = [ i, random.randint(self.receptor_y() - self.amp, self.receptor_y() + self.amp) ] tab_times.append(z) tab_times.append([self.end + 20, self.receptor_y()]) """ +------+ | Note | +------+ """ r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format( "taikohitcircle" if findsetting("UseSkinElements") else "SB/note") r_string += " MX,0,{},{},{},{}\n".format( note_in, note.t, self.receptor_x() + playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note) r_string += n_trans(note, self.color, note_in) for i in range(0, len(tab_times) - 1): r_string += " MY,0,{},,{}\n".format(tab_times[i][0], tab_times[i][1]) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) """ +--------------+ | Note Overlay | +--------------+ """ r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color) r_string += n_trans(note, self.color, note_in, True) r_string += " MX,0,{},{},{},{}\n".format( note_in, note.t, self.receptor_x() + playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) for i in range(0, len(tab_times) - 1): r_string += " MY,0,{},,{}\n".format(tab_times[i][0], tab_times[i][1]) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) return r_string
def note_to_sb(self, note): r_string = "" note_in = int(note.t - (60000 / self.bpm * 4)) playfield_length = int(findsetting("PlayfieldLength")) """ +------+ | Note | +------+ """ r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format( "taikohitcircle" if findsetting("UseSkinElements") else "SB/note") r_string += " MY,0,{},,{}\n".format(note_in, self.receptor_y()) if Hitsound(note.hs).iskat() or NoteType(note.note_type).isspinner(): r_string += " MX,0,{},{},{},{}\n".format( note_in, note.t, self.receptor_x() - playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) else: r_string += " MX,0,{},{},{},{}\n".format( note_in, note.t, self.receptor_x() + playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note) r_string += n_trans(note, self.color, note_in) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) """ +--------------+ | Note Overlay | +--------------+ """ r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color) r_string += n_trans(note, self.color, note_in, True) r_string += " MY,0,{},,{}\n".format(note_in, self.receptor_y()) if Hitsound(note.hs).iskat() or NoteType(note.note_type).isspinner(): r_string += " MX,0,{},{},{},{}\n".format( note_in, note.t, self.receptor_x() - playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) else: r_string += " MX,0,{},{},{},{}\n".format( note_in, note.t, self.receptor_x() + playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) return r_string
def note_to_sb(self, note): r_string = "" playfield_length = int(findsetting("PlayfieldLength")) note_in = int(note.t - (60000 / self.bpm * (4 / self.scroll))) """ +------+ | Note | +------+ """ r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format( "taikohitcircle" if findsetting("UseSkinElements") else "SB/note") r_string += " M,0,{},{},{},{},{},{}\n".format(note_in, note.t, int(self.receptor_x() + playfield_length * ( -1 if self.is_reverse else 1) * math.cos( self.angle)), int(self.receptor_y() + playfield_length * ( -1 if self.is_upside_down else 1) * math.sin(self.angle)), self.receptor_x(), self.receptor_y()) r_string += " R,0,{},,{}\n".format(note.t, self.angle) r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note) r_string += n_trans(note, self.color, note_in) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) """ +--------------+ | Note Overlay | +--------------+ """ r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color) r_string += " M,0,{},{},{},{},{},{}\n".format(note_in, note.t, int(self.receptor_x() + playfield_length * ( -1 if self.is_reverse else 1) * math.cos( self.angle)), int(self.receptor_y() + playfield_length * ( -1 if self.is_upside_down else 1) * math.sin(self.angle)), self.receptor_x(), self.receptor_y()) r_string += " R,0,{},,{}\n".format(note.t, self.angle) r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note) r_string += n_trans(note, self.color, note_in, True) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) return r_string
def note_to_sb_clock(self, note, n_in): note_in = n_in.t r_string = "" note_out = int(note_in + (60000 / self.bpm * self.beat_len)) note_beat = (note.t - note_in) / (60000 / self.bpm) if float(note_beat) < (float(self.beat_len) - 0.125): note_y = 360 + self.clock_rad * math.sin( (note_beat / ((-1 if self.is_reverse else 1) * self.beat_len)) * (2 * math.pi) - 0.5 * math.pi) note_x = 320 + self.clock_rad * math.cos( (note_beat / ((-1 if self.is_reverse else 1) * self.beat_len)) * (2 * math.pi) - 0.5 * math.pi) note_x, note_y = int(note_x), int(note_y) """ +------+ | Note | +------+ """ r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format( "taikohitcircle" if findsetting("UseSkinElements" ) else "SB/note") r_string += " MY,0,{},{},{}\n".format(note_in, note_out, note_y) r_string += " MX,0,{},{},{}\n".format(note_in, note_out, note_x) r_string += muma.note_mods.sbUtils.sbUtils.scale_big_clock(note) r_string += n_trans(note, self.color, note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) """ +--------------+ | Note Overlay | +--------------+ """ r_string += muma.note_mods.sbUtils.sbUtils.overlay_clock( note, self.color) r_string += " MY,0,{},{},{}\n".format(note_in, note_out, note_y) r_string += " MX,0,{},{},{}\n".format(note_in, note_out, note_x) r_string += n_trans(note, self.color, note_in, True) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) return r_string
def note_to_sb(self, note): r_string = "" period = 4. / self.freq note_in = int(note.t - (60000 / self.bpm * (4 / self.scroll))) playfield_length = int(findsetting("PlayfieldLength")) l = (playfield_length * 1.) / self.freq """ +------+ | Note | +------+ """ r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format( "taikohitcircle" if findsetting("UseSkinElements") else "SB/note") r_string += " MY,0,{},{},{}\n".format(note_in, note.t, self.receptor_y()) r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note) r_string += n_trans(note, self.color, note_in) for i in range(self.freq, 0, -1): r_string += " MX,{},{},{},{},{}\n".format( self.array_tweens[0], int(note.t - 60000 / self.bpm * (i - 0.0) * period), int(note.t - 60000 / self.bpm * (i - 0.5) * period), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 0.0) * l), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 0.5) * l)) r_string += " MX,{},{},{},{},{}\n".format( self.array_tweens[1], int(note.t - 60000 / self.bpm * (i - 0.5) * period), int(note.t - 60000 / self.bpm * (i - 1.0) * period), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 0.5) * l), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 1.0) * l)) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) """ +--------------+ | Note Overlay | +--------------+ """ r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color) r_string += n_trans(note, self.color, note_in, True) r_string += " MY,0,{},{},{}\n".format(note_in, note.t, self.receptor_y()) for i in range(self.freq, 0, -1): r_string += " MX,{},{},{},{},{}\n".format( self.array_tweens[0], int(note.t - 60000 / self.bpm * (i - 0.0) * period), int(note.t - 60000 / self.bpm * (i - 0.5) * period), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 0.0) * l), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 0.5) * l)) r_string += " MX,{},{},{},{},{}\n".format( self.array_tweens[1], int(note.t - 60000 / self.bpm * (i - 0.5) * period), int(note.t - 60000 / self.bpm * (i - 1.0) * period), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 0.5) * l), self.receptor_x() + (-1 if self.is_reverse else 1) * ((i - 1.0) * l)) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) return r_string
def note_to_sb(self, note): r_string = "" note_in = int(note.t - (60000 / self.bpm * (4 / self.scroll))) period = 4. / self.freq playfield_length = int(findsetting("PlayfieldLength")) """ +------+ | Note | +------+ """ r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format( "taikohitcircle" if findsetting("UseSkinElements") else "SB/note") r_string += " MY,{},{},,{}\n".format(self.tween, note_in, self.receptor_y()) r_string += " MX,{},{},{},{},{}\n".format( self.tween, note_in, note.t, self.receptor_x() + playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) r_string += muma.note_mods.sbUtils.sbUtils.tan_scale( note, self.freq, self.bpm) r_string += n_trans(note, self.color, note_in) for y in range(self.freq, 0, -1): r_string += " F,15,{},{},1\n".format( int(note.t - 60000 / self.bpm * (y - 0.5) * period), int(note.t - 60000 / self.bpm * (y - 1.0) * period)) r_string += " F,16,{},{},1,0\n".format( int(note.t - 60000 / self.bpm * (y - 0.0) * period), int(note.t - 60000 / self.bpm * (y - 0.5) * period)) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) """ +--------------+ | Note Overlay | +--------------+ """ r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color) r_string += muma.note_mods.sbUtils.sbUtils.tan_scale( note, self.freq, self.bpm) r_string += " MY,{},{},,{}\n".format(self.tween, note_in, self.receptor_y()) r_string += " MX,{},{},{},{},{}\n".format( self.tween, note_in, note.t, self.receptor_x() + playfield_length * (-1 if self.is_reverse else 1), self.receptor_x()) r_string += n_trans(note, self.color, note_in, True) for y in range(self.freq, 0, -1): r_string += " F,15,{},{},1\n".format( int(note.t - 60000 / self.bpm * (y - 0.5) * period), int(note.t - 60000 / self.bpm * (y - 1.0) * period)) r_string += " F,16,{},{},1,0\n".format( int(note.t - 60000 / self.bpm * (y - 0.0) * period), int(note.t - 60000 / self.bpm * (y - 0.5) * period)) if self.is_upside_down: r_string += " P,0,{},,V\n".format(note_in) if self.is_mirror: r_string += " P,0,{},,H\n".format(note_in) return r_string