metronome.mov
(Put the sound on 😊)
- I wanted to build out a metronome on the command line so I didn't have to rely on Google's metronome
- I used the Go beep package to output sound
- I created a Homebrew tap for easy installation of the metronome package
brew tap madeleinesmith/metronome && brew install metronome
Releasing new version:
- Tag code using
git tag -a v1.0.0 -m "version 1.0.0"
- Push tag with
git push origin v0.2.0
- Create a new release on GitHub for that tag
- Copy the link of the
tar.gz
file on GitHub - Change the
url
line ofhomebrew-metronome
repo to be this - And also update the
sha256
line by runningshasum -a 256 xxxxxxx.tar.gz
on the downloaded tar file (above) - Commit and push the
homebrew-metronome
repo with these edits
Updating the local package:
- Run
brew update && brew upgrade metronome
When using the Brew package run:
metronome -beats-per-minute=a -beats-per-bar=b -subdivisions=c,d,e,f
e.g.
metronome -beats-per-minute=15 -beats-per-bar=4 -subdivisions=4,4,4,7
If running locally use:
go run main.go -beats-per-minute=a -beats-per-bar=b -subdivisions=c,d,e,f
Creating a Homebrew tap:
- https://betterprogramming.pub/a-step-by-step-guide-to-create-homebrew-taps-from-github-repos-f33d3755ba74
- https://flowerinthenight.com/blog/2019/07/30/homebrew-golang
Using go:embed: