{"id":20651894,"url":"https://github.com/jingshing/dark_and_darker_bard","last_synced_at":"2025-04-17T22:57:06.056Z","repository":{"id":190972842,"uuid":"683700789","full_name":"JingShing/dark_and_darker_bard","owner":"JingShing","description":"a script help you to auto play bard music.","archived":false,"fork":false,"pushed_at":"2023-09-05T19:18:11.000Z","size":401,"stargazers_count":15,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T06:11:35.777Z","etag":null,"topics":["autoplay","bard","dark-and-darker","song"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JingShing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-27T12:34:20.000Z","updated_at":"2025-01-24T16:56:28.000Z","dependencies_parsed_at":"2024-11-16T17:31:02.602Z","dependency_job_id":"69a8ae11-1338-4925-9897-56c401d141e7","html_url":"https://github.com/JingShing/dark_and_darker_bard","commit_stats":null,"previous_names":["jingshing-python/dark_and_darker_bard","jingshing/dark_and_darker_bard"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JingShing%2Fdark_and_darker_bard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JingShing%2Fdark_and_darker_bard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JingShing%2Fdark_and_darker_bard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JingShing%2Fdark_and_darker_bard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JingShing","download_url":"https://codeload.github.com/JingShing/dark_and_darker_bard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249389125,"owners_count":21262851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoplay","bard","dark-and-darker","song"],"created_at":"2024-11-16T17:30:33.038Z","updated_at":"2025-04-17T22:57:06.028Z","avatar_url":"https://github.com/JingShing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [繁體中文](README_TCH.md)\n# dark_and_darker_bard\na script help you to auto play bard music.\n\nIn the [latest version](https://github.com/JingShing-Python/dark_and_darker_bard/releases/tag/ver1.4) it can worked in most song.\n\n## [Video Preview](https://youtu.be/2QAdS9OccjA)\nYou can click the image below to watch the [video preview](https://youtu.be/2QAdS9OccjA).\n\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=2QAdS9OccjA\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/2QAdS9OccjA/mqdefault.jpg\" alt=\"Watch the video\"/\u003e\n\u003c/a\u003e\n\n# How to use?\nIn the best case I highly suggest you to use the python to run this script. \n\n* In the latest version you can now use packed exe.\n\n~~Since there are some problem to packed it as exe file. So let me help you to run this script for dark and darker bard auto play.~~\n* ## Install Python3.10\n  * You can get [python here](https://www.python.org/downloads/release/python-3106/).\n  * My script is write in 3.10.6, so I recommend to install this version.\n* ## Install modules\n  * Using command in ```modules you need``` part\n  * Or using the bat file I provide name as ```install_modules.bat```\n* ## Editing Setting and Finding your perfect set\n  * I cannot help you in this step. As I don't know your screen resolution and pc detail.\n  * So you can see the detailed setting in ```Setting``` part. And you can cut the perfect image by yourself.\n* ## Final\n  * Enjoy your perfect auto song machine.\n  * And if you think this repo helped you can leave a comment or star.\n  * Genuinely Thank you for reading ```README```.\n# How to packed exe\n* python 3.9.10\n* ```pip install opencv-python==4.5.3.56```\n\u003e there are some problem between latest opencv and pyinstaller.\n* using pyinstaller to packed exe\n\n# module you need\n* ```pip install PyAutoGUI```\n* ```pip install opencv-python```\n\nOr you can use ```install_modules.bat```:\n```bat\n@echo off\npip install PyAutoGUI\npip install opencv-python\n```\n\n# image you need\nBecause it will need right resolution. So it may need to cut the right image by your self.\n\n~~And image should be named ```image.png```.~~\n~~* In the latest version. It will take two image: ```image_left.png``` and ```image_right.png```.~~\n\u003e In the future version. It will take more image to increase accuracy.\n* In version 1.6. We can just put image file in ```image``` folder. Script will automatically read all the image in this folder.\n\n# principle\nThis script is made for detect the image that the bar moving in yellow area. And it will auto right click. So you sould replace the ```image.png``` by yourself.\n\n# Bat\nYou can use bat to automatically using python to run it.\n\nIt is a convenient way to run script(Since I have trouble to packed script into exe).\n\nbat code:\n```bat\n@echo off\nREM it will run two command\nREM switch to the bat folder\ncd /d \"%~dp0\"\n\nREM run python script\npython bard_auto_play.py\n```\n\n# Setting\nYou can edit ```setting.txt``` to make this script more suitable for your purpose:\n* confidence=0.88\n  * This value is for the tolerance for the image. I suggest value between 0.85 ~ 1.0\n* grayscale=True\n  * This value is True or False. This value is for using grey image to detect or not. If using this script can be faster.\n* region=763,859,390,30\n  * This is for detect area. It can be edit by your self. 4 value is for x, y, width, height.\n  * Default 1920X1080 should be 0, 0, 1920, 1080.\n  * region=763,859,390,30 is also for the 1920X1080 resolution.\n* interval=0.01\n * time interval between right click. I suggest value between 0.01 ~ 0.05.\n## About the region problem\nHere is the [script help you to get position](https://github.com/JingShing/dark_and_darker_bard/blob/main/helping_script/get_position.py).\n\n* Region has 4 value: x, y, width, height.\n* You should get the left top pos(x1, y1) and right down pos(x2, y2).\n* And right value should be x1,y1,(x2-x1),(y2-y1)\n\n# different version\n## detect tempo version\nI highly suggest to directly to use [This Script](script/auto_play_bard.py). Or you can use these [packed exe](https://github.com/JingShing-Python/dark_and_darker_bard/releases) in release.\n\nSince I cannot deal with the confidence parameter in packed exe. So I highly suggest to use code directly.\n\nNow this version is kindly worked? It can play long tempo song. But sometimes it failed to detect.\n\n* Suggested resolution is 1920X1080. OR you should cut your own ```image.png``` and change ```setting.txt```\n* And your pc should installed opencv-python using ```pip install opencv-python```\n## recorded tempo version\nI want to tried another method to play song.\n\nThis method is to record all the song play. But this method is totally waste time.\n\n\u003cdetails\u003e\n\u003csummary\u003eUpdate Log\u003c/summary\u003e\n\n## Ver 1.0\n* Release first version\n  * Still disorder. And it is worked like a disastar.\n  * It just a code junk.\n  * Started to suspect to the image detect.\n## Ver 1.1\n* Give up using image detect, and started recording song script.\n  * It still worked awful.\n  * It is not easy to record all the song.\n## Ver 1.2\n* Figure out that we can give image detect some confidence.\n  * Ya. The confidence made the image detect worked.\n  * It fill my determination.\n  * Nooooo. Confidence broke exe package.\n  * Sorry guys. We need to dircetly using script.\n## Ver 1.3\n* I find out that we cannot just using ```click()``` function to simulate right click.\n  * Write new click function. And it worked!\n  * So in this version. We finally can run.\n  * I add some setting in this script: confidence, grayscale, interval and region.\n## Ver 1.4\n* Actually it worked. But it kinda broke? So I spend some time to make it better.\n  * I cut the region to make it faster.\n  * I adjust some confidence. To make it more wisely.\n  * I consider to using grey scale. It make detect more faster.\n  * I adjust the interval between right click to avoid double clicking.\n  * And I made two bat to help you to install module and run python more easily.\n## Ver 1.5\n* I was frustrated. That sometimes script work not well. So I started to get more image to detect.\n  * In my case. In the elder version that I only detect one side of pointer. So it is easy to miss tempo.\n  * I add two side detect. So it can be more accurate.\n  * It worked better than usual.\n  * I decide to cut more image to make it run better.\n## Ver 1.6\n* Add auto image finder. Just put all image you want to detect in the ```image``` folder. Script will automatically detect all the imaeg.\n  * We are finally can just put lots image to detect without named it as ```image.png```.\n  * You can named it with english alphabet and all ascii code.\n  * Image more flexible to add or reduce.\n## Ver 1.7\n* Found reason why cannot packed exe.\n  * It is kinda silly. And waste lots of my time.\n  * The detailed reason can see in ```How to packed exe```.\n  * Opencv and pyinstaller are conflict in 3.10. And you should install 3.9.10 to avoid that.\n  * And suggest install ``` pip install opencv-python==4.5.3.56``` and there are reference in [requirement.txt](requirement.txt).\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingshing%2Fdark_and_darker_bard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjingshing%2Fdark_and_darker_bard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingshing%2Fdark_and_darker_bard/lists"}