Keywords: Blue, Csound

What Happens When It Gets Processed
Prev | Sound SoundObject | Next

## What Happens When It Gets Processed

If your confused as to what's going on, it'll probably help to know exactly what happens when blue processes Sound SoundObjects. blue, whenever it goes to create a .CSD file to use with a commandline or to generatoe out to a file, has different stages of its compilation. The relevant parts to know here are that all instruments from the orchestra manager are first generated, but not yet put into the .CSD. Next, all soundObjects are called to generate any instruments they might have. This is where the Sound SoundObject would generate an instrument from your text input. The generated instruments from Sound SoundObjects at this point are assigned an instrument number. After all instruments are generated from soundObjects, all score text is then generated. At this point, the instrument number assigned in the earlier pass is now used by the Sound SoundObject to generate a note for your instrument. The note generated by the Sound SoundObject consists of only three p-fields: the instrument number, the start of the soundObject, and the duration. No other p-fields are generated (so your instrument should not use any other p-fields).

For example, let's say you have a Sound SoundObject with a start time at 0.5 seconds and a duration of 2 seconds. When blue goes to get it's instrument, let's say it is assigned instrument number 2. The generated note will be:

    i2 0.5 2

Perhaps the best way to see it is to do the simple example from the "How to use the Sound SoundObject" section, generate a CSD file (from the Project menu, select "Generate CSD to file"), and inspect what got generated. Comparing the soundObject's representation on the timeline as a sound and seeing how it got generated out might explain things better.

(NOTE: because the Sound SoundObject only write out the three p-fields, using a noteProcessor really doesn't have any purpose, which is why the sound soundObject does not support noteProcessors)

Ultimately in the lowest level implementation, there is a separation of a note as well as an instrument, but within blue, that separation is hidden from the user. From the user's point of view, all they have to do is write their sounds on the timeline, and they don't have to worry about numbering the instruments or creating notes for that instrument.

Prev | Up | Next
How to Use the Sound SoundObject | Home | Usage Scenarios and Patterns