2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ゲーム音楽をバグらせる

Last updated at Posted at 2022-01-04

RTA in japanのドラクエ3みててBGMいいなあと思ったので作れんかなと思った

バグらせる

なんかこの動画を見てたら一つの音階が丸ごとずれてるっぽいなと思ったのでそれをやる


import mido
midi = mido.MidiFile("original.mid")

import random

# いじりどころ
bugtone={}
for i in range(20):
    bugtone[random.randint(10, 80)] = random.randint(1, 4)

for track in midi.tracks:
    for msg in track:
        if hasattr(msg, 'note'):
            if msg.note in bugtone:
                msg.note = msg.note - bugtone[msg.note]

midi.save("bug.mid")

ランダムで適当な音階を選んで適当に音下げてる

聞いてみた

バグってる

音源はYMCKが出してるやつ使った

おしまい

おしまい

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?