Move 'note' module

This commit is contained in:
Bartłomiej Pluta
2019-07-09 22:09:10 +02:00
parent b91cc46d44
commit ef99c4d6e2
9 changed files with 12 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
from smnp.library.model import Function
from smnp.library.signature import signature, ofType
from smnp.type.model import Type
_signature = signature(ofType(Type.NOTE), ofType(Type.INTEGER))
def _function(env, note, octave):
return Type.note(note.value.withOctave(octave.value))
function = Function(_signature, _function, 'withOctave')