[Tool]Bytebeat

I was assuming it to be JavaScript simply because some of the pages I found about bytebeats suggested that all of the web based ‘players’ use JavaScript. I’ll have real try to figure it out tomorrow once I get another chance.

If it really is Javascript, then:

  • What size are t , x and y ? 32-bit? 64-bit?
  • Are they signed, unsigned?

They’re Number. That means they can be double, 32-bit signed, 32-bit unsigned. Javascript does not have explicit types or type casting, so the exact type depends on the operator used. For example: The >> operator always returns a signed 32-bit int, so -1.1>>0 will contain -1. -1>>>0 is an unsigned shift right, the result is 0xFFFFFFFF. The + operator will return different types, depending on the input, promoting ints to double to prevent truncation. 1+"1" equals string “11”. The * operator requires Number inputs, so it will try to parse the string into a Number before multiplying (2*"3" == 6).

  • What is the type of the result?
    Number… but it will probably be used as an 8-bit unsigned.

  • Is ^ xor or pow in this context?
    xor, which returns a signed 32-bit int Number.

  • The use of floats is an odd choice, does the behaviour change if you exchange them for their integer equivalents? ( 3e3 -> 3,000 , 4e4 -> 40,000 )
    The result is a Number either way. What you do with it is what defines the exact type. Whoever wrote that wasn’t really aiming for clarity, it’s golfed.

If this really is javascript, 1*"1"[0] == 1. If it’s C, 1*"1"[0] == 49.

After trying a couple of other equations on my pikitto, it’s obvious that this can only really sound terrible and also it takes up too much time calculating.
I’m going to look into other BG music ideas.

@Hanski

Have you ever seen this?

3 Likes

That is quite captivating, even thought it is not byte beat music.

At 256 bytes? What else can it be?

The melody sounds that it is created by a human. Maybe a combination of algorithms and a note table.

Ah. Then perhaps you don’t know who lft is.

1 Like