Mahadevan, Freeman, Magerko - An Interactive, Graphical Coding Environment For EarSketch Online Using Blockly and Web Audio API
Mahadevan, Freeman, Magerko - An Interactive, Graphical Coding Environment For EarSketch Online Using Blockly and Web Audio API
ber represents a single audio file or an index in a list of audio 3. CONCLUSION AND FUTURE WORK
files, a “+” sign extends the duration of the preceding sound In order to make this project appealing to a broader au-
by a sixteenth note, and a “-” sign indicates a rest. dience, further refinement and evaluation is required. The
Bolstered by the default libraries provided by Blockly (such criteria for evaluation must be chosen carefully. From the
as logic, loops, text and variables), the implemented frame- point of view of cognitive factors involved in visual program-
work is now capable of effectively leveraging the EarSketch ming, Blackwell et al.[9] lists out various intelligible ’dimen-
approach to teaching computer science in a visual program- sions’ such as Abstraction gradient, Closeness of mapping
ming context. and hidden dependencies. Their research highlights the im-
portance of the underlying paradigms of visual programming
languages (control flow versus data flow) and that it must
2.2 Saving and exporting be considered before performing empirical evaluations.
Blockly provides low level routines to switch between DOM There are several constraints with this environment that
and XML. The XML for these groups of blocks in the main need to be addressed. It is difficult to write complex scripts
workspace is the same as Blockly’s XML save format. The using Blockly due to limited available real estate on the can-
equivalent XML is stored just like any other JavaScript or vas. Although Blockly supports collapsing of blocks, it is not
Python script on the EarSketch server. When the user at- a scalable solution for larger projects. Unlike the code edi-
tempts to load his or her Blockly XML, the Blockly editor tor which supports multiple tabs, Blockly follows a singleton
is automatically brought up and populated with the corre- paradigm. Because of this, the user is limited to having one
sponding DOM. With a single click, the user can also export script open at a time. It is also challenging to address cer-
the Blockly code to Python or JavaScript code in a new tab tain basic computing concepts such as variable scope within
in the code editor. This can be particularly useful to illus- Blockly.
trate how abstractions translate to high level code. It also Despite the aforementioned constraints, there is opportu-
enables enthusiastic individuals to adopt different method- nity for improvement with regard to further abstraction and
ologies for composition, for example to design a skeletal improved user experience. The setEffect() API, for in-
framework via blocks and perform some advanced editing stance, can be broken down into separate entities for creating
through code. It should be noted however, that unlike Pen- the effect and applying automation envelopes on them. In-
cilCode [8] and Code.org’s App Lab [2], bidirectional con- telligently capturing logical errors like infinite loops and un-
version between blocks and text views of code is not yet reachable code sections leaves less room for confusion while
possible: users can only convert from blocks to text code debugging. Also, the notion of bidirectional conversion be-
but not the other way.
tween code and blocks opens a new avenue for EarSketch to [12] J. Freeman, B. Magerko, T. McKlin, M. Reilly,
explore. Animations between conversions and re-rendering J. Permar, C. Summers, and E. Fruchter. Engaging
unformatted text into clean blocks are some of the things underrepresented groups in high school introductory
users can benefit from. computing through computational remixing with
The project also stands as an example of the flexibility of earsketch. In Proceedings of the 45th ACM technical
authoring web applications with Web Audio API. Before the symposium on Computer science education, pages
advent of the Web Audio API, audio-intensive applications 85–90. ACM, 2014.
such as EarSketch could only be developed as standalone [13] J. Freeman and A. Van Troyer. Collaborative textual
desktop application software. The Web Audio API enables improvisation in a laptop ensemble. Computer Music
EarSketch to be deployed in the browser, where it can eas- Journal, (2):8, 2011.
ily integrate a variety of third-party APIs, frameworks, and [14] D. Kumar. Digital Playgrounds for Early Computing
web services to add new functionality to the platform much Education. ACM Inroads, 5(1):20–21, Mar. 2014.
more quickly than would be possible with desktop software. [15] T. Magnusson. The IXI lang: A SuperCollider parasite
The rapid integration of Blockly into EarSketch to enable a for live coding. International Computer Music
visual programming paradigm is one such example. Because Conference, pages 503–506. San Francisco,
web development tools and APIs make it relatively trivial to Huddersfield, International Computer Music
integrate new coding paradigms into the EarSketch environ- Association, Centre for Research in New Music
ment, our team has been able to concentrate its resources University of Huddersfield, 2011.
on exploring which programming paradigms map best onto [16] A. Mahadevan, J. Freeman, B. Magerko, and J. C.
digital audio workstation workflows and onto computer sci- Martinez. Earsketch: Teaching computational music
ence learning objectives, and on API and curricular design remixing in an online web audio based learning
that supports these approaches. environment. In Proceedings of the 2015 Web Audio
Conference, Paris, France, 2015.
4. ACKNOWLEDGMENTS [17] J. Maloney, M. Resnick, N. Rusk, B. Silverman, and
This material is based upon work supported by the Na- E. Eastmond. The scratch programming language and
tional Science Foundation under Grant Nos. CNS #1138469 environment. ACM Transactions on Computing
and DRL #1417835. Many thanks to the entire EarSketch Education (TOCE), 10(4):16, 2010.
project team (http://earsketch.gatech.edu/personnel). [18] S. McCoid, J. Freeman, B. Magerko, C. Michaud,
T. Jenkins, T. Mcklin, and H. Kan. EarSketch: An
integrated approach to teaching introductory
5. REFERENCES computer music. Organised Sound, 18(2):146–160,
[1] Blockly - https://blockly-games.appspot.com/ Aug. 2013.
accessed: 04/21/2015. [19] N. Park and Y. Ko. Computer Education’s
[2] Code.org’s app lab - https://code.org/educate/applab Teaching-Learning Methods Using Educational
accessed: 02/17/2016. Programming Language Based on STEAM Education.
[3] Max / msp - https://cycling74.com/ accessed: In J. J. Park, A. Zomaya, S.-S. Yeo, and S. Sahni,
04/21/2015. editors, Network and Parallel Computing, number
[4] Scratch - https://scratch.mit.edu/ accessed: 7513 in Lecture Notes in Computer Science, pages
04/21/2015. 320–327. Springer Berlin Heidelberg, Jan. 2012.
[5] Wavepot - http://wavepot.com/ accessed: 04/21/2015. [20] M. Puckette et al. Pure data: another integrated
[6] A. Baratè, M. G. Bergomi, and L. A. Ludovico. computer music environment. Proceedings of the
Development of Serious Games for Music Education. Second Intercollege Computer Music Concerts, pages
Journal of e-Learning and Knowledge Society, 9(2), 37–41, 1996.
May 2013. [21] C. Rader, C. Brand, and C. Lewis. Degrees of
[7] D. Bau. Droplet, a Blocks-based Editor for Text Code. comprehension: children’s understanding of a visual
J. Comput. Sci. Coll., 30(6):138–144, June 2015. programming environment. In Proceedings of the ACM
[8] D. Bau and D. A. Bau. A Preview of Pencil Code: A SIGCHI Conference on Human factors in computing
Tool for Developing Mastery of Programming. In systems, pages 351–358. ACM, 1997.
Proceedings of the 2nd Workshop on Programming for [22] M. Resnick, J. Maloney, A. Monroy-Hernández,
Mobile Touch, PROMOTO ’14, pages 21–24, New N. Rusk, E. Eastmond, K. Brennan, A. Millner,
York, NY, USA, 2014. ACM. E. Rosenbaum, J. Silver, B. Silverman, and Y. Kafai.
[9] A. F. Blackwell, K. N. Whitley, J. Good, and Scratch: Programming for All. Commun. ACM,
M. Petre. Cognitive factors in programming with 52(11):60–67, Nov. 2009.
diagrams. Artificial Intelligence Review, [23] N. C. Shu. Visual programming. Van Nostrand
15(1-2):95–114, 2001. Reinhold New York, 1988.
[10] S. Cooper, W. Dann, and R. Pausch. Teaching [24] K. N. Whitley. Visual programming languages and the
objects-first in introductory computer science. In empirical evidence for and against. Journal of Visual
ACM SIGCSE Bulletin, volume 35, pages 191–195. Languages & Computing, 8(1):109–142, 1997.
ACM, 2003.
[11] J. Freeman. Survey of music technology
https://www.coursera.org/course/musictech, October
2014.