| 1 | """ |
| 2 | 01-audio-server.py - Booting the audio server. |
| 3 | |
| 4 | A Server object needs to be created before any other audio object. |
| 5 | It is the one that handles the communication with the audio and midi |
| 6 | drivers and also the one that keeps track of the processing chain. |
| 7 | |
| 8 | """ |
| 9 | from pyo import * |
| 10 | |
| 11 | # Creates a Server object with default arguments. |
| 12 | # See the manual about how to change the sampling rate, the buffer |
| 13 | # size, the number of channels or one of the other global settings. |
| 14 | s = Server() |
| 15 | |
| 16 | # Boots the server. This step initializes audio and midi streams. |
| 17 | # Audio and midi configurations (if any) must be done before that call. |
| 18 | s.boot() |
| 19 | |
| 20 | # Starts the server. This step activates the server processing loop. |
| 21 | s.start() |
| 22 | |
| 23 | # Here comes the processing chain... |
| 24 | |
| 25 | # The Server object provides a Graphical User Interface with the |
| 26 | # gui() method. One of its purpose is to keep the program alive |
| 27 | # while computing samples over time. If the locals dictionary is |
| 28 | # given as argument, the user can continue to send commands to the |
| 29 | # python interpreter from the GUI. |
| 30 | s.gui(locals()) |