o
    f                     @   sb   d dl mZ d dlZd dlZdd Zdd ZG dd dejZG d	d
 d
eZ	G dd deZ
dS )    )FractionNc                 C   s   t  }ddddddddd	d
d
| jd}dddddddd| jd}||  kr/dkr;n n
|| |_||_|S |dkrJ||_t| j|_|S t	
td| j  d S )Nr                           	   )
r   r   r   r
          @         i   )r   r   r	         ?      zYEncountered rational duration with denominator %s, unable to convert to lilypond duration)musicexpZDurationgetdenominator	numeratorZduration_logdotsr   Zfactorlywarning_)Zrational_lendZd_logr    r   k/home/lily/lilypond-2.24.4/release/binaries/mingw/lilypond/lilypond-2.24.4/python/musicxml2ly_conversion.pyrational_to_lily_duration   s.   



r!   c                 C   s$   | rt | t d d d d S d S )NAr	   r   )ord)stepr   r   r    musicxml_step_to_lily5   s   r%   c                   @   s$   e Zd Zdd Zdd Zdd ZdS )Markerc                 C   s   d| _ d | _d S Nr   )Z	directionZeventselfr   r   r    __init__=   s   
zMarker.__init__c                 C   s   t td|   d S )Nz"Encountered unprocessed marker %s
)r   r   r   )r)   Zprinterr   r   r    print_lyA   s   zMarker.print_lyc                 C   s   dS )N r   r(   r   r   r    ly_expressionE   s   zMarker.ly_expressionN)__name__
__module____qualname__r*   r+   r-   r   r   r   r    r&   <   s    r&   c                   @   s   e Zd Zdd ZdS )RepeatMarkerc                 C   s   t |  d| _d S r'   )r&   r*   timesr(   r   r   r    r*   J   s   

zRepeatMarker.__init__N)r.   r/   r0   r*   r   r   r   r    r1   I   s    r1   c                   @   s   e Zd ZdS )EndingMarkerN)r.   r/   r0   r   r   r   r    r3   O   s    r3   )Z	fractionsr   Zlilylibr   r   r!   r%   ZMusicr&   r1   r3   r   r   r   r    <module>   s   