Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4929] Re: scons on mac

Date2004-07-13 02:43
From"Michael Gogins"
Subject[CSOUND-DEV:4929] Re: scons on mac
There shouldn't be blank lines between lines... check your CVS client's
linefeed conventions. You may be adding a carriage return to each linefeed.
Use UNIX linefeed conventions instead.

I prefer to omit blank lines in blocks of code, but of course this is purely
a matter of taste. I find that the more code there is on a page, the easier
it is for me to read the code, so the blank lines don't really help. If the
code is written clearly it's easy to follow without the blank lines.

Turning off the messages with command line flags is not currently done. We
can change the message printing code in the plugin itself to look at the
message level in Csound to do that later.

As for p->h.insdshead->nxtact: Csound creates a separate instance of each
instrument template for each score event ("i" statement). The sample
vstplugin instrument will therefore create a new instance of the vstplug
opcode for each "i" statement. But there is only one instance of the actual
VST plugin (AEffect). The way Csound runs, there is a linked list of active
instrument instances for each instrument template in the orchestra. What my
code does is wait to write the plugin's audio output block until the last
instance in the linked list of active instruments has been reached (nxtact
is null). This prevents each instance from overwriting audio from the
previous instance. This is not actually an adequate solution to this
problem, because it can't account for the times when no instrument instance
is active and yet the plugin may still be writing a decay tail or reverb
tail. Csound needs to be changed for this to really work well.

I agree, vstinst can go.

I don't understand your last comment about dummy arate variables -- can you
rephrase it?

----- Original Message ----- 
From: "Andres Cabrera" 
To: "Csound Developers Discussion List" 
Sent: Monday, July 12, 2004 9:19 PM
Subject: [CSOUND-DEV:4928] Re: scons on mac


> Hi Michael,
>
> I'm checking out your changes, and have a couple of newbie questions
> regarding conventions.
>
> Why do you separate each line by a blank line?
> Would it bother you if I included some comment separators between some
> functions as visual cues when scrolling rapidly?
> When posting messages as: csound->Message  are these messages turned off
> by command line flags?
> Can you explain what p->h.insdshead->nxtact does in line 195 in function
> vstplug? I don't really know the csound API.
>
>
> Do you agree we might get rid of vstinst, since vstplug already contains
> all functionality for both vst plug ins and vst instruments? I
> originally thought there might be some differences, but I don't see any
now.
>
> My implementation of vstnote contains an additional first parameter that
> triggers the note on message. I think this might be useful.
>
> One last question:  when defining the parameters for an opcode in the
> OENTRY vstOentry[] list, is there a symbol for optional audio rate
> parameters. I didn't find any reference to that on the Csound Book. This
> would be useful when vstplug is used for a vst instrument, so you don't
> need to create dummy a-rate variables to fill the spaces.
>
> Thanks, thanks, thanks,
> Andrés
>
>

Date2004-07-13 03:11
FromAndres Cabrera
Subject[CSOUND-DEV:4930] vst4cs

Michael Gogins wrote:

>There shouldn't be blank lines between lines... check your CVS client's
>linefeed conventions. You may be adding a carriage return to each linefeed.
>Use UNIX linefeed conventions instead.
>
>  
>
Somewhere an extra line is being added and I really can't find where... 
Has anyone used winCVS and know where this might come from?

>I don't understand your last comment about dummy arate variables -- can you
>rephrase it?
>
>  
>
When defining an opcode's parameters as e.g. "kiii" in the OENTRY 
vstOentry[] list, can you have an optional parameter that works at a-rate?
Say like "o" which stands for optional defaulting to 0, but that takes 
a-rate arguments? If I try to use "o" instead of "a", I get:
error:  input arg 'ga2' of type a not allowed when expecting o
This would be useful for vstplug when used with a vst instrument, which 
usually takes no input, and you would have to do:
ain = 0
a1, a2 vstplug "whatever", ain, ain

Cheers,
Andrés