Csound Csound-dev Csound-tekno Search About

Re: Opcodes

Date1997-12-07 10:21
FromRichard Dobson
SubjectRe: Opcodes
Christopher Neese wrote:
> 
> I hope this message gets through OK; the last time I posted my messages were delayed about five days.
> 
> ABOUT OPCODES:
> 
> This message is aimed at beginners.  Hans Mikelson's Introduction to Csound should be a great help to beginners, but there is one point that needs elucidation.  Both the score and the orchestra make use of opcodes, and this can lead to confusion when the manual talks about opcodes.
> 
> The score opcodes are the first letter on each line of the score.  The legal score opcodes are f, i, a, t, s, and e.
> Score opcodes are always single alphabetic characters.
> 
> On the other hand, a orchestra opcode is an alphanumeric string, such as oscil.  It is confusing that both score opcodes and orchestra opcodes are simply referred to as opcodes in the manual.
> 
> For those of you that need a justification for this [like me 8-)], suffice it to say that the word opcode has a specific meaning in computer science.  Both score opcodes and orchestra opcodes are opcodes in this sense.  However, score and orchestra opcodes are not interchangeable, just as English words are usually not interchangeable with Latin words.
> 

Sorry, but I want to quibble about this:

My feeling is that we should restrict the term 'opcode' to the orchestra
file, and use the term 'event' with respect to the score.

With a few exceptions, the basic Csound opcodes are not defined with
respect to absolute time - an instrument can be activated at any time.
Indeed, the code for an instrument could in principle be loaded into
permanent memory - for example, as the basis of a hardware synthesizer. 

A score event is however entirely defined in absolute time - even the
function tables (I'm talking about 'standard Csound here, not the the
new Extensions), and one would not normally want to frezze an event
stream in hardware, unless one was making a musical doorbell or
something! It is quite natural to refer to MIDI events; a score is
essentially Csound-speak for an event stream.


Richard Dobson