MIDI velocity values to dynamics markings
| Velocity | Dynamics marking | Explanation |
|---|---|---|
| 0-15 | pianississimo | extremely soft |
| 16-31 | pianissimo | very soft |
| 32-47 | piano | soft |
| 48-63 | mezzo-piano | medium soft |
| 64-79 | mezzo-forte | medium loud |
| 80-95 | forte | loud |
| defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock |
| - zsh (default) | |
| - homebrew (https://brew.sh/) | |
| - oh-my-zsh (https://github.com/ohmyzsh/ohmyzsh/) | |
| - oh-my-zsh themes: dieter (https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) | |
| # NOTE: the empty -i '' on macos for compatibility with GNU sed | |
| ``` | |
| sed -i '' 's/\(ZSH_THEME="robbyrussell"\)/#\1\ | |
| ZSH_THEME="dieter"/' ~/.zshrc |
| # NOTE(victor): Python for Code Golf. | |
| import runpy | |
| import sys | |
| import importlib | |
| builtins = sys.modules['builtins'] | |
| builtins.only = filter | |
| builtins.seq = range | |
| builtins.out = print |
| # Adding a new line in the command line prompt proved more difficult than needed | |
| nl() { | |
| printf "\n$ " | |
| } | |
| PROMPT='.... $(nl)' |
| - zsh | |
| - homebrew (https://brew.sh/) | |
| - oh-my-zsh (https://github.com/ohmyzsh/ohmyzsh/) | |
| - oh-my-zsh theme dieter (https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) | |
| - zsh-autosuggestions (https://github.com/zsh-users/zsh-autosuggestions) | |
| - cascadia mono pl size 18 (https://github.com/microsoft/cascadia-code) | |
| - terminal theme The Hulk (https://github.com/lysyi3m/macos-terminal-themes) | |
| - terminal window size 80 x 24 | |
| - atuin (https://github.com/atuinsh/atuin) | |
| - vitals (https://github.com/hmarr/vitals) |
| const mastHeadHeight = document.querySelector("ytd-masthead").clientHeight; | |
| let nextYtdRichGridRow = null; | |
| function scrollToNextYtdRichGridRow() { | |
| if (nextYtdRichGridRow === null) { | |
| nextYtdRichGridRow = document.querySelector('ytd-rich-grid-row'); | |
| } else { | |
| nextYtdRichGridRow = document.evaluate('following-sibling::ytd-rich-grid-row', nextYtdRichGridRow, null, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue; | |
| } |
MIDI velocity values to dynamics markings
| Velocity | Dynamics marking | Explanation |
|---|---|---|
| 0-15 | pianississimo | extremely soft |
| 16-31 | pianissimo | very soft |
| 32-47 | piano | soft |
| 48-63 | mezzo-piano | medium soft |
| 64-79 | mezzo-forte | medium loud |
| 80-95 | forte | loud |
| # macos | |
| # brew install librsvg | |
| rsvg-convert file.svg file.png | |
| # With imagemagick | |
| convert file.svg file.png |
| # basic | |
| cat **/*.txt | tr -sc "[:alnum:]" "\n" | tr "[:upper:]" "[:lower:]" | sort | uniq -c | sort -nr | head -10 | |
| # remove stop / common words | |
| cat **/*.txt | tr -sc "[:alnum:]" "\n" | tr "[:upper:]" "[:lower:]" | fgrep --word-regexp --invert-match --file common_words.txt | sort | uniq -c | sort -nr | head -10 |
| # NOTE(victor): the error is the unclosed print() statement | |
| print("""Are we getting better error messages yet?""" | |
| if __name__ == "__main__": | |
| print("Are we?") |