Tutorial: The Basics of Celody Modules

What are Modules: Every Celody stream generates music in real-time according to specific logic. This logic is contained within a module. Modules allow you to focus on a specific musical direction inside a small, swappable unit of code. So if you want to change your direction, you just have to switch the module. Here's a good way to think of modules. Imagine you are building a machine to make fruit. Instead of building one giant machine that contains the messy logic to build all the fruit in the universe, you can build individual modules. You can build an apple module if you want to focus on apples. Or an orange module to focus on oranges. The key point is you can still make any fruit by swapping in the appropriate module, but each fruit is now easier to customize and maintain. Similarly, by specifying the module field in the celody file, you can customize how randomness affects the final stream according to your own desires.

Modules as Oracles to Data: A module can be connected to an external data source (a combination module-oracle). So you can set up a pipeline where the external data gets sent to the module and then the value of the data influences the pitch or tempo or volume or pan of the stream. This means that a music stream can be programmed using the time of day (SEE "TIMEOFDAY" MODULE) or weather or temperature or location (SEE "LOCATION" MODULE). In other words, the music in the stream can sound different at different times of day or when it's sunny vs. raining. You can also change the music based on how fast your car is driving (SEE "SPEED" MODULE) or how high your plane is flying (SEE "AIRPLANE" MODULE). You can even hook a module up to stock prices. For example, if the stock market is up, the stream can be programmed to speed up and if it's down, the stream can be slower and deeper. In summary, you can connect any data api provider as an input into the module.

Example Modules: A module controls how the generative randomness (SEE TUTORIAL) gets translated into the final music stream. This means you have fine-tuned control over the different elements of a stream. Each module typically focuses on just one element. For example, the "SLOWDEEP" module focuses on making the stream slow & deep. Other modules focus on different features including: CHIPMUNK, DOWNHILL, UPHILL, SEESAW, NUTZO, TIGHT, TIMEOFDAY, WEEKEND, LOCATION, SPEED, AIRPLANE, and COMPASS. View the modules tab to see all the available choices and their descriptions.

How to Specify a Module: You specify the stream's module in the Celody file. In the module parameter of the file, you enter the name of the module. If you don't enter a module, the stream will default to the "core".