| I recognize that I might be splitting hairs here, though I do have my reasons.
My main concern is portability. If someone copy/pastes an instrument
from another orchestra, and this instrument uses an UDO that overrides
an existing opcode, this may cause confusion. I suspect that this
could cause someone, newbie or veteran, to pull out their hair trying
to figure out why the instrument does not work as expected when used
in their new orchestra. If the original instrument called the UDO
with an udo opcode, at least a message error would pop up, and the
user would know immediately what the problem was. Making Csound
slightly more user-friendly.
This wouldn't avoid all problems. For example, what if there was a
different UDO of the same name in the new orchestra. Even in this
case, at least when a user is looking over their copied instrument,
they have a better chance to figure out the problem as the udo opcode
itself is a clear indicator that the instrument has an outside
dependency.
Best,
Jake
2009/10/3 Andrés Cabrera :
> Hi,
>
> How about just a warning when the opcode already exists? I think it's
> not bad to allow redefinition of existing opcodes.
>
> Cheers,
> Andrés
>
> El lun, 28-09-2009 a las 10:18 -0700, Jacob Joaquin escribió:
>> I second your recommendation.
>>
>> While we're on the subject of UDOs. I just ran a test to see if an
>> UDO name will override the name of existing opcode, and it came back
>> positive. My spidey sense is sensing some potential problems with
>> this down the road.
>>
>> Perhaps the same treatment could be applied to UDOs and subinstr does, such as
>>
>> a1 udo "MyUdo", 1.0, 440
>>
>> instead of
>>
>> a1 MyUdo 1.0, 440
>>
>> What I'm not recommending is the invalidate the current UDO syntax in
>> an instrument, as we don't want to break backwards compatibility, but
>> deprecate it and encourage using the udo opcode instead.
>>
>> Here is my test file:
>>
>>
>>
>> sr = 44100
>> kr = 4410
>> ksmps = 10
>> nchnls = 1
>> 0dbfs = 1.0
>>
>> opcode oscils, a, iii
>> i1, i2, i3 xin
>> a1 oscil i1, i2 * 2, 1, i3
>> xout a1
>> endop
>>
>> instr 1
>> a1 oscils 1.0, 440, 0
>> out a1
>> endin
>>
>>
>>
>> f 1 0 8192 10 1
>> i 1 0 1
>>
>>
>>
>> Best,
>> Jake
>>
>>
>> On Mon, Sep 28, 2009 at 9:09 AM, Steven Yi wrote:
>> > I think this may be broken and has been for a while. I'd recommend we
>> > drop this feature and just use UDO's or subinstr and revise the docs.
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |