sscore_transpose.h

Includes:

Introduction

The C interface to transpose the score NB LICENCING: All functions here require the transpose_capable licence



Functions

sscore_current_transpose

get the current transpose value

sscore_set_transpose

set the current transpose

sscore_tr_clearclefchange

clear any current clef change for all parts

sscore_tr_setclefchange

set the current clef change for each part/staff


sscore_current_transpose


get the current transpose value

EXPORT int sscore_current_transpose(
    sscore *sc);  
Parameters
sc

the score from sscore_create

Return Value

the number of semitones previously set in sscore_set_transpose

Discussion

this requires the transpose_capable licence


sscore_set_transpose


set the current transpose

EXPORT enum sscore_error sscore_set_transpose(
    sscore *sc,
    int semitones);  
Parameters
sc

the score from sscore_create

semitones

the number of semitones to transpose [-12..+12]. 0 is reset to normal pitch

Return Value

any error

Discussion

this requires the transpose_capable licence


sscore_tr_clearclefchange


clear any current clef change for all parts

EXPORT void sscore_tr_clearclefchange(
    sscore *sc);  
Parameters
sc

the score from sscore_create

Discussion

this requires the transpose_capable licence


sscore_tr_setclefchange


set the current clef change for each part/staff

EXPORT enum sscore_error sscore_tr_setclefchange(
    sscore *sc,
    const sscore_tr_clefchangedef *clefchange);  
Parameters
sc

the score from sscore_create

clefchange

the clef change required

Return Value

any error

Discussion

this requires the transpose_capable licence


Typedefs

sscore_tr_clefchangedef

define clef substitutions for any parts

sscore_tr_clefconversion

define a clef substitution

sscore_tr_staffclefchange

define a clef substitution for a part/staff


sscore_tr_clefchangedef


define clef substitutions for any parts

typedef struct sscore_tr_clefchangedef { 
    int num; 
    sscore_tr_staffclefchange staffchange[
            sscore_tr_kMaxPartStaffClefChange]; 
    unsigned dummy[8]; 
} sscore_tr_clefchangedef;  

sscore_tr_clefconversion


define a clef substitution

typedef struct sscore_tr_clefconversion { 
    sscore_tr_cleftype fromclef; // convert any clef of type fromclef.. 
    sscore_tr_cleftype toclef; // .. into toclef 
} sscore_tr_clefconversion;  

sscore_tr_staffclefchange


define a clef substitution for a part/staff

typedef struct sscore_tr_staffclefchange { 
    int partindex; // use sscore_tr_kAllPartsPartIndex to apply to all parts 
    int staffindex; // use sscore_tr_kAllStaffsStaffIndex to apply to all staves in part 
    sscore_tr_clefconversion conv; // the required clef substitution 
    unsigned dummy[8]; 
} sscore_tr_staffclefchange;  

Enumerated Types

sscore_tr_cleftype

clef types which can be substituted


sscore_tr_cleftype


clef types which can be substituted

enum sscore_tr_cleftype { 
    sscore_tr_trebleclef, // G clef 
    sscore_tr_treblesub8clef, // G clef with 8 underneath 
    sscore_tr_treblesuper8clef, // G clef with 8 on top 
    sscore_tr_altoclef, // C clef on middle line of staff 
    sscore_tr_tenorclef, // C clef on line above middle line of staff 
    sscore_tr_bassclef, // F clef 
    sscore_tr_undefined 
};