23.3.3 How to Use Sonic Pi
23.3.3.1 Step 1 – First Sounds with Sonic Pi
First, select [Workspace 1] and enter the following. Then click [Run] button. What happens one day? Then you will hear a beep sound.
23.3.3 How to Use Sonic Pi
23.3.3.1 Step 1 – First Sounds with Sonic Pi
First, select [Workspace 1] and enter the following. Then click [Run] button. What happens one day? Then you will hear a beep sound.
23.3.2 Getting Started
You can start Sonic Pi from the desktop or Applications Menu as shown below.
When the program starts, the following screen appears.
23.3 Sonic Pi
23.3.1 Features
Sonic Pi is a sound processing computer program. It is originally developed to support computer and music lessons at school, and it is a live coding synth that everyone can use for free. By making code with this, you can create and play classic and contemporary music styles, from Canons to Dubstep. Even if you want to make funky music like Daft Punk or Will.I.Am, but you do not know how to hold and play cello, you can do this without problems by using Sonic Pi.
23.2.3 How to use Mathematica
Here we will use the case to explain how to use “notebook” in Mathematica.
23.2.3.1 How to Write Program in Mathematica
● Entering and executing script
23.2.2 Getting Started
Mathematica can be used in windowing environment and also in Terminal environment.
23.2.2.1 Starting in Desktop GUI Environment
You can run the program using [Mathematica] menu or icon in the desktop or application menu. You can alos do the same thing by running “mathematica” command on the Terminal screen.
23.2 Mathematica or Wolfram language
23.2.1 Features
Mathematica is a programming tool specialized for numerical analysis that facilitates the professional mathematical calculations needed in science, mathematics, computers, and engineering. It was developed in 1988 by Wolfram Research.
The developer, Stephen Wolfram is originally a particle physicist. While studying particle physics, he created a program for complex mathematical calculations and digged into program development. After all, he abandoned physics and devoted himself to development of the program. Mathematica is the program he developed in this way.
23.1.3 Available Major Languages and Tools
You can use various programming languages to write programs in Raspberry Pi. The following are a part of representative examples of what you can use in Raspberry Pi, and there are many other tools you can use.
■ Mathematica or Wolfram
■ Sonic Pi
■ Scratch
■ Python
■ C
■ Java
23.1.2 What We Can Do with Program
Let’s examine what it means for a user to develop and use a program separately, and what can be done with it.
■ You can freely develop and use functions that users want. If a function is not provided by an existing command or function, it can be developed and used by itself.
■ You can utilize the functions of existing command or program. If you need it in a program, you can use it by calling an existing system command or another program.
23.1 Overview of Program Basics
23.1.1 Significance of Program
In the Raspberry Pi system, we were able to do various tasks with the basic commands provided by the system. Also, with a script tool, we could combine several commands and process them all at once, and sometimes we could do it automatically. However, in this method, only the commands or functions provided basically by the system can be used, and besides, there are many restrictions because users can not perform other unique tasks desired by users.
Chapter 23 Writing Program
Chapter’s Main Topics
This chapter describes the way and procedures to create various programs in Raspberry Pi system. It shows you how to do various tasks in the system with simple operation without writing a program yourself. It also shows how to use the full-fledged program development language like Python, C, and Java.
It includes descriptions on the following topics:
■ Overview of program basics
■ Mathematica or Wolfram language
■ Sonic Pi
■ Scratch language
■ Python language
■ C language
■ Java language