Edit, compile, and play chiptune music written in the
Music Macro Language (see :help mml
for more information).
As simple as :MmlMake
. If you'd like to make it simpler, add the following
(or similar) to your ~/.vimrc
:
autocmd FileType mml nnoremap <leader>m :MmlMake<cr>
I recommend using either pathogen.vim or Vundle.
Once pathogen.vim is installed, simply run the following commands:
% cd ~/.vim/bundle
% git clone git://github.com/stephencelis/vim-mml.git
If you're using Vundle, add the following line to your ~/.vimrc
(with the rest of your Bundle
declarations):
Bundle 'stephencelis/vim-mml'
Then, :source $MYVIMRC
and :BundleInstall
.
Right now, automatically playing the compiled NES Sound Format (NSF) files requires Mac OS X and either Nestopia or Audio Overload.
vim secret.mml
and insert the following:
#TITLE Secret!
@v0 = { 8 12 15 14 12 10 8 6 }
@v1 = { 6 5 4 3 2 1 0 }
AB @t3,20 @2 @v0 l4 o5
A g d+ < g+ > @q9 @vr1 g+2^8
B r8 f+ < a > e > @q9 @vr1 c2
Then :w
, :MmlMake
, and...!
- Shaun Inman made a TextMate Bundle and mirrors an excellent MML Reference.
Copyright © 2012 Stephen Celis. Distributed under the same terms as Vim
itself (see :help license
).