Square "42 Melody" (bytebeat)
category: music [glöplog]
So I was trying modifications on the "42 Melody" and I ended up with a result that has a square tone instead of a sawtooth tone
try it out if you want
try it out if you want
Code:
((t >> 10) & 42) * t + 1000000000000000000
Ummm, no? 1000000000000000000 & 0xFF is zero, so it's the same as:
Which is the regular 42 melody. (Unless you're not writing 8-bit PCM output, then of course the addition will mess things up if it's 24-bit or higher.)
Code:
((t >> 10) & 42) * t
Which is the regular 42 melody. (Unless you're not writing 8-bit PCM output, then of course the addition will mess things up if it's 24-bit or higher.)
no, its actually not that. idk how to use pouet but the code is t*(42&t>>10) for me for some reason
adding a huge value truncates the precision, which is why it sounds different than without. You can use 1e18 instead if you want to save some decimal digits.
Right, JS, I was assuming C.
This bytebeat code here:
https://greggman.com/downloads/examples/html5bytebeat/html5bytebeat.html#t=0&e=0&s=44100&bb=5d00000100a20000000000000000310f4a8310243b01750ed3384422e816d117ef47cde333f8e0219e085bfaf6897f19a38448baf9f98e8bd29c9b031c1efcce20ca1aee63092b898b7a0028aa3b04076286dc7e139d1efb71dd82d676f9927cabc91080df6681cf49ee8db9a3c26e56471eb215f92b9a04781211110cdb198adc046154b75b912c693c3500eed481511fffd8a06000
https://greggman.com/downloads/examples/html5bytebeat/html5bytebeat.html#t=0&e=0&s=44100&bb=5d00000100a20000000000000000310f4a8310243b01750ed3384422e816d117ef47cde333f8e0219e085bfaf6897f19a38448baf9f98e8bd29c9b031c1efcce20ca1aee63092b898b7a0028aa3b04076286dc7e139d1efb71dd82d676f9927cabc91080df6681cf49ee8db9a3c26e56471eb215f92b9a04781211110cdb198adc046154b75b912c693c3500eed481511fffd8a06000
Remove the spaces of the link!