| 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
>
> |