Code Monkey home page Code Monkey logo

je_score_operator's Introduction

je_score_operator

Abstruct

je简谱处理工具,包括转调、制谱、播放、midi提取与制作、五线谱识别等

Demo

友链: 简谱(图片)转调

Explanation

何为je谱?

je谱为约定俗成,并无严格规定格式。但为了各种工具的使用,请按照此处的规则使用

基本格式

  • 以简谱的1234567代表七个全音,音符前加‘#’表示升半音,加‘b’表示降半音。如3 #1 5 b7,即 E C# G A#
  • (英文小括号里面是低音)[英文方括号里面是高音],括号可以嵌套,每多一层就再降/升12半音
  • 升降记号永远贴着音符,括号包裹在外,可视为音高的运算符。为了方便输入,一个括号里面可以有多个音,比如(6[2b1])表示‘低音A’、‘中音D’、‘低音G’。
  • 至于时值节奏,自行把握喽~

优缺点

  • 优点:方便编辑,易于传播,占用内存少。
  • 缺点:没有时值,依赖原曲————本项目有一半就是针对这个缺点而制作的。

je谱资源

转调器

je转调器——保持音符间音程关系不变,改变整体音高的工具。
基本原理:把音符数字化到数轴的一点,整体平移,再根据新位置转为音符。

je谱播放器

je播放器——根据je谱演奏的工具。
基本原理:数字化音符,利用这个项目播放音频。利用计时器,均匀播放,空格和换行视为休止

midi转je/简谱

midi转je/简谱/番茄简谱脚本——解析midi文件的工具。
基本原理:利用midi协议解读音符。【midi协议怎么看?瞧这!】可以解读为没有时值的je谱,也可以解读为‘番茄简谱’脚本:一个图片形式简谱制作网站,保留时值信息。
注意:所有的‘时长’均指相对时长,单位时长到底多长,由bpm参数确定。
本项目重新造了midi轮子。使用方法:midi class

midi制作

制作midi——利用特定文本生成midi文件的工具。
所谓特定文本,即需要的json,需要给出音序号、时长、开始时间(可省略)。详见网站。若不写明开始时间,则默认在上一个音的后面追加。

je谱确定节奏

je谱确定节奏——手动给没有时值的je谱加上时值的工具。
基本操作:输入je谱,点击开始,两个手指交替按压键盘,按下表示音开始,抬起表示音结束,根据记录的毫秒数,进行近似处理,得到“midi制作”所需的“特定文本”。

五线谱识别为je谱

五线谱->je识别五线谱图片为je谱的工具。
暂时只有个初步实现。使用了我另一个项目“jsPic”来处理图片,因为opencv.js太大了而且不能改。目前效果很糟糕,不能用手写谱,底色要白色,图片大点。
如果想要系统地转换,请看我的文章

How I rescue je ?

je谱诞生以来一直诟病不断,就是针对其缺少时值信息的缺点。本项目的解决方法:

五线谱识别实现

文档末尾细说一下五线谱识别的实现。目前(就是这个效果堪忧的版本)使用的方法是:

  • 标准霍夫变换+meanshift聚类,获取每根线的y坐标
  • 处理相邻线的间距,五根一组归类,获得平均间距
  • 有一个二分音符的模板文件(转成base64内嵌html了),按平均间距缩放,然后很简单地模板匹配,对结果聚类(所以只能识别四份音符和二分音符)
  • 根据匹配结果的y坐标和每组线的坐标得到je谱

怎么样,很粗糙吧。。。

je_score_operator's People

Contributors

madderscientist 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

Watchers

 avatar

je_score_operator's Issues

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.