かの有名なあの東方二次創作ソング、「bad apple!」のMVをPythonでやってみたって話

Overview

bad apple!!

bad apple!のスクショ

内容

このプログラムは、bad apple!(feat. nomico)のPVをPythonを用いて再現しよう!という内容です。 実はYoutube並びにGithub上に似たようなプログラムがあったしなんならそっちの方が結構良かったりするんですが、一応公開しますw

使い方

  • このプログラムをダウンロードします。上部の「Code」という緑のボタンから「Download ZIP」を選択、その後解凍します

  • まず、badapple.pyと同じ階層に、badapple.mp3とbadapple.mp4を置きます(既に用意はしてますが、著作権とかの問題があり次第削除します)

  • badapple.pyを普通に動作させます

  • データ生成が完了したらエンターキーを押して、楽しみます

データの保存について

v.1.1.0から、各フレームを表現する文字列(以下、ドットファイル)が保存できるようになりました。
これによって、いちいち待つことなく、すぐに再生することが可能になります。

使い方

  • まず、選択肢の「2」を選ぶ

  • 現在の設定に合わせたドットファイルを、badapple.pyと同じ階層にあるdotsフォルダの中に生成

  • その後、選択肢の「3」を選ぶ

  • 先ほど生成したファイル名を入力し、再生

  • 楽しむ

注意

ドットファイルはテキストファイル(txt)で保存されますが、なんと一つのファイルあたり100MBは超えます。というか私の時は300MB超えました。なので、容量には充分注意をして、生成しまくらないようにしてください。

あと、そのテキストファイルを生で見ようとすると重くなるので、あまり直視しないようにお願いします。

自動フレーム調整機能について

v.1.1.0から、自動で、fpsに合わせたフレーム調整を行うことができます。これにより、ある程度高画質なドットファイルでも、少しカクカクするかもしれませんが再生することができるようになりました。
なお、この機能は完璧なものではありません。遅れるもんは遅れます。抗えません。無駄な抵抗をせず、画質を落としましょう。

なお、再生時に「debug_fps」と入力すると、現在のfpsと、通常のfpsに合わせて調整するフレーム数をみることができますが、これをONにするとfps落ちるので、なんかおかしいという時のみ活用してください。

Q&A

  1. サイズが収まらない
    申し訳ありませんが、badapple.py内の「CUSTOM」というコメントがある箇所の数値を調整してください

  2. 音とズレる
    1番と同様、badapple.py内の「CUSTOM」というコメントがある箇所の数値を調整してください。
    原因は多分、描画するときの処理時間があるからだと思いますので、描画するときの文字数を減らすなどの対策を行うと良いかもしれません

  3. ウインドウが自動的に閉じない
    ウインドウを閉じる方法がよくわからなかったので、申し訳ありませんが手動でウインドウを閉じてください

  4. エラー吐きまくってる
    ライブラリのインストールをしていないのかもしれません。
    この作品では、

  • openCV
  • pygame
  • fpstimer
  • tkinter
  • screeninfo

が必要です。

  1. どう足掻いてもズレる
    他のアプリのウインドウをできるだけ閉じることをお勧めします。また、なぜか1回目はズレるんですが、2回目は普通になる時が結構あるので、何回か試してみるのもいいかもしれません。

  2. ウインドウを動かそうとするとズレる
    仕方ないものです。

  3. 特にない
    bad apple!!を楽しんでください

感想

小さい頃から、bad apple!!のPVのアレンジ(?)をめちゃくちゃ見てて、「うわぁ、こういうのやりたいなぁ」と思ってたので、どんな形であれ自分の手でアレンジができたのは本当に嬉しいです。もちろん、改善すべき点なんてあげればキリがないんですが、今はもうちょっとだけ幻想入りさせてもらいます。。。

そもそも、「bad apple!!」とは?

元々は、東方旧作の弾幕STGシリーズ、「東方幻想郷」の3面ステージの道中BGM。
それをnomicoがカバーした「bad apple!! feat. nomico」と、そのPVが爆発的人気を誇り、今や東方projectの顔とも呼べる曲となった。
また、PVが影絵なので、二値化できる作品であり、それを利用して今回のプログラムの他にも様々なオリジナリティのあるアレンジが公開されている。このプログラムでも、PythonのopenCVを用いて動画を二値化しているが、その処理を施しても違和感のない仕上がりとなっている。

実は、PVに関しては絵コンテから、神様が影絵へと変化させたのだが、影絵の元である絵コンテでは、最後に出てくる霊夢、魔理沙は旧作のキャラクターとなっている。

You might also like...
A super easy, but really really bad DBMS

Dumb DB Are you looking for a reliable database management system? Then you've come to the wrong place. This is a very small database management syste

A discord token nuker With loads of options that will screw an account up real bad
A discord token nuker With loads of options that will screw an account up real bad

A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

Kellogg bad | Union good | Support strike funds

