sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

WaveFile::Writer#initialize

Returns a constructed Writer object which is available for writing sample data to the specified 
file (via the write method). When all sample data has been written, the Writer should be closed. 
Note that the wave file being written to will NOT be valid (and playable in other programs) until 
the Writer has been closed.

If a block is given to this method, sample data can be written inside the given block. When the 
block terminates, the Writer will be automatically closed (and no more sample data can be written). 

If no block is given, then sample data can be written until the close method is called.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/wavefile-0.8.1/lib/wavefile/writer.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-WaveFile--Writer-initialize-for-pr


# Commit to git

git add app/server/ruby/vendor/wavefile-0.8.1/lib/wavefile/writer.rbgit commit -m "better docs for WaveFile::Writer#initialize"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-WaveFile--Writer-initialize-for-pr

hub pull-request


# Celebrate!