DESOSA 2022

Sonic Pi - Product Vision and Problem Analysis

Project Aim

As a programmer, after one-day coding in front of a small desk, maybe there was a moment when you were listening to the music that you imagined: “what if I was a musician?”; as a musician, maybe there was also a moment for you to be curious about “how those codes are working under the screens?”. Some people always have curiosities in the domains they have never touched before, and Sonic Pi provides a nice beginning for those people.

What is Sonic Pi? Sonic Pi is the system creatively combining coding and music synthesizer together. Its creator, software programmer Sam Aaron, mainly developed it on Ruby and set it as an open-source platform for future improvements. This system can be run on multiple mainstream operating systems such as Linux, maxOS, and Windows.

Figure: Interface of Sonic Pi

On the website of Sonic Pi, it defines itself as “The Live Coding Music synth for Everyone”. Sonic Pi says it is a “simple” system since there are sufficient tutorials for any beginners, at the same time, it is “powerful” to satisfy the needs of professional musicians. This already defined the aim of this project, which is “building a friendly-used but powerful system, and encouraging users to learn new skills with joy”[4].

To reach this goal, Sonic Pi provides its users with easily-used interface design, and simple instructions. At the same time, it also hosts an official community for the users to share their questions and discussions. Until now, there are 1.8 million live coders in its community.

Domain Model

The Sonic Pi is served for clients both in education and music domain. Although it was first developed to be an interactive programming education program, it now also became a powerful instrument for musicians to play with.

Thus, it first lies in the domain of education. Education means practice and improvement among the learners, as well as guidance provided by the instructors. Students will learn coding from achieving certain tasks and improve by getting more familiar with the basics and contacting more with the advanced programming skills. On the side of the instructors, they should be able to supervise the progress made by students and inspire students with passion and skill. It is also required that the Sonic Pi should be comprehensive enough so that involved curriculums could be designed.

Second, it lies in the domain of music production. The basic starting point in music production is to make sure what genre of music one wants to produce. Then it should be decided what instruments to play with. Next, a melody or symphony should be composed. Time for rehearsal is then needed to actually generate the music. And finally, the post processing process is done to refine the details and make the best out of the original music. Sonic Pi should be able to realize these steps with a pure coding fashion.

Main Capabilities

As a non-traditional instrument for producing music, Sonic Pi translates codes into sounds, allowing users to use blocks, iterations, loops, conditionals, threads and so on, to construct different elements in the music world. Mainly it contains the following capabilities:

  • Create, edit, and, save projects
  • Compile codes into audio results
  • Edit codes in real-time
  • Share music or codes in the Sonic Pi community
  • Visualize the audio result
  • Record and output the audio file

It brings more possibilities of creating music into the world, especially the programming world. However, it is not limited to the programmers. DJs realize playing and live-sharing the music with Sonic Pi in parties. Hundreds of Youtubers are posting their inspiration or process of producing the music and gaining a substantial audience. Even some of the professional musicians are finding Sonic Pi practical and efficient enough to become an alternative of traditional music instruments.

Furthermore, with these capabilities, Sonic Pi is also suitable for educational use. Programming factors such as variables and functions are controlling the beats, tunes, and styles of the music. Children can easily explain the result with the explicit audio output. And obviously, the creative and motivating software raises children’s interest in learning. It is quite an inspiring education toolkit that opens up the programming world for children.

System Context

Figure: System Context View

[1]

Figure x depicts the system context view of the Sonic Pi, which helps figure out what to be installed or modified, and visualize what dependencies are there between the components[3].

Regarding the current context, school children can learn basic programming concepts via the procedure of sound creation and teachers can use Sonic Pi to teach basic programming knowledge in the courses. There are several programming lessons based on the Sonic Pi provided by the contributors and educator instructions are also available in the course manual, which would be a good way to attract kids to learn programming skills and offer them a smoother programming learning curve. For the artists, Sonic Pi enables the possibility of editing music in real-time in the live. In this case, the computer can also be used as an instrument for the performance and they do not need to record the music from scratch for a minor modification.

For the external context, the Sonic Pi offers to support the MIDI I/O system. Musical Instrument Digital Interface (MIDI) is a protocol that allows communication between computers and musical hardware. By connecting the MIDI controller such as a keyboard to the computer, the user is able to edit the music note by note easier, which would be more convenient for the professionals[2].

Stakeholder Analysis

Users

The initial group of people that benefit from Sonic Pi are the school children. Originally this software is designed to explore and teach programming concepts within school through the process of creating new sounds. Sonic Pi has provided school children a joyful and exciting environment for learning programming. As it is closely connected to music, children are also inspired to create music themselves and derive their interest in the art field.

