A tool to convert digital musical notation to pwm rate and duration. You can use this tool to make the buzzer play nice music.
- Rate control
- Pitch
- Semitone
- Octave
- Pause
- Key Signature
- Pre-raised
- Time control
- BPM
- Time Signature
- Note
- Mordent
- Tie
parser = NotationParser()
parser.setKeySignature('C')
parser.setPreRaised(0)
parser.setBPM(120)
parser.setTimeSignature(4)
print(parser.parseNotation('+3..'))
parser = NotationParser()
Set key signature like 1=C
.
parser.setKeySignature('C')
The frequency division capability of the PWM pins of some chips is limited. In order to make the played music still conform to the law, the octave can be raised or lowered uniformly.
parser.setPreRaised(0)
parser.setBPM(120)
Set time signature like 4/4
.
parser.setTimeSignature(4)
parser.parseNotation('+3..')