KelloggBot Credit to SeanDaBlack for the basis of the script. req.py is selenium python bot. sc.js is a the base of the ios shortcut [COMING SOON] Set

Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

Instagram-Reports is a tool made to ban any scam or bad person

ABOUT TOOL : Instagram-Reports is a tool made to ban any scam or bad person. Installation : sudo apt-get update -y sudo apt-get upgrade -y apt insta

Some Discord bot block bad words, with this simple hacking tool you will be able to bypass blacklisted words
Some Discord bot block bad words, with this simple hacking tool you will be able to bypass blacklisted words

DISCORD-BAD-WORD-BYPASS-2022 DISCORD BLACKLISTED WORDS HACKING/BYPASS (EDUCATIONAL PURPOSES ONLY) bypass discord blacklisted words. Description Some D

A very bad wordle solver to help me solve the daily wordle

Wordle Solver A very bad wordle solver to help me solve the daily wordle on https://www.powerlanguage.co.uk/wordle/ TODO list take into account letter

A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!
A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

Installation | Important | Changelogs | Discord NOTE: Hazard is not finished! You can expect bugs, crashes, and non-working functions. Please make an

About A python based Apple Quicktime protocol,you can record audio and video from real iOS devices

介绍 本应用程序使用 python 实现,可以通过 USB 连接 iOS 设备进行屏幕共享 高帧率(30〜60fps) 高画质 低延迟(200ms) 非侵入性 支持多设备并行 Mac OSX 安装 python =3.7 brew install libusb pkg-config 如需使用 g

OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network
OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network

Stock Price Prediction of Apple Inc. Using Recurrent Neural Network OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network Dataset:

Research shows Google collects 20x more data from Android than Apple collects from iOS. Block this non-consensual telemetry using pihole blocklists.

pihole-antitelemetry Research shows Google collects 20x more data from Android than Apple collects from iOS. Block both using these pihole lists. Proj

Unofficial PyTorch implementation of Attention Free Transformer (AFT) layers by Apple Inc.
Unofficial PyTorch implementation of Attention Free Transformer (AFT) layers by Apple Inc.

aft-pytorch Unofficial PyTorch implementation of Attention Free Transformer's layers by Zhai, et al. [abs, pdf] from Apple Inc. Installation You can i

Orthrus is a macOS agent that uses Apple's MDM to backdoor a device using a malicious profile.

Orthrus is a macOS agent that uses Apple's MDM to backdoor a device using a malicious profile. It effectively runs its own MDM server and allows the operator to interface with it using Mythic.

Convert Apple NeuralHash model for CSAM Detection to ONNX.

Apple NeuralHash is a perceptual hashing method for images based on neural networks. It can tolerate image resize and compression.

Find target hash collisions for Apple's NeuralHash perceptual hash function.💣
Find target hash collisions for Apple's NeuralHash perceptual hash function.💣

neural-hash-collider Find target hash collisions for Apple's NeuralHash perceptual hash function. For example, starting from a picture of this cat, we

Applicator Kit for Modo allow you to apply Apple ARKit Face Tracking data from your iPhone or iPad to your characters in Modo.

Applicator Kit for Modo Applicator Kit for Modo allow you to apply Apple ARKit Face Tracking data from your iPhone or iPad with a TrueDepth camera to

Demonstrates iterative FGSM on Apple's NeuralHash model.
Demonstrates iterative FGSM on Apple's NeuralHash model.

apple-neuralhash-attack Demonstrates iterative FGSM on Apple's NeuralHash model. TL;DR: It is possible to apply noise to CSAM images and make them loo

Fast, simple API for Apple firmwares.

Loyal Fast, Simple API for fetching Apple Firmwares. The API server is closed due to some reasons. Wait for v2 releases. Features Fetching Signed IPSW

IDA loader for Apple's iBoot, SecureROM and AVPBooter
IDA loader for Apple's iBoot, SecureROM and AVPBooter

IDA iBoot Loader IDA loader for Apple's iBoot, SecureROM and AVPBooter Installation Copy iboot-loader.py to the loaders folder in IDA directory. Credi

Releases(v.1.2.0)
  • v.1.2.0(Aug 30, 2021)

    バージョン1.2.0リリース

    更新内容

    • バグモードの追加(下の画像参照)
    • 自動的に文字のサイズを調整
    • 白い部分と黒い部分の文字を自由に設定可能(下の画像参照)
    • 終了時に自動的にウインドウを閉じる
    • その他細かいところの修正

    資料

    バグモード

    白い部分と黒い部分の設定例

    Source code(tar.gz)
    Source code(zip)
  • v.1.1.0(Aug 27, 2021)

  • v.1.0.0(Aug 27, 2021)

Owner
赤紫
自分で作ったwebアプリのコードを中心に、適当にアップしていく予定
赤紫
pulse2percept: A Python-based simulation framework for bionic vision

pulse2percept: A Python-based simulation framework for bionic vision Retinal degenerative diseases such as retinitis pigmentosa and macular degenerati

