Showing posts with label webapp. Show all posts
Showing posts with label webapp. Show all posts

Playing MIDI tracks from an Arduino

Posted: Thursday, 29 October 2015

Link: https://www.extramaster.net/tools/midiToArduino/

Table of Contents (TOC)


^ TOC

So, you just learnt how to control a buzzer using an Arduino, but you want more then just simple beeps and hums - you want to assert your dominance over the sound-waves to show-off how well you can control the buzzer.

Cynical? Well there's no denying that it's a sentiment that we all share once we learn something new, but hey, if you've managed to acquire and get an Arduino working, then that's quite far an accomplishment.

A quick search of "music buzzer arduino" should point you to the right direction, but no-one has the time to individually hand-code and map the midi-tones to the frequency values that the Arduino's Tone function requires, especially if you're working with a long MIDI track.

The solution?

https://www.extramaster.net/tools/midiToArduino/

Circuitry

^ TOC

Wiring the Buzzer is trivial, just place the buzzer on two strips (on a breadboard), connect one strip to Pin 11 on your Arduino, and the other strip to the Ground.

Demo

^ TOC
https://www.youtube.com/watch?v=B1oHQzp1P3w
https://www.youtube.com/watch?v=4FDFpycApP4

Note that this also works with Raspberry Pis.
https://www.youtube.com/watch?v=HOisQF-JaS0


Steps/Instructions

^ TOC
  1. Visit: https://www.extramaster.net/tools/midiToArduino/
  2. Upload a midi file
  3. Choose the track that you want to export
  4. Copy the resulting code to a new Arduino sketch

Sample Exported Arduino Code

^ TOC

Didn't get the midi file to work with the web app? No worries, here are some sample code generated by the web-app

Midi: Fleuron-128 - Heaven - Song: Shaun Frank & KSHMR - Heaven (feat. Delaney Jane)

Midi: Antergy - DB15 - Song: Atmozfears - DB15

Midi: Kevin Fishburne - Terra's Theme - Song: Final Fantasy VI - Terra's Theme

https://www.extramaster.net/tools/midiToArduino/

Final Notes

^ TOC Oh, and by the way, it appears that you can leave the Piezo buzzer running on loop for an extensive amount of time (24 hours+), so if you want to play a midi indefinitely, you can use an Arduino to do so.

Unfortunately, you can only have one tone running at a time, so if your midi track has multiple keys being played simultaneously, expect some wacky results. (here - try this: http://www.forelise.com/midi - "Track 2: Acoustic Grand Piano - Piano - Fr Elise")
If you attempt some protothreads hack, then expect only one Piezo buzzer to work (at a time). But if you're game, and want to give using protothreads a try:





https://www.extramaster.net/tools/midiToArduino/

New site design

Posted: Sunday, 17 August 2014

Scroll down to the comments section to comment!
The web will continue to innovate and inspire new technology to impact on how we view the web and the world.

Familiarity

The current site template is focused on consistency and functionality, with interactive user interface elements given a clear distinction amongst other interfaces. A highlight of this new design consistency focuses on links. The idea of having links look like buttons, because the idea of hypertext being just a "link" is over. Buttons provide the gateway to more interactivity and content, and so why can't links convey the same meaning?

New web standards

HTML5 isn't new. It's been out there for a few years now. However, each second of time passed will see more new features added to HTML5, which makes it unique. This site design seeks to establish the new HTML5 tags with meaning and intent, with the <header>,<section> and <footer> tags reiterating meaning with site structure, and this is visually emphasised with CSS3.
SVG graphics are also featured in this new design. With most of the visual icons in an embedded SVG format. Vector graphics are at the hallmark of 2013-2014 web development, yet, major sites still rely on .jpg, .png and .gif for delivering graphical content. No more blocky graphics here! SVG aliases lines so they look good at any resolution!
Oh, and as of the time of this post, the site is also valid HTML5, but it might not be true from time-to-time (due to updates, e.t.c..) and isn't worthy of mentioning on the site itself.

Content-rich

Being a site that focuses on feature-rich content, the new site design is focused on making content as readable and interactive as possible. Scrolling triggers a mini parallax effect that is both used to indicate the position on the page, but also to increase the level of interactivity that this site has to offer.

One-size fits all, responsiveness

We should have to push you off to mobile-optimized versions of websites when mobile devices can only do so much in 2014. Whether it be a HDTV, 4K TV or a 300DPI "smartphone", the website will scale appropriately and still be readable... This coupled with the SVG graphics detailed above, leads to a crisp and clear browsing experience.
So, what do you think? Is it a little bit too over-the-top? Or is your experience stuttered by lag?
Comment here!

Checking for users who don't followback on Twitter

Since I no-longer "digest" my news from twitter,

I maintain my twitter account solely for people interested in "subprojects" that I embark on, and to stop others from grabbing at "extramaster".

I am aware of those that don't really care about my tweets and about the fact that a substantial portion of twitter users are bots.
And so, to keep my twitter followers as close to 1:1 as possible, I created a little online tool which identifies users who are not following you, hence not "followbacking".

Instructions:

In order to check for Twitter users that don't follow you back/aren't following you, then you can follow the steps below.

  • Step 1: Visit the landing page - http://www.extramaster.net/tools/twitterFollows/
  • Step 2: Click on the "Login to Twitter" button.
  • Step 2.5: Authorize the application with Twitter, or if you already have, let it login automatically.
  • Step 3: Look through the accounts that aren't following you (that you follow), and have fun!
Please keep note that if you want to build a semi-meaningful relationship with me, feel free to have a chat with me on Google+! Twitter feels too much like a race, and it's doomed to fail anyways.