cmScore.h/c:Added cmScoreBarEvt() and cmScoreEvtLoc().
This commit is contained in:
parent
869d1c716b
commit
a14aaf21e5
@ -1231,6 +1231,17 @@ cmScoreEvt_t* cmScoreEvt( cmScH_t h, unsigned idx )
|
|||||||
return p->array + idx;
|
return p->array + idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmScoreEvt_t* cmScoreBarEvt( cmScH_t h, unsigned barNumb )
|
||||||
|
{
|
||||||
|
cmSc_t* p = _cmScHandleToPtr(h);
|
||||||
|
unsigned i = 0;
|
||||||
|
for(; i<p->cnt; ++i)
|
||||||
|
if( p->array[i].typeId==kBarEvtScId && p->array[i].barNumb==barNumb )
|
||||||
|
return p->array + i;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned cmScoreSectionCount( cmScH_t h )
|
unsigned cmScoreSectionCount( cmScH_t h )
|
||||||
{
|
{
|
||||||
cmSc_t* p = _cmScHandleToPtr(h);
|
cmSc_t* p = _cmScHandleToPtr(h);
|
||||||
@ -1262,6 +1273,22 @@ cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx )
|
|||||||
return p->loc + idx;
|
return p->loc + idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmScoreLoc_t* cmScoreEvtLoc( cmScH_t h, const cmScoreEvt_t* evt )
|
||||||
|
{
|
||||||
|
cmSc_t* p = _cmScHandleToPtr(h);
|
||||||
|
unsigned i;
|
||||||
|
if( evt != NULL )
|
||||||
|
for(i=0; i<p->locCnt; ++i)
|
||||||
|
{
|
||||||
|
unsigned j;
|
||||||
|
for(j=0; j<p->loc[i].evtCnt; ++j)
|
||||||
|
if( p->loc[i].evtArray[j] == evt )
|
||||||
|
return p->loc + i;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cmScorePrintLoc( cmScH_t h )
|
void cmScorePrintLoc( cmScH_t h )
|
||||||
{
|
{
|
||||||
|
@ -151,6 +151,9 @@ extern "C" {
|
|||||||
unsigned cmScoreEvtCount( cmScH_t h );
|
unsigned cmScoreEvtCount( cmScH_t h );
|
||||||
cmScoreEvt_t* cmScoreEvt( cmScH_t h, unsigned idx );
|
cmScoreEvt_t* cmScoreEvt( cmScH_t h, unsigned idx );
|
||||||
|
|
||||||
|
// Given a bar number return the associated 'bar' event record.
|
||||||
|
cmScoreEvt_t* cmScoreBarEvt( cmScH_t h, unsigned barNumb );
|
||||||
|
|
||||||
// Access section records
|
// Access section records
|
||||||
unsigned cmScoreSectionCount( cmScH_t h );
|
unsigned cmScoreSectionCount( cmScH_t h );
|
||||||
cmScoreSection_t* cmScoreSection( cmScH_t h, unsigned idx );
|
cmScoreSection_t* cmScoreSection( cmScH_t h, unsigned idx );
|
||||||
@ -160,6 +163,9 @@ extern "C" {
|
|||||||
cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx );
|
cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx );
|
||||||
void cmScorePrintLoc( cmScH_t h );
|
void cmScorePrintLoc( cmScH_t h );
|
||||||
|
|
||||||
|
// Return the location associated with a given score event.
|
||||||
|
cmScoreLoc_t* cmScoreEvtLoc( cmScH_t h, const cmScoreEvt_t* evt );
|
||||||
|
|
||||||
// Return the count of sets.
|
// Return the count of sets.
|
||||||
unsigned cmScoreSetCount( cmScH_t h );
|
unsigned cmScoreSetCount( cmScH_t h );
|
||||||
|
|
||||||
@ -169,6 +175,7 @@ extern "C" {
|
|||||||
// cmScMsg_t record.
|
// cmScMsg_t record.
|
||||||
cmScRC_t cmScoreSeqNotify( cmScH_t h );
|
cmScRC_t cmScoreSeqNotify( cmScH_t h );
|
||||||
|
|
||||||
|
/*
|
||||||
void cmScoreClearPerfInfo( cmScH_t h );
|
void cmScoreClearPerfInfo( cmScH_t h );
|
||||||
|
|
||||||
// Assign 'smpIdx' and 'vel' to the event matching 'pitch' at 'locIdx'
|
// Assign 'smpIdx' and 'vel' to the event matching 'pitch' at 'locIdx'
|
||||||
@ -186,6 +193,7 @@ extern "C" {
|
|||||||
|
|
||||||
// Set the performed dynamic level of a score event.
|
// Set the performed dynamic level of a score event.
|
||||||
void cmScoreSetPerfDynLevel( cmScH_t h, unsigned evtIdx, unsigned dynLvl );
|
void cmScoreSetPerfDynLevel( cmScH_t h, unsigned evtIdx, unsigned dynLvl );
|
||||||
|
*/
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user