Worried about that background music eats all of your precious ROM and there is nothing left for the game? Bytebeat comes to rescue It is generated music based on an algorithm, which normally is an one liner!
The function which generates the music is on screen: ((t<<1)^((t<<1)+(t>>7)&t>>12))|t>>(4-(1^7&(t>>19)))|t>>7
A bit of a long read but seeing it visualised makes more sense.
The bit about the pitch shifting with multiplication makes sense.
I think itās probably either a mixture of knowing what some of the operations do and then just trying different numbers or the people doing it know about sound.
Glad you resurrected this, this freaking blows my mind! I have to read how it works. (Once Iāve been trying to create procedural music too, but on a MIDI level, not soundwave.)
How is it with bytebeat copyright? Such small code canāt possibly be copyrighted, but the emerging result is a quite big piece of art and a lot of effort goes into its creation⦠so? Iāve seen some licensed CC-BY, but I donāt know if all of these shouldnāt be public domain, just like mathematical formulas. Actually this is nothing but mathematical formulas to me, so I think the result falls under copyright, but not the code. Do you people agree?
Itās a grey area because while functional formulas canāt be copyrighted, things that require a degree of creativity can be, and obviously music crosses the border into the realm of creativity.
And of course code can by copyrighted and patented,
so thereās a grey area of where to draw the line between maths and code.
Patents are a different thing, these can be applied to all kinds of small formulas, but they also have to be explicitly registered and have to go through some manual approvals etc. But this issue definitely covers similar algorithms for visual art etc.
I agree itās probably a very grey area, but my honest believe is that the formulas canāt fall under copyright, even if they require or spawn creativity ā these are both true about mathematical formulas as well. You can probably claim copyright on the resulting sound wave that you generate yourself using your own computer from this formula, but effectively anyone else can do the same and itās unprovable whether youāve āstolenā (copied) such music or generated it yourself, so in the result the final music is practically uncopyrightable as well.
Has anyone came up with some āniceā tunes using this method, Iām hoping to use this to add something to Sensitive, but everything I try just sounds like a room full alarm clocks.
[edit]
This sounds good, but I have no idea how to convert it from javascript to cā¦
Supposing this takes one of the chars (a 8-bit or 16-bit value?) of ā6689ā depending on the value of t. So the char array index [t>>16&3] is always between 0 and 3.
If you extend the song generation, youāll hear this is a loop of 4 parts, 2 identical ones then 2 different ones after and that seems to match this pattern