コード例 #1
0
    def scale_big_clock(note):
        scale = float(findsetting("ScaleFactor")) if isfloat(
            findsetting("ScaleFactor")) else 1

        if Hitsound(note.hs).isfinish():
            return " S,0,{},,{}\n".format(note.t, 0.25 * scale)
        else:
            return " S,0,{},,{}\n".format(note.t, 0.175 * scale)
コード例 #2
0
    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
コード例 #3
0
    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
コード例 #4
0
    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
コード例 #5
0
    def overlay_clock(note, color):
        scale = float(findsetting("ScaleFactor")) if isfloat(
            findsetting("ScaleFactor")) else 1

        if Hitsound(note.hs).isfinish():
            return "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format("bigcirc_inv" if color == 8 else
                                                                          "taikobigcircleoverlay" if findsetting(
                                                                              "UseSkinElements")
                                                                          else "SB/notebig-overlay") \
                   + " S,0,{},,{}\n".format(note.t, 0.25 * scale)
        else:
            return "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format("hitcirc_inv" if color == 8 else
                                                                          "taikohitcircleoverlay" if findsetting(
                                                                              "UseSkinElements")
                                                                          else "SB/note-overlay") \
                   + " S,0,{},,{}\n".format(note.t, 0.175 * scale)
コード例 #6
0
 def tan_scale(note, freq, bpm):
     scale = float(findsetting("ScaleFactor")) if isfloat(
         findsetting("ScaleFactor")) else 1
     size = 0.50 if Hitsound(note.hs).isfinish() else 0.35
     period = 4. / freq
     scale_str = ""
     for x in range(freq, 0, -1):
         scale_str += " S,15,{},{},{},{}\n".format(
             int(note.t - 60000 / bpm * (x - 0.0) * period),
             int(note.t - 60000 / bpm * (x - 0.5) * period), size * scale,
             10 * size * scale)
         scale_str += " S,16,{},{},{},{}\n".format(
             int(note.t - 60000 / bpm * (x - 0.5) * period),
             int(note.t - 60000 / bpm * (x - 1.0) * period), 0,
             size * scale)
     return scale_str
コード例 #7
0
    def make_sb(self):
        r_string = ""
        strnc = str(len(self.notes))
        notes2 = list(reversed(self.notes))
        ln = len(strnc)

        for z in range(ln, 0, -1):
            n_placement = float(z * 2 - ln - 1) / 2
            x_pos = self.counter_x() - (n_placement * self.spacing())
            r_string += "Sprite,Foreground,Centre,\"{}{}.png\",320,240\n".format(
                "score-" if findsetting("UseSkinElements") else "SB/numbers/val_", strnc[-z])
            r_string += " M,0,{},{},{},{}\n".format(notes2[-1].t,
                                                    notes2[len(notes2) - len(self.notes) % (10 ** (z - 1)) - 1].t,
                                                    int(x_pos),
                                                    findsetting("Receptor_Y"))
            r_string += " S,0,{},{},{}\n".format(notes2[-1].t,
                                                 notes2[len(notes2) - len(self.notes) % (10 ** (z - 1)) - 1].t,
                                                 0.5 * self.scale())
            if self.is_upside_down:
                r_string += " P,0,{},,V\n".format(notes2[-1].t)
            if self.is_mirror:
                r_string += " P,0,{},,H\n".format(notes2[-1].t)

        for i in range(len(self.notes) - 1, 0, -1):
            nnext = notes2[i]
            lc = len(str(i))

            for z in range(lc, 0, -1):
                n_placement = float(z * 2 - lc - 1) / 2
                x_pos = self.counter_x() - (n_placement * self.spacing())
                if z == 1:
                    r_string += "Sprite,Foreground,Centre,\"{}{}.png\",320,240\n".format(
                        "score-" if findsetting("UseSkinElements") else "SB/numbers/val_", str(i)[-z])
                    r_string += " M,0,{0},{1},{2},{3}\n".format(nnext.t,
                                                                notes2[i - 1].t,
                                                                int(x_pos),
                                                                findsetting("Receptor_Y"))
                    r_string += " S,0,{0},{1},{2}\n".format(nnext.t,
                                                            notes2[i - 1].t,
                                                            0.5 * self.scale())
                if ((i + 1) % 10 ** (z - 1)) == 0 and z > 1:
                    r_string += "Sprite,Foreground,Centre,\"{}{}.png\",320,240\n".format(
                        "score-" if findsetting("UseSkinElements") else "SB/numbers/val_", str(i)[-z])
                    r_string += " M,0,{0},{1},{2},{3}\n".format(nnext.t,
                                                                notes2[i - 10 ** (z - 1)].t,
                                                                int(x_pos),
                                                                findsetting("Receptor_Y"))
                    r_string += " S,0,{0},{1},{2}\n".format(nnext.t,
                                                            notes2[i - 10 ** (z - 1)].t,
                                                            0.5 * self.scale())
                if self.is_upside_down:
                    r_string += " P,0,{},,V\n".format(nnext.t)
                if self.is_mirror:
                    r_string += " P,0,{},,H\n".format(nnext.t)

        return r_string
