Клон репозитрия с GitHub, причина: блокирует всё подряд...
|
2 years ago | |
---|---|---|
.github | 3 years ago | |
docs | 3 years ago | |
midis | 3 years ago | |
tests | 3 years ago | |
video2midi | 2 years ago | |
.gitignore | 3 years ago | |
.v2m.ini | 5 years ago | |
LICENSE | 5 years ago | |
README.md | 3 years ago | |
requirements.txt | 3 years ago | |
v2m.py | 2 years ago |
youtube synthesia video to midi, just for fun )
Воссоздание midi с видео роликов synthesia и ей подобным..
Video example on YouTube, creating midi from hybrid synthesia video & real piano video2midi 0.4.5.2
Video example on YouTube, creating 2 channels midi, version video2midi 0.3.9.1
Video example on YouTube, creating 6 channels midi, version video2midi 0.3.9.1
Video example on YouTube, creating 2 channels midi, version video2midi 0.3.0
Manual "How to" Or "How to use video2midi after installing"
GH already added new discuss functionality so we can talk without opening an issue... if you have any questions or comments, you can open discuss or you can write to whatsapp / telegram , i'll try to answer / help ;)
sudo apt install python-opencv python-pygame python-midiutil python-opengl
sudo pacman -S hdf5 opencv python-pygame python-opengl
sudo pip install midiutil
Download the video with your favorite melody (I recommend 720p), launch the program, adjust the keys in it, press Q and after the completion of the work a midi file will be created.
./v2m.py ./synthesia_video.mkv
in start menu search and open Anaconda command prompt:
cd path to v2m.py
python v2m.py synthesia_video.mkv
Control:
Frame by frame we scan the virtual keyboard and write the keys to the midi file...
All settings are moved to an ini file which can be used as common for all directories if it is located in the home directory (~/.v2m.ini) or as a separate for local directory (./v2m.ini).
You can also customize the separation into channels depending on the color of the key. To do this, in the v2m.ini file, you need to modify the color matching to the midi channel of the track. By default, each color key will be recorded in its own channel, so if you want to combine the channels, simply specify the same numbers for different colors.
color_channel_accordance = 0,0, 1,1, 2,2, 3,3, 4,4, 5,5
You can customize the channel mapping to a MIDI instrument. To do this, in the v2m.ini file, you need to modify the correspondence of the midi channel to the instrument. The default all channels is 0 midi instrument.
channel_prog_accordance = 0,0, 0,0, 0,0, 0,0, 0,0, 0,0
sudo apt install python-opencv python-pygame python-midiutil python-opengl
sudo pacman -S hdf5 opencv python-pygame python-opengl
sudo pip install midiutil
Скачиваем видео с понравившейся мелодией ( рекомендую 720p ) , запускаем программу, в ней регулируем клавиши жмём Q и после завершения работы будет создан midi файл.
./v2m.py ./synthesia_video.mkv
in start menu search and open Anaconda command prompt:
cd path to v2m.py
python v2m.py synthesia_video.mkv
Кадр за кадром сканируется видео поток отслеживая изменения виртуальной клавиатуры после всё что зафиксировано дампим на винт.
Все настройки вынесены в файл ini файл который может использоваться как общий для всех каталогов если находится в домашнем каталоге ~/.v2m.ini либо отдельный локальный для каталога ./v2m.ini.
Вы можете настроить разбиение на каналы в зависимости от цвета клавиши. Для этого в файле v2m.ini нужно поправить соответствие цвета каналу midi трека. По умолчанию каждый цвет активирующий клавишу будет записан в собственный канал, таким образом если хотите объединить каналы просто укажите для разных цветов одинаковые номера.
color_channel_accordance = 0,0, 1,1, 2,2, 3,3, 4,4, 5,5
Вы можете настроить соотнесение канала к MIDI инструменту. Для этого в файле v2m.ini нужно поправить соответствие канала midi инструменту. По умолчанию канал равен 0 midi инструменту
channel_prog_accordance = 0,0, 0,0, 0,0, 0,0, 0,0, 0,0