Improve environment and library
This commit is contained in:
@@ -1,75 +1,30 @@
|
||||
from smnp.environment.environment import Environment
|
||||
from smnp.library.function.combine import combine
|
||||
from smnp.library.function.display import display
|
||||
from smnp.library.function.duration import withDuration
|
||||
from smnp.library.function.exit import exit
|
||||
from smnp.library.function.flat import flat
|
||||
from smnp.library.function.interval import interval
|
||||
from smnp.library.function.mic import wait
|
||||
from smnp.library.function.octave import withOctave
|
||||
from smnp.library.function.pause import pause
|
||||
from smnp.library.function.rand import random
|
||||
from smnp.library.function.semitones import semitones
|
||||
from smnp.library.function.sleep import sleep
|
||||
from smnp.library.function.synth import synth
|
||||
from smnp.library.function.transpose import transpose
|
||||
from smnp.library.function.tuplet import tuplet
|
||||
from smnp.library.function.type import objectType
|
||||
from smnp.library.function import display, sleep, semitones, interval, combine, flat, wait, rand, tuplet, synth, pause, \
|
||||
transpose, type, exit, duration, octave
|
||||
|
||||
|
||||
def createEnvironment():
|
||||
functions = [
|
||||
display,
|
||||
objectType,
|
||||
exit,
|
||||
sleep,
|
||||
semitones,
|
||||
interval,
|
||||
combine,
|
||||
flat,
|
||||
wait,
|
||||
random,
|
||||
tuplet,
|
||||
synth,
|
||||
pause,
|
||||
transpose
|
||||
display.function,
|
||||
type.function,
|
||||
exit.function,
|
||||
sleep.function,
|
||||
semitones.function,
|
||||
interval.function,
|
||||
combine.function,
|
||||
flat.function,
|
||||
wait.function,
|
||||
rand.function,
|
||||
tuplet.function,
|
||||
synth.function,
|
||||
pause.function,
|
||||
transpose.function
|
||||
]
|
||||
|
||||
methods = [
|
||||
withDuration,
|
||||
withOctave
|
||||
duration.function,
|
||||
octave.function,
|
||||
]
|
||||
# 'exit': Function(base.exit, ONLY_FUNCTION),
|
||||
# 'print': Function(base.display, ONLY_FUNCTION),
|
||||
# 'read': Function(base.read, ONLY_FUNCTION),
|
||||
# 'type': Function(base.objectType, ONLY_FUNCTION),
|
||||
# 'sleep': Function(base.sleep, ONLY_FUNCTION),
|
||||
# 'synth': Function(synth.synth, ONLY_FUNCTION),
|
||||
# 'pause': Function(synth.pause, ONLY_FUNCTION),
|
||||
# 'changeDuration': Function(note.changeDuration, ONLY_FUNCTION),
|
||||
# 'changeOctave': Function(note.changeOctave, ONLY_FUNCTION),
|
||||
# 'semitones': Function(interval.semitones, ONLY_FUNCTION),
|
||||
# 'interval': Function(interval.interval, ONLY_FUNCTION),
|
||||
# 'transpose': Function(transposer.transpose, ONLY_FUNCTION),
|
||||
# 'transposeTo': Function(transposer.transposeTo, ONLY_FUNCTION),
|
||||
# 'random': Function(rand.random, ONLY_FUNCTION),
|
||||
# # 'sample': sample,
|
||||
# 'wait': Function(mic.wait, ONLY_FUNCTION),
|
||||
# 'tuplet': Function(note.tuplet, ONLY_FUNCTION),
|
||||
# 'combine': Function(l.combine, ONLY_FUNCTION),
|
||||
# 'flat': Function(l.flat, ONLY_FUNCTION),
|
||||
# 'debug': Function(lambda args, env: print(args), ONLY_FUNCTION),
|
||||
|
||||
|
||||
# methods = {
|
||||
# str: {},
|
||||
# list: {},
|
||||
# float: {},
|
||||
# Note: {
|
||||
# 'synth': synth.synth
|
||||
# },
|
||||
# type(None): {},
|
||||
# }
|
||||
|
||||
variables = {
|
||||
"bpm": 120
|
||||
|
||||
Reference in New Issue
Block a user