jstrait / beats Goto Github PK
View Code? Open in Web Editor NEWA command-line drum machine. Convert a beat notated in YAML into a *.wav file.
Home Page: https://beatsdrummachine.com
License: MIT License
A command-line drum machine. Convert a beat notated in YAML into a *.wav file.
Home Page: https://beatsdrummachine.com
License: MIT License
Hello how add wav not exactly one by one
for example I need put one in this same time this same after 1seconds
2 wave files playing in this same time but in different starting point
Howdy!
Nice library! I found one minor problem, files read and generated end with noise :-P
The reason of that is the direct usage of File.read
and also File.open
which doesn't respect binary content on Windows (either MRI or JRuby).
The fix for this is simple.
Replace File.read(filename)
with File.open(filename, "rb") { |f| f.read }
Replace File.open(filename, "w")
with File.open(filename, "wb")
Found 3 occurrences of that, so it doesn't worth the pull request ;-)
After that, beats start to beat music instead of noise!
Cheers and great work!
Just an idea: add support for accent using caps:
x...x...X...X...
I'd really like if I could pipe a YAML string to the beats
executable, and have it treat that YAML as the INPUT_YAML_FILE
if none is specified.
For example, in addition to being able to do this:
beats --path="./" tmp/word.beats.txt
It'd be great to be able to do something like this:
cat tmp/word.beats.txt | beats --path="./"
Hi, first off all, great Gem ๐
I'm having an issue with the beats output audio. It's seems that the audio from the kit is slowed down. Do you have a clue what could cause the issue?
You need to add wavefile as a dependency to the gemspec so that it is installed by adding:
s.add_dependency 'wavefile', '~> 0.3.0'
Excellent work on the library by the way!
Are there any plans to support rhythms that don't fit nicely into 16th-note patterns?
Right now I see that the audio engine is calculating the length of a sample by calculating the length of a 16th-note for the current tempo.
My thought was that (and I am willing to work on this & provide a patch) it could instead calculate the length for a quarter note, and then calculate the length of each sample depending on how the quarter note has been subdivided.
For example, we could accept syntax like this:
x...x...(xxx)x.x.
Which would correspond to:
16 rest rest rest 16th rest rest rest 1/4-triplet 1/4-triplet 1/4-triplet 16th rest 16th rest
If a quarter note section is wrapped in ()
, we calculate the length of each sample based on how many notes are within the parens.
From here, we could further subdivide the 1/4-note by nesting parens. Each nested paren would represent half of it's enclosing rhythm. So:
((xxx)(xxx))
would indicate 1/8-note triplets.
Just some ideas I've been kicking around.
The tests use StringIO
so that the wave file is written in memory, instead of being saved to disk. It does this by swapping out the normal File
object used by WaveFile::Writer
with a StringIO
instance.
However, the Writer
constructor writes the wave file header to disk. Since replacing File
with StringIO
happens after the constructor is called, an unnecessary does_not_matter
file gets written to disk, polluting the repo's home folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.