67 Dec 29, 2022
Resizing Canny Countour In Python

Resizing_Canny_Countour Install Visual Studio Code , https://code.visualstudio.com/download Select Python and install with terminal( pip install openc

Walter Ng 1 Nov 07, 2021
A python screen recorder for low-end computers, provides high quality video output.

RecorderX - v1.0 A screen recorder made in Python with the help of OpenCv, it has ability to record your screen in high quality. No matter what your P

Priyanshu Jindal 4 Nov 10, 2021
Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight'

SSTDNet Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight' using pytorch. This code is work for general object detecti

HotaekHan 84 Jan 05, 2022
Converts an image into funny, smaller amongus characters

SussyImage Converts an image into funny, smaller amongus characters Demo Mona Lisa | Lona Misa (Made up of AmongUs characters) API I've also added an

Dhravya Shah 14 Aug 18, 2022
This project proposes a camera vision based cursor control system, using hand moment captured from a webcam through a landmarks of hand by using Mideapipe module

This project proposes a camera vision based cursor control system, using hand moment captured from a webcam through a landmarks of hand by using Mideapipe module

Chandru 2 Feb 20, 2022
Repository for Scene Text Detection with Supervised Pyramid Context Network with tensorflow.

Scene-Text-Detection-with-SPCNET Unofficial repository for [Scene Text Detection with Supervised Pyramid Context Network][https://arxiv.org/abs/1811.0

121 Oct 15, 2021
Perspective recovery of text using transformed ellipses

unproject_text Perspective recovery of text using transformed ellipses. See full writeup at https://mzucker.github.io/2016/10/11/unprojecting-text-wit

Matt Zucker 111 Nov 13, 2022
Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Sergio Díaz Fernández 1 Jan 13, 2022
Handwritten Text Recognition (HTR) system implemented with TensorFlow.

Handwritten Text Recognition with TensorFlow Update 2021: more robust model, faster dataloader, word beam search decoder also available for Windows Up

Harald Scheidl 1.5k Jan 07, 2023
This repo contains a script that allows us to find range of colors in images using openCV, and then convert them into geo vectors.

Vectorizing color range This repo contains a script that allows us to find range of colors in images using openCV, and then convert them into geo vect

Development Seed 9 Jul 27, 2022
Textboxes implementation with Tensorflow (python)

tb_tensorflow A python implementation of TextBoxes Dependencies TensorFlow r1.0 OpenCV2 Code from Chaoyue Wang 03/09/2017 Update: 1.Debugging optimize

Jayne Shin (신재인) 20 May 31, 2019
docstrum

Docstrum Algorithm Getting Started This repo is for developing a Docstrum algorithm presented by O’Gorman (1993). Disclaimer This source code is built

Chulwoo Mike Pack 54 Dec 13, 2022
Code release for Hu et al., Learning to Segment Every Thing. in CVPR, 2018.

Learning to Segment Every Thing This repository contains the code for the following paper: R. Hu, P. Dollár, K. He, T. Darrell, R. Girshick, Learning

Ronghang Hu 417 Oct 03, 2022
Convert PDF/Image to TXT using EasyOcr - the best OCR engine available!

PDFImage2TXT - DOWNLOAD INSTALLER HERE What can you do with it? Convert scanned PDFs to TXT. Convert scanned Documents to TXT. No coding required!! In

Hans Alemão 2 Feb 22, 2022
Pixel art search engine for opengameart

Pixel Art Reverse Image Search for OpenGameArt What does the final search look like? The final search with an example can be found here. It looks like

Eivind Magnus Hvidevold 92 Nov 06, 2022
Detecting Text in Natural Image with Connectionist Text Proposal Network (ECCV'16)

Detecting Text in Natural Image with Connectionist Text Proposal Network The codes are used for implementing CTPN for scene text detection, described

Tian Zhi 1.3k Dec 22, 2022
【Auto】原神⭐钓鱼辅助工具 | 自动收竿、校准游标 | ✨您只需要抛出鱼竿,我们会帮你完成一切✨

原神钓鱼辅助工具 ✨ 作者正在努力重构代码中……会尽快带给大家一个更完美的脚本 ✨ 「您只需抛出鱼竿,然后我们会帮您搞定一切」 如果你觉得这个脚本好用,请点一个 Star ⭐ ,你的 Star 就是作者更新最大的动力 点击这里 查看演示视频 ✨ 欢迎大家在 Issues 中分享自己的配置文件 ✨ ✨

261 Jan 02, 2023
Sort By Face

Sort-By-Face This is an application with which you can either sort all the pictures by faces from a corpus of photos or retrieve all your photos from

0 Nov 29, 2021
Detect the mathematical formula from the given picture and the same formula is extracted and converted into the latex code

Mathematical formulae extractor The goal of this project is to create a learning based system that takes an image of a math formula and returns corres

6 May 22, 2022