根据midi文件演奏“风物之诗琴”的脚本 "Windsong Lyre" auto play

Overview

Genshin-lyre-auto-play

简体中文 | English

简介

根据midi文件演奏“风物之诗琴”的脚本。由Python驱动,在此承诺, ⚠️ 项目内绝不含任何能够引起安全问题的代码。

官方声明

前排提示:所有键盘在动但是原神没反应的都是因为没有管理员权限,双击run.bat或者以管理员模式运行命令行可以解决问题!(适用于方法二运行)

使用方法

方法一

对于没有接触过相关内容的用户,可以使用打包的exe文件:下载链接

双击运行然后按照提示输入midi文件名(不包含后缀,即.mid

ico图标来源于网络,侵删

方法二

查看

运行环境

Windows
python 3.x
pywin32 (用于模拟键盘输入)
numpy

1. 安装Python

去Python官网下载然后安装

2.安装模块

安装并配置好python环境后使用pip install -r requirements.txt命令安装模块。

国内可以使用:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

3.运行

使用管理员权限运行python piano.py,或者双击run.bat

注意

任何双击bat文件一闪而过都是因为程序出错,请按以下步奏依次检查:

  1. 检查是否安装了python 3.x并且设置了Path;
  2. 检查是否安装好了依赖包;
  3. 检查输入参数是否有误;
  4. 发一个issue,附上详细情况。

在输入midi名称后程序会自己切换回游戏内并演奏,如需退出可以最小化游戏窗口或者关闭程序窗口

新版本可自行选择↑

如何使用自己的曲谱?

确保乐谱midi文件中的音符在中央C和上下两个八度的白键位 并将midi文件放入名为songs的文件夹里。

声明

转载请务必加上来源,谢谢。请不要使用项目本体或者项目内曲谱进行任何盈利行为。

还存在bug,欢迎各位大佬提交pr

多人联携模式正在开发中。

可以给一个star嘛,秋梨膏~

Comments
  • What is playback speed?

    What is playback speed?

    If I put in the bpm it was too fast (155), I have no clue if it's even supposed to be bpm

    ^^^ The version earlier today ^^^


    vvv current version vvv

    It finds the song speed but its REALLY slow, what do I need to change in the song file to make the default speed faster

    Incomplete night of nights I threw together (1 minute)

    opened by ZhaanCS 7
  • (已解决)是不是少了个包啊

    (已解决)是不是少了个包啊

    File "C:\Users\15619\Desktop\genshin-lyre-auto-play-main\genshin-lyre-auto-play-main\midi\messages\checks.py", line 4, in from ..py2 import convert_py2_bytes ModuleNotFoundError: No module named 'midi.py2'

    opened by XiaoMiku01 5
  • "Try to culculate play speed...... Failed. Make sure the fileis not broken or input custom speed:(7)"

    For all midis not included, it shows the same error (even re-exporting the included files will also cause the same error)

    It shows "Try to culculate play speed...... Failed. Make sure the fileis not broken or input custom speed:(7)"

    Putting a custom not 60 or 120 will immediately crash the program Putting 60 will go to next step; https://i.imgur.com/rcZAtk9.png

    But program still crahes after

    opened by m4xolotl 4
  • Grammatical changes (English ReadME)

    Grammatical changes (English ReadME)

    The English originally was pretty understandable, there were some parts that was a bit confusing.

    It's not perfect (Because I don't know kanji that well) but I'm pretty confident that I made the word choices better without changing the meaning of the sentence.

    In the "Extra" I'm not sure what "reprint" was supposed to be, so I just guessed the meaning, please correct me if I'm wrong

    opened by ZhaanCS 3
  • Program crashes after the timer runs out

    Program crashes after the timer runs out

    https://imgur.com/a/pxuq0TJ

    piano.py from https://github.com/Misaka17032/genshin-lyre-auto-play/issues/10#issuecomment-808898876 works fine

    latest(?) version that still works https://github.com/Misaka17032/genshin-lyre-auto-play/blob/377c808a3c563ed2bd55d5b947050eec4b9973d3/piano.py

    opened by Quenom 2
  • 自动弹出原神窗口

    自动弹出原神窗口

    可以用这个方法自动打开原神窗口:

    def pop_window(name):
        handle = win32gui.FindWindow(0, name)
        if handle == 0:
            return False
        else:
            win32gui.SendMessage(handle, win32con.WM_SYSCOMMAND,
                                 win32con.SC_RESTORE, 0)
            win32gui.SetForegroundWindow(handle)
            while (win32gui.IsIconic(handle)):
                continue
            return True
    

    我的pr目前有冲突

    opened by yllhwa 2
