If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Universal Integer Translator
4 posts
• Page 1 of 1
Universal Integer Translator
Hi All,
While I was tinkering with Skull's MIDI gadgets, I realised how much I hate converting hex numbers!
So I made this little 'Universal Integer' box that lets you type in values in decimal, hex, octal or binary and just get the integer straight out without having to use the dreaded Windows calculator!
To make it even easier to use, it's made so that it doesn't care about the case of letters, and you can put whitespace anywhere within number to separate out the digits - there are a load of examples in the schematic.
The conversion is all handled by a single Ruby code block inside, so feel free to pull that out to use with your own custom edit boxes etc.
While I was tinkering with Skull's MIDI gadgets, I realised how much I hate converting hex numbers!
So I made this little 'Universal Integer' box that lets you type in values in decimal, hex, octal or binary and just get the integer straight out without having to use the dreaded Windows calculator!
To make it even easier to use, it's made so that it doesn't care about the case of letters, and you can put whitespace anywhere within number to separate out the digits - there are a load of examples in the schematic.
The conversion is all handled by a single Ruby code block inside, so feel free to pull that out to use with your own custom edit boxes etc.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Universal Integer Translator
Trog,
Nice use of RegExp's ... Keep it going!
Nice use of RegExp's ... Keep it going!
- ahcurer
- Posts: 7
- Joined: Sat Jun 23, 2012 1:55 am
Re: Universal Integer Translator
Thanks,mate - yes indeed, I have been forcing myself to learn (slowly!) how RegExp's work. The power they have for string manipulation is really astounding, but that syntax sure does take some getting used to!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Universal Integer Translator
Yes I couldn't agree more. I have been reading Mastering Regular Expressions Third Edition. The first few chapters really helped me to understand them a little more, always learning though.
I have followed your skills from the SM forum and am in constant amazement on how easy this all seems to come to you.
And now I guess I can follow you over here too.
I spent the $$ and bought RubyMine a while ago to help me learn the Ruby lang. I like the IDE thing as I come from the VC++ environment. Even though Ruby is an interpreted lang, I am still impressed with it (OCRA will make an .exe). Can do a lot with only a little.
Cheers trog man.
I have followed your skills from the SM forum and am in constant amazement on how easy this all seems to come to you.
And now I guess I can follow you over here too.
I spent the $$ and bought RubyMine a while ago to help me learn the Ruby lang. I like the IDE thing as I come from the VC++ environment. Even though Ruby is an interpreted lang, I am still impressed with it (OCRA will make an .exe). Can do a lot with only a little.
Cheers trog man.
- ahcurer
- Posts: 7
- Joined: Sat Jun 23, 2012 1:55 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 59 guests