In addition to being an engaging education resource it has evolved into an extremely powerful and performance-ready live coding instrument suitable for professional artists and DJs. With Sonic Pi, these musicians gain more possibilities for creating music, as they are provided with a wide range of options for instruments and music style. Meanwhile, a large amount of money can be saved. Music creators do not need to purchase expensive physical music instruments and rent costly studios to record. Instead, a computer is all it requires. Music is produced with lines of codes and tests are conducted with just a click.

Suppliers

A major supplier for Sonic Pi is the Raspberry Pi. Raspberry Pi provides a portable and relatively cheap hardware platform for Sonic Pi to run. Moreover, the Jessie distribution of Raspberry Pi included Sonic Pi as its built in application. The development and success of Sonic Pi will indeed boost users’ need for Raspberry Pi, the best hardware platform to run Sonic Pi.

Developers

Considering the team behind the development of Sonic Pi and especially the creator of Sonic Pi, Sam Aaron, a programmer and a teacher, this software serves as a means to promote his educational ideals to the world. As he claims, the clear joy, passion and excitement about programming should be shared so as to break the common assumption that the only output of programming is business. Up till now, the software has its own living community. Also, many speeches and live shows have been delivered by Sam to a broad audience. Developers from throughout the world are contributing to this project from the translations to the programming logic.

Key Attributes

After stakeholders are defined and demands are analyzed, what should be done in the next step as a software architect is answering a question “How good the system should be”, in another word, what are the desirable properties of the system. In the next section, it is going to answer this “How” question from both the external and internal perspectives, and try to take ourselves into the role of the software architect of Sonic Pi.

External key quality attributes

Functionality

Sonic Pi is a functional system designed with functionality in mind. The functionality of Soinc Pi ensures that it can work as a code compiler, and the output should be a synthese of music effects.

Usability:

Usability ensures that users will not encounter any difficulties while using the system. Sonic Pi, as a live coding music synthesizer, must ensure that the software responds to corresponding requests with correct feedback (correct sound outputs) at the desired speed.

Flexibility:

Sonic Pi users may run it on various operating systems, so flexibility is required to support the software runs successfully in a variety of OS environments.

Completeness:

As stakeholders and their requirement analyzed in the previous section, Sonic Pi has a large amount of end users with various background - from school children to professional music creators, the completeness of functions should be ensured in order to satisfy the needs for corresponding users, such as more sound effect choices for professional musicians and personalized setting choices.

Internal key quality attributes

Maintainability:

Sonic Pi, a music synthesiser used by some musicians who are dissatisfied with the current sound effects, should be able to add new features while retaining its current functionality. As a result, the quality attribute of maintainability must be added to the list.

Testability:

As an open source project, it must include testability in its quality attributes to ensure that all changes are made after thorough testing.

Product Roadmap

We consider that the main issue the Sonic Pi has to solve in the near future is with stability. Many people working on different operating systems have published issues on Github about unsuccessful booting of Sonic Pi. This could be developed through maintaining certain patches or distributions of the program.

After promising stability, the next step is to improve the user interface. The current interface is enough for programmers to program. But for students to learn coding, and musicians to compose music, it is better to make the interface more exciting and passionate.

Finally, collaboration with different softwares or realtime instruments could be developed. Sonic Pi is now a standalone software that can produce music by coding, and only coding in its language. This sometimes could be a limitation to creativity. Allowing the software to interact with different softwares and instruments may help broaden its application.

Ethical considerations

The Sonic Pi is a free platform for music creation and programming learning and everyone can get access to it without restrictions. Users without any experience in composing a song are able to create the music and share them in the community to find like-minded people or their own groups. Since users can only use it to compose music or learn to code in person, it is unlikely to involve the offensive topic in the software if the coding or composing tutorials are reviewed before publishing. To protect the copyrights of works and the privacy of users, it is prohibited to publish the work against proprietary rights in the Sonic Pi website or community and only basic user information is collected and processed under the regulations [5]. In general, the design of Sonic Pi follows the ACM Code of Ethics [6] but the developers have to be wary of malicious code during code review to ensure the software will not be illegally exploited.

References

[1] Sonic Pi. Sonic Pi Tutorial v3.2. https://sonic-pi.net/tutorial.html#section-1-2

[2] Hahn, M. (2020, September 4). What Is MIDI? How To Use the Most Powerful Tool in Music. LANDR Blog. https://blog.landr.com/what-is-midi/

[3] Pautasso, C. (2020). Software Architecture: Visual Lecture Notes. Leanpub. Leanpub.com.

[4] Sonic Pi. (2022). Sonic Pi - The Live Coding Music Synth for Everyone. https://sonic-pi.net/

[5] Sonic Pi. (2013). Terms of Service. In_thread. https://in-thread.sonic-pi.net/tos

[6] Association for Computing Machinery. (2018, June 22). ACM Code of Ethics and Professional Conduct. ACM Code of Ethics and Professional Conduct. https://www.acm.org/code-of-ethics

Sonic Pi
Authors
Tianyu Mo
Manning Zhang
Hanyuan Ban
Yuncong Zuo