Giter Club home page Giter Club logo

skyautoplayerscript's Introduction

SkyAutoPlayerScript

English: README-en.md

使用 AutoX 提供的无障碍权限实现在 Sky光遇 中自动弹奏 SkyStudio 导出的曲谱

shared sheet sheet contributors Hosted in

不会进一步支持原神的21键琴和上传21键位的共享乐谱,反正15键又不是不能弹。

特性

相比于其他脚本,SkyAutoPlayerScript 拥有以下优势

  • 全 GUI 操作,无需编辑任何代码,流畅的UI动画。
  • 多功能的弹奏控制面板,支持暂停进度控制倍速控制等。
  • 通过引导自设定键位坐标,避免按压琴键的偏移问题。
  • 在线共享乐谱,有许多优质乐谱。
  • 自动更新,及时修复 BUG,无需担心版本过时问题。
  • 多语言支持
  • ...

使用

以下两种方式仅需选择一种

拷贝脚本(推荐)
  1. Releases · kkevsekk1/AutoX 中下载 AutoX。

注意:请提前悉知设备架构选择 arm64-v8aarmeabi-v7a,否则选择 universal

  1. 为 AutoX 开启无障碍服务悬浮窗权限存储权限

  2. 在 AutoX 中新建一个脚本并粘贴以下代码并运行:

"ui";
"use strict";
const okhttp3 = Packages["okhttp3"];
(function(emitter) {
  const client = (new okhttp3.OkHttpClient.Builder())
    .connectTimeout(3, java.util.concurrent.TimeUnit.SECONDS)
    .writeTimeout(3, java.util.concurrent.TimeUnit.SECONDS)
    .readTimeout(3, java.util.concurrent.TimeUnit.SECONDS)
    .build();
  threads.start(function () {
    emitter.emit("evaluate", (function () {
      //Many sources 
      let sources = [
        "https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript/source/SkyAutoplayer.js",
        "http://cdn.stagex.top:8090/StageGuard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js",
        "https://dl.skyautoplayerscript.stageguard.top/source/SkyAutoplayer.js",
        "https://raw.githubusercontent.com/StageGuard/SkyAutoPlayerScript/master/source/SkyAutoplayer.js"
      ];
      for (let i in sources) {
        try {
          let resp = client.newCall(
            (new okhttp3.Request.Builder()).url(sources[i]).build()
          ).execute();
          if (resp.code() == 200) return resp.body().string();
        } catch(e) {
          let err = "Failed on source " + sources[i] + " : " + e;
          console.log(err); toast(err);
        }
      }
      console.show();
      return null;
    }()));
  });
  emitter.on('evaluate', s => { if(s != null) eval(s); });
}(events.emitter(threads.currentThread())));
安装独立程序(仅 arm64-v8a 可用)

Releases · StageGuard/SkyAutoPlayerScript 中下载脚本独立打包程序,安装后即可使用。

首次启动时请同意程序申请的权限:无障碍服务悬浮窗权限存储权限

注意:本程序申请的权限为 AutoX 打包程序自动控制,且仅申请使脚本运行的必要权限。

兼容性

在 AutoX 版本 6.3.6 中测试通过。

清除数据

SkyAutoPlayerScript 在使用过程中会产生本地数据存储,若想全部删除,请使用 AutoX 执行以下代码

storages.remove("StageGuard:SkyAutoPlayer:Config");
files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");

上传乐谱

SkyAutoplayerScript 可以从这个仓库中的 shared_sheets.json 读取在线共享乐谱列表并可以方便地下载和弹奏。

你可以通过以下两种方式的任意一种方式来让你自制或经过原作者授权转载的乐谱在这个列表显示:

1. Pull Request

你可以克隆这个仓库,将你的乐谱添加到 shared_sheets 文件夹中,并按照以下要求在 shared_sheets.json 中添加新的项目:

{
  //乐谱名称
  "name": "Vicetone - Nevada",
  //文件名
  "file": "Nevada.txt",
  //乐谱作者
  "author": "StageGuard",
  //乐谱简介
  "desc": "Nevada SkyStudio钢琴版。\n内包含<u>比较复杂的和弦</u>,不适合手弹(笑\n你可以在SkyStudio的练习模式试试[狗头]",
  //乐谱文件中的BPM
  "bpm": 497,
  //乐谱的键位数目(它是一个 15 键位乐谱还是 8 键位乐谱)
  "keyCount": 15,
  //乐谱文件中的音高
  "pitchLevel": 3,
  //键的数目
  //乐谱文件中数组 songNotes 的长度
  "noteCount": 1308,
  //你的社交链接
  //你可以添加多个
  "social": [
    {
      //社交平台名称代号,现在支持 github, twitter, douyin(tiktok) and coolapk
      "platform": "github",
      //社交平台名称
      "name": "GitHub",
      //社交连接
      "link": "https://github.com/StageGuard/"
    }
  ]
},

修改完成后,申请 Pull Request ,等待 merge 即可。

请注意:在申请Pull Request之前请确保你本地的 仓库已同步至最新,以免出现意外问题!

2. 如果你不是很懂 Github...

只需要把乐谱发送到邮箱 [email protected] 来交给我就行啦!别忘了附带乐谱简介!

注意!

