@hhpapazian No. For x = 0, result is F, but take for example x = 12. 12*299+41 = 0xe2d, so & 511 = 0x2d, which is not > 294, so also F.
-
-
-
Replying to @hhpapazian
@hhpapazian I might use this in a project I'm working on, as it's (probably) the fastest way of computing $(something) without using a LUT.1 reply 0 retweets 0 likes -
Replying to @raphlinus
@raphlinus I thought in this age of ~$1/GB LUTs would be a non-issue. Glad they're not though! Makes people think.1 reply 0 retweets 0 likes -
Replying to @hhpapazian
@hhpapazian@raphlinus e.g. wavetable synthesis is still faster with a sine table than computing it directly on a modern x86 CPU1 reply 0 retweets 0 likes -
Replying to @NilsSchneider
@NilsSchneider@hhpapazian Heh, true for scalar, false for SIMD, see https://code.google.com/p/music-synthesizer-for-android/wiki/SinePoly …1 reply 0 retweets 0 likes -
-
Replying to @NilsSchneider
@raphlinus@hhpapazian For a given X = Midi note you know if it's a black key if the result is true. Crazy shit2 replies 0 retweets 0 likes -
Replying to @NilsSchneider
@NilsSchneider@hhpapazian Well done! How does it work?3 replies 0 retweets 0 likes -
Replying to @raphlinus
@raphlinus@hhpapazian A loop count of 7 makes sense because of 7 white keys. 294 is chosen wisely to grab the black keys inbetween1 reply 0 retweets 0 likes
@NilsSchneider @hhpapazian Yup, you got it. (x*7+1)%12 > 6 is a more concise equivalent formula, but modulo is slower.
-
-
Replying to @raphlinus
@raphlinus@hhpapazian Nice! Where can I send my application to? :D0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.