| Sorry, for opcodes you should dereference the function from the CSOUND
struct. It looks like these are available:
int (*insert_score_event)(CSOUND *, EVTBLK *, double);
int (*insert_score_event_at_sample)(CSOUND *, EVTBLK *, int64_t);
void (*InputMessage)(CSOUND *, const char *message__);
On Mon, Mar 21, 2016 at 9:52 AM, Peter Burgess
wrote:
> for some reason my project is telling me that csoundScoreEvent() is
> undeclared. I've definitely got csound.h included, and an include path
> set to a copy of csound.h. I've also tried changing which csound.h the
> include path pointed to, as I just noticed it was pointing to an old
> copy (I've only organised where csound source lives, and still need to
> purge some old versions).
>
> Unfortunately, when I set the include path to the most recent source,
> I get a load of errors that I didn't get before, with or without
> csoundScoreEvent() and the inclusion of csound.h. Something to do with
> interlocks.h. I should probably report this problem in a separate
> thread I guess, as it definitely wasn't happening with the old copy.
>
> That second issue aside, the old copy of csound.h definately contains
> the function, so I'm not sure why it's telling me it's undeclared.
>
> On Mon, Mar 21, 2016 at 1:30 PM, Peter Burgess
> wrote:
>> I've had a look through, that looks like it should work out fine. I'll
>> let you know how it goes
>>
>> On Mon, Mar 21, 2016 at 1:24 PM, Steven Yi wrote:
>>> These functions are not externally accessible. You should maybe look
>>> at the score event related functions in API:
>>>
>>> /**
>>> * Send a new score event. 'type' is the score event type ('a', 'i', 'q',
>>> * 'f', or 'e').
>>> * 'numFields' is the size of the pFields array. 'pFields' is an array of
>>> * floats with all the pfields for this event, starting with the p1 value
>>> * specified in pFields[0].
>>> */
>>> PUBLIC int csoundScoreEvent(CSOUND *,
>>> char type, const MYFLT *pFields, long numFields);
>>>
>>> /**
>>> * Like csoundScoreEvent(), this function inserts a score event, but
>>> * at absolute time with respect to the start of performance, or from an
>>> * offset set with time_ofs
>>> */
>>> PUBLIC int csoundScoreEventAbsolute(CSOUND *,
>>> char type, const MYFLT *pfields, long numFields, double time_ofs);
>>>
>>> /**
>>> * Input a NULL-terminated string (as if from a console),
>>> * used for line events.
>>> */
>>> PUBLIC void csoundInputMessage(CSOUND *, const char *message);
>>>
>>>
>>> If those don't work, it'd be better to figure out what you do need,
>>> and we could all then figure out what's the best API to release for
>>> the feature.
>>>
>>>
>>> On Mon, Mar 21, 2016 at 9:12 AM, Peter Burgess
>>> wrote:
>>>> Adding linevent.c to my project also doesn't seem to be viable as it
>>>> includes csoundCore.h, so is the answer actually that I just need to
>>>> build it into csound to access this rather than do the pluggin thing?
>>>> I feel this will make the process of writing and testing the new
>>>> opcode much longer, but I'll try that if it's the best way
>>>>
>>>> On Mon, Mar 21, 2016 at 1:06 PM, Peter Burgess
>>>> wrote:
>>>>> nope, copying the function makes things much worse! lol
>>>>>
>>>>> On Mon, Mar 21, 2016 at 12:56 PM, Peter Burgess
>>>>> wrote:
>>>>>> you're right, it is in linevent. I've added linevent.h already. I've
>>>>>> just tried adding extern aswell just in case, but no dice. Is there
>>>>>> another way of doing this? You can send events via the APIs, so there
>>>>>> must be a function somewhere I can access. I might also try just
>>>>>> copying the function from linevent.c and see if that'll work
>>>>>>
>>>>>> On Mon, Mar 21, 2016 at 12:47 PM, Steven Yi wrote:
>>>>>>> The definitions are in Engine/lineevent.c. I'm not sure why
>>>>>>> schedule.c doesn't have an extern or something along those lines. I
>>>>>>> don't think these are exposed by the API for plugins or hosts to use.
>>>>>>>
>>>>>>> On Mon, Mar 21, 2016 at 8:33 AM, Peter Burgess
>>>>>>> wrote:
>>>>>>>> Gonna stack up one last question...
>>>>>>>>
>>>>>>>> Trying to schedule an event from my new pluggin, I've stolen bits of
>>>>>>>> code from schedule.c, and I've included linevent.h in my source, but I
>>>>>>>> can't figure out what's going on with these functions:
>>>>>>>>
>>>>>>>> int eventOpcodeI_(CSOUND *csound, LINEVENT *p, int s, char p1);
>>>>>>>> int eventOpcode_(CSOUND *csound, LINEVENT *p, int s, char p1);
>>>>>>>>
>>>>>>>> They are declared in schedule.c but never defined. Is that because
>>>>>>>> they are defined in some of the core Csound source? How can I use
>>>>>>>> these functions in a pluggin opcode source?
>>>>>>>>
>>>>>>>> Pete
>>>>>>>>
>>>>>>>> --
>>>>>>>> http://algorythmradio.com
>>>>>>>> https://soundcloud.com/algorythmradio
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> http://algorythmradio.com
>>>>>> https://soundcloud.com/algorythmradio
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://algorythmradio.com
>>>>> https://soundcloud.com/algorythmradio
>>>>
>>>>
>>>>
>>>> --
>>>> http://algorythmradio.com
>>>> https://soundcloud.com/algorythmradio
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>
>
>
> --
> http://algorythmradio.com |