Piano Playing Web Application Mobile Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Xcode SpriteKit Game Mobile Tutorial

Piano Playing Web Application Mobile Tutorial

Our Piano Playing web application has moved on to a โ€œsecond draftโ€. Nothing has changed about it using those audio mp3 files from the other day when we presented Xcode SpriteKit Game Primer Tutorial to โ€œreframeโ€ their use for creating a client based web application featuring โ€ฆ

  1. simulated piano keys that can be pressed by the user โ€ฆ and/or โ€ฆ
  2. the user can play some scales, arpeggios or chords with a nominated tonic note and in major or minor keys
  3. show a visual โ€œcueโ€ just below the piano keys to show the piano key note last played โ€ฆ we did start out on an SVG type of solution based on the code of Legend for and from HTML Map Element Web Server Tutorial where โ€œoverlaysโ€ appear in an HTML table โ€œlegendโ€, but trying โ€œoverlayingโ€ in this way caused problems, so today we show our โ€œvisualโ€ helpers overlaying the border down the bottom of the piano keys comprising โ€ฆ
    • HTML div elements โ€ฆ involving โ€ฆ
    • CSS border: 1px solid red; // initially, and also dynamically controlled โ€ฆ and with the usual โ€œoverlayโ€ suspects โ€ฆ
    • CSS position:absolute; left: 0; top: 0;
    • CSS z-index: 9;
    • CSS opacity: 1.0; // initially, and also dynamically controlled
    • iOS mobile users (only) are presented with new HTML audio elements awaiting user โ€œclick/touchโ€ intervention, to make the audio happen, as per Apple requirements on audio media, here

So with this second draft we associate audio โ€œcuesโ€ with โ€œvisualโ€ ones, and include functionality to cater for the mobile device habit of disallowing automated audio plays, by fitting in with this restriction, but use HTML audio elements, showing their controls, for users to push the Play buttons necessary to satisfy iOS media rules. For today, as with WordPress 4.1.1โ€™s Piano Playing Web Application Mobile Tutorial, try the piano playing web application (with the HTML and Javascript pianoโšซhtm), changed in thisway with respect to that previous โ€œfirst draftโ€, at this liveโœ‚run link (where, again, the C major scale, one octave is played first up), or, live also, below, in an HTML iframe โ€ฆ

We hope you like it. Even with the iOS mobile version, you may find a secondary iOS user with the web application can help out the primary piano practicer, playing along with the scales played on a real piano.



Previous relevant Piano Playing Web Application Primer Tutorial is shown below.

Xcode SpriteKit Game Primer Tutorial

Piano Playing Web Application Primer Tutorial

We hope you enjoy our new โ€œfirst draftโ€ of a Piano Playing web application. Weโ€™re using those audio mp3 files from the other day when we presented Xcode SpriteKit Game Primer Tutorial to โ€œreframeโ€ their use for creating a client based web application comprising, essentially โ€ฆ

  1. audio files, thanks to useful link
  2. image of piano, thanks to openclipart
  3. map tag creation, thanks to mobilefish
  4. our Javascript logic to play scales or arpeggios or chords in major and minor keys, for the userโ€™s listening โ€œindulgenceโ€, or perhaps to accompany a user learning the piano

This first draft needs more work regarding tying audio โ€œcuesโ€ with โ€œvisualโ€ ones, and getting around the mobile device habit of disallowing automated audio plays. That will be for future postings. But for today, as with WordPress 4.1.1โ€™s Piano Playing Web Application Primer Tutorial, try the piano playing web application (with the HTML and Javascript pianoโšซhtml) at this liveโœ‚run link (where the C major scale, one octave is played first up), or, live also, below, in an HTML iframe, curiously the technique by which we play the audio files (allowing for a bank of 9 HTML iframe elements be able to play up to 9 notes at the same time, hopefully enough for most future functionality thoughts โ€ฆ time will tell) โ€ฆ

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Games, iOS, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *