陳羿豐 Yi-Feng Chen
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # music-code Music Code Player is a web app that allows you to type and play music using plain text. Website: https://stdio2016.github.io/music-code/ Currently, it supports only one format, Music Macro Language. ## Music Macro Language Music Macro Language (MML) is a text format to describe a music. It is case-insensitive, and ignores all white spaces and newlines. I have implemented two versions of MML player, the first version is [mus.html](https://stdio2016.github.io/volatile/mus.html), and this is the second version. Some features are implemented after I finished mus.html, so there are syntax differences between these two versions. I will denote such differences in warning sections. :::warning :warning: mus.html does not allow white spaces within a command. ::: Here is a list of commands: ### `CDEFGAB` A note. Its format is `pitch accidentals duration dots`. Pitch is a letter from `A` to `G` and causes the corresponding note to be played. Accidentals can be zero or more `+`, `#`, `-`, `=` or `@`, where a `+` or `#` denotes a sharp, a `-` denotes a flat, and an `=` or `@` denotes a natural. :::warning :warning: mus.html does not support `=`, and allows up to 2 of the same accidental characters. ::: The note duration is specified by an integer, representing a fraction of a whole note. Valid range is 1 to 64. For example, `C4` is a C quarter note. Duration can have 0 to 2 dots, which correspond to the dots of the note. For example, `C4.` is single dotted C quarter note. :::warning :warning: mus.html supports at most one dot. Setting duration to 0 is an error and will crash mus.html. ::: ### `P` or `R` Rest note. Its format is `P duration dots`. It is similar to a note, but a rest note does not have pitch and accidentals. :::warning :warning: mus.html does not support `R` as rest note. ::: ### `O` Followed by a digit. Sets the octave of the following notes. Octave 4 (`O4`) contains Middle C. The octave setting will affect current track only. By default, each track is in octave 4 initially. Octave can be -1 to 9. To reach octave -1 you need to type `O0<`. :::warning :warning: mus.html accepts octave higher than 9, and can crash if octave is too large, such as `O2016`. ::: ### `>` Raise the octave by 1. The highest possible octave is 9. The octave setting will affect current track only. ### `<` Lower the octave by 1. The lowest possible octave is -1. The octave setting will affect current track only. ### `L` The format is `L duration dots`. Sets the duration of the following notes to the duration specified by this command. For each following note: 1. If a note has a duration, then its duration is not affected by this instruction. 2. If a note has dots but no duration, then its duration is the duration specified by this command, but its dots remain unchanged. 3. If a note has neither dots nor duration, the its duration and dots are set to the same as this command. The L command will affect current track only. By default all notes are quarter notes. :::warning :warning: mus.html does not support `L` command with dots. ::: ### `T` Followed by an integer. Set the tempo in Beats Per Second. Valid range is 32 to 255. An MML music is assumed to be 4/4 time. By default, a song will play a tempo of 120 (`T120`). T command will apply to the whole music, so the tempo of each track can by synchronized. :::warning :warning: mus.html supports decimal bpm such as `T120.5`, but I do not think it is useful, so I do not add support for non-integer bpm in this program. ::: ### `N` Play a note in the specified pitch. Its format is `N pitch dots`. The pitch is MIDI note number minus 12, so `N48` plays Middle C. Pitch is an integer between 0 and 115. N note can have dots, but cannot have a duration. Please use L command to change its duration. :::warning :warning: mus.html accepts pitch higher than 115, and can crash if pitch is too high, such as `N2016`. ::: ### `V` Change the volume of the following notes. Volume is an integer from 0 to 127. When in MML Compatible Mode, this command will accept an integer between 0 and 15. The program convert this integer to the volume with formula: $volume = input\times 8+7$. The volume setting will affect current track only. By default, all notes are played in volume 63. :::warning :warning: mus.html does not support `V` command. ::: ### `&` Connect notes of the same pitch together like ties in music. For example, `C2 & C4.` means to connect a C half note with a C dotted quarter note. When used with `&`, all the notes in the same chord are tied. :::warning :warning: mus.html does not support `&` command. ::: ### `MML@` Enter MML Compatible Mode. In MML Compatible Mode, you can use `,` to separate tracks. This mode is for playing Mabinogi MML music. :::warning :warning: mus.html does not support MML Compatible Mode. ::: ### `;` Leave MML Compatible Mode. It is also a line comment, so anything after `;` is ignored. :::warning :warning: mus.html does not support `;` as line comment. ::: ### Extensions These commands are extensions created by me. ### `,` (comma) When in MML Compatible Mode: Switch to next track. When not in MML Compatible Mode: Lower the octave by 1. This is the same as `<`. ### `'` (apostrophe) Raise the octave by 1. It is the same as `>`. ### `/` Chord. Its usage is `note / note / ... / note`. For example, `C/E/G` plays C, E, and G at the same time. Only the first note of the chord needs to specify a duration, since other notes will have the same duration as the first note. Octave changes after `/` will only apply to the following notes in the same chord, so `C/<G G` plays two G's in different octaves. ### `K keyname` Set a key signature. Key name is assumed to be major key. For example, `KD` means that this music is played in D major. After setting a key, the following notes that have no accidentals will add accidentals acording to that key signature. In D major, for example, C and F are sharp, so `KD C D E F G A B` will play `C+ D E F+ G A B`. If you want to specify a minor key, please type its relative major key instead. Key name can have accidentals. For example B flat major can be represented by `KB-`. ### `K accidentals` Transpose all the following notes. For example `K++` raises notes up 2 semitones. Transposition happens after a note adds accidentals, so `KD K++ F` will play a F sharp note raised by 2 semitones, that is G sharp. This command affects every tracks, so it can be used to transpose a music. If there are multiple transposition commands, their effect will sum up. `K++ K-` for example will raise music up 2 semitones, then lower down 1 semitone. The net effect will be raise up 1 semitone. `K=` has no effect, since this program does not reset transposition by natural symbol. :::warning :warning: mus.html does not support transposition command. ::: ### `! tracknumber` Switch to other track. Valid range of track number is 0 to 999. For example, `!0 C !1 D` plays C and D at the same time. You can interleave different tracks as you like. For example, `!0 A B !1 C !0 D !1 E F` is the same as `!0 A B D !1 C E F`. ### `~` Act as a tie in sheet music. Can only appear immediately after a note. When used with `/`, only the notes immediately preceding `~` are tied. For example, only G notes in `C/G~ C/G` are tied, where both C and G in `C/G& C/G` are tied.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully