Coder Social home page Coder Social logo

genshin_scripts's People

Contributors

3096 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

genshin_scripts's Issues

weird note doubling bug

I was trying to make my own midi files to play in the program, but I ran into a weird bug.

This is lyre.zip, which contains two files: test.mid and doesnt_work.mid. The first was exported from Musescore 3 and the second was made in MidiEditor. They play the exact same notes and are superficially identical if you listen to them, but one of them triggers the error and one of them doesn't.

Here's the output in notepad. There's some note doubling evident here.
test.mid: hqwjeqrwte
doesn't_work.mid: hqhqjwjwqeqewrwretet
(I probably should have picked a test piece without chords, but it's too late now.)

I tried mucking around in the midi files with a binary editor to try and figure it out, but looking at binary code makes my head hurt. It might have something to do with the types of midi files (there's 3), but I wasn't able to find out a way to identify which type it was.

Honestly, I don't expect this to be fixed or anything, but I just found it interesting and thought I would at least make you aware of it.

Anyways, thank you for this beautiful program. You are truly blessed by Venti himself.

stopped working in general

Traceback (most recent call last):
File "midi.py", line 263, in
File "midi.py", line 101, in init
File "midi.py", line 108, in load_config
FileNotFoundError: [Errno 2] No such file or directory: 'midi_config.json'
press any key to exit...

all the files are in the same folder and were working literally an hour ago. restarting doesn't work, nor does reinstalling. after doing that it just says 'auto root found root at _' when trying to play a song.

TypeError: __init__() got an unexpected keyword argument

Hello,I ran into this error when I press tab 1 in game,and I've tried out on both my two laptops but both the same error reported,it would be nice if you can help me out the problem

PS C:\Windows\system32> cd C:\Users\MECHREVO\Desktop\genshin_scripts-main
PS C:\Users\MECHREVO\Desktop\genshin_scripts-main> pip install pynput mido
Collecting pynput
Downloading pynput-1.7.3-py2.py3-none-any.whl (99 kB)
|████████████████████████████████| 99 kB 223 kB/s
Collecting mido
Downloading mido-1.2.9-py2.py3-none-any.whl (52 kB)
|████████████████████████████████| 52 kB 990 kB/s
Collecting six
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six, pynput, mido
Successfully installed mido-1.2.9 pynput-1.7.3 six-1.15.0
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'C:\Users\MECHREVO\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.
PS C:\Users\MECHREVO\Desktop\genshin_scripts-main> python midi.py

Lyre Midi Player
Copyright (C) 2021  3096

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see <http://www.gnu.org/licenses/>.

1 - everglow.mid
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
loaded 1 songs from config!
loading everglow.mid
auto root found root at 40 with 2064/2122 (0.9726672950047125)
start playing
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<LyrePlayer.play() done, defined at C:\Users\MECHREVO\Desktop\genshin_scripts-main\midi.py:167> exception=TypeError("init() got an unexpected keyword argument 'type'")>
Traceback (most recent call last):
File "C:\Users\MECHREVO\Desktop\genshin_scripts-main\midi.py", line 192, in play
for msg in mid:
File "C:\Users\MECHREVO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mido\midifiles\midifiles.py", line 376, in iter
for msg in merge_tracks(self.tracks):
File "C:\Users\MECHREVO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mido\midifiles\tracks.py", line 104, in merge_tracks
messages.extend(_to_abstime(track))
File "C:\Users\MECHREVO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mido\midifiles\tracks.py", line 62, in _to_abstime
yield msg.copy(time=now)
File "C:\Users\MECHREVO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mido\midifiles\meta.py", line 507, in copy
return self.class(**attrs)
TypeError: init() got an unexpected keyword argument 'type'

Traceback ZeroDivisionError

Hello, it would be nice if you could help me out, im a total noob when to this things.
I used PowerShell, it all started, but when in game, trying to use Tab 1 gave me that...

PS C:\WINDOWS\system32> cd F:\Programme\lyer_genshin\genshin_scripts-main
PS F:\Programme\lyer_genshin\genshin_scripts-main> python midi.py

Lyre Midi Player
Copyright (C) 2021  3096

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see <http://www.gnu.org/licenses/>.

1 - test.mid
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
file not found: put the path to your midi file here
loaded 1 songs from config!
loading test.mid
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<LyrePlayer.play() done, defined at F:\Programme\lyer_genshin\genshin_scripts-main\midi.py:167> exception=ZeroDivisionError('division by zero')>
Traceback (most recent call last):
File "F:\Programme\lyer_genshin\genshin_scripts-main\midi.py", line 174, in play
note_key_map = self.auto_root_key_map(mid, song_config.auto_root_channels, song_config.auto_root_tracks,
File "F:\Programme\lyer_genshin\genshin_scripts-main\midi.py", line 164, in auto_root_key_map
print(f"auto root found root at {best_root} with {best_hits}/{total} ({best_hits / total})")
ZeroDivisionError: division by zero
loading test.mid
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<LyrePlayer.play() done, defined at F:\Programme\lyer_genshin\genshin_scripts-main\midi.py:167> exception=ZeroDivisionError('division by zero')>
Traceback (most recent call last):
File "F:\Programme\lyer_genshin\genshin_scripts-main\midi.py", line 174, in play
note_key_map = self.auto_root_key_map(mid, song_config.auto_root_channels, song_config.auto_root_tracks,
File "F:\Programme\lyer_genshin\genshin_scripts-main\midi.py", line 164, in auto_root_key_map
print(f"auto root found root at {best_root} with {best_hits}/{total} ({best_hits / total})")
ZeroDivisionError: division by zero

OSError: MThd not found. Probably not a MIDI file

Task exception was never retrieved
future: <Task finished name='Task-1' coro=<LyrePlayer.play() done, defined at midi.py:169> exception=OSError('MThd not found. Probably not a MIDI file')>
Traceback (most recent call last):
File "midi.py", line 174, in play
File "mido\midifiles\midifiles.py", line 316, in init
File "mido\midifiles\midifiles.py", line 340, in _load
File "mido\midifiles\midifiles.py", line 111, in read_file_header
OSError: MThd not found. Probably not a MIDI file

Midi Config File?

Hello,

I noticed that the script requires a "midi_config.json", but that file isn't included in the repository.

Is there a certain way the json file should be formatted if I do have to write it myself?

Traceback error

Hello, I'm having this error when I try to press any key on my keyboard. I'm running and building the .py file from sublime text 3. I did pip installed every library that I was missing.
12

Line 9

Screenshot_793
it worked fine yesterday

I got this error and i couldn`t figure out nor find it what is the issue

loaded 1 songs from config!
loading ghoul.mid
auto root found root at 58 with 404/404 (1.0)
start playing
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<LyrePlayer.play() done, defined at midi.py:169> exception=TypeError("init() got an unexpected keyword argument 'type'")>
Traceback (most recent call last):
File "midi.py", line 194, in play
File "mido\midifiles\midifiles.py", line 376, in iter
File "mido\midifiles\tracks.py", line 104, in merge_tracks
File "mido\midifiles\tracks.py", line 62, in _to_abstime
File "mido\midifiles\meta.py", line 507, in copy
TypeError: init() got an unexpected keyword argument 'type'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.