请仔细阅读以下使用须知!

  1. 未充分测试,若遇到 BUG ,请酷安私信 @StageGuard 或新建 Issue 来反馈 BUG!

  2. SkyAutoplayerScript 是完全免费且开源的软件/脚本(https://github.com/StageGuard/SkyAutoPlayerScript),使用 SkyAutoplayerScript 盈利的同时请标注源项目链接。

  3. 共享乐谱不遵守 LGPL-2.1 协议,如您想在 SkyAutoPlayer 以外使用这些乐谱,请自行找乐谱作者授权!

  4. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会"正规场合"是什么意思),若因使用本脚本所出现了一些不友好的问题,与脚本作者 StageGuard 无关。

  5. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。

  6. 本脚本只是一个"弹奏机",并不内置曲谱,请在 GooglePlay 下载 SkyStudio 编谱。

  7. 本脚本不会增加解密乐谱功能,包括但不限于加密的 SkyStudio 乐谱加密的 JS 等,也不接受加密乐谱的共享。

针对上述第2, 3条出现的问题:

关于脚本倒卖的问题: #1

耻辱柱

Gitee 用户嗨游圈(@vipssp)未经乐谱上传者的同意下私自盗用 SkyAutoplayerScript 于 Gitee 的同步镜像到它的 Gitee 仓库

在经过通知后仍未及时删除盗用的乐谱,在于一些乐谱原作者沟通后,决定将其挂在此 README.md 首部,以告示。

贡献

欢迎任何人贡献本项目,包括但不限于 Pull Request,Issue,New feature request 或者贡献翻译。

⚠️警告

CodeFactor 代码评估: CodeFactor

由于项目为单脚本文件,未将不同模块分离至文件,即所有功能均在一个文件实现;再加上我糟糕的代码技能,源码会非常难读。

贡献者

SkyAutoPlayerScript

@tiaod

共享乐谱

酷安@Aex技术总监
酷安@夏卡卡卡
酷安@深空失忆か
抖音@子哲啊🌈(zizhe1880689503)
酷安@你们很有趣呢
酷安@情如风雪无常
酷安@慕疵
酷安@社区最弱萌新
酷安@九方辰
酷安@北极马可罗尼
哔哩哔哩@UTF16
酷安@Syngenex
Twitter Phoebe@huunhut1217
酷安@终究是错付了
酷安@DesperatU
酷安@明明酱
酷安@cxk的篮球
酷安@头条乀
酷安@Alusias
chikin
酷安@温茶予君
酷安@落红难相聚
酷安@bugjump233
酷安@阿基米德的船
[email protected]
酷安@皮皮小猪猪
酷安@DoubleGGe
恋上猫的鱼~
依稀(濒死动物)
zhangjinteng
哔哩哔哩@次卡安
酷安@ZyaIreZ
酷安@星释槐
KingXKK
酷安@Leotoast
小柒不会玩红石
我睡着的时候不困0v0
心酸的邂逅

翻译

SkyAutoplayerScript 在版本 21 已支持多语言并可以在线获取语言列表,你可以查看 contribute-translation.md (English) 来了解如何贡献翻译。

贡献者

图标来源

Iconfont-阿里巴巴矢量图标库

鸣谢

projectXero (提供适用于Rhino的ListAdapter)

许可证协议

    SkyAutoPlayer (AutoX script)
	  Copyright © 2020-2021 StageGuard

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

  This library 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
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
  USA

skyautoplayerscript's People

Contributors

bowen99 avatar github-actions[bot] avatar stageguard avatar tiaod 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

skyautoplayerscript's Issues

翻译

我想将您的脚本翻译成葡萄牙语,该怎么办?

[Feature request] 添加随机停顿与随机错误

脚本目前演奏乐谱的速度非常均匀、流畅,且100%正确,缺少手弹的那种停顿感,听起来没有灵魂,一听就知道是脚本。建议新增一个选项,启用后会随机地插入停顿,并且会随机弹错相邻的按键,让脚本演奏更有灵魂。作者看看这个想法如何?如果OK的话我周末写个PR

播放框位置修改请求

请问如何修改播放框位置? 现在的播放框在我的设备上会挡住琴键 导致无法正常播放

I have a problem with auto music on android 11.

Specifically, when I upgraded my device to android version 11. Sky auto music can no longer access the sheet file in data (because android 11 has banned it). Therefore, I hope you can add a new option of "choose another application to go to the sheet file".

下版本优化建议

大大,下个版本谱子目录可以考虑识别文件夹嘛,这样方便分类了(^▽^)

小请求

希望大佬可以增加一个本地乐谱搜索功能,谱子搞太多了QAQ

隐藏面板弹奏问题

在目前版本中,隐藏弹奏面板弹奏时出现致命bug,具体表现为弹奏延迟变长,原本连续的弹奏变成几分钟弹几下,完全失去使用价值,但在不隐藏时完全正常。
麻烦老哥辛苦瞅瞅bug,谢谢

I have an idea

I think you should add the ability to hide the playback toolbar. Specifically, you can add 1 toolbar minimize button.Or I think you can add the option to hide the toolbar on the notification bar, and control it in the notification bar. In short, I think we'll need a minimize button.Thank you for reading my request !!
Here is an image for the example I have just given.Screenshot_2021-04-06-23-56-57-25_e08b3c7e013d63887f51fcd172db7056.jpg

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.