pyampact.symbolic.toKern

pyampact.symbolic.toKern(piece, path_name='', data=None, include_lyrics=True, include_dynamics=True, analysis_dfs=None)[source]

Create a kern representation of the score. If no path_name variable is passed, then returns a pandas DataFrame of the kern representation. Otherwise a file is created or overwritten at the path_name path. If path_name does not end in ‘.krn’ then this file extension will be added to the path. If lyrics is True (default) then the lyrics for each part will be added to the output, if there are lyrics. The same applies to dynamics.

Parameters:
  • path_name – Optional string representing the path to save the kern file.

  • data – Optional string representing the data to be converted to kern format.

  • lyrics – Boolean, default True. If True, lyrics for each part will be added.

  • dynamics – Boolean, default True. If True, dynamics for each part will be added.

Returns:

String of new kern score if no path_name is given, or None if writing the new kern file to the location of path_name

See also

show()