You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

Hex Drums? Say What??

Find out here: Hexadecimal Drum Machine

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 13,180

Very interesting, MathsIsFun! I tried different combinations at random, and enjoyed it! I'm sure all visitng the page would love it too! A link to Hex Drums may be placed on the index page, MathsIsFun!

Character is who you are when no one is looking.

Offline

**justlookingforthemoment****Moderator**- Registered: 2005-05-26
- Posts: 2,161

Wow! It's cool! I'm going to have a play!

Do you remember when a guest once posted asking for 'maths music games' and we had no idea what that meant? Well, I think this qualifies!

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

Thanks, it was fun. Now I just need some more ideas ... hmmmm, maybe a random function could be fun?

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**justlookingforthemoment****Moderator**- Registered: 2005-05-26
- Posts: 2,161

MathsIsFun wrote:

Now I just need some more ideas ...

A speed adjusting slider, for changing the tempo?

Oh, yes, I like the random idea.

One more thing: when I click on the 'hex drums' title in the flash page, I get this message:

Oops! - can't find the file "/games/hexadecimal-drum-machine.html"

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

Yes, the tempo adjusting dial thing is a good idea. I don't think the random thing is though.

A rhythm created using that would be exactly that - random. And for that reason, it would sound absolutely horrible.

Another possible idea is to adjust the amount of beats you have in the loop. At the moment it's 16, which means that any continuous rhythm you make has to have 1, 2, 4, 8 or 16 beats in it. If you made the thing's size adjustable, then people would have more freedom in creating rhythm loops. I'd imagine that might be quite hard to implement though.

Why did the vector cross the road?

It wanted to be normal.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

jl: I don't know how to let the user adjust the speed! And thanks, I will fix that error.

mathsy: adjustable size is pretty difficult, but maybe one day. And the random rhythm could have 1,2,4,8 or 16 spacings, so that one random change could be (for example) to play the snare every 4th beat starting at beat 3.

Another fun idea would be to have a couple of extra drums that could be "hit" with the mouse.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

Good pages, but there are a few faults with the converter.

When you type stuff into the hexadecimal box, the other two behave strangely. The decimal one eventually gets a decimal point from nowhere and starts showing numbers far smaller than it should, and the binary one is even odder. If you type only 1 and 0 into the hex box, then it the binary box just copies it and there are other strange things about it too.

The explanation for Binary, Decimal and Hex numbers was very good though. I especally liked the counter that could go up to 10 digits in any base from 2 to 16. I watched it count all the way up to 1111111111 in binary.

The only minor thing I can find with that is that the tally of how many it's done goes off the screen after around 150-ish. I'm not sure how you'd fix that though.

Why did the vector cross the road?

It wanted to be normal.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

Thanks mathsy! Lifesaver! I simply didn't copy a line of code to the right spot in the final version Attending to it now.

With the tally, it goes off the screen and eventually stops creating little dots (if I let it go on, and somebody let it go overnight it might eventually create so many little dots that it would use up all the computers memory). Maybe I could get it to create a large dot for every hundred dots or something?

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

Sorry, but there are still a few minor faults in there. If the decimal box gets more than 15 digits in it, it tries to show it in standard form, but it does have anything to say "x 10^##", which makes it a bit confusing.

Also, if you type a number that ends in 0 into the hex box, then the binary converter ignores the 0.

e.g 100(Hex) ---> 1(Bin)

Why did the vector cross the road?

It wanted to be normal.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

That's good. I will allow the letter "e" in the decimal box, that should fix it.

That 100(Hex) ---> 1(Bin) is part of the original problem. Inbetween Binary and Hex I do a direct "translation", and then clean up any leading and trailing zeros. It was that cleanup that was misbehaving (turning binary "100000000" into "1").

Have a try now, I have uploaded a modified version. You may need to use "refresh".

(Now that I allow "e" to be displayed in the decimal box, people will also be able to enter decimals in standard form. I now need to check all possibilities there.)

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

Heehee, I found some more.

When you enter big numbers into the decimal box, then the binary and hex boxes start to not convert accurately anymore. They get the first digits of the number and then it ends with a bunch of zeroes.

Interestingly, converting to and from binary and hex doesn't have this problem.

Why did the vector cross the road?

It wanted to be normal.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

I have been relying on floating point arithmetic - I may need to go to full-precision digit-by-digit conversion

At least then I won't have to deal with variations like "-1.1e-5"

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

Me like! Me make noise!

5EC1A1A85E5A81A0

1591121181151210

El que pega primero pega dos veces.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

Hey, I just read the page. Is it supposed to end like this?

"Also, computers love binary (and hexadecimal) because the computer circuits and memory are based on "on/off" (either a signal is there or not). For example, the pictures and sound on a DVD"

It looks chopped short to me.

El que pega primero pega dos veces.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

On the converter, I didn't find any errors, but I do have a suggestion. Would it be possible to make it type from right to left? That's the way binary numbers increase, so it makes more intuitive sense while typing even though on paper it may sound like a bad idea.

El que pega primero pega dos veces.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

ryos wrote:

5EC1A1A85E5A81A0

1591121181151210

5EC1A1A85E5A81A0 sounds best on drumkit 3

1591121181151210 sounds best with the volume down

And you are right, explanations of why binary is useful is just so obvious I couldn't think of what to say! How should it end?

Offline

**justlookingforthemoment****Moderator**- Registered: 2005-05-26
- Posts: 2,161

This is fun! Thanks Rod!

90A0C01A1842D182

On the Binary, Decimal and Hexadecimal Numbers page, in the 'Counting' flash window, the white bits on the play button aren't transparent, whereas the pause button is. Purely for looks...

Hexadecimal Numbers wrote:

The Hexadecimal

numberare interesting.

Maybe insert an 's' or rephrase the sentence? That's all. Thanks.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,534

Great!

And thanx for corrections.

Another One: FAF90088280820C0

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

Good ones, you guys!

9CBADDCB8BABCDAB

8090a0b0c0d0e0f0

(play them on kit 2. #2 I made by starting with the cursor at the left (and the field zeroed out) and typing 123456789abcdef. The program turned it into that, and it doesn't sound half bad!)

As for how it should end...Maybe explain that binary is the only way to represent any number if all you have is two numbers to work with. And that this invention enables all electronic gadgets, from remote controls to satellites. :

El que pega primero pega dos veces.

Offline

Pages: **1**