{"id":49936727,"url":"https://github.com/genius-society/mathematica_music_pack","last_synced_at":"2026-05-17T07:13:53.433Z","repository":{"id":129053402,"uuid":"250416393","full_name":"Genius-Society/mathematica_music_pack","owner":"Genius-Society","description":"This macro package simplifies the arrangement input structure in the Mathematica platform sound module, reducing the amount of code keyed in by the composer and removing a lot of repetitive code structure and functional flaws in the original synthesis on special sounds.|此宏包可简化Mathematica平台声音模块中的编曲输入结构，降低作曲者键入代码量，去除原有合成中大量重复的代码结构和特殊音效上的功能缺陷。","archived":false,"fork":false,"pushed_at":"2025-03-30T00:19:49.000Z","size":57383,"stargazers_count":11,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T05:49:41.718Z","etag":null,"topics":["macro","mathematica","midi","music-composition"],"latest_commit_sha":null,"homepage":"https://foruda.gitee.com/images/1681966896514664617/0aa85937_10787834.png","language":"Mathematica","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Genius-Society.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,"zenodo":null}},"created_at":"2020-03-27T01:55:22.000Z","updated_at":"2025-05-20T15:26:44.000Z","dependencies_parsed_at":"2025-06-10T05:49:46.017Z","dependency_job_id":"d189f98f-bfbf-4006-99d3-e3d29e2be769","html_url":"https://github.com/Genius-Society/mathematica_music_pack","commit_stats":null,"previous_names":["mugeminorum/mathematica-music-pack","mugemst/mathematica-music-pack","genius-society/mathematica_music_pack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Genius-Society/mathematica_music_pack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genius-Society%2Fmathematica_music_pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genius-Society%2Fmathematica_music_pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genius-Society%2Fmathematica_music_pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genius-Society%2Fmathematica_music_pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genius-Society","download_url":"https://codeload.github.com/Genius-Society/mathematica_music_pack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genius-Society%2Fmathematica_music_pack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33130321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T06:27:06.342Z","status":"ssl_error","status_checked_at":"2026-05-17T06:26:59.432Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["macro","mathematica","midi","music-composition"],"created_at":"2026-05-17T07:13:47.900Z","updated_at":"2026-05-17T07:13:53.426Z","avatar_url":"https://github.com/Genius-Society.png","language":"Mathematica","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mathematica Music Package 编曲简化宏包\n[![license](https://img.shields.io/badge/license-CC--BY--NC--SA-74c853.svg)](https://github.com/Genius-Society/mathematica_music_pack/blob/main/LICENSE)\n[![cloudflare](https://img.shields.io/badge/cloudflare-mathemusica-f6821f.svg)](https://mathemusica.pages.dev)\n[![bili](https://img.shields.io/badge/bilibili-BV14krgYJEJU-fc8bab.svg)](https://www.bilibili.com/video/BV14krgYJEJU)\n\nA macro package for simplifying composition on Mathematica\n\n一款用于简化 Mathematica 编曲的宏包\n\n## Code download 源码下载\n```bash\ngit clone git@github.com:Genius-Society/mathematica_music_pack.git\ncd mathematica_music_pack\n```\n\n## User manual 用户手册\nWe use vectors and numbers to replace complicated SoundNote[] functions. A complete song has many sections, its format is as follow:\n\n我们使用向量和数字来代替复杂的 SoundNote[] 系列函数。 经简化后的一首完整歌曲格式如下：\n```txt\ntrack1 = {\n    {params of section 1}, (*{片段1参数}*)\n    {notes  of section 1}, (*{片段1乐谱}*)\n\n    {params of section 2}, (*{片段2参数}*)\n    {notes  of section 2}, (*{片段2乐谱}*)\n\n    ...\n\n    {params of section m}, (*{片段m参数}*)\n    {notes  of section m}  (*{片段m乐谱}*)\n};\n\ntrack2 = {\n    {params of section 1}, (*{片段1参数}*)\n    {notes  of section 1}, (*{片段1乐谱}*)\n\n    {params of section 2}, (*{片段2参数}*)\n    {notes  of section 2}, (*{片段2乐谱}*)\n\n    ...\n\n    {params of section n}, (*{片段n参数}*)\n    {notes  of section n}  (*{片段n乐谱}*)\n};\n\n...\n\nplayer[track1, soundfont1, track2, soundfont2, ...]\n(*player[track1, 音色1, track2, 音色2, ...]*)\n```\n\nOne section consists of an info part and a note part, the info part includes 4 required params(tonality, central note, transposition, tempo) and one optional param(volume number or volume change vector); While the note part contains melodies and chords. The info part follows below format rules:\n\n一个片段由参数域和乐谱域组成，参数域包含4个必要参数（音调、中心音、移调、速度）和一个可选参数（音量 或 音量变化）；其中参数域遵循以下规则：\n\n\u003cdiv align=center\u003e\u003cb\u003eTable 1: Param part format (表 1: 参数域格式)\u003c/b\u003e\u003cbr\u003e\u003c/div\u003e\n\n| \u003cdiv style=\"width:120px;\"\u003eFormat 格式\u003c/div\u003e    | Remark 符号                                                                                                                                                                                                                                                                                      |\n| :--------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| *{m, c, s, t}*                                 | *m* is 0(major) or 1(minor) 为大小调(0大调，1小调);\u003cbr\u003e*c* is central note integer 为中心音 ([0, 11]);\u003cbr\u003e*s* is transposing(The whole piece moves up s semitones) 为移调(片段整体移动s个半音);\u003cbr\u003e*t* is tempo(the number = a quarter note) 为速度(即乐谱左上角标记的一个四分音符所等于的数字); |\n| *{m, c, s, t, v}*                              | *v* is volume 为音量 ([0, 1]);                                                                                                                                                                                                                                                                   |\n| *{m, c, s, t, {v\u003csub\u003es\u003c/sub\u003e, v\u003csub\u003et\u003c/sub\u003e}}* | Volume fades from *v\u003csub\u003es\u003c/sub\u003e* to *v\u003csub\u003et\u003c/sub\u003e* (音量从 *v\u003csub\u003es\u003c/sub\u003e* 渐变到 *v\u003csub\u003et\u003c/sub\u003e*)                                                                                                                                                                                             |\n\nThe central note list is as follow:\n\n如下为中心音表:\n\n\u003cdiv align=center\u003e\u003cb\u003eTable 2: Central note list (表 2: 中心音表)\u003c/b\u003e\u003cbr\u003e\u003c/div\u003e\n\n|   C   | C#/Db |   D   | Eb/D# |   E   |   F   | F#/Gb |   G   | Ab/G# |   A   | Bb/A# |   B   |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n|   0   |   1   |   2   |   3   |   4   |   5   |   6   |   7   |   8   |   9   |  10   |  11   |\n\nThe note part has melodies and chords, which consists of different kinds of notes: \n\n乐谱域由不同种类的音符组成：\n\n\u003cdiv align=center\u003e\u003cb\u003eTable 3: Input formats of notes (表 3: 音符的输入格式)\u003c/b\u003e\u003cbr\u003e\u003c/div\u003e\n\n| Effect 音效   | Format 格式                                                           | Remark 符号                                                                                                                               |\n| :------------ | :-------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |\n| Rest 休止符   | *{l}*                                                                 | *l* is duration (为时值);                                                                                                                 |\n| Tone 音符     | *{n, l}*                                                              | *n* is note value (为音高);                                                                                                               |\n| Chord 和弦    | *{{n\u003csub\u003e1\u003c/sub\u003e, n\u003csub\u003e2\u003c/sub\u003e, ...}, l}*                            | *n\u003csub\u003ek\u003c/sub\u003e* are chord note values (为和弦上各音符音高);                                                                               |\n| Staccato 跳音 | *{n, {l\u003csub\u003e1\u003c/sub\u003e, l\u003csub\u003e2\u003c/sub\u003e}}*                                 | *l\u003csub\u003e1\u003c/sub\u003e* is real duration (为时值), *l\u003csub\u003e2\u003c/sub\u003e* is duration ratio (为缩短后时值占真实时值比率);                                |\n| Vibrato 颤音  | *{{n\u003csub\u003e1\u003c/sub\u003e, n\u003csub\u003e2\u003c/sub\u003e}, l\u003csub\u003e1\u003c/sub\u003e, t\u003csub\u003en\u003c/sub\u003e}*      | *t\u003csub\u003en\u003c/sub\u003e* is trill number (为抖动次数);                                                                                             |\n| Arpeggio 波音 | *{{n\u003csub\u003e1\u003c/sub\u003e, n\u003csub\u003e2\u003c/sub\u003e, ...}, l\u003csub\u003e1\u003c/sub\u003e, l\u003csub\u003e2\u003c/sub\u003e}* | *l\u003csub\u003e2\u003c/sub\u003e* is duration ratio (为琶音变化时值占真总时值比);                                                                           |\n| Tenuto 延音   | *{bottom note, top notes}*                                            | Bottom note can be a tone or a chord, top notes consist of any above type. 背景音可以是一个音符或一个和弦, 主题旋律可以由上述任何类型组成 |\n\nWith these rules, we can get a concise format of notes. \n\n根据以上规则，给出以下音效示例：\n\n\u003cdiv align=center\u003e\n    \u003cb\u003eTable 4: Sound effect demos (表 4: 音效示例)\u003c/b\u003e\u003cbr\u003e\n    \u003cimg width=\"605\" src=\"https://user-images.githubusercontent.com/20459298/233112536-f5b900e8-8201-4e9b-9672-43f99b2979f3.PNG\"/\u003e\n\u003c/div\u003e\n\nFor notes in the note part, 12-note scheme is unfriendly to us, it can be transferred into 7-note scheme once the tonality is fixed:\n\n对于乐谱域的音符，12音模式使用起来并不方便，一旦调性固定，可将其转为7音模式：\n\n\u003cdiv align=center\u003e\n    \u003cb\u003eTable 5: The 12-note scheme(left) \u0026 7-note scheme(right) 表 5: (左)12音模式 与 (右)7音模式\u003c/b\u003e\u003cbr\u003e\n    \u003cimg width=\"500\" src=\"https://user-images.githubusercontent.com/20459298/233112569-3efd5cb1-87c3-44a6-b74b-357104055dd3.png\"/\u003e\n\u003c/div\u003e\n\nPlease refer to the demo code _`Demo_BWV-1079.nb`_ or visit our [song library](https://mathemusica.pages.dev) for more details; Before compiling songs, please run the macro package first.\n\n可参考示例代码 _`Demo_BWV-1079.nb`_ 或浏览 \u003ca href=\"https://mathemusica.pages.dev\" target=\"_blank\"\u003e我的Mathematica音乐库\u003c/a\u003e 来弄清具体用法; 生成乐谱之前请先运行 _`mathematica_music_pack.nb`_\n\nBesides, the _`e-piano.nb`_ is a piano keyboard UI, you can play it as a virtual piano on Mathematica.\n\n另外，_`e-piano.nb`_ 是一个编写于 Mathematica 上的钢琴键盘，可作为虚拟钢琴来弹奏。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenius-society%2Fmathematica_music_pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenius-society%2Fmathematica_music_pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenius-society%2Fmathematica_music_pack/lists"}