pyampact.symbolicUtils._id_gen

pyampact.symbolicUtils._id_gen(start=1)[source]

Generate a unique ID for each instance of the Score class.

This function generates a unique ID for each instance of the Score class by incrementing a counter starting from the provided start value. The ID is in the format ‘pyAMPACT-{start}’. This isn’t meant to be used directly so see the example below for usage.

Parameters:

start – An integer representing the starting value for the ID counter. Default is 1.

Yield:

A string representing the unique ID.

See also

insertAudioAnalysis(), xmlIDs()

Example

newID = next(idGen)