Η διεπαφή του Sonic Pi

Το Sonic Pi έχει μία πολύ απλή διεπαφή για την κωδικοποίηση μουσικής. Ας αφιερώσουμε λίγο χρόνο για να την εξερευνήσουμε.

Sonic Pi Interface

Α. Ελεγκτές Αναπαραγωγής

Αυτά τα ροζ κουμπιά είναι ο βασικός τρόπος για το ξεκίνημα και το σταμάτημα ήχων. Υπάρχει το κουμπί Τρέξιμο για την εκτέλεση του κώδικα που βρίσκεται στον επεξεργαστή κειμένου, το Στοπ για το σταμάτημα όλου του κώδικα που εκτελείται, το Αποθήκευση για την αποθήκευση του κώδικα σε εξωτερικό αρχείο, και το Ηχογράφηση για την δημιουργία μιας ηχογράφησης (σε αρχείο WAV) του ήχου που παίζει.

Β. Χειριστήρια Επεξεργαστή Κώδικα

These orange buttons allow you to manipulate the code editor. The Size + and Size - buttons allow you to make the text bigger and smaller.

Γ. Πληροφορίες και Βοηθεια

Αυτά τα μπλε κουμπιά σου δίνουν πρόσβαση στις πληροφορίες, βοήθεια, και ρυθμίσεις. Το κουμπί Πληροφορίες ανοίγει το παράθηρο πληροφοριών, το οποίο περιέχει πληροφορίες για το Sonic Pi - την κεντρική ομάδα, την ιστορία του, τους συνεισφέροντες και την κοινότητα. Το κουμπί Βοήθεια ανοιγοκλείνει το σύστημα βοήθειας (Γ), ενώ το κουμπί Ρυθμίσεις ανοιγοκλείνει το παράθυρο ρυθμίσεων, το οποίο σου επιτρέπει να ελέγξεις μερικές από τις βασικές παραμέτρους του συστήματος.

Δ. Επεξεργαστής Κώδικα

Αυτή είναι η περιοχή στην οποία θα γράφεις τον κώδικά σου και θα συνθέτεις/παίζεις μουσική. Είναι ένας απλός επεξεργαστής κειμένου όπου μπορείς να γράψεις κώδικα, να τον διαγράψεις, να αποκόψεις και να επικολλήσεις, κλπ. Σκέψου το σαν μια πολύ βασική έκδοση του Word ή του Google Docs. Ο επεξεργαστής χρωματίζει αυτόματα τις λέξεις ανάλογα με τον ρόλο που έχουν στον κώδικα. Αυτό μπορεί να σου φανεί περίεργο στην αρχή, αλλά σύντομα θα ανακαλύψεις ότι είναι πολύ χρήσιμο. Για παράδειγμα, θα ξέρεις ότι κάτι είναι αριθμός επειδή έχει μπλε χρώμα.

E. Prefs Panel

Sonic Pi supports a number of tweakable preferences which can be accessed by toggling the prefs button in the Info and Help button set. This will toggle the visibility of the Prefs Panel which includes a number of options to be changed. Examples are forcing mono mode, inverting stereo, toggling log output verbosity and also a volume slider and audio selector on the Raspberry Pi.

F. Log Viewer

When you run your code, information about what the program is doing will be displayed in the log viewer. By default, you’ll see a message for every sound you create with the exact time the sound was triggered. This is very useful for debugging your code and understanding what your code is doing.

G. Help System

One of the most important parts of the Sonic Pi interface is the help system which appears at the bottom of the window. This can be toggled on and off by clicking on the blue Help button. The help system contains help and information about all aspects of Sonic Pi including this tutorial, a list of available synths, samples, examples, FX and a full list of all the functions Sonic Pi provides for coding music.

H. Scope Viewer

The scope viewer allows you to see the sound you’re hearing. You can easily see that the saw wave looks like a saw and that the basic beep is a curvey sine wave. You can also see the difference between loud and quiet sounds by the size of the lines. There are 3 scopes to play with - the default is a combined scope for the left and right channels, there is a stereo scope which draws a separate scope for each channel. Finally there is a Lissajous curve scope which will show the phase relationship between the left and right channels and allows you to draw pretty pictures with sound (https://en.wikipedia.org/wiki/Lissajous_curve).

I. Cue Viewer

All internal and external events (called cues in Sonic Pi) are automatically logged in the Cue Viewer. For example, if you have a MIDI controller connected and press one of its buttons, you’ll see a new cue event in the Cue Viewer telling you the name of the controller and which button you pressed. Once you’ve mastered the basics of making and producing sounds, you’ll start to want to cue sounds or whole sections of sounds based on events such as these. A cue event is just an indication that something happened. For example, every time a live loop spins round, it sends a cue event out which is logged in the Cue Viewer. Also, external events such as MIDI messages from connected MIDI equipment and OSC messages from other programs or computers are also displayed in the Cue Viewer. It is also possible to directly generate cue events using the cue function. Anything that appears in the Cue Viewer can be used to trigger something happening. This is covered in more detail in Sections 10 to 12 of this tutorial.