コード例 #8
0
ファイル: Clock.py プロジェクト: Chiyozel/TaikoStoryboardGen
    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
コード例 #9
0
    def make_sb(self):
        out = ""
        scale = float(findsetting("ScaleFactor")) if isfloat(findsetting("ScaleFactor")) else 1

        # Main Black Bar
        out += "Sprite,Background,Centre,\"{}.png\",320,240\n".format("taiko-bar-right" if findsetting("UseSkinElements") else "SB/black_bar")
        out += " F,0,0,500000,1\n"
        out += " M,0,0,500000,320,{}\n".format(findsetting("Receptor_Y"))
        out += " V,0,0,500000,1,{}\n".format(0.4 * scale)

        # Receptor
        out += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format("approachcircle" if findsetting("UseSkinElements") else "SB/point")
        out += " S,0,0,500000,{}\n".format(0.4 * scale)
        out += " F,0,0,500000,1\n"
        out += " M,0,0,500000,{},{}\n".format(findsetting("Receptor_X"), findsetting("Receptor_Y"))

        # Taiko Left Portion
        out += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format("taiko-bar-left" if findsetting("UseSkinElements") else "SB/taiko_left")
        out += " M,0,0,500000,{},{}\n".format(int(findsetting("CounterCentreLeft")) - 60, findsetting("Receptor_Y"))
        out += " F,0,0,50000,1\n"
        out += " S,0,0,500000,{}\n".format(0.4 * scale)

        return out
コード例 #10
0
 def receptor_x(self):
     return int(findsetting("SplitReceptorX"))
コード例 #11
0
ファイル: Base.py プロジェクト: Chiyozel/TaikoStoryboardGen
 def receptor_y(self):
     return int(findsetting("UpsideDownReceptor_Y")
                ) if self.is_upside_down else int(findsetting("Receptor_Y"))
コード例 #12
0
ファイル: Base.py プロジェクト: Chiyozel/TaikoStoryboardGen
 def receptor_x(self):
     return int(
         findsetting("ReversedReceptor_X")) if self.is_reverse else int(
             findsetting("Receptor_X"))
コード例 #13
0
 def spacing(self):
     return int(findsetting("CounterNumberSpacing")) * self.scale() * (-1 if self.is_mirror else 1)
コード例 #14
0
 def scale(self):
     return float(findsetting("ScaleFactor")) if isfloat(findsetting("ScaleFactor")) else 1
コード例 #15
0
    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
コード例 #16
0
    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
コード例 #17
0
ファイル: Left.py プロジェクト: Chiyozel/TaikoStoryboardGen
 def counter_x(self):
     return int(
         findsetting("CounterCentreRight")) if self.is_reverse else int(
             findsetting("CounterCentreLeft"))