Releases(V1.2.1)
Owner
御坂17032号
御坂17032号
Game Agent Framework. Helping you create AIs / Bots that learn to play any game you own!

Serpent.AI - Game Agent Framework (Python) Update: Revival (May 2020) Development work has resumed on the framework with the aim of bringing it into 2

Serpent.AI 6.4k Jan 5, 2023
This is the code of using DQN to play Sekiro .

Update for using DQN to play sekiro 2021.2.2(English Version) This is the code of using DQN to play Sekiro . I am very glad to tell that I have writen

null 144 Dec 25, 2022
计算机视觉中用到的注意力模块和其他即插即用模块PyTorch Implementation Collection of Attention Module and Plug&Play Module

PyTorch实现多种计算机视觉中网络设计中用到的Attention机制,还收集了一些即插即用模块。由于能力有限精力有限,可能很多模块并没有包括进来,有任何的建议或者改进,可以提交issue或者进行PR。

PJDong 599 Dec 23, 2022
Using Python to Play Cyberpunk 2077

CyberPython 2077 Using Python to Play Cyberpunk 2077 This repo will contain code from the Cyberpython 2077 video series on Youtube (youtube.

Harrison 118 Oct 18, 2022
Plug-n-Play Reinforcement Learning in Python with OpenAI Gym and JAX

coax is built on top of JAX, but it doesn't have an explicit dependence on the jax python package. The reason is that your version of jaxlib will depend on your CUDA version.

null 128 Dec 27, 2022
[ICML 2021] DouZero: Mastering DouDizhu with Self-Play Deep Reinforcement Learning | 斗地主AI

[ICML 2021] DouZero: Mastering DouDizhu with Self-Play Deep Reinforcement Learning DouZero is a reinforcement learning framework for DouDizhu (斗地主), t

Kwai Inc. 3.1k Jan 4, 2023
Gesture-controlled Video Game. Just swing your finger and play the game without touching your PC

Gesture Controlled Video Game Detailed Blog : https://www.analyticsvidhya.com/blog/2021/06/gesture-controlled-video-game/ Introduction This project is

Devbrat Anuragi 35 Jan 6, 2023
Plug and play transformer you can find network structure and official complete code by clicking List

Plug-and-play Module Plug and play transformer you can find network structure and official complete code by clicking List The following is to quickly

null 8 Mar 27, 2022
Scripts for training an AI to play the endless runner Subway Surfers using a supervised machine learning approach by imitation and a convolutional neural network (CNN) for image classification

About subwAI subwAI - a project for training an AI to play the endless runner Subway Surfers using a supervised machine learning approach by imitation

null 82 Jan 1, 2023
Gradient Step Denoiser for convergent Plug-and-Play

Source code for the paper "Gradient Step Denoiser for convergent Plug-and-Play"

Samuel Hurault 11 Sep 17, 2022
A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

Eugenio Herrera 175 Dec 29, 2022
Deep Q-network learning to play flappybird.

AI Plays Flappy Bird I've trained a DQN that learns to play flappy bird on it's own. Try the pre-trained model First install the pip requirements and

Anish Shrestha 3 Mar 1, 2022
A plug-and-play library for neural networks written in Python

A plug-and-play library for neural networks written in Python!

Dimos Michailidis 2 Jul 16, 2022
Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code

Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code

STARS Laboratory 8 Sep 14, 2022
RL agent to play μRTS with Stable-Baselines3

Gym-μRTS with Stable-Baselines3/PyTorch This repo contains an attempt to reproduce Gridnet PPO with invalid action masking algorithm to play μRTS usin

Oleksii Kachaiev 24 Nov 11, 2022
Minimal diffusion models - Minimal code and simple experiments to play with Denoising Diffusion Probabilistic Models (DDPMs)

Minimal code and simple experiments to play with Denoising Diffusion Probabilist

Rithesh Kumar 16 Oct 6, 2022
The aim of this project is to build an AI bot that can play the Wordle game, or more generally Squabble

Wordle RL The aim of this project is to build an AI bot that can play the Wordle game, or more generally Squabble I know there are more deterministic

Aditya Arora 3 Feb 22, 2022
Static-test - A playground to play with ideas related to testing the comparability of the code

Static test playground ⚠️ The code is just an experiment. Compiles and runs on U

Igor Bogoslavskyi 4 Feb 18, 2022
Official implementation for Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder at NeurIPS 2020

Likelihood-Regret Official implementation of Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder at NeurIPS 2020. T

Xavier 33 Oct 12, 2022