Merge pull request #7985 from jepler/synthio-lfo-dag

synthio: Add LFOs
This commit is contained in:
Dan Halbert 2023-05-23 15:48:11 -04:00 committed by GitHub
commit b26e4ca0ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
84 changed files with 5500 additions and 456 deletions

@ -1 +1 @@
Subproject commit f2dd2230c4fdf1aa5c7a160782efdde18e8204bb
Subproject commit 6619c20b3b75864554fcee5f88846fac27df5701

View File

@ -211,7 +211,7 @@ msgstr ""
msgid "%q must be of type %q or %q, not %q"
msgstr ""
#: py/argcheck.c py/obj.c py/objstrunicode.c
#: py/argcheck.c py/obj.c py/objstrunicode.c shared-module/synthio/__init__.c
msgid "%q must be of type %q, not %q"
msgstr ""
@ -2470,6 +2470,10 @@ msgstr ""
msgid "annotation must be an identifier"
msgstr ""
#: extmod/ulab/code/numpy/create.c
msgid "arange: cannot compute length"
msgstr ""
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@ -2642,6 +2646,10 @@ msgstr ""
msgid "can only have up to 4 parameters to Xtensa assembly"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "can only specify one unknown dimension"
msgstr ""
#: py/objtype.c
msgid "can't add special method to already-subclassed class"
msgstr ""
@ -2793,6 +2801,10 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "cannot reshape array"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3242,10 +3254,6 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "input and output shapes are not compatible"
msgstr ""
#: extmod/ulab/code/numpy/create.c
msgid "input argument must be an integer, a tuple, or a list"
msgstr ""
@ -3959,7 +3967,7 @@ msgid "set unsupported"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "shape must be a tuple"
msgid "shape must be integer or tuple of integers"
msgstr ""
#: shared-module/msgpack/__init__.c

View File

@ -13,3 +13,4 @@ EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY_PS2IO = 1
CIRCUITPY_SYNTHIO = 0

View File

@ -11,3 +11,4 @@ EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, S25FL064L"
LONGINT_IMPL = MPZ
CIRCUITPY_PS2IO = 1
CIRCUITPY_SYNTHIO = 0

View File

@ -9,3 +9,4 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ, W25Q16JVxM"
LONGINT_IMPL = MPZ
CIRCUITPY_SYNTHIO = 0

View File

@ -9,3 +9,4 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ"
LONGINT_IMPL = MPZ
CIRCUITPY_SYNTHIO = 0

View File

@ -9,3 +9,4 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ"
LONGINT_IMPL = MPZ
CIRCUITPY_SYNTHIO = 0

View File

@ -11,3 +11,4 @@ EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY_KEYPAD = 1
CIRCUITPY_SYNTHIO = 0

View File

@ -9,3 +9,4 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"
LONGINT_IMPL = MPZ
CIRCUITPY_SYNTHIO = 0

View File

@ -9,3 +9,4 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY_SYNTHIO = 0

View File

@ -9,3 +9,4 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"
LONGINT_IMPL = MPZ
CIRCUITPY_SYNTHIO = 0

View File

@ -11,9 +11,10 @@ LONGINT_IMPL = NONE
SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
CIRCUITPY_NVM = 1
CIRCUITPY_BITMAPTOOLS = 0
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_NVM = 1
CIRCUITPY_SYNTHIO = 0
CIRCUITPY_ZLIB = 0
MCU_SERIES = F4

View File

@ -41,7 +41,9 @@ SRC_BITMAP := \
shared-bindings/rainbowio/__init__.c \
shared-bindings/struct/__init__.c \
shared-bindings/synthio/__init__.c \
shared-bindings/synthio/Math.c \
shared-bindings/synthio/MidiTrack.c \
shared-bindings/synthio/LFO.c \
shared-bindings/synthio/Note.c \
shared-bindings/synthio/Synthesizer.c \
shared-bindings/traceback/__init__.c \
@ -64,7 +66,9 @@ SRC_BITMAP := \
shared-module/rainbowio/__init__.c \
shared-module/struct/__init__.c \
shared-module/synthio/__init__.c \
shared-module/synthio/Math.c \
shared-module/synthio/MidiTrack.c \
shared-module/synthio/LFO.c \
shared-module/synthio/Note.c \
shared-module/synthio/Synthesizer.c \
shared-module/traceback/__init__.c \

View File

@ -650,6 +650,8 @@ SRC_SHARED_MODULE_ALL = \
struct/__init__.c \
supervisor/__init__.c \
supervisor/StatusBar.c \
synthio/LFO.c \
synthio/Math.c \
synthio/MidiTrack.c \
synthio/Note.c \
synthio/Synthesizer.c \

View File

@ -50,12 +50,13 @@ typedef struct {
cp_enum_obj_print_helper(MP_QSTR_##module, print, self_in, kind); \
}
#define MAKE_ENUM_TYPE(module, type, typename) \
#define MAKE_ENUM_TYPE(module, type, typename, ...) \
const mp_obj_type_t typename##_type = { \
{ &mp_type_type }, \
.name = MP_QSTR_##type, \
.print = typename##_print, \
.locals_dict = (mp_obj_dict_t *)&typename##_locals_dict, \
##__VA_ARGS__ \
}

View File

@ -0,0 +1,305 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Artyom Skrobov
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/obj.h"
#include "py/objproperty.h"
#include "py/proto.h"
#include "py/runtime.h"
#include "shared-bindings/util.h"
#include "shared-bindings/synthio/LFO.h"
#include "shared-module/synthio/LFO.h"
STATIC const uint16_t triangle[] = {0, 32767, 0, -32767};
//| class LFO:
//| """A low-frequency oscillator block
//|
//| Every `rate` seconds, the output of the LFO cycles through its `waveform`.
//| The output at any particular moment is ``waveform[idx] * scale + offset``.
//|
//| If `waveform` is None, a triangle waveform is used.
//|
//| `rate`, `phase_offset`, `offset`, `scale`, and `once` can be changed at run-time. `waveform` may be mutated.
//|
//| `waveform` must be a ``ReadableBuffer`` with elements of type ``'h'``
//| (16-bit signed integer). Internally, the elements of `waveform` are scaled
//| so that the input range ``[-32768,32767]`` maps to ``[-1.0, 0.99996]``.
//|
//| An LFO only updates if it is actually associated with a playing `Synthesizer`,
//| including indirectly via a `Note` or another intermediate LFO.
//|
//| Using the same LFO as an input to multiple other LFOs or Notes is OK, but
//| the result if an LFO is tied to multiple Synthtesizer objects is undefined.
//|
//| In the current implementation, LFOs are updated every 256 samples. This
//| should be considered an implementation detail, though it affects how LFOs
//| behave for instance when used to implement an integrator (``l.offset = l``).
//| """
//|
//| def __init__(
//| self,
//| waveform: ReadableBuffer = None,
//| *,
//| rate: BlockInput = 1.0,
//| scale: BlockInput = 1.0,
//| offset: BlockInput = 0.0,
//| phase_offset: BlockInput = 0.0,
//| once=False,
//| interpolate=True
//| ):
//| pass
static const mp_arg_t lfo_properties[] = {
{ MP_QSTR_waveform, MP_ARG_OBJ, {.u_obj = MP_ROM_NONE } },
{ MP_QSTR_rate, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
{ MP_QSTR_scale, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
{ MP_QSTR_offset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_phase_offset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_once, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_interpolate, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
};
STATIC mp_obj_t synthio_lfo_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
enum { ARG_waveform }; // others never directly referred to by argument number
mp_arg_val_t args[MP_ARRAY_SIZE(lfo_properties)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(lfo_properties), lfo_properties, args);
synthio_lfo_obj_t *self = m_new_obj(synthio_lfo_obj_t);
self->base.base.type = &synthio_lfo_type;
self->waveform_bufinfo = ((mp_buffer_info_t) {.buf = (void *)triangle, .len = MP_ARRAY_SIZE(triangle)});
if (args[ARG_waveform].u_obj != mp_const_none) {
synthio_synth_parse_waveform(&self->waveform_bufinfo, args[ARG_waveform].u_obj);
}
self->waveform_obj = args[ARG_waveform].u_obj;
self->base.last_tick = synthio_global_tick;
mp_obj_t result = MP_OBJ_FROM_PTR(self);
properties_construct_helper(result, lfo_properties + 1, args + 1, MP_ARRAY_SIZE(lfo_properties) - 1);
return result;
};
//| waveform: Optional[ReadableBuffer]
//| """The waveform of this lfo. (read-only, but the values in the buffer may be modified dynamically)"""
STATIC mp_obj_t synthio_lfo_get_waveform(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_lfo_get_waveform_obj(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_waveform_obj, synthio_lfo_get_waveform);
MP_PROPERTY_GETTER(synthio_lfo_waveform_obj,
(mp_obj_t)&synthio_lfo_get_waveform_obj);
//| rate: BlockInput
//| """The rate (in Hz) at which the LFO cycles through its waveform"""
STATIC mp_obj_t synthio_lfo_get_rate(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_lfo_get_rate_obj(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_rate_obj, synthio_lfo_get_rate);
STATIC mp_obj_t synthio_lfo_set_rate(mp_obj_t self_in, mp_obj_t arg) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_set_rate_obj(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_lfo_set_rate_obj, synthio_lfo_set_rate);
MP_PROPERTY_GETSET(synthio_lfo_rate_obj,
(mp_obj_t)&synthio_lfo_get_rate_obj,
(mp_obj_t)&synthio_lfo_set_rate_obj);
//| offset: BlockInput
//| """An additive value applied to the LFO's output"""
STATIC mp_obj_t synthio_lfo_get_offset(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_lfo_get_offset_obj(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_offset_obj, synthio_lfo_get_offset);
STATIC mp_obj_t synthio_lfo_set_offset(mp_obj_t self_in, mp_obj_t arg) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_set_offset_obj(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_lfo_set_offset_obj, synthio_lfo_set_offset);
MP_PROPERTY_GETSET(synthio_lfo_offset_obj,
(mp_obj_t)&synthio_lfo_get_offset_obj,
(mp_obj_t)&synthio_lfo_set_offset_obj);
//| phase_offset: BlockInput
//| """An additive value applied to the LFO's phase"""
STATIC mp_obj_t synthio_lfo_get_phase_offset(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_lfo_get_phase_offset_obj(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_phase_offset_obj, synthio_lfo_get_phase_offset);
STATIC mp_obj_t synthio_lfo_set_phase_offset(mp_obj_t self_in, mp_obj_t arg) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_set_phase_offset_obj(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_lfo_set_phase_offset_obj, synthio_lfo_set_phase_offset);
MP_PROPERTY_GETSET(synthio_lfo_phase_offset_obj,
(mp_obj_t)&synthio_lfo_get_phase_offset_obj,
(mp_obj_t)&synthio_lfo_set_phase_offset_obj);
//| scale: BlockInput
//| """An multiplier value applied to the LFO's output"""
STATIC mp_obj_t synthio_lfo_get_scale(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_lfo_get_scale_obj(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_scale_obj, synthio_lfo_get_scale);
STATIC mp_obj_t synthio_lfo_set_scale(mp_obj_t self_in, mp_obj_t arg) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_set_scale_obj(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_lfo_set_scale_obj, synthio_lfo_set_scale);
MP_PROPERTY_GETSET(synthio_lfo_scale_obj,
(mp_obj_t)&synthio_lfo_get_scale_obj,
(mp_obj_t)&synthio_lfo_set_scale_obj);
//|
//| once: bool
//| """True if the waveform should stop when it reaches its last output value, false if it should re-start at the beginning of its waveform
//|
//| This applies to the ``phase`` *before* the addition of any ``phase_offset`` """
STATIC mp_obj_t synthio_lfo_get_once(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_bool(common_hal_synthio_lfo_get_once(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_once_obj, synthio_lfo_get_once);
STATIC mp_obj_t synthio_lfo_set_once(mp_obj_t self_in, mp_obj_t arg) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_set_once(self, mp_obj_is_true(arg));
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_lfo_set_once_obj, synthio_lfo_set_once);
MP_PROPERTY_GETSET(synthio_lfo_once_obj,
(mp_obj_t)&synthio_lfo_get_once_obj,
(mp_obj_t)&synthio_lfo_set_once_obj);
//|
//| interpolate: bool
//| """True if the waveform should perform linear interpolation between values"""
STATIC mp_obj_t synthio_lfo_get_interpolate(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_bool(common_hal_synthio_lfo_get_interpolate(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_interpolate_obj, synthio_lfo_get_interpolate);
STATIC mp_obj_t synthio_lfo_set_interpolate(mp_obj_t self_in, mp_obj_t arg) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_set_interpolate(self, mp_obj_is_true(arg));
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_lfo_set_interpolate_obj, synthio_lfo_set_interpolate);
MP_PROPERTY_GETSET(synthio_lfo_interpolate_obj,
(mp_obj_t)&synthio_lfo_get_interpolate_obj,
(mp_obj_t)&synthio_lfo_set_interpolate_obj);
//|
//| phase: float
//| """The phase of the oscillator, in the range 0 to 1 (read-only)"""
STATIC mp_obj_t synthio_lfo_get_phase(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_lfo_get_phase(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_phase_obj, synthio_lfo_get_phase);
MP_PROPERTY_GETTER(synthio_lfo_phase_obj,
(mp_obj_t)&synthio_lfo_get_phase_obj);
//|
//| value: float
//| """The value of the oscillator (read-only)"""
STATIC mp_obj_t synthio_lfo_get_value(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_lfo_get_value(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_get_value_obj, synthio_lfo_get_value);
MP_PROPERTY_GETTER(synthio_lfo_value_obj,
(mp_obj_t)&synthio_lfo_get_value_obj);
//|
//| def retrigger(self):
//| """Reset the LFO's internal index to the start of the waveform. Most useful when it its `once` property is `True`."""
//|
STATIC mp_obj_t synthio_lfo_retrigger(mp_obj_t self_in) {
synthio_lfo_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_lfo_retrigger(self);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_lfo_retrigger_obj, synthio_lfo_retrigger);
static void lfo_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind;
properties_print_helper(print, self_in, lfo_properties, MP_ARRAY_SIZE(lfo_properties));
}
STATIC const mp_rom_map_elem_t synthio_lfo_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_waveform), MP_ROM_PTR(&synthio_lfo_waveform_obj) },
{ MP_ROM_QSTR(MP_QSTR_rate), MP_ROM_PTR(&synthio_lfo_rate_obj) },
{ MP_ROM_QSTR(MP_QSTR_scale), MP_ROM_PTR(&synthio_lfo_scale_obj) },
{ MP_ROM_QSTR(MP_QSTR_offset), MP_ROM_PTR(&synthio_lfo_offset_obj) },
{ MP_ROM_QSTR(MP_QSTR_phase_offset), MP_ROM_PTR(&synthio_lfo_phase_offset_obj) },
{ MP_ROM_QSTR(MP_QSTR_once), MP_ROM_PTR(&synthio_lfo_once_obj) },
{ MP_ROM_QSTR(MP_QSTR_interpolate), MP_ROM_PTR(&synthio_lfo_interpolate_obj) },
{ MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&synthio_lfo_value_obj) },
{ MP_ROM_QSTR(MP_QSTR_phase), MP_ROM_PTR(&synthio_lfo_phase_obj) },
{ MP_ROM_QSTR(MP_QSTR_retrigger), MP_ROM_PTR(&synthio_lfo_retrigger_obj) },
};
STATIC MP_DEFINE_CONST_DICT(synthio_lfo_locals_dict, synthio_lfo_locals_dict_table);
STATIC const synthio_block_proto_t lfo_proto = {
MP_PROTO_IMPLEMENT(MP_QSTR_synthio_block)
.tick = common_hal_synthio_lfo_tick,
};
const mp_obj_type_t synthio_lfo_type = {
{ &mp_type_type },
.flags = MP_TYPE_FLAG_EXTENDED,
.name = MP_QSTR_LFO,
.make_new = synthio_lfo_make_new,
.locals_dict = (mp_obj_dict_t *)&synthio_lfo_locals_dict,
.print = lfo_print,
MP_TYPE_EXTENDED_FIELDS(
.protocol = &lfo_proto,
),
};

View File

@ -0,0 +1,60 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#pragma once
#include "py/obj.h"
typedef struct synthio_lfo_obj synthio_lfo_obj_t;
extern const mp_obj_type_t synthio_lfo_type;
mp_obj_t common_hal_synthio_lfo_get_waveform_obj(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_waveform_obj(synthio_lfo_obj_t *self, mp_obj_t arg);
mp_obj_t common_hal_synthio_lfo_get_rate_obj(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_rate_obj(synthio_lfo_obj_t *self, mp_obj_t arg);
mp_obj_t common_hal_synthio_lfo_get_scale_obj(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_scale_obj(synthio_lfo_obj_t *self, mp_obj_t arg);
mp_obj_t common_hal_synthio_lfo_get_phase_offset_obj(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_phase_offset_obj(synthio_lfo_obj_t *self, mp_obj_t arg);
mp_obj_t common_hal_synthio_lfo_get_offset_obj(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_offset_obj(synthio_lfo_obj_t *self, mp_obj_t arg);
bool common_hal_synthio_lfo_get_once(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_once(synthio_lfo_obj_t *self, bool arg);
bool common_hal_synthio_lfo_get_interpolate(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_set_interpolate(synthio_lfo_obj_t *self, bool arg);
mp_float_t common_hal_synthio_lfo_get_value(synthio_lfo_obj_t *self);
mp_float_t common_hal_synthio_lfo_get_phase(synthio_lfo_obj_t *self);
void common_hal_synthio_lfo_retrigger(synthio_lfo_obj_t *self);
mp_float_t common_hal_synthio_lfo_tick(mp_obj_t self_in);

View File

@ -0,0 +1,307 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Artyom Skrobov
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/obj.h"
#include "py/objproperty.h"
#include "py/proto.h"
#include "py/runtime.h"
#include "shared-bindings/util.h"
#include "shared-bindings/synthio/Math.h"
#include "shared-module/synthio/Math.h"
static const mp_arg_t math_properties[4];
STATIC mp_obj_t synthio_math_make_new_common(mp_arg_val_t args[MP_ARRAY_SIZE(math_properties)]);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, SUM, OP_SUM);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, ADD_SUB, OP_ADD_SUB);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, PRODUCT, OP_PRODUCT);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, MUL_DIV, OP_MUL_DIV);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, SCALE_OFFSET, OP_SCALE_OFFSET);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, OFFSET_SCALE, OP_OFFSET_SCALE);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, LERP, OP_LERP);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, CONSTRAINED_LERP, OP_CONSTRAINED_LERP);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, DIV_ADD, OP_DIV_ADD);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, ADD_DIV, OP_ADD_DIV);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, MID, OP_MID);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, MAX, OP_MAX);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, MIN, OP_MIN);
MAKE_ENUM_VALUE(synthio_math_operation_type, math_op, ABS, OP_ABS);
//| class MathOperation:
//| """Operation for a Math block"""
//|
//| def __call__(self, a: BlockInput, b: BlockInput = 0.0, c: BlockInput = 1.0) -> Math:
//| """A MathOperation enumeration value can be called to construct a Math block that performs that operation"""
//| SUM: "MathOperation"
//| """Computes ``a+b+c``. For 2-input sum, set one argument to ``0.0``. To hold a control value for multiple subscribers, set two arguments to ``0.0``."""
//|
//| ADD_SUB: "MathOperation"
//| """Computes ``a+b-c``. For 2-input subtraction, set ``b`` to ``0.0``."""
//|
//| PRODUCT: "MathOperation"
//| """Computes ``a*b*c``. For 2-input product, set one argument to ``1.0``."""
//|
//| MUL_DIV: "MathOperation"
//| """Computes ``a*b/c``. If ``c`` is zero, the output is ``1.0``."""
//|
//| SCALE_OFFSET: "MathOperation"
//| """Computes ``(a*b)+c``."""
//|
//| OFFSET_SCALE: "MathOperation"
//| """Computes ``(a+b)*c``. For 2-input multiplication, set ``b`` to 0."""
//|
//| LERP: "MathOperation"
//| """Computes ``a * (1-c) + b * c``."""
//|
//| CONSTRAINED_LERP: "MathOperation"
//| """Computes ``a * (1-c') + b * c'``, where ``c'`` is constrained to be between ``0.0`` and ``1.0``."""
//|
//| DIV_ADD: "MathOperation"
//| """Computes ``a/b+c``. If ``b`` is zero, the output is ``c``."""
//|
//| ADD_DIV: "MathOperation"
//| """Computes ``(a+b)/c``. For 2-input product, set ``b`` to ``0.0``."""
//|
//| MID: "MathOperation"
//| """Returns the middle of the 3 input values."""
//|
//| MAX: "MathOperation"
//| """Returns the biggest of the 3 input values."""
//|
//| MIN: "MathOperation"
//| """Returns the smallest of the 3 input values."""
//|
//| ABS: "MathOperation"
//| """Returns the absolute value of ``a``."""
//|
MAKE_ENUM_MAP(synthio_math_operation) {
MAKE_ENUM_MAP_ENTRY(math_op, SUM),
MAKE_ENUM_MAP_ENTRY(math_op, ADD_SUB),
MAKE_ENUM_MAP_ENTRY(math_op, PRODUCT),
MAKE_ENUM_MAP_ENTRY(math_op, MUL_DIV),
MAKE_ENUM_MAP_ENTRY(math_op, SCALE_OFFSET),
MAKE_ENUM_MAP_ENTRY(math_op, OFFSET_SCALE),
MAKE_ENUM_MAP_ENTRY(math_op, LERP),
MAKE_ENUM_MAP_ENTRY(math_op, CONSTRAINED_LERP),
MAKE_ENUM_MAP_ENTRY(math_op, DIV_ADD),
MAKE_ENUM_MAP_ENTRY(math_op, ADD_DIV),
MAKE_ENUM_MAP_ENTRY(math_op, MID),
MAKE_ENUM_MAP_ENTRY(math_op, MAX),
MAKE_ENUM_MAP_ENTRY(math_op, MIN),
MAKE_ENUM_MAP_ENTRY(math_op, ABS),
};
STATIC mp_obj_t mathop_call(mp_obj_t fun, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
mp_arg_val_t args[4];
args[0].u_obj = fun;
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(math_properties) - 1, math_properties + 1, &args[1]);
return synthio_math_make_new_common(args);
}
STATIC MP_DEFINE_CONST_DICT(synthio_math_operation_locals_dict, synthio_math_operation_locals_table);
MAKE_PRINTER(synthio, synthio_math_operation);
MAKE_ENUM_TYPE(synthio, MathOperation, synthio_math_operation,
.flags = MP_TYPE_FLAG_EXTENDED,
MP_TYPE_EXTENDED_FIELDS(
.call = mathop_call,
));
//| class Math:
//| """An arithmetic block
//|
//| Performs an arithmetic operation on up to 3 inputs. See the
//| documentation of ``MathOperation`` for the specific functions available.
//|
//| The properties can all be changed at run-time.
//|
//| An Math only updates if it is actually associated with a playing `Synthesizer`,
//| including indirectly via a `Note` or another intermediate Math.
//|
//| Using the same Math as an input to multiple other Maths or Notes is OK, but
//| the result if an Math is tied to multiple Synthtesizer objects is undefined.
//|
//| In the current implementation, Maths are updated every 256 samples. This
//| should be considered an implementation detail.
//| """
//|
//| def __init__(
//| self,
//| operation: MathOperation,
//| a: BlockInput,
//| b: BlockInput = 0.0,
//| c: BlockInput = 1.0,
//| ):
//| pass
static const mp_arg_t math_properties[] = {
{ MP_QSTR_operation, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = NULL } },
{ MP_QSTR_a, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = NULL } },
{ MP_QSTR_b, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_c, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(1) } },
};
STATIC mp_obj_t synthio_math_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
mp_arg_val_t args[MP_ARRAY_SIZE(math_properties)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(math_properties), math_properties, args);
return synthio_math_make_new_common(args);
}
STATIC mp_obj_t synthio_math_make_new_common(mp_arg_val_t args[MP_ARRAY_SIZE(math_properties)]) {
synthio_math_obj_t *self = m_new_obj(synthio_math_obj_t);
self->base.base.type = &synthio_math_type;
self->base.last_tick = synthio_global_tick;
mp_obj_t result = MP_OBJ_FROM_PTR(self);
properties_construct_helper(result, math_properties, args, MP_ARRAY_SIZE(math_properties));
return result;
};
//| a: BlockInput
//| """The first input to the operation"""
STATIC mp_obj_t synthio_math_get_a(mp_obj_t self_in) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_math_get_input_obj(self, 0);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_math_get_a_obj, synthio_math_get_a);
STATIC mp_obj_t synthio_math_set_a(mp_obj_t self_in, mp_obj_t arg) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_math_set_input_obj(self, 0, arg, MP_QSTR_a);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_math_set_a_obj, synthio_math_set_a);
MP_PROPERTY_GETSET(synthio_math_a_obj,
(mp_obj_t)&synthio_math_get_a_obj,
(mp_obj_t)&synthio_math_set_a_obj);
//| b: BlockInput
//| """The second input to the operation"""
STATIC mp_obj_t synthio_math_get_b(mp_obj_t self_in) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_math_get_input_obj(self, 1);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_math_get_b_obj, synthio_math_get_b);
STATIC mp_obj_t synthio_math_set_b(mp_obj_t self_in, mp_obj_t arg) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_math_set_input_obj(self, 1, arg, MP_QSTR_b);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_math_set_b_obj, synthio_math_set_b);
MP_PROPERTY_GETSET(synthio_math_b_obj,
(mp_obj_t)&synthio_math_get_b_obj,
(mp_obj_t)&synthio_math_set_b_obj);
//| c: BlockInput
//| """The third input to the operation"""
STATIC mp_obj_t synthio_math_get_c(mp_obj_t self_in) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_math_get_input_obj(self, 2);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_math_get_c_obj, synthio_math_get_c);
STATIC mp_obj_t synthio_math_set_c(mp_obj_t self_in, mp_obj_t arg) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_math_set_input_obj(self, 2, arg, MP_QSTR_c);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_math_set_c_obj, synthio_math_set_c);
MP_PROPERTY_GETSET(synthio_math_c_obj,
(mp_obj_t)&synthio_math_get_c_obj,
(mp_obj_t)&synthio_math_set_c_obj);
//| operation: MathOperation
//| """The function to compute"""
STATIC mp_obj_t synthio_math_get_operation(mp_obj_t self_in) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
return cp_enum_find(&synthio_math_operation_type, common_hal_synthio_math_get_operation(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_math_get_operation_obj, synthio_math_get_operation);
STATIC mp_obj_t synthio_math_set_operation(mp_obj_t self_in, mp_obj_t arg) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_math_set_operation(self, cp_enum_value(&synthio_math_operation_type, arg, MP_QSTR_operation));
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_math_set_operation_obj, synthio_math_set_operation);
MP_PROPERTY_GETSET(synthio_math_operation_obj,
(mp_obj_t)&synthio_math_get_operation_obj,
(mp_obj_t)&synthio_math_set_operation_obj);
//|
//| value: float
//| """The value of the oscillator (read-only)"""
//|
STATIC mp_obj_t synthio_math_get_value(mp_obj_t self_in) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_math_get_value(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_math_get_value_obj, synthio_math_get_value);
MP_PROPERTY_GETTER(synthio_math_value_obj,
(mp_obj_t)&synthio_math_get_value_obj);
static void math_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind;
properties_print_helper(print, self_in, math_properties, MP_ARRAY_SIZE(math_properties));
}
STATIC const mp_rom_map_elem_t synthio_math_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_a), MP_ROM_PTR(&synthio_math_a_obj) },
{ MP_ROM_QSTR(MP_QSTR_b), MP_ROM_PTR(&synthio_math_b_obj) },
{ MP_ROM_QSTR(MP_QSTR_c), MP_ROM_PTR(&synthio_math_c_obj) },
{ MP_ROM_QSTR(MP_QSTR_operation), MP_ROM_PTR(&synthio_math_operation_obj) },
{ MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&synthio_math_value_obj) },
};
STATIC MP_DEFINE_CONST_DICT(synthio_math_locals_dict, synthio_math_locals_dict_table);
STATIC const synthio_block_proto_t math_proto = {
MP_PROTO_IMPLEMENT(MP_QSTR_synthio_block)
.tick = common_hal_synthio_math_tick,
};
const mp_obj_type_t synthio_math_type = {
{ &mp_type_type },
.flags = MP_TYPE_FLAG_EXTENDED,
.name = MP_QSTR_Math,
.make_new = synthio_math_make_new,
.locals_dict = (mp_obj_dict_t *)&synthio_math_locals_dict,
.print = math_print,
MP_TYPE_EXTENDED_FIELDS(
.protocol = &math_proto,
),
};

View File

@ -0,0 +1,60 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#pragma once
#include "py/obj.h"
typedef enum {
OP_SUM,
OP_ADD_SUB,
OP_PRODUCT,
OP_MUL_DIV,
OP_SCALE_OFFSET,
OP_OFFSET_SCALE,
OP_LERP,
OP_CONSTRAINED_LERP,
OP_DIV_ADD,
OP_ADD_DIV,
OP_MID,
OP_MIN,
OP_MAX,
OP_ABS
} synthio_math_operation_t;
typedef struct synthio_math_obj synthio_math_obj_t;
extern const mp_obj_type_t synthio_math_type;
extern const mp_obj_type_t synthio_math_operation_type;
mp_obj_t common_hal_synthio_math_get_input_obj(synthio_math_obj_t *self, size_t i);
void common_hal_synthio_math_set_input_obj(synthio_math_obj_t *self, size_t i, mp_obj_t arg, qstr argname);
synthio_math_operation_t common_hal_synthio_math_get_operation(synthio_math_obj_t *self);
void common_hal_synthio_math_set_operation(synthio_math_obj_t *self, synthio_math_operation_t arg);
mp_float_t common_hal_synthio_math_get_value(synthio_math_obj_t *self);
mp_float_t common_hal_synthio_math_tick(mp_obj_t self_in);

View File

@ -37,15 +37,13 @@
static const mp_arg_t note_properties[] = {
{ MP_QSTR_frequency, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = NULL } },
{ MP_QSTR_panning, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_tremolo_rate, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = NULL } },
{ MP_QSTR_tremolo_depth, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = NULL } },
{ MP_QSTR_bend_rate, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = NULL } },
{ MP_QSTR_bend_depth, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = NULL } },
{ MP_QSTR_bend_mode, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = (mp_obj_t)MP_ROM_PTR(&bend_mode_VIBRATO_obj) } },
{ MP_QSTR_amplitude, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
{ MP_QSTR_bend, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
{ MP_QSTR_envelope, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
{ MP_QSTR_filter, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
{ MP_QSTR_ring_frequency, MP_ARG_OBJ, {.u_obj = NULL } },
{ MP_QSTR_ring_frequency, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_ring_bend, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
{ MP_QSTR_ring_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
};
//| class Note:
@ -53,14 +51,14 @@ static const mp_arg_t note_properties[] = {
//| self,
//| *,
//| frequency: float,
//| panning: float = 0.0,
//| panning: BlockInput = 0.0,
//| waveform: Optional[ReadableBuffer] = None,
//| envelope: Optional[Envelope] = None,
//| tremolo_depth: float = 0.0,
//| tremolo_rate: float = 0.0,
//| bend_depth: float = 0.0,
//| bend_rate: float = 0.0,
//| bend_mode: "BendMode" = BendMode.VIBRATO,
//| amplitude: BlockInput = 0.0,
//| bend: BlockInput = 0.0,
//| ring_frequency: float = 0.0,
//| ring_bend: float = 0.0,
//| ring_waveform: Optional[ReadableBuffer] = 0.0,
//| ) -> None:
//| """Construct a Note object, with a frequency in Hz, and optional panning, waveform, envelope, tremolo (volume change) and bend (frequency change).
//|
@ -76,16 +74,12 @@ STATIC mp_obj_t synthio_note_make_new(const mp_obj_type_t *type_in, size_t n_arg
self->base.type = &synthio_note_type;
mp_obj_t result = MP_OBJ_FROM_PTR(self);
for (size_t i = 0; i < MP_ARRAY_SIZE(note_properties); i++) {
if (args[i].u_obj != NULL) {
mp_store_attr(result, note_properties[i].qst, args[i].u_obj);
}
}
properties_construct_helper(result, note_properties, args, MP_ARRAY_SIZE(note_properties));
return result;
};
//| frequency: float
//| frequency: BlockInput
//| """The base frequency of the note, in Hz."""
STATIC mp_obj_t synthio_note_get_frequency(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
@ -121,7 +115,7 @@ MP_PROPERTY_GETSET(synthio_note_filter_obj,
(mp_obj_t)&synthio_note_get_filter_obj,
(mp_obj_t)&synthio_note_set_filter_obj);
//| panning: float
//| panning: BlockInput
//| """Defines the channel(s) in which the note appears.
//|
//| -1 is left channel only, 0 is both channels, and 1 is right channel.
@ -130,13 +124,13 @@ MP_PROPERTY_GETSET(synthio_note_filter_obj,
//| amplitude in the left channel and 1/2 amplitude in the right channel."""
STATIC mp_obj_t synthio_note_get_panning(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_note_get_panning(self));
return common_hal_synthio_note_get_panning(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_panning_obj, synthio_note_get_panning);
STATIC mp_obj_t synthio_note_set_panning(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_panning(self, mp_obj_get_float(arg));
common_hal_synthio_note_set_panning(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_panning_obj, synthio_note_set_panning);
@ -145,108 +139,54 @@ MP_PROPERTY_GETSET(synthio_note_panning_obj,
(mp_obj_t)&synthio_note_set_panning_obj);
//| tremolo_depth: float
//| """The tremolo depth of the note, from 0 to 1
//| amplitude: BlockInput
//| """The relative amplitude of the note, from 0 to 1
//|
//| A depth of 0 disables tremolo. A nonzero value enables tremolo,
//| with the maximum decrease in amplitude being equal to the tremolo
//| depth. A note with a tremolo depth of 1 will fade out to nothing, while
//| a tremolo depth of 0.1 will give a minimum amplitude of 0.9."""
STATIC mp_obj_t synthio_note_get_tremolo_depth(mp_obj_t self_in) {
//| An amplitude of 0 makes the note inaudible. It is combined multiplicatively with
//| the value from the note's envelope.
//|
//| To achieve a tremolo effect, attach an LFO here."""
STATIC mp_obj_t synthio_note_get_amplitude(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_note_get_tremolo_depth(self));
return common_hal_synthio_note_get_amplitude(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_tremolo_depth_obj, synthio_note_get_tremolo_depth);
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_amplitude_obj, synthio_note_get_amplitude);
STATIC mp_obj_t synthio_note_set_tremolo_depth(mp_obj_t self_in, mp_obj_t arg) {
STATIC mp_obj_t synthio_note_set_amplitude(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_tremolo_depth(self, mp_obj_get_float(arg));
common_hal_synthio_note_set_amplitude(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_tremolo_depth_obj, synthio_note_set_tremolo_depth);
MP_PROPERTY_GETSET(synthio_note_tremolo_depth_obj,
(mp_obj_t)&synthio_note_get_tremolo_depth_obj,
(mp_obj_t)&synthio_note_set_tremolo_depth_obj);
//| tremolo_rate: float
//| """The tremolo rate of the note, in Hz."""
STATIC mp_obj_t synthio_note_get_tremolo_rate(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_note_get_tremolo_rate(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_tremolo_rate_obj, synthio_note_get_tremolo_rate);
STATIC mp_obj_t synthio_note_set_tremolo_rate(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_tremolo_rate(self, mp_obj_get_float(arg));
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_tremolo_rate_obj, synthio_note_set_tremolo_rate);
MP_PROPERTY_GETSET(synthio_note_tremolo_rate_obj,
(mp_obj_t)&synthio_note_get_tremolo_rate_obj,
(mp_obj_t)&synthio_note_set_tremolo_rate_obj);
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_amplitude_obj, synthio_note_set_amplitude);
MP_PROPERTY_GETSET(synthio_note_amplitude_obj,
(mp_obj_t)&synthio_note_get_amplitude_obj,
(mp_obj_t)&synthio_note_set_amplitude_obj);
//|
//| bend_mode: BendMode
//| """The type of bend operation"""
STATIC mp_obj_t synthio_note_get_bend_mode(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return cp_enum_find(&synthio_bend_mode_type, common_hal_synthio_note_get_bend_mode(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_bend_mode_obj, synthio_note_get_bend_mode);
STATIC mp_obj_t synthio_note_set_bend_mode(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_bend_mode(self, cp_enum_value(&synthio_bend_mode_type, arg, MP_QSTR_bend_mode));
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_bend_mode_obj, synthio_note_set_bend_mode);
MP_PROPERTY_GETSET(synthio_note_bend_mode_obj,
(mp_obj_t)&synthio_note_get_bend_mode_obj,
(mp_obj_t)&synthio_note_set_bend_mode_obj);
//
//| bend: BlockInput
//| """The pitch bend depth of the note, from -12 to +12
//|
//| bend_depth: float
//| """The bend depth of the note, from -1 to +1
//|
//| A depth of 0 disables bend. A depth of 1 corresponds to a bend of 1
//| octave. A depth of (1/12) = 0.833 corresponds to a bend of 1 semitone,
//| A depth of 0 plays the programmed frequency. A depth of 1 corresponds to a bend of 1
//| octave. A depth of (1/12) = 0.0833 corresponds to a bend of 1 semitone,
//| and a depth of .00833 corresponds to one musical cent.
//|
//| To achieve a vibrato or sweep effect, attach an LFO here.
//| """
STATIC mp_obj_t synthio_note_get_bend_depth(mp_obj_t self_in) {
STATIC mp_obj_t synthio_note_get_bend(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_note_get_bend_depth(self));
return common_hal_synthio_note_get_bend(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_bend_depth_obj, synthio_note_get_bend_depth);
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_bend_obj, synthio_note_get_bend);
STATIC mp_obj_t synthio_note_set_bend_depth(mp_obj_t self_in, mp_obj_t arg) {
STATIC mp_obj_t synthio_note_set_bend(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_bend_depth(self, mp_obj_get_float(arg));
common_hal_synthio_note_set_bend(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_bend_depth_obj, synthio_note_set_bend_depth);
MP_PROPERTY_GETSET(synthio_note_bend_depth_obj,
(mp_obj_t)&synthio_note_get_bend_depth_obj,
(mp_obj_t)&synthio_note_set_bend_depth_obj);
//| bend_rate: float
//| """The bend rate of the note, in Hz."""
STATIC mp_obj_t synthio_note_get_bend_rate(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return mp_obj_new_float(common_hal_synthio_note_get_bend_rate(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_bend_rate_obj, synthio_note_get_bend_rate);
STATIC mp_obj_t synthio_note_set_bend_rate(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_bend_rate(self, mp_obj_get_float(arg));
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_bend_rate_obj, synthio_note_set_bend_rate);
MP_PROPERTY_GETSET(synthio_note_bend_rate_obj,
(mp_obj_t)&synthio_note_get_bend_rate_obj,
(mp_obj_t)&synthio_note_set_bend_rate_obj);
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_bend_obj, synthio_note_set_bend);
MP_PROPERTY_GETSET(synthio_note_bend_obj,
(mp_obj_t)&synthio_note_get_bend_obj,
(mp_obj_t)&synthio_note_set_bend_obj);
//| waveform: Optional[ReadableBuffer]
//| """The waveform of this note. Setting the waveform to a buffer of a different size resets the note's phase."""
@ -306,6 +246,31 @@ MP_PROPERTY_GETSET(synthio_note_ring_frequency_obj,
(mp_obj_t)&synthio_note_get_ring_frequency_obj,
(mp_obj_t)&synthio_note_set_ring_frequency_obj);
//| ring_bend: float
//| """The pitch bend depth of the note's ring waveform, from -12 to +12
//|
//| A depth of 0 plays the programmed frequency. A depth of 1 corresponds to a bend of 1
//| octave. A depth of (1/12) = 0.0833 corresponds to a bend of 1 semitone,
//| and a depth of .00833 corresponds to one musical cent.
//|
//| To achieve a vibrato or sweep effect on the ring waveform, attach an LFO here.
//| """
STATIC mp_obj_t synthio_note_get_ring_bend(mp_obj_t self_in) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
return common_hal_synthio_note_get_ring_bend(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_ring_bend_obj, synthio_note_get_ring_bend);
STATIC mp_obj_t synthio_note_set_ring_bend(mp_obj_t self_in, mp_obj_t arg) {
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_note_set_ring_bend(self, arg);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_ring_bend_obj, synthio_note_set_ring_bend);
MP_PROPERTY_GETSET(synthio_note_ring_bend_obj,
(mp_obj_t)&synthio_note_get_ring_bend_obj,
(mp_obj_t)&synthio_note_set_ring_bend_obj);
//| ring_waveform: Optional[ReadableBuffer]
//| """The ring waveform of this note. Setting the ring_waveform to a buffer of a different size resets the note's phase.
//|
@ -340,12 +305,10 @@ STATIC const mp_rom_map_elem_t synthio_note_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_panning), MP_ROM_PTR(&synthio_note_panning_obj) },
{ MP_ROM_QSTR(MP_QSTR_waveform), MP_ROM_PTR(&synthio_note_waveform_obj) },
{ MP_ROM_QSTR(MP_QSTR_envelope), MP_ROM_PTR(&synthio_note_envelope_obj) },
{ MP_ROM_QSTR(MP_QSTR_tremolo_depth), MP_ROM_PTR(&synthio_note_tremolo_depth_obj) },
{ MP_ROM_QSTR(MP_QSTR_tremolo_rate), MP_ROM_PTR(&synthio_note_tremolo_rate_obj) },
{ MP_ROM_QSTR(MP_QSTR_bend_depth), MP_ROM_PTR(&synthio_note_bend_depth_obj) },
{ MP_ROM_QSTR(MP_QSTR_bend_rate), MP_ROM_PTR(&synthio_note_bend_rate_obj) },
{ MP_ROM_QSTR(MP_QSTR_bend_mode), MP_ROM_PTR(&synthio_note_bend_mode_obj) },
{ MP_ROM_QSTR(MP_QSTR_amplitude), MP_ROM_PTR(&synthio_note_amplitude_obj) },
{ MP_ROM_QSTR(MP_QSTR_bend), MP_ROM_PTR(&synthio_note_bend_obj) },
{ MP_ROM_QSTR(MP_QSTR_ring_frequency), MP_ROM_PTR(&synthio_note_ring_frequency_obj) },
{ MP_ROM_QSTR(MP_QSTR_ring_bend), MP_ROM_PTR(&synthio_note_ring_bend_obj) },
{ MP_ROM_QSTR(MP_QSTR_ring_waveform), MP_ROM_PTR(&synthio_note_ring_waveform_obj) },
};
STATIC MP_DEFINE_CONST_DICT(synthio_note_locals_dict, synthio_note_locals_dict_table);

View File

@ -12,30 +12,24 @@ void common_hal_synthio_note_set_frequency(synthio_note_obj_t *self, mp_float_t
bool common_hal_synthio_note_get_filter(synthio_note_obj_t *self);
void common_hal_synthio_note_set_filter(synthio_note_obj_t *self, bool value);
mp_float_t common_hal_synthio_note_get_ring_frequency(synthio_note_obj_t *self);
void common_hal_synthio_note_set_ring_frequency(synthio_note_obj_t *self, mp_float_t value);
mp_obj_t common_hal_synthio_note_get_panning(synthio_note_obj_t *self);
void common_hal_synthio_note_set_panning(synthio_note_obj_t *self, mp_obj_t value);
mp_float_t common_hal_synthio_note_get_panning(synthio_note_obj_t *self);
void common_hal_synthio_note_set_panning(synthio_note_obj_t *self, mp_float_t value);
mp_obj_t common_hal_synthio_note_get_amplitude(synthio_note_obj_t *self);
void common_hal_synthio_note_set_amplitude(synthio_note_obj_t *self, mp_obj_t value);
mp_float_t common_hal_synthio_note_get_tremolo_rate(synthio_note_obj_t *self);
void common_hal_synthio_note_set_tremolo_rate(synthio_note_obj_t *self, mp_float_t value);
mp_float_t common_hal_synthio_note_get_tremolo_depth(synthio_note_obj_t *self);
void common_hal_synthio_note_set_tremolo_depth(synthio_note_obj_t *self, mp_float_t value);
synthio_bend_mode_t common_hal_synthio_note_get_bend_mode(synthio_note_obj_t *self);
void common_hal_synthio_note_set_bend_mode(synthio_note_obj_t *self, synthio_bend_mode_t value);
mp_float_t common_hal_synthio_note_get_bend_rate(synthio_note_obj_t *self);
void common_hal_synthio_note_set_bend_rate(synthio_note_obj_t *self, mp_float_t value);
mp_float_t common_hal_synthio_note_get_bend_depth(synthio_note_obj_t *self);
void common_hal_synthio_note_set_bend_depth(synthio_note_obj_t *self, mp_float_t value);
mp_obj_t common_hal_synthio_note_get_bend(synthio_note_obj_t *self);
void common_hal_synthio_note_set_bend(synthio_note_obj_t *self, mp_obj_t value);
mp_obj_t common_hal_synthio_note_get_waveform_obj(synthio_note_obj_t *self);
void common_hal_synthio_note_set_waveform(synthio_note_obj_t *self, mp_obj_t value);
mp_float_t common_hal_synthio_note_get_ring_frequency(synthio_note_obj_t *self);
void common_hal_synthio_note_set_ring_frequency(synthio_note_obj_t *self, mp_float_t value);
mp_obj_t common_hal_synthio_note_get_ring_bend(synthio_note_obj_t *self);
void common_hal_synthio_note_set_ring_bend(synthio_note_obj_t *self, mp_obj_t value);
mp_obj_t common_hal_synthio_note_get_ring_waveform_obj(synthio_note_obj_t *self);
void common_hal_synthio_note_set_ring_waveform(synthio_note_obj_t *self, mp_obj_t value);

View File

@ -33,11 +33,16 @@
#include "py/runtime.h"
#include "shared-bindings/util.h"
#include "shared-bindings/synthio/Synthesizer.h"
#include "shared-bindings/synthio/LFO.h"
#include "shared-bindings/synthio/__init__.h"
#include "supervisor/shared/translate/translate.h"
//| NoteSequence = Sequence[Union[int, Note]]
//| """A sequence of notes, which can each be integer MIDI notes or `Note` objects"""
//| """A sequence of notes, which can each be integer MIDI note numbers or `Note` objects"""
//| NoteOrNoteSequence = Union[int, Note, NoteSequence]
//| """A note or sequence of notes"""
//| LFOOrLFOSequence = Union["LFO", Sequence["LFO"]]
//| """An LFO or a sequence of LFOs"""
//|
//| class Synthesizer:
//| def __init__(
@ -93,12 +98,12 @@ STATIC void check_for_deinit(synthio_synthesizer_obj_t *self) {
}
}
//| def press(self, /, press: NoteSequence = ()) -> None:
//| def press(self, /, press: NoteOrNoteSequence = ()) -> None:
//| """Turn some notes on.
//|
//| Pressing a note that was already pressed has no effect.
//|
//| :param NoteSequence press: Any sequence of notes."""
//| :param NoteOrNoteSequence press: Any sequence of notes."""
STATIC mp_obj_t synthio_synthesizer_press(mp_obj_t self_in, mp_obj_t press) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
@ -106,12 +111,12 @@ STATIC mp_obj_t synthio_synthesizer_press(mp_obj_t self_in, mp_obj_t press) {
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(synthio_synthesizer_press_obj, synthio_synthesizer_press);
//| def release(self, /, release: NoteSequence = ()) -> None:
//| def release(self, /, release: NoteOrNoteSequence = ()) -> None:
//| """Turn some notes off.
//|
//| Releasing a note that was already released has no effect.
//|
//| :param NoteSequence release: Any sequence of notes."""
//| :param NoteOrNoteSequence release: Any sequence of notes."""
STATIC mp_obj_t synthio_synthesizer_release(mp_obj_t self_in, mp_obj_t release) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
@ -120,23 +125,37 @@ STATIC mp_obj_t synthio_synthesizer_release(mp_obj_t self_in, mp_obj_t release)
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(synthio_synthesizer_release_obj, synthio_synthesizer_release);
//| def release_then_press(self, release: NoteSequence = (), press: NoteSequence = ()) -> None:
//| """Turn some notes on and/or off.
//| def change(
//| self,
//| release: NoteOrNoteSequence = (),
//| press: NoteOrNoteSequence = (),
//| retrigger=LFOOrLFOSequence,
//| ) -> None:
//| """Start notes, stop them, and/or re-trigger some LFOs.
//|
//| The changes all happen atomically with respect to output generation.
//|
//| It is OK to release note that was not actually turned on.
//|
//| Pressing a note that was already pressed has no effect.
//| Pressing a note that was already pressed returns it to the attack phase
//| but without resetting its amplitude. Releasing a note and immediately
//| pressing it again returns it to the attack phase with an initial
//| amplitude of 0.
//|
//| Releasing and pressing the note again has little effect, but does reset the phase
//| of the note, which may be perceptible as a small glitch.
//| At the same time, the passed LFOs (if any) are retriggered.
//|
//| :param NoteSequence release: Any sequence of notes.
//| :param NoteSequence press: Any sequence of notes."""
STATIC mp_obj_t synthio_synthesizer_release_then_press(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_release, ARG_press };
//| :param NoteOrNoteSequence release: Any sequence of notes.
//| :param NoteOrNoteSequence press: Any sequence of notes.
//| :param LFOOrLFOSequence retrigger: Any sequence of LFOs.
//|
//| Note: for compatibility, ``release_then_press`` may be used as an alias
//| for this function. This compatibility name will be removed in 9.0."""
STATIC mp_obj_t synthio_synthesizer_change(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_release, ARG_press, ARG_retrigger };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_release, MP_ARG_OBJ, {.u_obj = mp_const_empty_tuple } },
{ MP_QSTR_press, MP_ARG_OBJ, {.u_obj = mp_const_empty_tuple } },
{ MP_QSTR_retrigger, MP_ARG_OBJ, {.u_obj = mp_const_empty_tuple } },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
@ -146,18 +165,19 @@ STATIC mp_obj_t synthio_synthesizer_release_then_press(mp_uint_t n_args, const m
check_for_deinit(self);
common_hal_synthio_synthesizer_release(self, args[ARG_release].u_obj);
common_hal_synthio_synthesizer_press(self, args[ARG_press].u_obj);
common_hal_synthio_synthesizer_retrigger(self, args[ARG_retrigger].u_obj);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(synthio_synthesizer_release_then_press_obj, 1, synthio_synthesizer_release_then_press);
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(synthio_synthesizer_change_obj, 1, synthio_synthesizer_change);
//
//| def release_all_then_press(self, /, press: NoteSequence) -> None:
//| def release_all_then_press(self, /, press: NoteOrNoteSequence) -> None:
//| """Turn any currently-playing notes off, then turn on the given notes
//|
//| Releasing and pressing the note again has little effect, but does reset the phase
//| of the note, which may be perceptible as a small glitch.
//| Releasing a note and immediately pressing it again returns it to the
//| attack phase with an initial amplitude of 0.
//|
//| :param NoteSequence press: Any sequence of notes."""
//| :param NoteOrNoteSequence press: Any sequence of notes."""
STATIC mp_obj_t synthio_synthesizer_release_all_then_press(mp_obj_t self_in, mp_obj_t press) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
@ -250,6 +270,23 @@ MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_get_pressed_obj, synthio_synthesiz
MP_PROPERTY_GETTER(synthio_synthesizer_pressed_obj,
(mp_obj_t)&synthio_synthesizer_get_pressed_obj);
//| lfos: List[LFO]
//| """A list of LFOs to advance whether or not they are associated with a playing note.
//|
//| This can be used to implement 'free-running' LFOs. LFOs associated with playing notes are advanced whether or not they are in this list.
//|
//| This property is read-only but its contents may be modified by e.g., calling ``synth.lfos.append()`` or ``synth.lfos.remove()``. It is initially an empty list."""
//|
STATIC mp_obj_t synthio_synthesizer_obj_get_lfos(mp_obj_t self_in) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
return common_hal_synthio_synthesizer_get_lfos(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_get_lfos_obj, synthio_synthesizer_obj_get_lfos);
MP_PROPERTY_GETTER(synthio_synthesizer_lfos_obj,
(mp_obj_t)&synthio_synthesizer_get_lfos_obj);
//| max_polyphony: int
//| """Maximum polyphony of the synthesizer (read-only class property)"""
//|
@ -259,7 +296,8 @@ STATIC const mp_rom_map_elem_t synthio_synthesizer_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_press), MP_ROM_PTR(&synthio_synthesizer_press_obj) },
{ MP_ROM_QSTR(MP_QSTR_release), MP_ROM_PTR(&synthio_synthesizer_release_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_all), MP_ROM_PTR(&synthio_synthesizer_release_all_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_then_press), MP_ROM_PTR(&synthio_synthesizer_release_then_press_obj) },
{ MP_ROM_QSTR(MP_QSTR_change), MP_ROM_PTR(&synthio_synthesizer_change_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_then_press), MP_ROM_PTR(&synthio_synthesizer_change_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_all_then_press), MP_ROM_PTR(&synthio_synthesizer_release_all_then_press_obj) },
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&synthio_synthesizer_deinit_obj) },
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
@ -270,6 +308,7 @@ STATIC const mp_rom_map_elem_t synthio_synthesizer_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_sample_rate), MP_ROM_PTR(&synthio_synthesizer_sample_rate_obj) },
{ MP_ROM_QSTR(MP_QSTR_max_polyphony), MP_ROM_INT(CIRCUITPY_SYNTHIO_MAX_CHANNELS) },
{ MP_ROM_QSTR(MP_QSTR_pressed), MP_ROM_PTR(&synthio_synthesizer_pressed_obj) },
{ MP_ROM_QSTR(MP_QSTR_lfos), MP_ROM_PTR(&synthio_synthesizer_lfos_obj) },
};
STATIC MP_DEFINE_CONST_DICT(synthio_synthesizer_locals_dict, synthio_synthesizer_locals_dict_table);

View File

@ -41,5 +41,7 @@ uint8_t common_hal_synthio_synthesizer_get_bits_per_sample(synthio_synthesizer_o
uint8_t common_hal_synthio_synthesizer_get_channel_count(synthio_synthesizer_obj_t *self);
void common_hal_synthio_synthesizer_release(synthio_synthesizer_obj_t *self, mp_obj_t to_release);
void common_hal_synthio_synthesizer_press(synthio_synthesizer_obj_t *self, mp_obj_t to_press);
void common_hal_synthio_synthesizer_retrigger(synthio_synthesizer_obj_t *self, mp_obj_t to_retrigger);
void common_hal_synthio_synthesizer_release_all(synthio_synthesizer_obj_t *self);
mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_obj_t *self);
mp_obj_t common_hal_synthio_synthesizer_get_lfos(synthio_synthesizer_obj_t *self);

View File

@ -24,6 +24,7 @@
* THE SOFTWARE.
*/
#include <math.h>
#include <string.h>
#include "py/enum.h"
@ -35,10 +36,14 @@
#include "extmod/vfs_posix.h"
#include "shared-bindings/synthio/__init__.h"
#include "shared-bindings/synthio/LFO.h"
#include "shared-bindings/synthio/Math.h"
#include "shared-bindings/synthio/MidiTrack.h"
#include "shared-bindings/synthio/Note.h"
#include "shared-bindings/synthio/Synthesizer.h"
#include "shared-module/synthio/LFO.h"
#define default_attack_time (MICROPY_FLOAT_CONST(0.1))
#define default_decay_time (MICROPY_FLOAT_CONST(0.05))
#define default_release_time (MICROPY_FLOAT_CONST(0.2))
@ -57,7 +62,12 @@ static const mp_arg_t envelope_properties[] = {
//| """Support for multi-channel audio synthesis
//|
//| At least 2 simultaneous notes are supported. samd5x, mimxrt10xx and rp2040 platforms support up to 12 notes.
//| """
//|
//| BlockInput = Union["Math", "LFO", float, None]
//| """Blocks and Notes can take any of these types as inputs on certain attributes
//|
//| A BlockInput can be any of the following types: `Math`, `LFO`, `builtins.float`, `None` (treated same as 0).
//| """
//|
//| class Envelope:
@ -266,7 +276,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(synthio_from_file_obj, 1, synthio_from_file);
//|
STATIC mp_obj_t midi_to_hz(mp_obj_t arg) {
mp_float_t note = mp_arg_validate_obj_float_range(arg, 1, 127, MP_QSTR_note);
mp_float_t note = mp_arg_validate_type_float(arg, MP_QSTR_note);
return mp_obj_new_float(common_hal_synthio_midi_to_hz_float(note));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_midi_to_hz_obj, midi_to_hz);
@ -283,51 +293,36 @@ STATIC mp_obj_t onevo_to_hz(mp_obj_t arg) {
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_onevo_to_hz_obj, onevo_to_hz);
MAKE_ENUM_VALUE(synthio_bend_mode_type, bend_mode, STATIC, SYNTHIO_BEND_MODE_STATIC);
MAKE_ENUM_VALUE(synthio_bend_mode_type, bend_mode, VIBRATO, SYNTHIO_BEND_MODE_VIBRATO);
MAKE_ENUM_VALUE(synthio_bend_mode_type, bend_mode, SWEEP, SYNTHIO_BEND_MODE_SWEEP);
MAKE_ENUM_VALUE(synthio_bend_mode_type, bend_mode, SWEEP_IN, SYNTHIO_BEND_MODE_SWEEP_IN);
//|
//| class BendMode:
//| """Controls the way the ``Note.pitch_bend_depth`` and ``Note.pitch_bend_rate`` properties are interpreted."""
//|
//| STATIC: "BendMode"
//| """The Note's pitch is modified by its ``pitch_bend_depth``. ``pitch_bend_rate`` is ignored."""
//|
//| VIBRATO: "BendMode"
//| """The Note's pitch varies by ``±pitch_bend_depth`` at a rate of ``pitch_bend_rate`` Hz."""
//|
//| SWEEP: "BendMode"
//| """The Note's pitch starts at ``Note.frequency`` then sweeps up or down by ``pitch_bend_depth`` over ``1/pitch_bend_rate`` seconds."""
//|
//| SWEEP_IN: "BendMode"
//| """The Note's pitch sweep is the reverse of ``SWEEP`` mode, starting at the bent pitch and arriving at the tuned pitch."""
//|
MAKE_ENUM_MAP(synthio_bend_mode) {
MAKE_ENUM_MAP_ENTRY(bend_mode, STATIC),
MAKE_ENUM_MAP_ENTRY(bend_mode, VIBRATO),
MAKE_ENUM_MAP_ENTRY(bend_mode, SWEEP),
MAKE_ENUM_MAP_ENTRY(bend_mode, SWEEP_IN),
};
STATIC MP_DEFINE_CONST_DICT(synthio_bend_mode_locals_dict, synthio_bend_mode_locals_table);
MAKE_PRINTER(synthio, synthio_bend_mode);
MAKE_ENUM_TYPE(synthio, BendMode, synthio_bend_mode);
#if CIRCUITPY_AUDIOCORE_DEBUG
STATIC mp_obj_t synthio_lfo_tick(size_t n, const mp_obj_t *args) {
shared_bindings_synthio_lfo_tick(48000);
mp_obj_t result[n];
for (size_t i = 0; i < n; i++) {
synthio_block_slot_t slot;
synthio_block_assign_slot(args[i], &slot, MP_QSTR_arg);
mp_float_t value = synthio_block_slot_get(&slot);
result[i] = mp_obj_new_float(value);
}
return mp_obj_new_tuple(n, result);
}
MP_DEFINE_CONST_FUN_OBJ_VAR(synthio_lfo_tick_obj, 1, synthio_lfo_tick);
#endif
STATIC const mp_rom_map_elem_t synthio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_synthio) },
{ MP_ROM_QSTR(MP_QSTR_BendMode), MP_ROM_PTR(&synthio_bend_mode_type) },
{ MP_ROM_QSTR(MP_QSTR_Math), MP_ROM_PTR(&synthio_math_type) },
{ MP_ROM_QSTR(MP_QSTR_MathOperation), MP_ROM_PTR(&synthio_math_operation_type) },
{ MP_ROM_QSTR(MP_QSTR_MidiTrack), MP_ROM_PTR(&synthio_miditrack_type) },
{ MP_ROM_QSTR(MP_QSTR_Note), MP_ROM_PTR(&synthio_note_type) },
{ MP_ROM_QSTR(MP_QSTR_LFO), MP_ROM_PTR(&synthio_lfo_type) },
{ MP_ROM_QSTR(MP_QSTR_Synthesizer), MP_ROM_PTR(&synthio_synthesizer_type) },
{ MP_ROM_QSTR(MP_QSTR_from_file), MP_ROM_PTR(&synthio_from_file_obj) },
{ MP_ROM_QSTR(MP_QSTR_Envelope), MP_ROM_PTR(&synthio_envelope_type_obj) },
{ MP_ROM_QSTR(MP_QSTR_midi_to_hz), MP_ROM_PTR(&synthio_midi_to_hz_obj) },
{ MP_ROM_QSTR(MP_QSTR_onevo_to_hz), MP_ROM_PTR(&synthio_midi_to_hz_obj) },
#if CIRCUITPY_AUDIOCORE_DEBUG
{ MP_ROM_QSTR(MP_QSTR_lfo_tick), MP_ROM_PTR(&synthio_lfo_tick_obj) },
#endif
};
STATIC MP_DEFINE_CONST_DICT(synthio_module_globals, synthio_module_globals_table);

View File

@ -24,9 +24,6 @@
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_UTIL_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_UTIL_H
#include "py/runtime.h"
#include "shared-bindings/util.h"
@ -50,4 +47,10 @@ void properties_print_helper(const mp_print_t *print, mp_obj_t self_in, const mp
mp_print_str(print, ")");
}
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_UTIL_H
void properties_construct_helper(mp_obj_t self_in, const mp_arg_t *args, const mp_arg_val_t *vals, size_t n_properties) {
for (size_t i = 0; i < n_properties; i++) {
if (vals[i].u_obj != NULL) {
mp_store_attr(self_in, args[i].qst, vals[i].u_obj);
}
}
}

View File

@ -24,14 +24,11 @@
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_UTIL_H
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_UTIL_H
#pragma once
#include "py/mpprint.h"
#include "py/runtime.h"
void raise_deinited_error(void);
void properties_print_helper(const mp_print_t *print, mp_obj_t self_in, const mp_arg_t *properties, size_t n_properties);
#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_UTIL_H
void properties_construct_helper(mp_obj_t self_in, const mp_arg_t *args, const mp_arg_val_t *vals, size_t n_properties);

141
shared-module/synthio/LFO.c Normal file
View File

@ -0,0 +1,141 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "shared-bindings/synthio/LFO.h"
#include "shared-module/synthio/LFO.h"
#include <math.h>
#define ONE (MICROPY_FLOAT_CONST(1.))
#define ZERO (MICROPY_FLOAT_CONST(0.))
#define ALMOST_ONE (MICROPY_FLOAT_CONST(32767.) / 32768)
mp_float_t common_hal_synthio_lfo_tick(mp_obj_t self_in) {
synthio_lfo_obj_t *lfo = MP_OBJ_TO_PTR(self_in);
mp_float_t rate = synthio_block_slot_get(&lfo->rate) * synthio_global_rate_scale;
mp_float_t phase_offset = synthio_block_slot_get(&lfo->phase_offset);
mp_float_t accum = lfo->accum + rate + phase_offset;
if (lfo->once) {
if (rate > 0) {
if (accum > ALMOST_ONE) {
accum = ALMOST_ONE;
}
} else if (rate < 0 && accum < ZERO) {
accum = ZERO;
}
} else {
accum = accum - MICROPY_FLOAT_C_FUN(floor)(accum);
}
lfo->accum = accum - phase_offset;
int len = lfo->waveform_bufinfo.len;
mp_float_t scaled_accum = accum * (len - lfo->once);
size_t idx = (size_t)MICROPY_FLOAT_C_FUN(floor)(scaled_accum);
assert(idx < lfo->waveform_bufinfo.len);
int16_t *waveform = lfo->waveform_bufinfo.buf;
mp_float_t value = waveform[idx];
if (lfo->interpolate) {
mp_float_t frac = scaled_accum - idx;
size_t idxp1 = idx + 1;
if (idxp1 == lfo->waveform_bufinfo.len) {
idxp1 = lfo->once ? idx : 0;
}
value = value * (1 - frac) + waveform[idxp1] * frac;
}
mp_float_t scale = synthio_block_slot_get(&lfo->scale);
mp_float_t offset = synthio_block_slot_get(&lfo->offset);
value = MICROPY_FLOAT_C_FUN(ldexp)(value, -15) * scale + offset;
return value;
}
mp_obj_t common_hal_synthio_lfo_get_waveform_obj(synthio_lfo_obj_t *self) {
return self->waveform_obj;
}
mp_obj_t common_hal_synthio_lfo_get_rate_obj(synthio_lfo_obj_t *self) {
return self->rate.obj;
}
void common_hal_synthio_lfo_set_rate_obj(synthio_lfo_obj_t *self, mp_obj_t arg) {
synthio_block_assign_slot(arg, &self->rate, MP_QSTR_rate);
}
mp_obj_t common_hal_synthio_lfo_get_scale_obj(synthio_lfo_obj_t *self) {
return self->scale.obj;
}
void common_hal_synthio_lfo_set_scale_obj(synthio_lfo_obj_t *self, mp_obj_t arg) {
synthio_block_assign_slot(arg, &self->scale, MP_QSTR_scale);
}
mp_obj_t common_hal_synthio_lfo_get_phase_offset_obj(synthio_lfo_obj_t *self) {
return self->phase_offset.obj;
}
void common_hal_synthio_lfo_set_phase_offset_obj(synthio_lfo_obj_t *self, mp_obj_t arg) {
synthio_block_assign_slot(arg, &self->phase_offset, MP_QSTR_phase_offset);
}
mp_obj_t common_hal_synthio_lfo_get_offset_obj(synthio_lfo_obj_t *self) {
return self->offset.obj;
}
void common_hal_synthio_lfo_set_offset_obj(synthio_lfo_obj_t *self, mp_obj_t arg) {
synthio_block_assign_slot(arg, &self->offset, MP_QSTR_offset);
}
bool common_hal_synthio_lfo_get_once(synthio_lfo_obj_t *self) {
return self->once;
}
void common_hal_synthio_lfo_set_once(synthio_lfo_obj_t *self, bool arg) {
self->once = arg;
}
bool common_hal_synthio_lfo_get_interpolate(synthio_lfo_obj_t *self) {
return self->interpolate;
}
void common_hal_synthio_lfo_set_interpolate(synthio_lfo_obj_t *self, bool arg) {
self->interpolate = arg;
}
mp_float_t common_hal_synthio_lfo_get_value(synthio_lfo_obj_t *self) {
return self->base.value;
}
mp_float_t common_hal_synthio_lfo_get_phase(synthio_lfo_obj_t *self) {
return self->accum;
}
void common_hal_synthio_lfo_retrigger(synthio_lfo_obj_t *self) {
self->accum = 0;
}

View File

@ -0,0 +1,50 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#pragma once
#include "shared-module/synthio/block.h"
typedef struct synthio_lfo_obj {
synthio_block_base_t base;
bool once, interpolate;
synthio_block_slot_t rate, scale, offset, phase_offset;
mp_float_t accum;
mp_obj_t waveform_obj;
mp_buffer_info_t waveform_bufinfo;
} synthio_lfo_obj_t;
// Update the value inside the lfo slot if the value is an LFO, returning the new value
mp_float_t synthio_block_slot_get(synthio_block_slot_t *block_slot);
// the same, but the output is constrained to be between lo and hi
mp_float_t synthio_block_slot_get_limited(synthio_block_slot_t *block_slot, mp_float_t lo, mp_float_t hi);
// the same, but the output is constrained to be between lo and hi and converted to an integer with 15 fractional bits
int32_t synthio_block_slot_get_scaled(synthio_block_slot_t *block_slot, mp_float_t lo, mp_float_t hi);
// Assign an object (which may be a float or a synthio_block_obj_t) to an block slot
void synthio_block_assign_slot(mp_obj_t obj, synthio_block_slot_t *block_slot, qstr arg_name);

View File

@ -0,0 +1,122 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <math.h>
#include "shared-bindings/synthio/Math.h"
#include "shared-module/synthio/Math.h"
mp_obj_t common_hal_synthio_math_get_input_obj(synthio_math_obj_t *self, size_t i) {
return self->inputs[i].obj;
}
void common_hal_synthio_math_set_input_obj(synthio_math_obj_t *self, size_t i, mp_obj_t arg, qstr argname) {
assert(i < MP_ARRAY_SIZE(self->inputs));
synthio_block_assign_slot(arg, &self->inputs[i], argname);
}
synthio_math_operation_t common_hal_synthio_math_get_operation(synthio_math_obj_t *self) {
return self->operation;
}
void common_hal_synthio_math_set_operation(synthio_math_obj_t *self, synthio_math_operation_t arg) {
self->operation = arg;
}
#define ZERO (MICROPY_FLOAT_CONST(0.))
mp_float_t common_hal_synthio_math_get_value(synthio_math_obj_t *self) {
return self->base.value;
}
mp_float_t common_hal_synthio_math_tick(mp_obj_t self_in) {
synthio_math_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_float_t a = synthio_block_slot_get(&self->inputs[0]);
if (self->operation == OP_ABS) {
return MICROPY_FLOAT_C_FUN(fabs)(a);
}
mp_float_t b = synthio_block_slot_get(&self->inputs[1]);
mp_float_t c = synthio_block_slot_get(&self->inputs[2]);
switch (self->operation) {
case OP_SUM:
return a + b + c;
case OP_ADD_SUB:
return a + b - c;
case OP_PRODUCT:
return a * b * c;
case OP_MUL_DIV:
if (fpclassify(c) == FP_ZERO) {
return 0;
}
return a * b / c;
case OP_SCALE_OFFSET:
return a * b + c;
case OP_OFFSET_SCALE:
return (a + b) * c;
case OP_CONSTRAINED_LERP:
c = MIN(1, MAX(0, c));
MP_FALLTHROUGH;
case OP_LERP:
return a * (1 - c) + b * c;
case OP_DIV_ADD:
if (fpclassify(b) == FP_ZERO) {
return ZERO;
}
return a / b + c;
case OP_ADD_DIV:
if (fpclassify(c) == FP_ZERO) {
return ZERO;
}
return (a + b) / c;
case OP_MID:
if (a < b) {
if (b < c) {
return b;
}
if (a < c) {
return c;
}
return a;
}
if (a < c) {
return a;
}
if (c < b) {
return b;
}
return c;
case OP_MIN:
return MIN(a,MIN(b,c));
case OP_MAX:
return MAX(a,MAX(b,c));
case OP_ABS:
break;
}
return ZERO;
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#pragma once
#include "shared-module/synthio/block.h"
typedef struct synthio_math_obj {
synthio_block_base_t base;
synthio_block_slot_t inputs[3];
synthio_math_operation_t operation;
} synthio_math_obj_t;

View File

@ -30,10 +30,6 @@
#include "shared-bindings/synthio/Note.h"
#include "shared-bindings/synthio/__init__.h"
static int32_t round_float_to_int(mp_float_t f) {
return (int32_t)(f + MICROPY_FLOAT_CONST(0.5));
}
mp_float_t common_hal_synthio_note_get_frequency(synthio_note_obj_t *self) {
return self->frequency;
}
@ -62,73 +58,36 @@ void common_hal_synthio_note_set_ring_frequency(synthio_note_obj_t *self, mp_flo
self->ring_frequency_scaled = synthio_frequency_convert_float_to_scaled(val);
}
mp_float_t common_hal_synthio_note_get_panning(synthio_note_obj_t *self) {
return self->panning;
mp_obj_t common_hal_synthio_note_get_panning(synthio_note_obj_t *self) {
return self->panning.obj;
}
void common_hal_synthio_note_set_panning(synthio_note_obj_t *self, mp_float_t value_in) {
mp_float_t val = mp_arg_validate_float_range(value_in, -1, 1, MP_QSTR_panning);
self->panning = val;
if (val >= 0) {
self->left_panning_scaled = 32768;
self->right_panning_scaled = 32768 - round_float_to_int(val * 32768);
} else {
self->right_panning_scaled = 32768;
self->left_panning_scaled = 32768 + round_float_to_int(val * 32768);
}
void common_hal_synthio_note_set_panning(synthio_note_obj_t *self, mp_obj_t value_in) {
synthio_block_assign_slot(value_in, &self->panning, MP_QSTR_panning);
}
mp_float_t common_hal_synthio_note_get_tremolo_depth(synthio_note_obj_t *self) {
return self->tremolo_descr.amplitude;
mp_obj_t common_hal_synthio_note_get_amplitude(synthio_note_obj_t *self) {
return self->amplitude.obj;
}
void common_hal_synthio_note_set_tremolo_depth(synthio_note_obj_t *self, mp_float_t value_in) {
mp_float_t val = mp_arg_validate_float_range(value_in, 0, 1, MP_QSTR_tremolo_depth);
self->tremolo_descr.amplitude = val;
self->tremolo_state.amplitude_scaled = round_float_to_int(val * 32768);
void common_hal_synthio_note_set_amplitude(synthio_note_obj_t *self, mp_obj_t value_in) {
synthio_block_assign_slot(value_in, &self->amplitude, MP_QSTR_amplitude);
}
mp_float_t common_hal_synthio_note_get_tremolo_rate(synthio_note_obj_t *self) {
return self->tremolo_descr.frequency;
mp_obj_t common_hal_synthio_note_get_bend(synthio_note_obj_t *self) {
return self->bend.obj;
}
void common_hal_synthio_note_set_tremolo_rate(synthio_note_obj_t *self, mp_float_t value_in) {
mp_float_t val = mp_arg_validate_float_range(value_in, 0, 60, MP_QSTR_tremolo_rate);
self->tremolo_descr.frequency = val;
if (self->sample_rate != 0) {
self->tremolo_state.dds = synthio_frequency_convert_float_to_dds(val * 65536, self->sample_rate);
}
void common_hal_synthio_note_set_bend(synthio_note_obj_t *self, mp_obj_t value_in) {
synthio_block_assign_slot(value_in, &self->bend, MP_QSTR_bend);
}
mp_float_t common_hal_synthio_note_get_bend_depth(synthio_note_obj_t *self) {
return self->bend_descr.amplitude;
mp_obj_t common_hal_synthio_note_get_ring_bend(synthio_note_obj_t *self) {
return self->ring_bend.obj;
}
void common_hal_synthio_note_set_bend_depth(synthio_note_obj_t *self, mp_float_t value_in) {
mp_float_t val = mp_arg_validate_float_range(value_in, -1, 1, MP_QSTR_bend_depth);
self->bend_descr.amplitude = val;
self->bend_state.amplitude_scaled = round_float_to_int(val * 32768);
}
mp_float_t common_hal_synthio_note_get_bend_rate(synthio_note_obj_t *self) {
return self->bend_descr.frequency;
}
synthio_bend_mode_t common_hal_synthio_note_get_bend_mode(synthio_note_obj_t *self) {
return self->bend_mode;
}
void common_hal_synthio_note_set_bend_mode(synthio_note_obj_t *self, synthio_bend_mode_t value) {
self->bend_mode = value;
}
void common_hal_synthio_note_set_bend_rate(synthio_note_obj_t *self, mp_float_t value_in) {
mp_float_t val = mp_arg_validate_float_range(value_in, 0, 60, MP_QSTR_bend_rate);
self->bend_descr.frequency = val;
if (self->sample_rate != 0) {
self->bend_state.dds = synthio_frequency_convert_float_to_dds(val * 65536, self->sample_rate);
}
void common_hal_synthio_note_set_ring_bend(synthio_note_obj_t *self, mp_obj_t value_in) {
synthio_block_assign_slot(value_in, &self->ring_bend, MP_QSTR_ring_bend);
}
mp_obj_t common_hal_synthio_note_get_envelope_obj(synthio_note_obj_t *self) {
@ -184,22 +143,10 @@ void synthio_note_recalculate(synthio_note_obj_t *self, int32_t sample_rate) {
if (self->envelope_obj != mp_const_none) {
synthio_envelope_definition_set(&self->envelope_def, self->envelope_obj, sample_rate);
}
synthio_lfo_set(&self->tremolo_state, &self->tremolo_descr, sample_rate);
self->tremolo_state.offset_scaled = 32768 - self->tremolo_state.amplitude_scaled;
synthio_lfo_set(&self->bend_state, &self->bend_descr, sample_rate);
self->bend_state.offset_scaled = 32768;
}
void synthio_note_start(synthio_note_obj_t *self, int32_t sample_rate) {
synthio_note_recalculate(self, sample_rate);
if (self->bend_mode != SYNTHIO_BEND_MODE_VIBRATO) {
self->bend_state.phase = 0;
}
}
uint32_t synthio_note_envelope(synthio_note_obj_t *self) {
return self->amplitude_scaled;
}
// Perform a pitch bend operation
@ -213,40 +160,46 @@ uint32_t synthio_note_envelope(synthio_note_obj_t *self) {
STATIC uint16_t pitch_bend_table[] = { 0, 1948, 4013, 6200, 8517, 10972, 13573, 16329, 19248, 22341, 25618, 29090, 32768 };
STATIC uint32_t pitch_bend(uint32_t frequency_scaled, uint16_t bend_value) {
bool down = (bend_value < 32768);
if (!down) {
bend_value -= 32768;
}
STATIC uint32_t pitch_bend(uint32_t frequency_scaled, int32_t bend_value) {
int octave = bend_value >> 15;
bend_value &= 0x7fff;
uint32_t bend_value_semitone = (uint32_t)bend_value * 24; // 65536/semitone
uint32_t semitone = bend_value_semitone >> 16;
uint32_t fractone = bend_value_semitone & 0xffff;
uint32_t f_lo = pitch_bend_table[semitone];
uint32_t f_hi = pitch_bend_table[semitone + 1]; // table has 13 entries, indexing with semitone=12 is OK
uint32_t f = ((f_lo * (65535 - fractone) + f_hi * fractone) >> 16) + BEND_OFFSET;
return (frequency_scaled * (uint64_t)f) >> (15 + down);
return (frequency_scaled * (uint64_t)f) >> (15 - octave);
}
STATIC int synthio_bend_value(synthio_note_obj_t *self, int16_t dur) {
switch (self->bend_mode) {
case SYNTHIO_BEND_MODE_STATIC:
return self->bend_state.amplitude_scaled + self->bend_state.offset_scaled;
case SYNTHIO_BEND_MODE_VIBRATO:
return synthio_lfo_step(&self->bend_state, dur);
case SYNTHIO_BEND_MODE_SWEEP:
return synthio_sweep_step(&self->bend_state, dur);
case SYNTHIO_BEND_MODE_SWEEP_IN:
return synthio_sweep_in_step(&self->bend_state, dur);
default:
return 32768;
}
}
#define ZERO MICROPY_FLOAT_CONST(0.)
#define ONE MICROPY_FLOAT_CONST(1.)
#define ALMOST_ONE (MICROPY_FLOAT_CONST(32767.) / 32768)
uint32_t synthio_note_step(synthio_note_obj_t *self, int32_t sample_rate, int16_t dur, uint16_t loudness[2]) {
int tremolo_value = synthio_lfo_step(&self->tremolo_state, dur);
loudness[0] = (((loudness[0] * tremolo_value) >> 15) * self->left_panning_scaled) >> 15;
loudness[1] = (((loudness[1] * tremolo_value) >> 15) * self->right_panning_scaled) >> 15;
int bend_value = synthio_bend_value(self, dur);
int panning = synthio_block_slot_get_scaled(&self->panning, -ALMOST_ONE, ALMOST_ONE);
int left_panning_scaled, right_panning_scaled;
if (panning >= 0) {
left_panning_scaled = 32768;
right_panning_scaled = 32767 - panning;
} else {
right_panning_scaled = 32768;
left_panning_scaled = 32767 + panning;
}
int amplitude = synthio_block_slot_get_scaled(&self->amplitude, ZERO, ALMOST_ONE);
left_panning_scaled = (left_panning_scaled * amplitude) >> 15;
right_panning_scaled = (right_panning_scaled * amplitude) >> 15;
loudness[0] = (loudness[0] * left_panning_scaled) >> 15;
loudness[1] = (loudness[1] * right_panning_scaled) >> 15;
if (self->ring_frequency_scaled != 0) {
int ring_bend_value = synthio_block_slot_get_scaled(&self->ring_bend, -12, 12);
self->ring_frequency_bent = pitch_bend(self->ring_frequency_scaled, ring_bend_value);
}
int bend_value = synthio_block_slot_get_scaled(&self->bend, -12, 12);
uint32_t frequency_scaled = pitch_bend(self->frequency_scaled, bend_value);
return frequency_scaled;
}

View File

@ -27,25 +27,22 @@
#pragma once
#include "shared-module/synthio/__init__.h"
#include "shared-module/synthio/LFO.h"
#include "shared-bindings/synthio/__init__.h"
typedef struct synthio_note_obj {
mp_obj_base_t base;
synthio_block_slot_t panning, bend, amplitude, ring_bend;
mp_float_t frequency, ring_frequency;
mp_float_t panning;
mp_obj_t waveform_obj, envelope_obj, ring_waveform_obj;
int32_t sample_rate;
int32_t frequency_scaled;
int32_t ring_frequency_scaled;
int32_t amplitude_scaled;
int32_t left_panning_scaled, right_panning_scaled;
int32_t ring_frequency_scaled, ring_frequency_bent;
bool filter;
synthio_bend_mode_t bend_mode;
synthio_lfo_descr_t tremolo_descr, bend_descr;
synthio_lfo_state_t tremolo_state, bend_state;
mp_buffer_info_t waveform_buf;
mp_buffer_info_t ring_waveform_buf;
@ -56,4 +53,3 @@ void synthio_note_recalculate(synthio_note_obj_t *self, int32_t sample_rate);
uint32_t synthio_note_step(synthio_note_obj_t *self, int32_t sample_rate, int16_t dur, uint16_t loudness[2]);
void synthio_note_start(synthio_note_obj_t *self, int32_t sample_rate);
bool synthio_note_playing(synthio_note_obj_t *self);
uint32_t synthio_note_envelope(synthio_note_obj_t *self);

View File

@ -25,8 +25,9 @@
*/
#include "py/runtime.h"
#include "shared-bindings/synthio/Synthesizer.h"
#include "shared-bindings/synthio/LFO.h"
#include "shared-bindings/synthio/Note.h"
#include "shared-bindings/synthio/Synthesizer.h"
#include "shared-module/synthio/Note.h"
@ -36,6 +37,7 @@ void common_hal_synthio_synthesizer_construct(synthio_synthesizer_obj_t *self,
mp_obj_t envelope_obj) {
synthio_synth_init(&self->synth, sample_rate, channel_count, waveform_obj, filter_obj, envelope_obj);
self->lfos = mp_obj_new_list(0, NULL);
}
void common_hal_synthio_synthesizer_deinit(synthio_synthesizer_obj_t *self) {
@ -67,7 +69,21 @@ audioio_get_buffer_result_t synthio_synthesizer_get_buffer(synthio_synthesizer_o
return GET_BUFFER_ERROR;
}
self->synth.span.dur = SYNTHIO_MAX_DUR;
synthio_synth_synthesize(&self->synth, buffer, buffer_length, single_channel_output ? channel : 0);
// free-running LFOs
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(self->lfos, &iter_buf);
mp_obj_t item;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
if (!synthio_obj_is_block(item)) {
continue;
}
synthio_block_slot_t slot = { item };
(void)synthio_block_slot_get(&slot);
}
return GET_BUFFER_MORE_DATA;
}
@ -84,6 +100,10 @@ void common_hal_synthio_synthesizer_release_all(synthio_synthesizer_obj_t *self)
}
}
STATIC bool is_note(mp_obj_t note_in) {
return mp_obj_is_small_int(note_in) || mp_obj_is_type(note_in, &synthio_note_type);
}
STATIC mp_obj_t validate_note(mp_obj_t note_in) {
if (mp_obj_is_small_int(note_in)) {
mp_arg_validate_int_range(mp_obj_get_int(note_in), 0, 127, MP_QSTR_note);
@ -97,6 +117,11 @@ STATIC mp_obj_t validate_note(mp_obj_t note_in) {
}
void common_hal_synthio_synthesizer_release(synthio_synthesizer_obj_t *self, mp_obj_t to_release) {
if (is_note(to_release)) {
synthio_span_change_note(&self->synth, validate_note(to_release), SYNTHIO_SILENCE);
return;
}
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(to_release, &iter_buf);
mp_obj_t item;
@ -106,6 +131,15 @@ void common_hal_synthio_synthesizer_release(synthio_synthesizer_obj_t *self, mp_
}
void common_hal_synthio_synthesizer_press(synthio_synthesizer_obj_t *self, mp_obj_t to_press) {
if (is_note(to_press)) {
if (!mp_obj_is_small_int(to_press)) {
synthio_note_obj_t *note = MP_OBJ_TO_PTR(to_press);
synthio_note_start(note, self->synth.sample_rate);
}
synthio_span_change_note(&self->synth, SYNTHIO_SILENCE, validate_note(to_press));
return;
}
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(to_press, &iter_buf);
mp_obj_t note_obj;
@ -119,6 +153,22 @@ void common_hal_synthio_synthesizer_press(synthio_synthesizer_obj_t *self, mp_ob
}
}
void common_hal_synthio_synthesizer_retrigger(synthio_synthesizer_obj_t *self, mp_obj_t to_retrigger) {
if (mp_obj_is_type(to_retrigger, &synthio_lfo_type)) {
synthio_lfo_obj_t *lfo = MP_OBJ_TO_PTR(mp_arg_validate_type(to_retrigger, &synthio_lfo_type, MP_QSTR_retrigger));
common_hal_synthio_lfo_retrigger(lfo);
return;
}
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(to_retrigger, &iter_buf);
mp_obj_t lfo_obj;
while ((lfo_obj = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
synthio_lfo_obj_t *lfo = MP_OBJ_TO_PTR(mp_arg_validate_type(lfo_obj, &synthio_lfo_type, MP_QSTR_retrigger));
common_hal_synthio_lfo_retrigger(lfo);
}
}
mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_obj_t *self) {
int count = 0;
for (int chan = 0; chan < CIRCUITPY_SYNTHIO_MAX_CHANNELS; chan++) {
@ -134,3 +184,7 @@ mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_ob
}
return MP_OBJ_FROM_PTR(result);
}
mp_obj_t common_hal_synthio_synthesizer_get_lfos(synthio_synthesizer_obj_t *self) {
return self->lfos;
}

View File

@ -34,6 +34,7 @@
typedef struct {
mp_obj_base_t base;
synthio_synth_t synth;
mp_obj_t lfos;
} synthio_synthesizer_obj_t;

View File

@ -32,14 +32,14 @@
#include <math.h>
#include <stdlib.h>
mp_float_t synthio_global_rate_scale;
uint8_t synthio_global_tick;
STATIC const int16_t square_wave[] = {-32768, 32767};
STATIC const uint16_t notes[] = {8372, 8870, 9397, 9956, 10548, 11175, 11840,
12544, 13290, 14080, 14917, 15804}; // 9th octave
STATIC int32_t round_float_to_int(mp_float_t f) {
return (int32_t)(f + MICROPY_FLOAT_CONST(0.5));
}
STATIC int64_t round_float_to_int64(mp_float_t f) {
return (int64_t)(f + MICROPY_FLOAT_CONST(0.5));
@ -192,7 +192,7 @@ static void synth_note_into_buffer(synthio_synth_t *synth, int chan, int32_t *ou
uint32_t dds_rate;
const int16_t *waveform = synth->waveform_bufinfo.buf;
uint32_t waveform_length = synth->waveform_bufinfo.len / sizeof(int16_t);
uint32_t waveform_length = synth->waveform_bufinfo.len;
uint32_t ring_dds_rate = 0;
const int16_t *ring_waveform = NULL;
@ -213,13 +213,13 @@ static void synth_note_into_buffer(synthio_synth_t *synth, int chan, int32_t *ou
int32_t frequency_scaled = synthio_note_step(note, sample_rate, dur, loudness);
if (note->waveform_buf.buf) {
waveform = note->waveform_buf.buf;
waveform_length = note->waveform_buf.len / sizeof(int16_t);
waveform_length = note->waveform_buf.len;
}
dds_rate = synthio_frequency_convert_scaled_to_dds((uint64_t)frequency_scaled * waveform_length, sample_rate);
if (note->ring_frequency_scaled != 0 && note->ring_waveform_buf.buf) {
ring_waveform = note->ring_waveform_buf.buf;
ring_waveform_length = note->ring_waveform_buf.len / sizeof(int16_t);
ring_dds_rate = synthio_frequency_convert_scaled_to_dds((uint64_t)note->ring_frequency_scaled * ring_waveform_length, sample_rate);
ring_waveform_length = note->ring_waveform_buf.len;
ring_dds_rate = synthio_frequency_convert_scaled_to_dds((uint64_t)note->ring_frequency_bent * ring_waveform_length, sample_rate);
uint32_t lim = ring_waveform_length << SYNTHIO_FREQUENCY_SHIFT;
if (ring_dds_rate > lim / sizeof(int16_t)) {
ring_dds_rate = 0; // can't ring at that frequency
@ -311,7 +311,7 @@ static void synth_note_into_buffer(synthio_synth_t *synth, int chan, int32_t *ou
STATIC void run_fir(synthio_synth_t *synth, int32_t *out_buffer32, uint16_t dur) {
int16_t *coeff = (int16_t *)synth->filter_bufinfo.buf;
size_t fir_len = synth->filter_bufinfo.len / sizeof(int16_t);
size_t fir_len = synth->filter_bufinfo.len;
int32_t *in_buf = synth->filter_buffer;
@ -350,6 +350,8 @@ void synthio_synth_synthesize(synthio_synth_t *synth, uint8_t **bufptr, uint32_t
return;
}
shared_bindings_synthio_lfo_tick(synth->sample_rate);
synth->buffer_index = !synth->buffer_index;
synth->other_channel = 1 - channel;
synth->other_buffer_index = synth->buffer_index;
@ -360,7 +362,7 @@ void synthio_synth_synthesize(synthio_synth_t *synth, uint8_t **bufptr, uint32_t
int32_t out_buffer32[dur * synth->channel_count];
if (synth->filter_buffer) {
int32_t *filter_start = &synth->filter_buffer[synth->filter_bufinfo.len * synth->channel_count / sizeof(int16_t)];
int32_t *filter_start = &synth->filter_buffer[synth->filter_bufinfo.len * synth->channel_count];
memset(filter_start, 0, dur * synth->channel_count * sizeof(int32_t));
for (int chan = 0; chan < CIRCUITPY_SYNTHIO_MAX_CHANNELS; chan++) {
@ -439,7 +441,7 @@ void synthio_synth_init(synthio_synth_t *synth, uint32_t sample_rate, int channe
synth->buffers[0] = m_malloc(synth->buffer_length, false);
synth->buffers[1] = m_malloc(synth->buffer_length, false);
if (synth->filter_bufinfo.len) {
synth->filter_buffer_length = (synth->filter_bufinfo.len / 2 + SYNTHIO_MAX_DUR) * channel_count * sizeof(int32_t);
synth->filter_buffer_length = (synth->filter_bufinfo.len + SYNTHIO_MAX_DUR) * channel_count * sizeof(int32_t);
synth->filter_buffer = m_malloc(synth->filter_buffer_length, false);
}
synth->channel_count = channel_count;
@ -471,12 +473,13 @@ STATIC void parse_common(mp_buffer_info_t *bufinfo, mp_obj_t o, int16_t what, mp
if (bufinfo->typecode != 'h') {
mp_raise_ValueError_varg(translate("%q must be array of type 'h'"), what);
}
mp_arg_validate_length_range(bufinfo->len / sizeof(int16_t), 2, max_len, what);
bufinfo->len /= 2;
mp_arg_validate_length_range(bufinfo->len, 2, max_len, what);
}
}
void synthio_synth_parse_waveform(mp_buffer_info_t *bufinfo_waveform, mp_obj_t waveform_obj) {
*bufinfo_waveform = ((mp_buffer_info_t) { .buf = (void *)square_wave, .len = 4 });
*bufinfo_waveform = ((mp_buffer_info_t) { .buf = (void *)square_wave, .len = 2 });
parse_common(bufinfo_waveform, waveform_obj, MP_QSTR_waveform, 16384);
}
@ -541,49 +544,67 @@ uint32_t synthio_frequency_convert_scaled_to_dds(uint64_t frequency_scaled, int3
return (sample_rate / 2 + frequency_scaled) / sample_rate;
}
void synthio_lfo_set(synthio_lfo_state_t *state, const synthio_lfo_descr_t *descr, uint32_t sample_rate) {
state->amplitude_scaled = round_float_to_int(descr->amplitude * 32768);
state->dds = synthio_frequency_convert_float_to_dds(descr->frequency * 65536, sample_rate);
void shared_bindings_synthio_lfo_tick(uint32_t sample_rate) {
synthio_global_rate_scale = (mp_float_t)SYNTHIO_MAX_DUR / sample_rate;
synthio_global_tick++;
}
STATIC int synthio_lfo_step_common(synthio_lfo_state_t *state, uint16_t dur) {
uint32_t phase = state->phase;
uint16_t whole_phase = phase >> 16;
// advance the phase accumulator
state->phase = phase + state->dds * dur;
return whole_phase;
}
STATIC int synthio_lfo_sweep_common(synthio_lfo_state_t *state, uint16_t dur) {
uint32_t old_phase = state->phase;
uint16_t whole_phase = synthio_lfo_step_common(state, dur);
if (state->phase < old_phase) {
state->phase = 0xffffffff;
mp_float_t synthio_block_slot_get(synthio_block_slot_t *slot) {
// all numbers (and None!) previously converted to float in synthio_block_assign_slot
if (mp_obj_is_float(slot->obj)) {
return mp_obj_get_float(slot->obj);
}
return whole_phase;
}
int synthio_sweep_step(synthio_lfo_state_t *state, uint16_t dur) {
uint16_t whole_phase = synthio_lfo_sweep_common(state, dur);
return (state->amplitude_scaled * whole_phase) / 65536 + state->offset_scaled;
}
int synthio_sweep_in_step(synthio_lfo_state_t *state, uint16_t dur) {
uint16_t whole_phase = 65535 - synthio_lfo_sweep_common(state, dur);
return (state->amplitude_scaled * whole_phase) / 65536 + state->offset_scaled;
}
int synthio_lfo_step(synthio_lfo_state_t *state, uint16_t dur) {
uint16_t whole_phase = synthio_lfo_step_common(state, dur);
// create a triangle wave, it's quick and easy
int v;
if (whole_phase < 16384) { // ramp from 0 to amplitude
v = (state->amplitude_scaled * whole_phase);
} else if (whole_phase < 49152) { // ramp from +amplitude to -amplitude
v = (state->amplitude_scaled * (32768 - whole_phase));
} else { // from -amplitude to 0
v = (state->amplitude_scaled * (whole_phase - 65536));
synthio_block_base_t *block = MP_OBJ_TO_PTR(slot->obj);
if (block->last_tick == synthio_global_tick) {
return block->value;
}
return v / 16384 + state->offset_scaled;
block->last_tick = synthio_global_tick;
// previously verified by call to mp_proto_get in synthio_block_assign_slot
const synthio_block_proto_t *p = mp_type_get_protocol_slot(mp_obj_get_type(slot->obj));
mp_float_t value = p->tick(slot->obj);
block->value = value;
return value;
}
mp_float_t synthio_block_slot_get_limited(synthio_block_slot_t *lfo_slot, mp_float_t lo, mp_float_t hi) {
mp_float_t value = synthio_block_slot_get(lfo_slot);
if (value < lo) {
return lo;
}
if (value > hi) {
return hi;
}
return value;
}
int32_t synthio_block_slot_get_scaled(synthio_block_slot_t *lfo_slot, mp_float_t lo, mp_float_t hi) {
mp_float_t value = synthio_block_slot_get_limited(lfo_slot, lo, hi);
return (int32_t)MICROPY_FLOAT_C_FUN(round)(MICROPY_FLOAT_C_FUN(ldexp)(value, 15));
}
bool synthio_block_assign_slot_maybe(mp_obj_t obj, synthio_block_slot_t *slot) {
if (synthio_obj_is_block(obj)) {
slot->obj = obj;
return true;
}
mp_float_t value = MICROPY_FLOAT_CONST(0.);
if (obj != mp_const_none && !mp_obj_get_float_maybe(obj, &value)) {
return false;
}
slot->obj = mp_obj_new_float(value);
return true;
}
void synthio_block_assign_slot(mp_obj_t obj, synthio_block_slot_t *slot, qstr arg_name) {
if (!synthio_block_assign_slot_maybe(obj, slot)) {
mp_raise_TypeError_varg(translate("%q must be of type %q, not %q"), arg_name, MP_QSTR_BlockInput, mp_obj_get_type_qstr(obj));
}
}
bool synthio_obj_is_block(mp_obj_t obj) {
return mp_proto_get(MP_QSTR_synthio_block, obj);
}

View File

@ -112,3 +112,7 @@ void synthio_lfo_set(synthio_lfo_state_t *state, const synthio_lfo_descr_t *desc
int synthio_lfo_step(synthio_lfo_state_t *state, uint16_t dur);
int synthio_sweep_step(synthio_lfo_state_t *state, uint16_t dur);
int synthio_sweep_in_step(synthio_lfo_state_t *state, uint16_t dur);
extern mp_float_t synthio_global_rate_scale;
extern uint8_t synthio_global_tick;
void shared_bindings_synthio_lfo_tick(uint32_t sample_rate);

View File

@ -0,0 +1,60 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#pragma once
#include "py/obj.h"
#include "py/proto.h"
#include "shared-module/synthio/__init__.h"
#include "shared-bindings/synthio/__init__.h"
typedef struct synthio_block_base {
mp_obj_base_t base;
uint8_t last_tick;
mp_float_t value;
} synthio_block_base_t;
typedef struct synthio_block_slot {
mp_obj_t obj;
} synthio_block_slot_t;
typedef struct {
MP_PROTOCOL_HEAD;
mp_float_t (*tick)(mp_obj_t obj);
} synthio_block_proto_t;
// Update the value inside the lfo slot if the value is an LFO, returning the new value
mp_float_t synthio_block_slot_get(synthio_block_slot_t *block_slot);
// the same, but the output is constrained to be between lo and hi
mp_float_t synthio_block_slot_get_limited(synthio_block_slot_t *block_slot, mp_float_t lo, mp_float_t hi);
// the same, but the output is constrained to be between lo and hi and converted to an integer with 15 fractional bits
int32_t synthio_block_slot_get_scaled(synthio_block_slot_t *block_slot, mp_float_t lo, mp_float_t hi);
// Assign an object (which may be a float or a synthio_block_obj_t) to an block slot
void synthio_block_assign_slot(mp_obj_t obj, synthio_block_slot_t *block_slot, qstr arg_name);
bool synthio_block_assign_slot_maybe(mp_obj_t obj, synthio_block_slot_t *block_slot);
bool synthio_obj_is_block(mp_obj_t obj);

View File

@ -65,6 +65,8 @@ noise = np.array(
dtype=np.int16,
)
bend_in = np.linspace(32767, 0, num=SAMPLE_SIZE, endpoint=True, dtype=np.int16)
envelope = synthio.Envelope(
attack_time=0.1, decay_time=0.05, release_time=0.2, attack_level=1, sustain_level=0.8
)
@ -157,8 +159,8 @@ def synthesize4(synth):
synth.press(chord)
for i in range(16):
for c in chord:
c.tremolo_depth = i / 50
c.tremolo_rate = (i + 1) / 4
d = i / 50
c.amplitude = synthio.LFO(scale=d / 2, offset=1 - d, rate=(i + 1) / 4, waveform=sine)
yield 48
yield 36
@ -171,17 +173,14 @@ def synthesize5(synth):
synth.press(chord)
for i in range(16):
for c in chord:
c.bend_depth = 1 / 24
c.bend_rate = (i + 1) / 2
c.bend = synthio.LFO(scale=1 / 24, rate=(i + 1) / 2, waveform=sine)
yield 24
synth.release_all()
yield 100
for c in chord:
synth.release_all()
c.bend_mode = synthio.BendMode.SWEEP_IN
c.bend_depth = randf(-1, 1)
c.bend_rate = 1 / 2
c.bend = synthio.LFO(scale=randf(-1, 1), rate=1 / 2, waveform=bend_in)
synth.press(chord)
yield 320

View File

@ -25,6 +25,9 @@ fast_decay_envelope = synthio.Envelope(
synth = synthio.Synthesizer(sample_rate=48000)
# for a note without sustain phase,
# switching to an envelope with decay_time 0.25 is about the same as
# releasing with a release time of 0.25
def synthesize(synth):
notes = (synthio.Note(frequency=440, waveform=sine, envelope=envelope),)
synth.press(notes)

View File

@ -9,6 +9,7 @@ import audiocore
import synthio
from ulab import numpy as np
import adafruit_wave as wave
import mkfilter
random.seed(9)
@ -16,89 +17,37 @@ envelope = synthio.Envelope(
attack_time=0.1, decay_time=0.05, release_time=0.2, attack_level=0.8, sustain_level=0.8
)
h = np.array(
[
-0.001229734800309099,
-0.008235561806605458,
-0.015082497016061390,
-0.020940136918319988,
-0.024981800822463429,
-0.026464233332370746,
-0.024803890156806906,
-0.019642276775473012,
-0.010893620860173042,
0.001230341899766145,
0.016221637398855598,
0.033304135659230648,
0.051486665261155681,
0.069636961761409016,
0.086570197432542767,
0.101144354207918147,
0.112353938422488253,
0.119413577288191297,
0.121823886314051028,
0.119413577288191297,
0.112353938422488253,
0.101144354207918147,
0.086570197432542767,
0.069636961761409016,
0.051486665261155681,
0.033304135659230648,
0.016221637398855598,
0.001230341899766145,
-0.010893620860173042,
-0.019642276775473012,
-0.024803890156806906,
-0.026464233332370746,
-0.024981800822463429,
-0.020940136918319988,
-0.015082497016061390,
-0.008235561806605458,
-0.001229734800309099,
]
)
SAMPLE_SIZE = 1024
bend_out = np.linspace(0, 32767, num=SAMPLE_SIZE, endpoint=True, dtype=np.int16)
filter_coeffs = np.array(h[::-1] * 32768, dtype=np.int16)
synth = synthio.Synthesizer(sample_rate=48000, filter=filter_coeffs)
filter_rectangular = mkfilter.LPF(48000, 800, 13)
filter_rectangular_big = mkfilter.LPF(48000, 800, 59)
filter_blackman = mkfilter.LPF(48000, 800, 59, win=mkfilter.blackman)
print(filter_blackman)
def synthesize(synth):
n = synthio.Note(
frequency=120,
envelope=envelope,
filter=False,
filter=True,
bend=synthio.LFO(bend_out, once=True, rate=1 / 2, scale=5),
)
synth.press(n)
print(synth, n)
synth.press((n,))
for _ in range(20):
n.frequency *= 1.0595
yield 36
synth.release_all()
yield 36
n.filter = True
n.frequency = 120
synth.press((n,))
for _ in range(20):
n.frequency *= 1.0595
yield 36
yield 2 * 48000 // 256
synth.release_all()
yield 36
def chain(*args):
for a in args:
yield from a
# sox -r 48000 -e signed -b 16 -c 1 tune.raw tune.wav
with wave.open("fir.wav", "w") as f:
f.setnchannels(1)
f.setsampwidth(2)
f.setframerate(48000)
for n in chain(synthesize(synth)):
for i in range(n):
result, data = audiocore.get_buffer(synth)
f.writeframes(data)
for filter_coeffs in [None, filter_rectangular, filter_rectangular_big, filter_blackman]:
synth = synthio.Synthesizer(sample_rate=48000, filter=filter_coeffs)
for n in synthesize(synth):
for i in range(n):
result, data = audiocore.get_buffer(synth)
f.writeframes(data)

View File

@ -0,0 +1,105 @@
try:
from ulab import numpy as np
except ImportError:
import numpy as np
def lpf(fS, f, N, win=lambda N: 1):
if not (N & 1):
raise ValueError("filter length must be odd")
h = np.sinc(2 * f / fS * (np.arange(N) - (N - 1) / 2))
h = h * win(N)
return h * (1 / np.sum(h))
def hpf(fS, f, N, win=lambda N: 1):
if not (N & 1):
raise ValueError("filter length must be odd")
h = -lpf(fS, f, N)
h = h * win(N)
h[(N - 1) // 2] += 1
return h
def brf(fS, fL, NL, fH, NH, win=lambda N: 1):
hlpf = lpf(fS, fL, NL, win)
hhpf = hpf(fS, fH, NH, win)
if NH > NL:
h = hhpf
h[(NH - NL) // 2 : (NH - NL) // 2 + NL] += hlpf
else:
h = hlpf
h[(NL - NH) // 2 : (NL - NH) // 2 + NH] += hhpf
return h
def bpf(fS, fL, NL, fH, NH, win=lambda N: 1):
hlpf = lpf(fS, fL, NL, win)
hhpf = hpf(fS, fH, NH, win)
return np.convolve(hlpf, hhpf)
def blackman(M):
n = np.arange(1 - M, M, 2)
return 0.42 + 0.5 * np.cos(np.pi * n / (M - 1)) + 0.08 * np.cos(2.0 * np.pi * n / (M - 1))
def tosynthio(coeffs):
result = np.array(coeffs * 32767, dtype=np.int16)
return trim_zeros(result)
def trim_zeros(arr):
i = 0
j = len(arr) - 1
while i < len(arr) and arr[i] == 0:
i += 1
while j > i and arr[j] == 0:
j -= 1
return arr[i : j + 1]
# fiiir.com uses factor 4.6 for blackman window, 0.91 for rectangular
def ntaps(fS, fB, factor=4.6):
b = fB / fS
return round(factor / b) | 1
def LPF(*args, **kw):
return tosynthio(lpf(*args, **kw))
def HPF(*args, **kw):
return tosynthio(hpf(*args, **kw))
def BRF(*args, **kw):
return tosynthio(brf(*args, **kw))
def BPF(*args, **kw):
return tosynthio(bpf(*args, **kw))
if __name__ == "__main__":
print("lpf(24000, 2040, 13) # 1920Hz transition window")
print(list(lpf(24000, 2040, 13)))
print("hpf(24000, 9600, 13) # 960Hz transition window")
print(list(hpf(24000, 9600, 23)))
print("bpf(24000, 1200, 11, 3960, 15) # 2400Hz, 1600Hz transition windows")
print(list(bpf(24000, 1200, 11, 3960, 15)))
print("brf(24000, 960, 19, 2400, 13) # 1200, 1800Hz transition windows")
brf_tst = brf(24000, 960, 19, 2400, 13)
print(brf_tst)
print("brf(24000, 960, 13, 2400, 19) # 1200, 1800Hz transition windows")
brf_tst = brf(24000, 960, 13, 2400, 19)
print(brf_tst)
print("lpf(1, 0.1, 59, blackman) # 1920Hz transition window, blackman")
print(lpf(1, 0.1, 59, blackman))

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.ABS)

View File

@ -0,0 +1,188 @@
-1.978606282552083 1.978606282552083 3.0 2.0
-1.957273600260416 1.957273600260416 3.0 2.0
-1.93594091796875 1.93594091796875 3.0 2.0
-1.914608235677083 1.914608235677083 3.0 2.0
-1.893275553385417 1.893275553385417 3.0 2.0
-1.87194287109375 1.87194287109375 3.0 2.0
-1.850610188802083 1.850610188802083 3.0 2.0
-1.829277506510417 1.829277506510417 3.0 2.0
-1.80794482421875 1.80794482421875 3.0 2.0
-1.786612141927083 1.786612141927083 3.0 2.0
-1.765279459635417 1.765279459635417 3.0 2.0
-1.74394677734375 1.74394677734375 3.0 2.0
-1.722614095052083 1.722614095052083 3.0 2.0
-1.701281412760417 1.701281412760417 3.0 2.0
-1.67994873046875 1.67994873046875 3.0 2.0
-1.658616048177083 1.658616048177083 3.0 2.0
-1.637283365885417 1.637283365885417 3.0 2.0
-1.61595068359375 1.61595068359375 3.0 2.0
-1.594618001302083 1.594618001302083 3.0 2.0
-1.573285319010417 1.573285319010417 3.0 2.0
-1.55195263671875 1.55195263671875 3.0 2.0
-1.530619954427083 1.530619954427083 3.0 2.0
-1.509287272135417 1.509287272135417 3.0 2.0
-1.48795458984375 1.48795458984375 3.0 2.0
-1.466621907552084 1.466621907552084 3.0 2.0
-1.445289225260417 1.445289225260417 3.0 2.0
-1.42395654296875 1.42395654296875 3.0 2.0
-1.402623860677084 1.402623860677084 3.0 2.0
-1.381291178385417 1.381291178385417 3.0 2.0
-1.35995849609375 1.35995849609375 3.0 2.0
-1.338625813802083 1.338625813802083 3.0 2.0
-1.317293131510417 1.317293131510417 3.0 2.0
-1.29596044921875 1.29596044921875 3.0 2.0
-1.274627766927084 1.274627766927084 3.0 2.0
-1.253295084635417 1.253295084635417 3.0 2.0
-1.23196240234375 1.23196240234375 3.0 2.0
-1.210629720052084 1.210629720052084 3.0 2.0
-1.189297037760417 1.189297037760417 3.0 2.0
-1.16796435546875 1.16796435546875 3.0 2.0
-1.146631673177084 1.146631673177084 3.0 2.0
-1.125298990885417 1.125298990885417 3.0 2.0
-1.10396630859375 1.10396630859375 3.0 2.0
-1.082633626302084 1.082633626302084 3.0 2.0
-1.061300944010417 1.061300944010417 3.0 2.0
-1.039968261718751 1.039968261718751 3.0 2.0
-1.018635579427084 1.018635579427084 3.0 2.0
-0.9973028971354172 0.9973028971354172 3.0 2.0
-0.9759702148437505 0.9759702148437505 3.0 2.0
-0.9546375325520838 0.9546375325520838 3.0 2.0
-0.9333048502604168 0.9333048502604168 3.0 2.0
-0.9119721679687501 0.9119721679687501 3.0 2.0
-0.8906394856770833 0.8906394856770833 3.0 2.0
-0.8693068033854166 0.8693068033854166 3.0 2.0
-0.8479741210937499 0.8479741210937499 3.0 2.0
-0.8266414388020831 0.8266414388020831 3.0 2.0
-0.8053087565104164 0.8053087565104164 3.0 2.0
-0.7839760742187497 0.7839760742187497 3.0 2.0
-0.7626433919270829 0.7626433919270829 3.0 2.0
-0.7413107096354159 0.7413107096354159 3.0 2.0
-0.7199780273437493 0.7199780273437493 3.0 2.0
-0.6986453450520828 0.6986453450520828 3.0 2.0
-0.6773126627604157 0.6773126627604157 3.0 2.0
-0.6559799804687488 0.6559799804687488 3.0 2.0
-0.6346472981770823 0.6346472981770823 3.0 2.0
-0.6133146158854156 0.6133146158854156 3.0 2.0
-0.5919819335937487 0.5919819335937487 3.0 2.0
-0.5706492513020819 0.5706492513020819 3.0 2.0
-0.5493165690104153 0.5493165690104153 3.0 2.0
-0.5279838867187485 0.5279838867187485 3.0 2.0
-0.5066512044270817 0.5066512044270817 3.0 2.0
-0.4853185221354149 0.4853185221354149 3.0 2.0
-0.4639858398437481 0.4639858398437481 3.0 2.0
-0.4426531575520815 0.4426531575520815 3.0 2.0
-0.4213204752604147 0.4213204752604147 3.0 2.0
-0.3999877929687479 0.3999877929687479 3.0 2.0
-0.3786551106770811 0.3786551106770811 3.0 2.0
-0.3573224283854145 0.3573224283854145 3.0 2.0
-0.3359897460937477 0.3359897460937477 3.0 2.0
-0.3146570638020807 0.3146570638020807 3.0 2.0
-0.2933243815104141 0.2933243815104141 3.0 2.0
-0.2719916992187476 0.2719916992187476 3.0 2.0
-0.2506590169270807 0.2506590169270807 3.0 2.0
-0.2293263346354136 0.2293263346354136 3.0 2.0
-0.2079936523437471 0.2079936523437471 3.0 2.0
-0.1866609700520805 0.1866609700520805 3.0 2.0
-0.1653282877604135 0.1653282877604135 3.0 2.0
-0.1439956054687467 0.1439956054687467 3.0 2.0
-0.1226629231770801 0.1226629231770801 3.0 2.0
-0.1013302408854133 0.1013302408854133 3.0 2.0
-0.07999755859374647 0.07999755859374647 3.0 2.0
-0.05866487630207972 0.05866487630207972 3.0 2.0
-0.0373321940104131 0.0373321940104131 3.0 2.0
-0.01599951171874625 0.01599951171874625 3.0 2.0
0.005333170572920487 0.005333170572920487 3.0 2.0
0.026665852864587 0.026665852864587 3.0 2.0
0.04799853515625363 0.04799853515625363 3.0 2.0
0.06933121744792015 0.06933121744792015 3.0 2.0
0.09066389973958666 0.09066389973958666 3.0 2.0
0.1119965820312533 0.1119965820312533 3.0 2.0
0.1333292643229198 0.1333292643229198 3.0 2.0
0.1546619466145862 0.1546619466145862 3.0 2.0
0.1759946289062527 0.1759946289062527 3.0 2.0
0.1973273111979195 0.1973273111979195 3.0 2.0
0.2186599934895859 0.2186599934895859 3.0 2.0
0.2399926757812524 0.2399926757812524 3.0 2.0
0.261325358072919 0.261325358072919 3.0 2.0
0.2826580403645855 0.2826580403645855 3.0 2.0
0.303990722656252 0.303990722656252 3.0 2.0
0.3253234049479187 0.3253234049479187 3.0 2.0
0.3466560872395852 0.3466560872395852 3.0 2.0
0.3679887695312516 0.3679887695312516 3.0 2.0
0.3893214518229181 0.3893214518229181 3.0 2.0
0.4106541341145848 0.4106541341145848 3.0 2.0
0.4319868164062513 0.4319868164062513 3.0 2.0
0.4533194986979177 0.4533194986979177 3.0 2.0
0.4746521809895844 0.4746521809895844 3.0 2.0
0.4959848632812509 0.4959848632812509 3.0 2.0
0.5173175455729173 0.5173175455729173 3.0 2.0
0.5386502278645841 0.5386502278645841 3.0 2.0
0.5599829101562506 0.5599829101562506 3.0 2.0
0.581315592447917 0.581315592447917 3.0 2.0
0.6026482747395835 0.6026482747395835 3.0 2.0
0.6239809570312501 0.6239809570312501 3.0 2.0
0.6453136393229166 0.6453136393229166 3.0 2.0
0.6666463216145831 0.6666463216145831 3.0 2.0
0.6879790039062498 0.6879790039062498 3.0 2.0
0.7093116861979163 0.7093116861979163 3.0 2.0
0.7306443684895827 0.7306443684895827 3.0 2.0
0.7519770507812495 0.7519770507812495 3.0 2.0
0.773309733072916 0.773309733072916 3.0 2.0
0.7946424153645824 0.7946424153645824 3.0 2.0
0.8159750976562488 0.8159750976562488 3.0 2.0
0.8373077799479155 0.8373077799479155 3.0 2.0
0.858640462239582 0.858640462239582 3.0 2.0
0.8799731445312485 0.8799731445312485 3.0 2.0
0.9013058268229152 0.9013058268229152 3.0 2.0
0.9226385091145817 0.9226385091145817 3.0 2.0
0.9439711914062482 0.9439711914062482 3.0 2.0
0.9653038736979148 0.9653038736979148 3.0 2.0
0.9866365559895813 0.9866365559895813 3.0 2.0
1.007969238281248 1.007969238281248 3.0 2.0
1.029301920572914 1.029301920572914 3.0 2.0
1.050634602864581 1.050634602864581 3.0 2.0
1.071967285156247 1.071967285156247 3.0 2.0
1.093299967447914 1.093299967447914 3.0 2.0
1.114632649739581 1.114632649739581 3.0 2.0
1.135965332031247 1.135965332031247 3.0 2.0
1.157298014322913 1.157298014322913 3.0 2.0
1.17863069661458 1.17863069661458 3.0 2.0
1.199963378906247 1.199963378906247 3.0 2.0
1.221296061197913 1.221296061197913 3.0 2.0
1.24262874348958 1.24262874348958 3.0 2.0
1.263961425781246 1.263961425781246 3.0 2.0
1.285294108072913 1.285294108072913 3.0 2.0
1.306626790364579 1.306626790364579 3.0 2.0
1.327959472656246 1.327959472656246 3.0 2.0
1.349292154947912 1.349292154947912 3.0 2.0
1.370624837239579 1.370624837239579 3.0 2.0
1.391957519531245 1.391957519531245 3.0 2.0
1.413290201822912 1.413290201822912 3.0 2.0
1.434622884114579 1.434622884114579 3.0 2.0
1.455955566406245 1.455955566406245 3.0 2.0
1.477288248697912 1.477288248697912 3.0 2.0
1.498620930989578 1.498620930989578 3.0 2.0
1.519953613281245 1.519953613281245 3.0 2.0
1.541286295572911 1.541286295572911 3.0 2.0
1.562618977864578 1.562618977864578 3.0 2.0
1.583951660156244 1.583951660156244 3.0 2.0
1.605284342447911 1.605284342447911 3.0 2.0
1.626617024739577 1.626617024739577 3.0 2.0
1.647949707031244 1.647949707031244 3.0 2.0
1.66928238932291 1.66928238932291 3.0 2.0
1.690615071614577 1.690615071614577 3.0 2.0
1.711947753906244 1.711947753906244 3.0 2.0
1.73328043619791 1.73328043619791 3.0 2.0
1.754613118489577 1.754613118489577 3.0 2.0
1.775945800781243 1.775945800781243 3.0 2.0
1.79727848307291 1.79727848307291 3.0 2.0
1.818611165364576 1.818611165364576 3.0 2.0
1.839943847656243 1.839943847656243 3.0 2.0
1.861276529947909 1.861276529947909 3.0 2.0
1.882609212239576 1.882609212239576 3.0 2.0
1.903941894531243 1.903941894531243 3.0 2.0
1.925274576822909 1.925274576822909 3.0 2.0
1.946607259114575 1.946607259114575 3.0 2.0
1.967939941406242 1.967939941406242 3.0 2.0
1.989272623697909 1.989272623697909 3.0 2.0
1.99981689825654 1.99981689825654 3.0 2.0

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.ADD_DIV)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -0.007131239149305541 -2.489303141276042 0.5054062593545195
-1.957273600260416 -0.01424213324652782 -2.478636800130208 0.5109147744428522
-1.93594091796875 -0.02135302734375004 -2.467970458984375 0.5165446893127459
-1.914608235677083 -0.02846392144097217 -2.457304117838542 0.5223000618956176
-1.893275553385417 -0.03557481553819438 -2.446637776692708 0.5281851330155682
-1.87194287109375 -0.04268570963541674 -2.435971435546875 0.5342043368106176
-1.850610188802083 -0.04979660373263886 -2.425305094401041 0.5403623118747168
-1.829277506510417 -0.05690749782986107 -2.414638753255208 0.5466639131793782
-1.80794482421875 -0.06401839192708336 -2.403972412109375 0.5531142248393119
-1.786612141927083 -0.07112928602430557 -2.393306070963542 0.5597185737926171
-1.765279459635417 -0.07824018012152778 -2.382639729817708 0.5664825444728905
-1.74394677734375 -0.08535107421875006 -2.371973388671875 0.5734119945581858
-1.722614095052083 -0.09246196831597226 -2.361307047526042 0.5805130718901758
-1.701281412760417 -0.09957286241319441 -2.350640706380208 0.587792232666228
-1.67994873046875 -0.1066837565104166 -2.339974365234375 0.5952562610175452
-1.658616048177083 -0.1137946506076389 -2.329308024088542 0.6029122900981568
-1.637283365885417 -0.1209055447048611 -2.318641682942708 0.6107678248225627
-1.61595068359375 -0.1280164388020832 -2.307975341796875 0.6188307664043786
-1.594618001302083 -0.1351273328993055 -2.297309000651042 0.6271094388646379
-1.573285319010417 -0.1422382269965278 -2.286642659505208 0.6356126176967009
-1.55195263671875 -0.14934912109375 -2.275976318359375 0.6443495608952809
-1.530619954427083 -0.1564600151909722 -2.265309977213541 0.6533300425802326
-1.509287272135417 -0.1635709092881944 -2.254643636067708 0.6625643894718259
-1.48795458984375 -0.1706818033854166 -2.243977294921875 0.6720635205036801
-1.466621907552084 -0.1777926974826388 -2.233310953776042 0.6818389898928245
-1.445289225260417 -0.1849035915798611 -2.222644612630209 0.6919030340240839
-1.42395654296875 -0.1920144856770832 -2.211978271484375 0.7022686225487891
-1.402623860677084 -0.1991253797743055 -2.201311930338542 0.7129495141464894
-1.381291178385417 -0.2062362738715278 -2.190645589192708 0.7239603174537712
-1.35995849609375 -0.2133471679687499 -2.179979248046875 0.7353165577275557
-1.338625813802083 -0.2204580620659722 -2.169312906901042 0.7470347498825767
-1.317293131510417 -0.2275689561631944 -2.158646565755209 0.7591324786256143
-1.29596044921875 -0.2346798502604166 -2.147980224609375 0.7716284865042252
-1.274627766927084 -0.2417907443576387 -2.137313883463542 0.7845427707971828
-1.253295084635417 -0.2489016384548609 -2.126647542317709 0.7978966903001135
-1.23196240234375 -0.2560125325520833 -2.115981201171875 0.8117130832057434
-1.210629720052084 -0.2631234266493054 -2.105314860026042 0.8260163974472542
-1.189297037760417 -0.2702343207465276 -2.094648518880208 0.8408328350696262
-1.16796435546875 -0.2773452148437499 -2.083982177734375 0.8561905124224964
-1.146631673177084 -0.2844561089409721 -2.073315836588542 0.872119638235008
-1.125298990885417 -0.2915670030381943 -2.062649495442709 0.888652711945624
-1.10396630859375 -0.2986778971354165 -2.051983154296875 0.905824745026699
-1.082633626302084 -0.3057887912326387 -2.041316813151042 0.9236735084755006
-1.061300944010417 -0.3128996853298609 -2.030650472005209 0.9422398101534004
-1.039968261718751 -0.3200105794270831 -2.019984130859375 0.9615678062591108
-1.018635579427084 -0.3271214735243054 -2.009317789713542 0.9817053519399302
-0.9973028971354172 -0.3342323676215277 -1.998651448567708 1.002704396901212
-0.9759702148437505 -0.3413432617187498 -1.987985107421875 1.024621432899053
-0.9546375325520838 -0.3484541558159721 -1.977318766276042 1.047518001231993
-0.9333048502604168 -0.3555650499131944 -1.966652425130208 1.071461269831581
-0.9119721679687501 -0.3626759440104166 -1.955986083984375 1.096524691348109
-0.8906394856770833 -0.369786838107639 -1.945319742838542 1.122788755811537
-0.8693068033854166 -0.376897732204861 -1.934653401692708 1.150341854113661
-0.8479741210937499 -0.3840086263020834 -1.923987060546875 1.179281271827212
-0.8266414388020831 -0.3911195203993056 -1.913320719401042 1.209714336906625
-0.8053087565104164 -0.3982304144965279 -1.902654378255208 1.241759749804813
-0.7839760742187497 -0.4053413085937501 -1.891988037109375 1.275549130751883
-0.7626433919270829 -0.4124522026909723 -1.881321695963542 1.311228826716971
-0.7413107096354159 -0.4195630967881947 -1.870655354817708 1.348962030363503
-0.7199780273437493 -0.4266739908854169 -1.859989013671875 1.388931275707607
-0.6986453450520828 -0.4337848849826391 -1.849322672526041 1.431341390996389
-0.6773126627604157 -0.4408957790798615 -1.838656331380208 1.476423009610449
-0.6559799804687488 -0.4480066731770838 -1.827989990234374 1.524436766020545
-0.6346472981770823 -0.4551175672743059 -1.817323649088541 1.575678337987622
-0.6133146158854156 -0.4622284613715281 -1.806657307942708 1.630484541048061
-0.5919819335937487 -0.4693393554687504 -1.795990966796874 1.68924074072547
-0.5706492513020819 -0.4764502495659728 -1.785324625651041 1.752389927294647
-0.5493165690104153 -0.4835611436631948 -1.774658284505208 1.820443905053662
-0.5279838867187485 -0.4906720377604172 -1.763991943359374 1.89399719414674
-0.5066512044270817 -0.4977829318576394 -1.753325602213541 1.973744444426604
-0.4853185221354149 -0.5048938259548618 -1.742659261067707 2.060502441983818
-0.4639858398437481 -0.512004720052084 -1.731992919921874 2.155238186442845
-0.4426531575520815 -0.5191156141493062 -1.721326578776041 2.259105086994308
-0.4213204752604147 -0.5262265082465284 -1.710660237630207 2.373490154690223
-0.3999877929687479 -0.5333374023437507 -1.699993896484374 2.500076296273703
-0.3786551106770811 -0.5404482964409731 -1.689327555338541 2.640925665077857
-0.3573224283854145 -0.5475591905381951 -1.678661214192707 2.798592868963103
-0.3359897460937477 -0.5546700846354175 -1.667994873046874 2.976281305087747
-0.3146570638020807 -0.5617809787326397 -1.65732853190104 3.178063088483531
-0.2933243815104141 -0.568891872829862 -1.646662190755207 3.409194949464153
-0.2719916992187476 -0.5760027669270841 -1.635995849609374 3.676582788637813
-0.2506590169270807 -0.5831136610243064 -1.62532950846354 3.989483451500611
-0.2293263346354136 -0.5902245551215288 -1.614663167317707 4.360598191175098
-0.2079936523437471 -0.5973354492187509 -1.603996826171874 4.807839031295624
-0.1866609700520805 -0.6044463433159732 -1.59333048502604 5.357306349157989
-0.1653282877604135 -0.6115572374131956 -1.582664143880207 6.048571684533235
-0.1439956054687467 -0.6186681315104178 -1.571997802734373 6.944656378538188
-0.1226629231770801 -0.62577902560764 -1.56133146158854 8.152422705240511
-0.1013302408854133 -0.6328899197048622 -1.550665120442707 9.868722222133313
-0.07999755859374647 -0.6400008138020845 -1.539998779296873 12.500381481369
-0.05866487630207972 -0.6471117078993069 -1.52933243815104 17.04597474732166
-0.0373321940104131 -0.6542226019965289 -1.518666097005207 26.78653174579209
-0.01599951171874625 -0.6613334960937513 -1.507999755859373 62.50190740685689
0.005333170572920487 -0.6684443901909734 -1.49733341471354 -187.5057222203924
0.026665852864587 -0.6755552842881957 -1.486667073567707 -37.50114444410019
0.04799853515625363 -0.6826661783854179 -1.476000732421873 -20.83396913561251
0.06933121744792015 -0.6897770724826401 -1.46533439127604 -14.42351709388595
0.09066389973958666 -0.6968879665798622 -1.454668050130207 -11.02974836591293
0.1119965820312533 -0.7039988606770845 -1.444001708984373 -8.928843915262917
0.1333292643229198 -0.7111097547743066 -1.43333536783854 -7.500228888820893
0.1546619466145862 -0.7182206488715287 -1.422669026692707 -6.465714559328388
0.1759946289062527 -0.7253315429687509 -1.412002685546874 -5.681991582440117
0.1973273111979195 -0.7324424370659731 -1.40133634440104 -5.067722222176327
0.2186599934895859 -0.7395533311631953 -1.390670003255207 -4.573310298061575
0.2399926757812524 -0.7466642252604174 -1.380003662109374 -4.166793827122775
0.261325358072919 -0.7537751193576398 -1.36933732096354 -3.826647392255614
0.2826580403645855 -0.7608860134548618 -1.358670979817707 -3.537843815481609
0.303990722656252 -0.7679969075520839 -1.348004638671874 -3.289574074044307
0.3253234049479187 -0.7751078016493063 -1.337338297526041 -3.073864298697141
0.3466560872395852 -0.7822186957465283 -1.326671956380207 -2.884703418777319
0.3679887695312516 -0.7893295898437506 -1.316005615234374 -2.717474235080086
0.3893214518229181 -0.7964404839409727 -1.305339274088541 -2.56857153726748
0.4106541341145848 -0.8035513780381949 -1.294672932942708 -2.435139249617222
0.4319868164062513 -0.8106622721354171 -1.284006591796874 -2.314885459512669
0.4533194986979177 -0.8177731662326392 -1.273340250651041 -2.205949673182662
0.4746521809895844 -0.8248840603298614 -1.262673909505208 -2.106805867646363
0.4959848632812509 -0.8319949544270836 -1.252007568359375 -2.016190561511037
0.5173175455729173 -0.8391058485243057 -1.241341227213541 -1.93304868268584
0.5386502278645841 -0.8462167426215281 -1.230674886067708 -1.856492299213134
0.5599829101562506 -0.8533276367187502 -1.220008544921875 -1.785768783052634
0.581315592447917 -0.8604385308159724 -1.209342203776042 -1.720235983674556
0.6026482747395835 -0.8675494249131944 -1.198675862630208 -1.659342674517935
0.6239809570312501 -0.8746603190104167 -1.188009521484375 -1.602613010431852
0.6453136393229166 -0.8817712131076389 -1.177343180338542 -1.549634067938238
0.6666463216145831 -0.8888821072048611 -1.166676839192708 -1.500045777764214
0.6879790039062498 -0.8959930013020832 -1.156010498046875 -1.453532730391681
0.7093116861979163 -0.9031038953993054 -1.145344156901042 -1.409817460304713
0.7306443684895827 -0.9102147894965276 -1.134677815755209 -1.368654906719174
0.7519770507812495 -0.9173256835937499 -1.124011474609375 -1.329827817166857
0.773309733072916 -0.9244365776909721 -1.113345133463542 -1.293142911865703
0.7946424153645824 -0.9315474717881941 -1.102678792317709 -1.258427665909577
0.8159750976562488 -0.9386583658854162 -1.092012451171876 -1.225527596212595
0.8373077799479155 -0.9457692599826386 -1.081346110026042 -1.19430396318807
0.858640462239582 -0.9528801540798607 -1.070679768880209 -1.164631815034329
0.8799731445312485 -0.9599910481770827 -1.060013427734376 -1.136398316488043
0.9013058268229152 -0.9671019422743051 -1.049347086588542 -1.109501314914361
0.9226385091145817 -0.9742128363715272 -1.038680745442709 -1.083848105320966
0.9439711914062482 -0.9813237304687494 -1.028014404296876 -1.059354362827837
0.9653038736979148 -0.9884346245659717 -1.017348063151043 -1.035943216687995
0.9866365559895813 -0.9955455186631937 -1.006681722005209 -1.013544444435282
1.007969238281248 -1.002656412760416 -0.9960153808593761 -0.9920937683625775
1.029301920572914 -1.009767306857638 -0.9853490397135429 -0.971532239484597
1.050634602864581 -1.01687820095486 -0.9746826985677096 -0.9518056965508993
1.071967285156247 -1.023989095052082 -0.9640163574218763 -0.9328642896543641
1.093299967447914 -1.031099989149305 -0.9533500162760431 -0.9146620596123281
1.114632649739581 -1.038210883246527 -0.9426836751302098 -0.8971565656484554
1.135965332031247 -1.045321777343749 -0.9320173339843764 -0.8803085550259496
1.157298014322913 -1.052432671440971 -0.9213509928385433 -0.8640816692190196
1.17863069661458 -1.059543565538194 -0.9106846516927099 -0.848442181993336
1.199963378906247 -1.066654459635415 -0.9000183105468766 -0.8333587654245656
1.221296061197913 -1.073765353732638 -0.8893519694010434 -0.8188022804389838
1.24262874348958 -1.08087624782986 -0.8786856282552103 -0.8047455889293019
1.263961425781246 -1.087987141927082 -0.8680192871093768 -0.7911633848967396
1.285294108072913 -1.095098036024304 -0.8573529459635436 -0.7780320424088271
1.306626790364579 -1.102208930121526 -0.8466866048177105 -0.765329478451132
1.327959472656246 -1.109319824218749 -0.8360202636718769 -0.7530350289981016
1.349292154947912 -1.116430718315971 -0.8253539225260438 -0.741129336840029
1.370624837239579 -1.123541612413193 -0.8146875813802106 -0.7295942498853205
1.391957519531245 -1.130652506510415 -0.8040212402343773 -0.7184127288142812
1.413290201822912 -1.137763400607637 -0.793354899088544 -0.7075687630963296
1.434622884114579 -1.14487429470486 -0.7826885579427108 -0.6970472945001019
1.455955566406245 -1.151985188802082 -0.7720222167968775 -0.6868341473279393
1.477288248697912 -1.159096082899304 -0.7613558756510441 -0.6769159646950447
1.498620930989578 -1.166206976996526 -0.750689534505211 -0.6672801502509872
1.519953613281245 -1.173317871093748 -0.7400231933593777 -0.6579148148088682
1.541286295572911 -1.18042876519097 -0.7293568522135443 -0.6488087274066691
1.562618977864578 -1.187539659288193 -0.7186905110677111 -0.6399512703772267
1.583951660156244 -1.194650553385415 -0.7080241699218779 -0.6313323980489139
1.605284342447911 -1.201761447482637 -0.6973578287760446 -0.6229425987392939
1.626617024739577 -1.208872341579859 -0.6866914876302113 -0.6147728597394342
1.647949707031244 -1.215983235677081 -0.6760251464843781 -0.6068146350178881
1.66928238932291 -1.223094129774303 -0.6653588053385448 -0.5990598154010462
1.690615071614577 -1.230205023871526 -0.6546924641927115 -0.5915007010111275
1.711947753906244 -1.237315917968748 -0.6440261230468782 -0.584129975764883
1.73328043619791 -1.24442681206597 -0.633359781901045 -0.5769406837554691
1.754613118489577 -1.251537706163192 -0.6226934407552116 -0.5699262073572263
1.775945800781243 -1.258648600260414 -0.6120270996093784 -0.5630802469084909
1.79727848307291 -1.265759494357636 -0.6013607584635452 -0.5563968018413279
1.818611165364576 -1.272870388454859 -0.590694417317712 -0.5498701531393769
1.839943847656243 -1.279981282552081 -0.5800280761718786 -0.5434948470160217
1.861276529947909 -1.287092176649303 -0.5693617350260453 -0.5372656797149785
1.882609212239576 -1.294203070746525 -0.5586953938802122 -0.5311776833442706
1.903941894531243 -1.301313964843748 -0.5480290527343787 -0.5252261126625419
1.925274576822909 -1.30842485894097 -0.5373627115885455 -0.5194064327438435
1.946607259114575 -1.315535753038192 -0.5266963704427123 -0.5137143074535001
1.967939941406242 -1.322646647135414 -0.5160300292968789 -0.5081455886735162
1.989272623697909 -1.329757541232636 -0.5053636881510457 -0.5026963062212534
1.99981689825654 -1.333272299418847 -0.5000915508717299 -0.5000457796270297

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.ADD_SUB)

View File

@ -0,0 +1,188 @@
-1.978606282552083 3.021393717447917 -6.978606282552083 0.9786062825520833
-1.957273600260416 3.042726399739584 -6.957273600260416 0.9572736002604165
-1.93594091796875 3.06405908203125 -6.93594091796875 0.93594091796875
-1.914608235677083 3.085391764322917 -6.914608235677083 0.9146082356770835
-1.893275553385417 3.106724446614583 -6.893275553385417 0.8932755533854168
-1.87194287109375 3.12805712890625 -6.87194287109375 0.8719428710937498
-1.850610188802083 3.149389811197917 -6.850610188802083 0.8506101888020833
-1.829277506510417 3.170722493489583 -6.829277506510417 0.8292775065104168
-1.80794482421875 3.19205517578125 -6.80794482421875 0.80794482421875
-1.786612141927083 3.213387858072917 -6.786612141927083 0.7866121419270833
-1.765279459635417 3.234720540364584 -6.765279459635416 0.7652794596354166
-1.74394677734375 3.25605322265625 -6.74394677734375 0.7439467773437498
-1.722614095052083 3.277385904947917 -6.722614095052084 0.7226140950520832
-1.701281412760417 3.298718587239583 -6.701281412760417 0.7012814127604168
-1.67994873046875 3.32005126953125 -6.67994873046875 0.6799487304687501
-1.658616048177083 3.341383951822917 -6.658616048177083 0.6586160481770833
-1.637283365885417 3.362716634114583 -6.637283365885416 0.6372833658854167
-1.61595068359375 3.38404931640625 -6.61595068359375 0.6159506835937503
-1.594618001302083 3.405381998697917 -6.594618001302083 0.5946180013020834
-1.573285319010417 3.426714680989583 -6.573285319010417 0.5732853190104166
-1.55195263671875 3.44804736328125 -6.551952636718751 0.5519526367187502
-1.530619954427083 3.469380045572917 -6.530619954427083 0.5306199544270833
-1.509287272135417 3.490712727864583 -6.509287272135417 0.5092872721354169
-1.48795458984375 3.51204541015625 -6.48795458984375 0.4879545898437501
-1.466621907552084 3.533378092447916 -6.466621907552083 0.4666219075520837
-1.445289225260417 3.554710774739583 -6.445289225260417 0.4452892252604168
-1.42395654296875 3.57604345703125 -6.42395654296875 0.4239565429687504
-1.402623860677084 3.597376139322916 -6.402623860677084 0.4026238606770836
-1.381291178385417 3.618708821614583 -6.381291178385417 0.3812911783854167
-1.35995849609375 3.64004150390625 -6.35995849609375 0.3599584960937503
-1.338625813802083 3.661374186197917 -6.338625813802084 0.3386258138020835
-1.317293131510417 3.682706868489583 -6.317293131510417 0.3172931315104168
-1.29596044921875 3.70403955078125 -6.29596044921875 0.2959604492187502
-1.274627766927084 3.725372233072916 -6.274627766927084 0.2746277669270838
-1.253295084635417 3.746704915364583 -6.253295084635417 0.2532950846354172
-1.23196240234375 3.76803759765625 -6.231962402343751 0.2319624023437501
-1.210629720052084 3.789370279947916 -6.210629720052084 0.2106297200520837
-1.189297037760417 3.810702962239583 -6.189297037760417 0.1892970377604173
-1.16796435546875 3.83203564453125 -6.16796435546875 0.1679643554687502
-1.146631673177084 3.853368326822917 -6.146631673177083 0.1466316731770836
-1.125298990885417 3.874701009114583 -6.125298990885417 0.1252989908854172
-1.10396630859375 3.89603369140625 -6.10396630859375 0.1039663085937503
-1.082633626302084 3.917366373697916 -6.082633626302083 0.08263362630208393
-1.061300944010417 3.938699055989583 -6.061300944010418 0.06130094401041708
-1.039968261718751 3.960031738281249 -6.039968261718751 0.03996826171875068
-1.018635579427084 3.981364420572916 -6.018635579427084 0.01863557942708383
-0.9973028971354172 4.002697102864583 -5.997302897135417 -0.002697102864582912
-0.9759702148437505 4.02402978515625 -5.97597021484375 -0.02402978515624954
-0.9546375325520838 4.045362467447916 -5.954637532552084 -0.04536246744791628
-0.9333048502604168 4.066695149739584 -5.933304850260416 -0.06669514973958313
-0.9119721679687501 4.08802783203125 -5.91197216796875 -0.08802783203124987
-0.8906394856770833 4.109360514322917 -5.890639485677083 -0.1093605143229167
-0.8693068033854166 4.130693196614583 -5.869306803385417 -0.1306931966145833
-0.8479741210937499 4.15202587890625 -5.84797412109375 -0.1520258789062501
-0.8266414388020831 4.173358561197917 -5.826641438802083 -0.1733585611979169
-0.8053087565104164 4.194691243489584 -5.805308756510416 -0.1946912434895837
-0.7839760742187497 4.216023925781251 -5.783976074218749 -0.2160239257812503
-0.7626433919270829 4.237356608072917 -5.762643391927083 -0.2373566080729171
-0.7413107096354159 4.258689290364584 -5.741310709635416 -0.2586892903645841
-0.7199780273437493 4.28002197265625 -5.71997802734375 -0.2800219726562507
-0.6986453450520828 4.301354654947917 -5.698645345052083 -0.3013546549479172
-0.6773126627604157 4.322687337239584 -5.677312662760416 -0.3226873372395843
-0.6559799804687488 4.344020019531252 -5.655979980468748 -0.3440200195312512
-0.6346472981770823 4.365352701822918 -5.634647298177082 -0.3653527018229177
-0.6133146158854156 4.386685384114585 -5.613314615885415 -0.3866853841145843
-0.5919819335937487 4.408018066406251 -5.591981933593749 -0.4080180664062513
-0.5706492513020819 4.429350748697918 -5.570649251302082 -0.4293507486979181
-0.5493165690104153 4.450683430989585 -5.549316569010415 -0.4506834309895847
-0.5279838867187485 4.472016113281251 -5.527983886718749 -0.4720161132812515
-0.5066512044270817 4.493348795572919 -5.506651204427081 -0.4933487955729183
-0.4853185221354149 4.514681477864585 -5.485318522135415 -0.5146814778645851
-0.4639858398437481 4.536014160156252 -5.463985839843748 -0.5360141601562519
-0.4426531575520815 4.557346842447918 -5.442653157552082 -0.5573468424479185
-0.4213204752604147 4.578679524739585 -5.421320475260415 -0.5786795247395853
-0.3999877929687479 4.600012207031252 -5.399987792968748 -0.6000122070312521
-0.3786551106770811 4.621344889322919 -5.378655110677081 -0.6213448893229189
-0.3573224283854145 4.642677571614586 -5.357322428385414 -0.6426775716145855
-0.3359897460937477 4.664010253906252 -5.335989746093748 -0.6640102539062523
-0.3146570638020807 4.68534293619792 -5.31465706380208 -0.6853429361979194
-0.2933243815104141 4.706675618489585 -5.293324381510415 -0.7066756184895859
-0.2719916992187476 4.728008300781252 -5.271991699218748 -0.7280083007812524
-0.2506590169270807 4.749340983072919 -5.250659016927081 -0.7493409830729193
-0.2293263346354136 4.770673665364587 -5.229326334635413 -0.7706736653645864
-0.2079936523437471 4.792006347656253 -5.207993652343747 -0.7920063476562529
-0.1866609700520805 4.81333902994792 -5.18666097005208 -0.8133390299479196
-0.1653282877604135 4.834671712239587 -5.165328287760413 -0.8346717122395864
-0.1439956054687467 4.856004394531253 -5.143995605468747 -0.8560043945312533
-0.1226629231770801 4.87733707682292 -5.12266292317708 -0.8773370768229199
-0.1013302408854133 4.898669759114586 -5.101330240885414 -0.8986697591145866
-0.07999755859374647 4.920002441406254 -5.079997558593746 -0.9200024414062536
-0.05866487630207972 4.94133512369792 -5.05866487630208 -0.9413351236979203
-0.0373321940104131 4.962667805989587 -5.037332194010413 -0.962667805989587
-0.01599951171874625 4.984000488281254 -5.015999511718746 -0.9840004882812538
0.005333170572920487 5.00533317057292 -4.99466682942708 -1.00533317057292
0.026665852864587 5.026665852864587 -4.973334147135413 -1.026665852864587
0.04799853515625363 5.047998535156253 -4.952001464843747 -1.047998535156254
0.06933121744792015 5.06933121744792 -4.93066878255208 -1.06933121744792
0.09066389973958666 5.090663899739587 -4.909336100260413 -1.090663899739587
0.1119965820312533 5.111996582031253 -4.888003417968747 -1.111996582031253
0.1333292643229198 5.13332926432292 -4.86667073567708 -1.13332926432292
0.1546619466145862 5.154661946614587 -4.845338053385413 -1.154661946614586
0.1759946289062527 5.175994628906253 -4.824005371093747 -1.175994628906253
0.1973273111979195 5.197327311197919 -4.802672688802081 -1.197327311197919
0.2186599934895859 5.218659993489586 -4.781340006510414 -1.218659993489586
0.2399926757812524 5.239992675781252 -4.760007324218748 -1.239992675781252
0.261325358072919 5.261325358072919 -4.738674641927081 -1.261325358072919
0.2826580403645855 5.282658040364586 -4.717341959635414 -1.282658040364586
0.303990722656252 5.303990722656252 -4.696009277343748 -1.303990722656252
0.3253234049479187 5.325323404947919 -4.674676595052081 -1.325323404947919
0.3466560872395852 5.346656087239586 -4.653343912760414 -1.346656087239585
0.3679887695312516 5.367988769531252 -4.632011230468748 -1.367988769531252
0.3893214518229181 5.389321451822918 -4.610678548177082 -1.389321451822918
0.4106541341145848 5.410654134114585 -4.589345865885415 -1.410654134114585
0.4319868164062513 5.431986816406251 -4.568013183593749 -1.431986816406251
0.4533194986979177 5.453319498697917 -4.546680501302083 -1.453319498697918
0.4746521809895844 5.474652180989585 -4.525347819010415 -1.474652180989585
0.4959848632812509 5.495984863281251 -4.504015136718749 -1.495984863281251
0.5173175455729173 5.517317545572917 -4.482682454427083 -1.517317545572917
0.5386502278645841 5.538650227864585 -4.461349772135415 -1.538650227864584
0.5599829101562506 5.559982910156251 -4.440017089843749 -1.559982910156251
0.581315592447917 5.581315592447917 -4.418684407552083 -1.581315592447917
0.6026482747395835 5.602648274739583 -4.397351725260417 -1.602648274739583
0.6239809570312501 5.62398095703125 -4.37601904296875 -1.62398095703125
0.6453136393229166 5.645313639322916 -4.354686360677084 -1.645313639322917
0.6666463216145831 5.666646321614583 -4.333353678385417 -1.666646321614583
0.6879790039062498 5.68797900390625 -4.31202099609375 -1.68797900390625
0.7093116861979163 5.709311686197916 -4.290688313802084 -1.709311686197916
0.7306443684895827 5.730644368489583 -4.269355631510417 -1.730644368489583
0.7519770507812495 5.75197705078125 -4.24802294921875 -1.75197705078125
0.773309733072916 5.773309733072916 -4.226690266927084 -1.773309733072916
0.7946424153645824 5.794642415364582 -4.205357584635418 -1.794642415364582
0.8159750976562488 5.815975097656249 -4.184024902343751 -1.815975097656249
0.8373077799479155 5.837307779947915 -4.162692220052085 -1.837307779947916
0.858640462239582 5.858640462239582 -4.141359537760418 -1.858640462239582
0.8799731445312485 5.879973144531249 -4.120026855468751 -1.879973144531249
0.9013058268229152 5.901305826822915 -4.098694173177085 -1.901305826822915
0.9226385091145817 5.922638509114582 -4.077361490885418 -1.922638509114582
0.9439711914062482 5.943971191406249 -4.056028808593751 -1.943971191406248
0.9653038736979148 5.965303873697914 -4.034696126302086 -1.965303873697915
0.9866365559895813 5.986636555989581 -4.013363444010419 -1.986636555989581
1.007969238281248 6.007969238281248 -3.992030761718752 -2.007969238281248
1.029301920572914 6.029301920572914 -3.970698079427086 -2.029301920572914
1.050634602864581 6.050634602864581 -3.949365397135419 -2.050634602864581
1.071967285156247 6.071967285156248 -3.928032714843753 -2.071967285156247
1.093299967447914 6.093299967447914 -3.906700032552086 -2.093299967447914
1.114632649739581 6.114632649739581 -3.885367350260419 -2.114632649739581
1.135965332031247 6.135965332031247 -3.864034667968753 -2.135965332031247
1.157298014322913 6.157298014322913 -3.842701985677087 -2.157298014322913
1.17863069661458 6.17863069661458 -3.82136930338542 -2.17863069661458
1.199963378906247 6.199963378906247 -3.800036621093753 -2.199963378906247
1.221296061197913 6.221296061197913 -3.778703938802087 -2.221296061197913
1.24262874348958 6.242628743489579 -3.75737125651042 -2.24262874348958
1.263961425781246 6.263961425781247 -3.736038574218754 -2.263961425781246
1.285294108072913 6.285294108072913 -3.714705891927087 -2.285294108072913
1.306626790364579 6.306626790364579 -3.693373209635421 -2.306626790364579
1.327959472656246 6.327959472656246 -3.672040527343754 -2.327959472656246
1.349292154947912 6.349292154947912 -3.650707845052088 -2.349292154947912
1.370624837239579 6.370624837239578 -3.629375162760421 -2.370624837239579
1.391957519531245 6.391957519531245 -3.608042480468755 -2.391957519531245
1.413290201822912 6.413290201822912 -3.586709798177088 -2.413290201822912
1.434622884114579 6.434622884114578 -3.565377115885421 -2.434622884114579
1.455955566406245 6.455955566406245 -3.544044433593755 -2.455955566406245
1.477288248697912 6.477288248697912 -3.522711751302088 -2.477288248697912
1.498620930989578 6.498620930989578 -3.501379069010422 -2.498620930989578
1.519953613281245 6.519953613281245 -3.480046386718755 -2.519953613281245
1.541286295572911 6.541286295572911 -3.458713704427089 -2.541286295572911
1.562618977864578 6.562618977864577 -3.437381022135422 -2.562618977864578
1.583951660156244 6.583951660156244 -3.416048339843756 -2.583951660156244
1.605284342447911 6.605284342447911 -3.394715657552089 -2.605284342447911
1.626617024739577 6.626617024739577 -3.373382975260423 -2.626617024739577
1.647949707031244 6.647949707031244 -3.352050292968756 -2.647949707031244
1.66928238932291 6.669282389322911 -3.33071761067709 -2.66928238932291
1.690615071614577 6.690615071614577 -3.309384928385423 -2.690615071614577
1.711947753906244 6.711947753906244 -3.288052246093756 -2.711947753906244
1.73328043619791 6.73328043619791 -3.26671956380209 -2.73328043619791
1.754613118489577 6.754613118489576 -3.245386881510423 -2.754613118489577
1.775945800781243 6.775945800781243 -3.224054199218757 -2.775945800781243
1.79727848307291 6.79727848307291 -3.20272151692709 -2.79727848307291
1.818611165364576 6.818611165364576 -3.181388834635424 -2.818611165364576
1.839943847656243 6.839943847656243 -3.160056152343757 -2.839943847656243
1.861276529947909 6.86127652994791 -3.138723470052091 -2.861276529947909
1.882609212239576 6.882609212239576 -3.117390787760424 -2.882609212239576
1.903941894531243 6.903941894531243 -3.096058105468757 -2.903941894531243
1.925274576822909 6.925274576822909 -3.074725423177091 -2.925274576822909
1.946607259114575 6.946607259114575 -3.053392740885425 -2.946607259114575
1.967939941406242 6.967939941406242 -3.032060058593758 -2.967939941406242
1.989272623697909 6.989272623697909 -3.010727376302091 -2.989272623697909
1.99981689825654 6.99981689825654 -3.00018310174346 -2.99981689825654

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.CONSTRAINED_LERP)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -1.978606282552083 -1.978606282552083 2.0
-1.957273600260416 -1.957273600260416 -1.957273600260416 2.0
-1.93594091796875 -1.93594091796875 -1.93594091796875 2.0
-1.914608235677083 -1.914608235677083 -1.914608235677083 2.0
-1.893275553385417 -1.893275553385417 -1.893275553385417 2.0
-1.87194287109375 -1.87194287109375 -1.87194287109375 2.0
-1.850610188802083 -1.850610188802083 -1.850610188802083 2.0
-1.829277506510417 -1.829277506510417 -1.829277506510417 2.0
-1.80794482421875 -1.80794482421875 -1.80794482421875 2.0
-1.786612141927083 -1.786612141927083 -1.786612141927083 2.0
-1.765279459635417 -1.765279459635417 -1.765279459635417 2.0
-1.74394677734375 -1.74394677734375 -1.74394677734375 2.0
-1.722614095052083 -1.722614095052083 -1.722614095052083 2.0
-1.701281412760417 -1.701281412760417 -1.701281412760417 2.0
-1.67994873046875 -1.67994873046875 -1.67994873046875 2.0
-1.658616048177083 -1.658616048177083 -1.658616048177083 2.0
-1.637283365885417 -1.637283365885417 -1.637283365885417 2.0
-1.61595068359375 -1.61595068359375 -1.61595068359375 2.0
-1.594618001302083 -1.594618001302083 -1.594618001302083 2.0
-1.573285319010417 -1.573285319010417 -1.573285319010417 2.0
-1.55195263671875 -1.55195263671875 -1.55195263671875 2.0
-1.530619954427083 -1.530619954427083 -1.530619954427083 2.0
-1.509287272135417 -1.509287272135417 -1.509287272135417 2.0
-1.48795458984375 -1.48795458984375 -1.48795458984375 2.0
-1.466621907552084 -1.466621907552084 -1.466621907552084 2.0
-1.445289225260417 -1.445289225260417 -1.445289225260417 2.0
-1.42395654296875 -1.42395654296875 -1.42395654296875 2.0
-1.402623860677084 -1.402623860677084 -1.402623860677084 2.0
-1.381291178385417 -1.381291178385417 -1.381291178385417 2.0
-1.35995849609375 -1.35995849609375 -1.35995849609375 2.0
-1.338625813802083 -1.338625813802083 -1.338625813802083 2.0
-1.317293131510417 -1.317293131510417 -1.317293131510417 2.0
-1.29596044921875 -1.29596044921875 -1.29596044921875 2.0
-1.274627766927084 -1.274627766927084 -1.274627766927084 2.0
-1.253295084635417 -1.253295084635417 -1.253295084635417 2.0
-1.23196240234375 -1.23196240234375 -1.23196240234375 2.0
-1.210629720052084 -1.210629720052084 -1.210629720052084 2.0
-1.189297037760417 -1.189297037760417 -1.189297037760417 2.0
-1.16796435546875 -1.16796435546875 -1.16796435546875 2.0
-1.146631673177084 -1.146631673177084 -1.146631673177084 2.0
-1.125298990885417 -1.125298990885417 -1.125298990885417 2.0
-1.10396630859375 -1.10396630859375 -1.10396630859375 2.0
-1.082633626302084 -1.082633626302084 -1.082633626302084 2.0
-1.061300944010417 -1.061300944010417 -1.061300944010417 2.0
-1.039968261718751 -1.039968261718751 -1.039968261718751 2.0
-1.018635579427084 -1.018635579427084 -1.018635579427084 2.0
-0.9973028971354172 -0.9973028971354172 -0.9973028971354172 2.0
-0.9759702148437505 -0.9759702148437505 -0.9759702148437505 2.0
-0.9546375325520838 -0.9546375325520838 -0.9546375325520838 2.0
-0.9333048502604168 -0.9333048502604168 -0.9333048502604168 2.0
-0.9119721679687501 -0.9119721679687501 -0.9119721679687501 2.0
-0.8906394856770833 -0.8906394856770833 -0.8906394856770833 2.0
-0.8693068033854166 -0.8693068033854166 -0.8693068033854166 2.0
-0.8479741210937499 -0.8479741210937499 -0.8479741210937499 2.0
-0.8266414388020831 -0.8266414388020831 -0.8266414388020831 2.0
-0.8053087565104164 -0.8053087565104164 -0.8053087565104164 2.0
-0.7839760742187497 -0.7839760742187497 -0.7839760742187497 2.0
-0.7626433919270829 -0.7626433919270829 -0.7626433919270829 2.0
-0.7413107096354159 -0.7413107096354159 -0.7413107096354159 2.0
-0.7199780273437493 -0.7199780273437493 -0.7199780273437493 2.0
-0.6986453450520828 -0.6986453450520828 -0.6986453450520828 2.0
-0.6773126627604157 -0.6773126627604157 -0.6773126627604157 2.0
-0.6559799804687488 -0.6559799804687488 -0.6559799804687488 2.0
-0.6346472981770823 -0.6346472981770823 -0.6346472981770823 2.0
-0.6133146158854156 -0.6133146158854156 -0.6133146158854156 2.0
-0.5919819335937487 -0.5919819335937487 -0.5919819335937487 2.0
-0.5706492513020819 -0.5706492513020819 -0.5706492513020819 2.0
-0.5493165690104153 -0.5493165690104153 -0.5493165690104153 2.0
-0.5279838867187485 -0.5279838867187485 -0.5279838867187485 2.0
-0.5066512044270817 -0.5066512044270817 -0.5066512044270817 2.0
-0.4853185221354149 -0.4853185221354149 -0.4853185221354149 2.0
-0.4639858398437481 -0.4639858398437481 -0.4639858398437481 2.0
-0.4426531575520815 -0.4426531575520815 -0.4426531575520815 2.0
-0.4213204752604147 -0.4213204752604147 -0.4213204752604147 2.0
-0.3999877929687479 -0.3999877929687479 -0.3999877929687479 2.0
-0.3786551106770811 -0.3786551106770811 -0.3786551106770811 2.0
-0.3573224283854145 -0.3573224283854145 -0.3573224283854145 2.0
-0.3359897460937477 -0.3359897460937477 -0.3359897460937477 2.0
-0.3146570638020807 -0.3146570638020807 -0.3146570638020807 2.0
-0.2933243815104141 -0.2933243815104141 -0.2933243815104141 2.0
-0.2719916992187476 -0.2719916992187476 -0.2719916992187476 2.0
-0.2506590169270807 -0.2506590169270807 -0.2506590169270807 2.0
-0.2293263346354136 -0.2293263346354136 -0.2293263346354136 2.0
-0.2079936523437471 -0.2079936523437471 -0.2079936523437471 2.0
-0.1866609700520805 -0.1866609700520805 -0.1866609700520805 2.0
-0.1653282877604135 -0.1653282877604135 -0.1653282877604135 2.0
-0.1439956054687467 -0.1439956054687467 -0.1439956054687467 2.0
-0.1226629231770801 -0.1226629231770801 -0.1226629231770801 2.0
-0.1013302408854133 -0.1013302408854133 -0.1013302408854133 2.0
-0.07999755859374647 -0.07999755859374647 -0.07999755859374647 2.0
-0.05866487630207972 -0.05866487630207972 -0.05866487630207972 2.0
-0.0373321940104131 -0.0373321940104131 -0.0373321940104131 2.0
-0.01599951171874625 -0.01599951171874625 -0.01599951171874625 2.0
0.005333170572920487 0.005333170572920487 0.005333170572920487 1.973334147135398
0.026665852864587 0.026665852864587 0.026665852864587 1.866670735677065
0.04799853515625363 0.04799853515625363 0.04799853515625363 1.760007324218732
0.06933121744792015 0.06933121744792015 0.06933121744792015 1.653343912760399
0.09066389973958666 0.09066389973958666 0.09066389973958666 1.546680501302067
0.1119965820312533 0.1119965820312533 0.1119965820312533 1.440017089843733
0.1333292643229198 0.1333292643229198 0.1333292643229198 1.333353678385401
0.1546619466145862 0.1546619466145862 0.1546619466145862 1.226690266927069
0.1759946289062527 0.1759946289062527 0.1759946289062527 1.120026855468736
0.1973273111979195 0.1973273111979195 0.1973273111979195 1.013363444010403
0.2186599934895859 0.2186599934895859 0.2186599934895859 0.9067000325520706
0.2399926757812524 0.2399926757812524 0.2399926757812524 0.8000366210937381
0.261325358072919 0.261325358072919 0.261325358072919 0.6933732096354049
0.2826580403645855 0.2826580403645855 0.2826580403645855 0.5867097981770724
0.303990722656252 0.303990722656252 0.303990722656252 0.4800463867187398
0.3253234049479187 0.3253234049479187 0.3253234049479187 0.3733829752604066
0.3466560872395852 0.3466560872395852 0.3466560872395852 0.2667195638020741
0.3679887695312516 0.3679887695312516 0.3679887695312516 0.160056152343742
0.3893214518229181 0.3893214518229181 0.3893214518229181 0.05339274088540935
0.4106541341145848 0.4106541341145848 0.4106541341145848 -0.05327067057292356
0.4319868164062513 0.4319868164062513 0.4319868164062513 -0.1599340820312563
0.4533194986979177 0.4533194986979177 0.4533194986979177 -0.2665974934895889
0.4746521809895844 0.4746521809895844 0.4746521809895844 -0.3732609049479219
0.4959848632812509 0.4959848632812509 0.4959848632812509 -0.4799243164062545
0.5173175455729173 0.5173175455729173 0.5173175455729173 -0.5865877278645866
0.5386502278645841 0.5386502278645841 0.5386502278645841 -0.6932511393229202
0.5599829101562506 0.5599829101562506 0.5599829101562506 -0.7999145507812528
0.581315592447917 0.581315592447917 0.581315592447917 -0.9065779622395848
0.6026482747395835 0.6026482747395835 0.6026482747395835 -1.013241373697918
0.6239809570312501 0.6239809570312501 0.6239809570312501 -1.11990478515625
0.6453136393229166 0.6453136393229166 0.6453136393229166 -1.226568196614583
0.6666463216145831 0.6666463216145831 0.6666463216145831 -1.333231608072916
0.6879790039062498 0.6879790039062498 0.6879790039062498 -1.439895019531249
0.7093116861979163 0.7093116861979163 0.7093116861979163 -1.546558430989581
0.7306443684895827 0.7306443684895827 0.7306443684895827 -1.653221842447913
0.7519770507812495 0.7519770507812495 0.7519770507812495 -1.759885253906247
0.773309733072916 0.773309733072916 0.773309733072916 -1.86654866536458
0.7946424153645824 0.7946424153645824 0.7946424153645824 -1.973212076822912
0.8159750976562488 0.8159750976562488 0.8159750976562488 -2.079875488281244
0.8373077799479155 0.8373077799479155 0.8373077799479155 -2.186538899739578
0.858640462239582 0.858640462239582 0.858640462239582 -2.29320231119791
0.8799731445312485 0.8799731445312485 0.8799731445312485 -2.399865722656243
0.9013058268229152 0.9013058268229152 0.9013058268229152 -2.506529134114576
0.9226385091145817 0.9226385091145817 0.9226385091145817 -2.613192545572908
0.9439711914062482 0.9439711914062482 0.9439711914062482 -2.71985595703124
0.9653038736979148 0.9653038736979148 0.9653038736979148 -2.826519368489574
0.9866365559895813 0.9866365559895813 0.9866365559895813 -2.933182779947907
1.007969238281248 1.007969238281248 1.007969238281248 -3.0
1.029301920572914 1.029301920572914 1.029301920572914 -3.0
1.050634602864581 1.050634602864581 1.050634602864581 -3.0
1.071967285156247 1.071967285156247 1.071967285156247 -3.0
1.093299967447914 1.093299967447914 1.093299967447914 -3.0
1.114632649739581 1.114632649739581 1.114632649739581 -3.0
1.135965332031247 1.135965332031247 1.135965332031247 -3.0
1.157298014322913 1.157298014322913 1.157298014322913 -3.0
1.17863069661458 1.17863069661458 1.17863069661458 -3.0
1.199963378906247 1.199963378906247 1.199963378906247 -3.0
1.221296061197913 1.221296061197913 1.221296061197913 -3.0
1.24262874348958 1.24262874348958 1.24262874348958 -3.0
1.263961425781246 1.263961425781246 1.263961425781246 -3.0
1.285294108072913 1.285294108072913 1.285294108072913 -3.0
1.306626790364579 1.306626790364579 1.306626790364579 -3.0
1.327959472656246 1.327959472656246 1.327959472656246 -3.0
1.349292154947912 1.349292154947912 1.349292154947912 -3.0
1.370624837239579 1.370624837239579 1.370624837239579 -3.0
1.391957519531245 1.391957519531245 1.391957519531245 -3.0
1.413290201822912 1.413290201822912 1.413290201822912 -3.0
1.434622884114579 1.434622884114579 1.434622884114579 -3.0
1.455955566406245 1.455955566406245 1.455955566406245 -3.0
1.477288248697912 1.477288248697912 1.477288248697912 -3.0
1.498620930989578 1.498620930989578 1.498620930989578 -3.0
1.519953613281245 1.519953613281245 1.519953613281245 -3.0
1.541286295572911 1.541286295572911 1.541286295572911 -3.0
1.562618977864578 1.562618977864578 1.562618977864578 -3.0
1.583951660156244 1.583951660156244 1.583951660156244 -3.0
1.605284342447911 1.605284342447911 1.605284342447911 -3.0
1.626617024739577 1.626617024739577 1.626617024739577 -3.0
1.647949707031244 1.647949707031244 1.647949707031244 -3.0
1.66928238932291 1.66928238932291 1.66928238932291 -3.0
1.690615071614577 1.690615071614577 1.690615071614577 -3.0
1.711947753906244 1.711947753906244 1.711947753906244 -3.0
1.73328043619791 1.73328043619791 1.73328043619791 -3.0
1.754613118489577 1.754613118489577 1.754613118489577 -3.0
1.775945800781243 1.775945800781243 1.775945800781243 -3.0
1.79727848307291 1.79727848307291 1.79727848307291 -3.0
1.818611165364576 1.818611165364576 1.818611165364576 -3.0
1.839943847656243 1.839943847656243 1.839943847656243 -3.0
1.861276529947909 1.861276529947909 1.861276529947909 -3.0
1.882609212239576 1.882609212239576 1.882609212239576 -3.0
1.903941894531243 1.903941894531243 1.903941894531243 -3.0
1.925274576822909 1.925274576822909 1.925274576822909 -3.0
1.946607259114575 1.946607259114575 1.946607259114575 -3.0
1.967939941406242 1.967939941406242 1.967939941406242 -3.0
1.989272623697909 1.989272623697909 1.989272623697909 -3.0
1.99981689825654 1.99981689825654 1.99981689825654 -3.0

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.DIV_ADD)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -3.989303141276041 3.516218778063559 -2.64527294921875
-1.957273600260416 -3.978636800130208 3.532744323328557 -2.623940266927083
-1.93594091796875 -3.967970458984375 3.549634067938237 -2.602607584635416
-1.914608235677083 -3.957304117838542 3.566900185686853 -2.58127490234375
-1.893275553385417 -3.946637776692708 3.584555399046705 -2.559942220052084
-1.87194287109375 -3.935971435546875 3.602613010431853 -2.538609537760416
-1.850610188802083 -3.925305094401041 3.621086935624151 -2.51727685546875
-1.829277506510417 -3.914638753255208 3.639991739538135 -2.495944173177084
-1.80794482421875 -3.903972412109375 3.659342674517936 -2.474611490885417
-1.786612141927083 -3.893306070963542 3.679155721377851 -2.45327880859375
-1.765279459635417 -3.882639729817708 3.699447633418671 -2.431946126302083
-1.74394677734375 -3.871973388671875 3.720235983674558 -2.410613444010417
-1.722614095052083 -3.861307047526042 3.741539215670527 -2.38928076171875
-1.701281412760417 -3.850640706380208 3.763376697998684 -2.367948079427083
-1.67994873046875 -3.839974365234375 3.785768783052636 -2.346615397135417
-1.658616048177083 -3.829308024088542 3.80873687029447 -2.32528271484375
-1.637283365885417 -3.818641682942708 3.832303474467688 -2.303950032552083
-1.61595068359375 -3.807975341796875 3.856492299213136 -2.282617350260417
-1.594618001302083 -3.797309000651042 3.881328316593914 -2.26128466796875
-1.573285319010417 -3.786642659505208 3.906837853090103 -2.239951985677083
-1.55195263671875 -3.775976318359375 3.933048682685842 -2.218619303385417
-1.530619954427083 -3.765309977213541 3.959990127740697 -2.19728662109375
-1.509287272135417 -3.754643636067708 3.987693168415477 -2.175953938802083
-1.48795458984375 -3.743977294921875 4.01619056151104 -2.154621256510417
-1.466621907552084 -3.733310953776042 4.045516969678474 -2.13328857421875
-1.445289225260417 -3.722644612630209 4.075709102072252 -2.111955891927083
-1.42395654296875 -3.711978271484375 4.106805867646367 -2.090623209635417
-1.402623860677084 -3.701311930338542 4.138848542439469 -2.06929052734375
-1.381291178385417 -3.690645589192708 4.171880952361313 -2.047957845052083
-1.35995849609375 -3.679979248046875 4.205949673182667 -2.026625162760417
-1.338625813802083 -3.669312906901042 4.24110424964773 -2.00529248046875
-1.317293131510417 -3.658646565755209 4.277397435876843 -1.983959798177084
-1.29596044921875 -3.647980224609375 4.314885459512675 -1.962627115885417
-1.274627766927084 -3.637313883463542 4.353628312391548 -1.94129443359375
-1.253295084635417 -3.626647542317709 4.393690070900341 -1.919961751302084
-1.23196240234375 -3.615981201171875 4.43513924961723 -1.898629069010417
-1.210629720052084 -3.605314860026042 4.478049192341762 -1.87729638671875
-1.189297037760417 -3.594648518880208 4.522498505208879 -1.855963704427084
-1.16796435546875 -3.583982177734375 4.56857153726749 -1.834631022135417
-1.146631673177084 -3.573315836588542 4.616358914705024 -1.81329833984375
-1.125298990885417 -3.562649495442709 4.665958135836872 -1.791965657552084
-1.10396630859375 -3.551983154296875 4.717474235080097 -1.770632975260417
-1.082633626302084 -3.541316813151042 4.771020525426502 -1.74930029296875
-1.061300944010417 -3.530650472005209 4.826719430460201 -1.727967610677084
-1.039968261718751 -3.519984130859375 4.884703418777333 -1.706634928385417
-1.018635579427084 -3.509317789713542 4.94511605581979 -1.68530224609375
-0.9973028971354172 -3.498651448567708 5.008113190703636 -1.663969563802084
-0.9759702148437505 -3.487985107421875 5.073864298697158 -1.642636881510417
-0.9546375325520838 -3.477318766276042 5.142554003695977 -1.62130419921875
-0.9333048502604168 -3.466652425130208 5.214383809494743 -1.599971516927083
-0.9119721679687501 -3.455986083984375 5.289574074044328 -1.578638834635417
-0.8906394856770833 -3.445319742838542 5.368366267434613 -1.55730615234375
-0.8693068033854166 -3.434653401692708 5.451025562340983 -1.535973470052083
-0.8479741210937499 -3.423987060546875 5.537843815481637 -1.514640787760416
-0.8266414388020831 -3.413320719401042 5.629143010719874 -1.49330810546875
-0.8053087565104164 -3.402654378255208 5.72527924941444 -1.471975423177083
-0.7839760742187497 -3.391988037109375 5.82664739225565 -1.450642740885416
-0.7626433919270829 -3.381321695963541 5.933686480150913 -1.429310058593749
-0.7413107096354159 -3.370655354817708 6.04688609109051 -1.407977376302083
-0.7199780273437493 -3.359989013671875 6.166793827122821 -1.386644694010416
-0.6986453450520828 -3.349322672526041 6.294024172989165 -1.365312011718749
-0.6773126627604157 -3.338656331380208 6.429269028831347 -1.343979329427082
-0.6559799804687488 -3.327989990234375 6.573310298061636 -1.322646647135415
-0.6346472981770823 -3.317323649088541 6.727035013962867 -1.301313964843749
-0.6133146158854156 -3.306657307942708 6.891453623144184 -1.279981282552082
-0.5919819335937487 -3.295990966796874 7.06772222217641 -1.258648600260415
-0.5706492513020819 -3.285324625651041 7.257169781883941 -1.237315917968749
-0.5493165690104153 -3.274658284505207 7.461331715160988 -1.215983235677082
-0.5279838867187485 -3.263991943359374 7.681991582440221 -1.194650553385415
-0.5066512044270817 -3.253325602213541 7.921233333279812 -1.173317871093748
-0.4853185221354149 -3.242659261067708 8.181507325951454 -1.151985188802082
-0.4639858398437481 -3.231992919921874 8.465714559328536 -1.130652506510415
-0.4426531575520815 -3.221326578776041 8.777315260982924 -1.109319824218748
-0.4213204752604147 -3.210660237630207 9.120470464070669 -1.087987141927081
-0.3999877929687479 -3.199993896484374 9.500228888821109 -1.066654459635414
-0.3786551106770811 -3.189327555338541 9.922776995233571 -1.045321777343748
-0.3573224283854145 -3.178661214192707 10.39577860688931 -1.023989095052081
-0.3359897460937477 -3.167994873046874 10.92884391526324 -1.002656412760414
-0.3146570638020807 -3.15732853190104 11.53418926545059 -0.9813237304687473
-0.2933243815104141 -3.146662190755207 12.22758484839246 -0.9599910481770808
-0.2719916992187476 -3.135995849609374 13.02974836591344 -0.9386583658854143
-0.2506590169270807 -3.12532950846354 13.96845035450183 -0.9173256835937472
-0.2293263346354136 -3.114663167317707 15.0817945735253 -0.8959930013020802
-0.2079936523437471 -3.103996826171874 16.42351709388687 -0.8746603190104137
-0.1866609700520805 -3.09333048502604 18.07191904747397 -0.8533276367187471
-0.1653282877604135 -3.082664143880207 20.14571505359971 -0.8319949544270802
-0.1439956054687467 -3.071997802734373 22.83396913561456 -0.8106622721354134
-0.1226629231770801 -3.06133146158854 26.45726811572154 -0.7893295898437467
-0.1013302408854133 -3.050665120442707 31.60616666639994 -0.7679969075520799
-0.07999755859374647 -3.039998779296873 39.50114444410701 -0.7466642252604131
-0.05866487630207972 -3.02933243815104 53.13792424196498 -0.7253315429687463
-0.0373321940104131 -3.018666097005207 82.35959523737628 -0.7039988606770797
-0.01599951171874625 -3.007999755859373 189.5057222205707 -0.6826661783854129
0.005333170572920487 -2.99733341471354 -560.5171666611773 -0.6613334960937461
0.026665852864587 -2.986667073567706 -110.5034333323006 -0.6400008138020796
0.04799853515625363 -2.976000732421873 -60.50190740683752 -0.618668131510413
0.06933121744792015 -2.96533439127604 -41.27055128165784 -0.5973354492187465
0.09066389973958666 -2.954668050130207 -31.0892450977388 -0.57600276692708
0.1119965820312533 -2.944001708984374 -24.78653174578875 -0.5546700846354133
0.1333292643229198 -2.93333536783854 -20.50068666646268 -0.5333374023437468
0.1546619466145862 -2.922669026692707 -17.39714367798517 -0.5120047200520804
0.1759946289062527 -2.912002685546874 -15.04597474732035 -0.4906720377604139
0.1973273111979195 -2.90133634440104 -13.20316666652898 -0.4693393554687471
0.2186599934895859 -2.890670003255207 -11.71993089418472 -0.4480066731770807
0.2399926757812524 -2.880003662109374 -10.50038148136833 -0.4266739908854142
0.261325358072919 -2.86933732096354 -9.479942176766841 -0.4053413085937477
0.2826580403645855 -2.858670979817707 -8.613531446444828 -0.3840086263020811
0.303990722656252 -2.848004638671874 -7.86872222213292 -0.3626759440104146
0.3253234049479187 -2.837338297526041 -7.221592896091423 -0.341343261718748
0.3466560872395852 -2.826671956380207 -6.654110256331958 -0.3200105794270814
0.3679887695312516 -2.816005615234374 -6.152422705240259 -0.298677897135415
0.3893214518229181 -2.805339274088541 -5.70571461180244 -0.2773452148437485
0.4106541341145848 -2.794672932942708 -5.305417748851666 -0.2560125325520819
0.4319868164062513 -2.784006591796874 -4.944656378538007 -0.2346798502604154
0.4533194986979177 -2.773340250651041 -4.617849019547987 -0.2133471679687489
0.4746521809895844 -2.762673909505208 -4.32041760293909 -0.1920144856770822
0.4959848632812509 -2.752007568359375 -4.04857168453311 -0.1706818033854157
0.5173175455729173 -2.741341227213542 -3.799146048057521 -0.1493491210937493
0.5386502278645841 -2.730674886067708 -3.569476897639401 -0.1280164388020826
0.5599829101562506 -2.720008544921875 -3.357306349157902 -0.1066837565104161
0.581315592447917 -2.709342203776042 -3.160707951023669 -0.08535107421874965
0.6026482747395835 -2.698675862630208 -2.978028023553806 -0.06401839192708314
0.6239809570312501 -2.688009521484375 -2.807839031295557 -0.04268570963541651
0.6453136393229166 -2.677343180338542 -2.648902203814713 -0.02135302734375
0.6666463216145831 -2.666676839192708 -2.500137333292643 -2.034505208348136e-05
0.6879790039062498 -2.656010498046875 -2.360598191175042 0.02131233723958315
0.7093116861979163 -2.645344156901042 -2.22945238091414 0.04264501953124967
0.7306443684895827 -2.634677815755209 -2.105964720157524 0.06397770182291607
0.7519770507812495 -2.624011474609375 -1.989483451500572 0.0853103841145828
0.773309733072916 -2.613345133463542 -1.879428735597109 0.1066430664062493
0.7946424153645824 -2.602678792317709 -1.775282997728731 0.1279757486979157
0.8159750976562488 -2.592012451171875 -1.676582788637785 0.1493084309895822
0.8373077799479155 -2.581346110026042 -1.58291188956421 0.1706411132812489
0.858640462239582 -2.570679768880209 -1.493895445102988 0.1919737955729154
0.8799731445312485 -2.560013427734376 -1.409194949464128 0.2133064778645819
0.9013058268229152 -2.549347086588543 -1.328503944743084 0.2346391601562485
0.9226385091145817 -2.538680745442709 -1.251544315962898 0.2559718424479151
0.9439711914062482 -2.528014404296876 -1.178063088483511 0.2773045247395815
0.9653038736979148 -2.517348063151043 -1.107829650063985 0.2986372070312482
0.9866365559895813 -2.506681722005209 -1.040633333305845 0.3199698893229147
1.007969238281248 -2.496015380859376 -0.976281305087733 0.3413025716145811
1.029301920572914 -2.485349039713543 -0.9145967184537906 0.3626352539062475
1.050634602864581 -2.47468269856771 -0.8554170896526978 0.3839679361979144
1.071967285156247 -2.464016357421876 -0.7985928689630928 0.4053006184895808
1.093299967447914 -2.453350016276043 -0.7439861788369839 0.4266333007812472
1.114632649739581 -2.44268367513021 -0.6914696969453664 0.447965983072914
1.135965332031247 -2.432017333984376 -0.6409256650778485 0.4692986653645804
1.157298014322913 -2.421350992838543 -0.5922450076570591 0.4906313476562469
1.17863069661458 -2.41068465169271 -0.5453265459800076 0.5119640299479137
1.199963378906247 -2.400018310546876 -0.5000762962736967 0.5332967122395801
1.221296061197913 -2.389351969401043 -0.4564068413169515 0.5546293945312465
1.24262874348958 -2.37868562825521 -0.4142367667879054 0.5759620768229129
1.263961425781246 -2.368019287109377 -0.3734901546902187 0.5972947591145798
1.285294108072913 -2.357352945963544 -0.3340961272264811 0.6186274414062462
1.306626790364579 -2.346686604817711 -0.2959884353533959 0.6399601236979126
1.327959472656246 -2.336020263671877 -0.259105086994305 0.6612928059895794
1.349292154947912 -2.325353922526044 -0.2233880105200869 0.6826254882812458
1.370624837239579 -2.314687581380211 -0.1887827496559615 0.7039581705729122
1.391957519531245 -2.304021240234377 -0.1552381864428436 0.7252908528645786
1.413290201822912 -2.293354899088544 -0.1227062892889887 0.7466235351562455
1.434622884114579 -2.282688557942711 -0.09114188350030528 0.7679562174479119
1.455955566406245 -2.272022216796878 -0.0605024419838176 0.7892888997395783
1.477288248697912 -2.261355875651044 -0.03074789408513379 0.8106215820312451
1.498620930989578 -2.250689534505211 -0.001840450752961686 0.8319542643229115
1.519953613281245 -2.240023193359378 0.02625555557339565 0.853286946614578
1.541286295572911 -2.229356852213544 0.05357381777999248 0.8746196289062448
1.562618977864578 -2.218690511067711 0.08014618886831993 0.8959523111979111
1.583951660156244 -2.208024169921878 0.1060028058532583 0.9172849934895776
1.605284342447911 -2.197357828776044 0.1311722037821184 0.9386176757812439
1.626617024739577 -2.186691487630211 0.1556814207816974 0.9599503580729108
1.647949707031244 -2.176025146484378 0.1795560949463355 0.9812830403645773
1.66928238932291 -2.165358805338545 0.2028205537968613 1.002615722656244
1.690615071614577 -2.154692464192712 0.2254978969666173 1.023948404947911
1.711947753906244 -2.144026123046878 0.247610072705351 1.045281087239577
1.73328043619791 -2.133359781901045 0.2691779487335926 1.066613769531243
1.754613118489577 -2.122693440755212 0.2902213779283212 1.08794645182291
1.775945800781243 -2.112027099609378 0.3107592592745274 1.109279134114577
1.79727848307291 -2.101360758463545 0.3308095944760165 1.130611816406243
1.818611165364576 -2.090694417317712 0.3503895405818696 1.151944498697909
1.839943847656243 -2.080028076171879 0.3695154589519349 1.173277180989576
1.861276529947909 -2.069361735026045 0.3882029608550646 1.194609863281243
1.882609212239576 -2.058695393880212 0.4064669499671883 1.215942545572909
1.903941894531243 -2.048029052734379 0.4243216620123739 1.237275227864576
1.925274576822909 -2.037362711588545 0.4417807017684694 1.258607910156242
1.946607259114575 -2.026696370442712 0.4588570776394998 1.279940592447909
1.967939941406242 -2.016030029296879 0.4755632339794513 1.301273274739576
1.989272623697909 -2.005363688151045 0.49191108133624 1.322605957031242
1.99981689825654 -2.00009155087173 0.499862661118911 1.333150231589874

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.LERP)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -13.91442513020833 -0.9572125651041667 11.89303141276042
-1.957273600260416 -13.82909440104167 -0.914547200520833 11.78636800130208
-1.93594091796875 -13.743763671875 -0.8718818359374998 11.67970458984375
-1.914608235677083 -13.65843294270833 -0.829216471354167 11.57304117838542
-1.893275553385417 -13.57310221354167 -0.7865511067708337 11.46637776692708
-1.87194287109375 -13.487771484375 -0.7438857421874996 11.35971435546875
-1.850610188802083 -13.40244075520833 -0.7012203776041668 11.25305094401042
-1.829277506510417 -13.31711002604167 -0.6585550130208335 11.14638753255208
-1.80794482421875 -13.231779296875 -0.6158896484374998 11.03972412109375
-1.786612141927083 -13.14644856770833 -0.5732242838541666 10.93306070963542
-1.765279459635417 -13.06111783854167 -0.5305589192708333 10.82639729817708
-1.74394677734375 -12.975787109375 -0.4878935546874996 10.71973388671875
-1.722614095052083 -12.89045638020833 -0.4452281901041664 10.61307047526041
-1.701281412760417 -12.80512565104167 -0.4025628255208336 10.50640706380208
-1.67994873046875 -12.719794921875 -0.3598974609375003 10.39974365234375
-1.658616048177083 -12.63446419270833 -0.3172320963541666 10.29308024088542
-1.637283365885417 -12.54913346354167 -0.2745667317708333 10.18641682942708
-1.61595068359375 -12.463802734375 -0.2319013671875005 10.07975341796875
-1.594618001302083 -12.37847200520833 -0.1892360026041668 9.973090006510418
-1.573285319010417 -12.29314127604167 -0.1465706380208331 9.866426595052083
-1.55195263671875 -12.207810546875 -0.1039052734375003 9.759763183593751
-1.530619954427083 -12.12247981770833 -0.06123990885416664 9.653099772135416
-1.509287272135417 -12.03714908854167 -0.01857454427083383 9.546436360677085
-1.48795458984375 -11.951818359375 0.02409082031249987 9.439772949218749
-1.466621907552084 -11.86648763020833 0.06675618489583268 9.333109537760418
-1.445289225260417 -11.78115690104167 0.1094215494791664 9.226446126302083
-1.42395654296875 -11.695826171875 0.1520869140624992 9.119782714843751
-1.402623860677084 -11.61049544270833 0.1947522786458329 9.013119303385418
-1.381291178385417 -11.52516471354167 0.2374176432291666 8.906455891927084
-1.35995849609375 -11.439833984375 0.2800830078124994 8.799792480468753
-1.338625813802083 -11.35450325520833 0.3227483723958331 8.693129069010418
-1.317293131510417 -11.26917252604167 0.3654137369791663 8.586465657552084
-1.29596044921875 -11.183841796875 0.4080791015624996 8.479802246093751
-1.274627766927084 -11.09851106770834 0.4507444661458324 8.373138834635419
-1.253295084635417 -11.01318033854167 0.4934098307291657 8.266475423177086
-1.23196240234375 -10.927849609375 0.5360751953124998 8.159812011718751
-1.210629720052084 -10.84251888020833 0.5787405598958326 8.053148600260418
-1.189297037760417 -10.75718815104167 0.6214059244791654 7.946485188802086
-1.16796435546875 -10.671857421875 0.6640712890624996 7.839821777343751
-1.146631673177084 -10.58652669270833 0.7067366536458328 7.733158365885417
-1.125298990885417 -10.50119596354167 0.7494020182291656 7.626494954427086
-1.10396630859375 -10.415865234375 0.7920673828124993 7.519831542968752
-1.082633626302084 -10.33053450520834 0.8347327473958321 7.413168131510419
-1.061300944010417 -10.24520377604167 0.8773981119791658 7.306504720052086
-1.039968261718751 -10.159873046875 0.9200634765624986 7.199841308593753
-1.018635579427084 -10.07454231770834 0.9627288411458323 7.093177897135419
-0.9973028971354172 -9.989211588541668 1.005394205729166 6.986514485677086
-0.9759702148437505 -9.903880859375002 1.048059570312499 6.879851074218752
-0.9546375325520838 -9.818550130208335 1.090724934895833 6.773187662760419
-0.9333048502604168 -9.733219401041667 1.133390299479166 6.666524251302084
-0.9119721679687501 -9.647888671875 1.1760556640625 6.559860839843751
-0.8906394856770833 -9.562557942708333 1.218721028645833 6.453197428385416
-0.8693068033854166 -9.477227213541667 1.261386393229167 6.346534016927084
-0.8479741210937499 -9.391896484375 1.3040517578125 6.23987060546875
-0.8266414388020831 -9.306565755208332 1.346717122395834 6.133207194010415
-0.8053087565104164 -9.221235026041665 1.389382486979167 6.026543782552082
-0.7839760742187497 -9.135904296874999 1.432047851562501 5.919880371093749
-0.7626433919270829 -9.050573567708332 1.474713216145834 5.813216959635414
-0.7413107096354159 -8.965242838541663 1.517378580729168 5.70655354817708
-0.7199780273437493 -8.879912109374997 1.560043945312501 5.599890136718747
-0.6986453450520828 -8.794581380208331 1.602709309895834 5.493226725260413
-0.6773126627604157 -8.709250651041662 1.645374674479169 5.386563313802078
-0.6559799804687488 -8.623919921874995 1.688040039062502 5.279899902343744
-0.6346472981770823 -8.538589192708329 1.730705403645835 5.173236490885412
-0.6133146158854156 -8.453258463541662 1.773370768229169 5.066573079427078
-0.5919819335937487 -8.367927734374994 1.816036132812503 4.959909667968743
-0.5706492513020819 -8.282597005208327 1.858701497395836 4.85324625651041
-0.5493165690104153 -8.197266276041661 1.901366861979169 4.746582845052076
-0.5279838867187485 -8.111935546874994 1.944032226562503 4.639919433593743
-0.5066512044270817 -8.026604817708327 1.986697591145837 4.533256022135408
-0.4853185221354149 -7.941274088541659 2.02936295572917 4.426592610677075
-0.4639858398437481 -7.855943359374992 2.072028320312504 4.31992919921874
-0.4426531575520815 -7.770612630208326 2.114693684895837 4.213265787760408
-0.4213204752604147 -7.685281901041659 2.157359049479171 4.106602376302074
-0.3999877929687479 -7.599951171874991 2.200024414062504 3.999938964843739
-0.3786551106770811 -7.514620442708324 2.242689778645838 3.893275553385406
-0.3573224283854145 -7.429289713541658 2.285355143229171 3.786612141927073
-0.3359897460937477 -7.343958984374991 2.328020507812504 3.679948730468738
-0.3146570638020807 -7.258628255208323 2.370685872395839 3.573285319010403
-0.2933243815104141 -7.173297526041656 2.413351236979172 3.46662190755207
-0.2719916992187476 -7.087966796874991 2.456016601562505 3.359958496093738
-0.2506590169270807 -7.002636067708323 2.498681966145838 3.253295084635404
-0.2293263346354136 -6.917305338541654 2.541347330729173 3.146631673177068
-0.2079936523437471 -6.831974609374988 2.584012695312506 3.039968261718736
-0.1866609700520805 -6.746643880208322 2.626678059895839 2.933304850260402
-0.1653282877604135 -6.661313151041654 2.669343424479173 2.826641438802067
-0.1439956054687467 -6.575982421874986 2.712008789062507 2.719978027343733
-0.1226629231770801 -6.490651692708321 2.75467415364584 2.6133146158854
-0.1013302408854133 -6.405320963541653 2.797339518229173 2.506651204427067
-0.07999755859374647 -6.319990234374986 2.840004882812507 2.399987792968732
-0.05866487630207972 -6.234659505208318 2.882670247395841 2.293324381510399
-0.0373321940104131 -6.149328776041653 2.925335611979174 2.186660970052066
-0.01599951171874625 -6.063998046874985 2.968000976562507 2.079997558593731
0.005333170572920487 -5.978667317708318 3.010666341145841 1.973334147135398
0.026665852864587 -5.893336588541652 3.053331705729174 1.866670735677065
0.04799853515625363 -5.808005859374985 3.095997070312507 1.760007324218732
0.06933121744792015 -5.722675130208319 3.13866243489584 1.653343912760399
0.09066389973958666 -5.637344401041654 3.181327799479173 1.546680501302067
0.1119965820312533 -5.552013671874986 3.223993164062507 1.440017089843733
0.1333292643229198 -5.466682942708321 3.26665852864584 1.333353678385401
0.1546619466145862 -5.381352213541655 3.309323893229172 1.226690266927069
0.1759946289062527 -5.29602148437499 3.351989257812505 1.120026855468736
0.1973273111979195 -5.210690755208322 3.394654622395839 1.013363444010403
0.2186599934895859 -5.125360026041657 3.437319986979172 0.9067000325520706
0.2399926757812524 -5.040029296874991 3.479985351562505 0.8000366210937381
0.261325358072919 -4.954698567708324 3.522650716145838 0.6933732096354049
0.2826580403645855 -4.869367838541658 3.565316080729171 0.5867097981770724
0.303990722656252 -4.784037109374992 3.607981445312504 0.4800463867187398
0.3253234049479187 -4.698706380208325 3.650646809895838 0.3733829752604066
0.3466560872395852 -4.613375651041659 3.69331217447917 0.2667195638020741
0.3679887695312516 -4.528044921874994 3.735977539062503 0.160056152343742
0.3893214518229181 -4.442714192708328 3.778642903645836 0.05339274088540935
0.4106541341145848 -4.357383463541661 3.82130826822917 -0.05327067057292356
0.4319868164062513 -4.272052734374995 3.863973632812503 -0.1599340820312563
0.4533194986979177 -4.186722005208329 3.906638997395835 -0.2665974934895889
0.4746521809895844 -4.101391276041662 3.949304361979169 -0.3732609049479219
0.4959848632812509 -4.016060546874996 3.991969726562502 -0.4799243164062545
0.5173175455729173 -3.930729817708331 4.034635091145835 -0.5865877278645866
0.5386502278645841 -3.845399088541664 4.077300455729168 -0.6932511393229202
0.5599829101562506 -3.760068359374998 4.119965820312501 -0.7999145507812528
0.581315592447917 -3.674737630208332 4.162631184895834 -0.9065779622395848
0.6026482747395835 -3.589406901041666 4.205296549479167 -1.013241373697918
0.6239809570312501 -3.504076171875 4.2479619140625 -1.11990478515625
0.6453136393229166 -3.418745442708333 4.290627278645833 -1.226568196614583
0.6666463216145831 -3.333414713541667 4.333292643229166 -1.333231608072916
0.6879790039062498 -3.248083984375001 4.3759580078125 -1.439895019531249
0.7093116861979163 -3.162753255208335 4.418623372395833 -1.546558430989581
0.7306443684895827 -3.077422526041669 4.461288736979165 -1.653221842447913
0.7519770507812495 -2.992091796875002 4.503954101562499 -1.759885253906247
0.773309733072916 -2.906761067708336 4.546619466145832 -1.86654866536458
0.7946424153645824 -2.821430338541671 4.589284830729165 -1.973212076822912
0.8159750976562488 -2.736099609375005 4.631950195312498 -2.079875488281244
0.8373077799479155 -2.650768880208338 4.674615559895831 -2.186538899739578
0.858640462239582 -2.565438151041672 4.717280924479164 -2.29320231119791
0.8799731445312485 -2.480107421875006 4.759946289062497 -2.399865722656243
0.9013058268229152 -2.394776692708339 4.802611653645831 -2.506529134114576
0.9226385091145817 -2.309445963541673 4.845277018229163 -2.613192545572908
0.9439711914062482 -2.224115234375008 4.887942382812496 -2.71985595703124
0.9653038736979148 -2.138784505208341 4.93060774739583 -2.826519368489574
0.9866365559895813 -2.053453776041675 4.973273111979163 -2.933182779947907
1.007969238281248 -1.968123046875009 5.015938476562495 -3.039846191406239
1.029301920572914 -1.882792317708343 5.058603841145828 -3.146509602864571
1.050634602864581 -1.797461588541676 5.101269205729162 -3.253173014322905
1.071967285156247 -1.71213085937501 5.143934570312495 -3.359836425781237
1.093299967447914 -1.626800130208345 5.186599934895828 -3.466499837239569
1.114632649739581 -1.541469401041677 5.229265299479161 -3.573163248697903
1.135965332031247 -1.456138671875012 5.271930664062494 -3.679826660156235
1.157298014322913 -1.370807942708346 5.314596028645827 -3.786490071614567
1.17863069661458 -1.285477213541679 5.357261393229161 -3.893153483072902
1.199963378906247 -1.200146484375013 5.399926757812493 -3.999816894531234
1.221296061197913 -1.114815755208348 5.442592122395826 -4.106480305989566
1.24262874348958 -1.029485026041682 5.485257486979159 -4.213143717447897
1.263961425781246 -0.9441542968750145 5.527922851562493 -4.319807128906232
1.285294108072913 -0.8588235677083489 5.570588216145826 -4.426470540364564
1.306626790364579 -0.7734928385416833 5.613253580729158 -4.533133951822895
1.327959472656246 -0.6881621093750159 5.655918945312492 -4.639797363281231
1.349292154947912 -0.6028313802083503 5.698584309895825 -4.746460774739562
1.370624837239579 -0.5175006510416846 5.741249674479158 -4.853124186197895
1.391957519531245 -0.432169921875019 5.78391503906249 -4.959787597656226
1.413290201822912 -0.3468391927083516 5.826580403645824 -5.06645100911456
1.434622884114579 -0.261508463541686 5.869245768229157 -5.173114420572893
1.455955566406245 -0.1761777343750204 5.91191113281249 -5.279777832031225
1.477288248697912 -0.09084700520835298 5.954576497395824 -5.386441243489559
1.498620930989578 -0.005516276041687362 5.997241861979156 -5.493104654947891
1.519953613281245 0.07981445312497826 6.039907226562489 -5.599768066406223
1.541286295572911 0.1651451822916457 6.082572591145823 -5.706431477864557
1.562618977864578 0.2504759114583113 6.125237955729156 -5.81309488932289
1.583951660156244 0.3358066406249769 6.167903320312488 -5.919758300781221
1.605284342447911 0.4211373697916425 6.210568684895821 -6.026421712239553
1.626617024739577 0.5064680989583099 6.253234049479155 -6.133085123697888
1.647949707031244 0.5917988281249755 6.295899414062488 -6.239748535156219
1.66928238932291 0.6771295572916411 6.338564778645821 -6.346411946614551
1.690615071614577 0.7624602864583085 6.381230143229154 -6.453075358072886
1.711947753906244 0.8477910156249742 6.423895507812487 -6.559738769531218
1.73328043619791 0.9331217447916398 6.46656087239582 -6.666402180989549
1.754613118489577 1.018452473958307 6.509226236979154 -6.773065592447884
1.775945800781243 1.103783203124973 6.551891601562486 -6.879729003906216
1.79727848307291 1.189113932291638 6.594556966145819 -6.986392415364548
1.818611165364576 1.274444661458304 6.637222330729152 -7.09305582682288
1.839943847656243 1.359775390624971 6.679887695312486 -7.199719238281214
1.861276529947909 1.445106119791637 6.722553059895819 -7.306382649739546
1.882609212239576 1.530436848958303 6.765218424479151 -7.413046061197878
1.903941894531243 1.61576757812497 6.807883789062485 -7.519709472656213
1.925274576822909 1.701098307291636 6.850549153645818 -7.626372884114544
1.946607259114575 1.786429036458301 6.893214518229151 -7.733036295572877
1.967939941406242 1.871759765624969 6.935879882812484 -7.839699707031211
1.989272623697909 1.957090494791634 6.978545247395817 -7.946363118489542
1.99981689825654 1.999267593026161 6.999633796513081 -7.999084491282701

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.MAX)

View File

@ -0,0 +1,188 @@
-1.978606282552083 2.0 2.0 2.0
-1.957273600260416 2.0 2.0 2.0
-1.93594091796875 2.0 2.0 2.0
-1.914608235677083 2.0 2.0 2.0
-1.893275553385417 2.0 2.0 2.0
-1.87194287109375 2.0 2.0 2.0
-1.850610188802083 2.0 2.0 2.0
-1.829277506510417 2.0 2.0 2.0
-1.80794482421875 2.0 2.0 2.0
-1.786612141927083 2.0 2.0 2.0
-1.765279459635417 2.0 2.0 2.0
-1.74394677734375 2.0 2.0 2.0
-1.722614095052083 2.0 2.0 2.0
-1.701281412760417 2.0 2.0 2.0
-1.67994873046875 2.0 2.0 2.0
-1.658616048177083 2.0 2.0 2.0
-1.637283365885417 2.0 2.0 2.0
-1.61595068359375 2.0 2.0 2.0
-1.594618001302083 2.0 2.0 2.0
-1.573285319010417 2.0 2.0 2.0
-1.55195263671875 2.0 2.0 2.0
-1.530619954427083 2.0 2.0 2.0
-1.509287272135417 2.0 2.0 2.0
-1.48795458984375 2.0 2.0 2.0
-1.466621907552084 2.0 2.0 2.0
-1.445289225260417 2.0 2.0 2.0
-1.42395654296875 2.0 2.0 2.0
-1.402623860677084 2.0 2.0 2.0
-1.381291178385417 2.0 2.0 2.0
-1.35995849609375 2.0 2.0 2.0
-1.338625813802083 2.0 2.0 2.0
-1.317293131510417 2.0 2.0 2.0
-1.29596044921875 2.0 2.0 2.0
-1.274627766927084 2.0 2.0 2.0
-1.253295084635417 2.0 2.0 2.0
-1.23196240234375 2.0 2.0 2.0
-1.210629720052084 2.0 2.0 2.0
-1.189297037760417 2.0 2.0 2.0
-1.16796435546875 2.0 2.0 2.0
-1.146631673177084 2.0 2.0 2.0
-1.125298990885417 2.0 2.0 2.0
-1.10396630859375 2.0 2.0 2.0
-1.082633626302084 2.0 2.0 2.0
-1.061300944010417 2.0 2.0 2.0
-1.039968261718751 2.0 2.0 2.0
-1.018635579427084 2.0 2.0 2.0
-0.9973028971354172 2.0 2.0 2.0
-0.9759702148437505 2.0 2.0 2.0
-0.9546375325520838 2.0 2.0 2.0
-0.9333048502604168 2.0 2.0 2.0
-0.9119721679687501 2.0 2.0 2.0
-0.8906394856770833 2.0 2.0 2.0
-0.8693068033854166 2.0 2.0 2.0
-0.8479741210937499 2.0 2.0 2.0
-0.8266414388020831 2.0 2.0 2.0
-0.8053087565104164 2.0 2.0 2.0
-0.7839760742187497 2.0 2.0 2.0
-0.7626433919270829 2.0 2.0 2.0
-0.7413107096354159 2.0 2.0 2.0
-0.7199780273437493 2.0 2.0 2.0
-0.6986453450520828 2.0 2.0 2.0
-0.6773126627604157 2.0 2.0 2.0
-0.6559799804687488 2.0 2.0 2.0
-0.6346472981770823 2.0 2.0 2.0
-0.6133146158854156 2.0 2.0 2.0
-0.5919819335937487 2.0 2.0 2.0
-0.5706492513020819 2.0 2.0 2.0
-0.5493165690104153 2.0 2.0 2.0
-0.5279838867187485 2.0 2.0 2.0
-0.5066512044270817 2.0 2.0 2.0
-0.4853185221354149 2.0 2.0 2.0
-0.4639858398437481 2.0 2.0 2.0
-0.4426531575520815 2.0 2.0 2.0
-0.4213204752604147 2.0 2.0 2.0
-0.3999877929687479 2.0 2.0 2.0
-0.3786551106770811 2.0 2.0 2.0
-0.3573224283854145 2.0 2.0 2.0
-0.3359897460937477 2.0 2.0 2.0
-0.3146570638020807 2.0 2.0 2.0
-0.2933243815104141 2.0 2.0 2.0
-0.2719916992187476 2.0 2.0 2.0
-0.2506590169270807 2.0 2.0 2.0
-0.2293263346354136 2.0 2.0 2.0
-0.2079936523437471 2.0 2.0 2.0
-0.1866609700520805 2.0 2.0 2.0
-0.1653282877604135 2.0 2.0 2.0
-0.1439956054687467 2.0 2.0 2.0
-0.1226629231770801 2.0 2.0 2.0
-0.1013302408854133 2.0 2.0 2.0
-0.07999755859374647 2.0 2.0 2.0
-0.05866487630207972 2.0 2.0 2.0
-0.0373321940104131 2.0 2.0 2.0
-0.01599951171874625 2.0 2.0 2.0
0.005333170572920487 2.0 2.0 2.0
0.026665852864587 2.0 2.0 2.0
0.04799853515625363 2.0 2.0 2.0
0.06933121744792015 2.0 2.0 2.0
0.09066389973958666 2.0 2.0 2.0
0.1119965820312533 2.0 2.0 2.0
0.1333292643229198 2.0 2.0 2.0
0.1546619466145862 2.0 2.0 2.0
0.1759946289062527 2.0 2.0 2.0
0.1973273111979195 2.0 2.0 2.0
0.2186599934895859 2.0 2.0 2.0
0.2399926757812524 2.0 2.0 2.0
0.261325358072919 2.0 2.0 2.0
0.2826580403645855 2.0 2.0 2.0
0.303990722656252 2.0 2.0 2.0
0.3253234049479187 2.0 2.0 2.0
0.3466560872395852 2.0 2.0 2.0
0.3679887695312516 2.0 2.0 2.0
0.3893214518229181 2.0 2.0 2.0
0.4106541341145848 2.0 2.0 2.0
0.4319868164062513 2.0 2.0 2.0
0.4533194986979177 2.0 2.0 2.0
0.4746521809895844 2.0 2.0 2.0
0.4959848632812509 2.0 2.0 2.0
0.5173175455729173 2.0 2.0 2.0
0.5386502278645841 2.0 2.0 2.0
0.5599829101562506 2.0 2.0 2.0
0.581315592447917 2.0 2.0 2.0
0.6026482747395835 2.0 2.0 2.0
0.6239809570312501 2.0 2.0 2.0
0.6453136393229166 2.0 2.0 2.0
0.6666463216145831 2.0 2.0 2.0
0.6879790039062498 2.0 2.0 2.0
0.7093116861979163 2.0 2.0 2.0
0.7306443684895827 2.0 2.0 2.0
0.7519770507812495 2.0 2.0 2.0
0.773309733072916 2.0 2.0 2.0
0.7946424153645824 2.0 2.0 2.0
0.8159750976562488 2.0 2.0 2.0
0.8373077799479155 2.0 2.0 2.0
0.858640462239582 2.0 2.0 2.0
0.8799731445312485 2.0 2.0 2.0
0.9013058268229152 2.0 2.0 2.0
0.9226385091145817 2.0 2.0 2.0
0.9439711914062482 2.0 2.0 2.0
0.9653038736979148 2.0 2.0 2.0
0.9866365559895813 2.0 2.0 2.0
1.007969238281248 2.0 2.0 2.0
1.029301920572914 2.0 2.0 2.0
1.050634602864581 2.0 2.0 2.0
1.071967285156247 2.0 2.0 2.0
1.093299967447914 2.0 2.0 2.0
1.114632649739581 2.0 2.0 2.0
1.135965332031247 2.0 2.0 2.0
1.157298014322913 2.0 2.0 2.0
1.17863069661458 2.0 2.0 2.0
1.199963378906247 2.0 2.0 2.0
1.221296061197913 2.0 2.0 2.0
1.24262874348958 2.0 2.0 2.0
1.263961425781246 2.0 2.0 2.0
1.285294108072913 2.0 2.0 2.0
1.306626790364579 2.0 2.0 2.0
1.327959472656246 2.0 2.0 2.0
1.349292154947912 2.0 2.0 2.0
1.370624837239579 2.0 2.0 2.0
1.391957519531245 2.0 2.0 2.0
1.413290201822912 2.0 2.0 2.0
1.434622884114579 2.0 2.0 2.0
1.455955566406245 2.0 2.0 2.0
1.477288248697912 2.0 2.0 2.0
1.498620930989578 2.0 2.0 2.0
1.519953613281245 2.0 2.0 2.0
1.541286295572911 2.0 2.0 2.0
1.562618977864578 2.0 2.0 2.0
1.583951660156244 2.0 2.0 2.0
1.605284342447911 2.0 2.0 2.0
1.626617024739577 2.0 2.0 2.0
1.647949707031244 2.0 2.0 2.0
1.66928238932291 2.0 2.0 2.0
1.690615071614577 2.0 2.0 2.0
1.711947753906244 2.0 2.0 2.0
1.73328043619791 2.0 2.0 2.0
1.754613118489577 2.0 2.0 2.0
1.775945800781243 2.0 2.0 2.0
1.79727848307291 2.0 2.0 2.0
1.818611165364576 2.0 2.0 2.0
1.839943847656243 2.0 2.0 2.0
1.861276529947909 2.0 2.0 2.0
1.882609212239576 2.0 2.0 2.0
1.903941894531243 2.0 2.0 2.0
1.925274576822909 2.0 2.0 2.0
1.946607259114575 2.0 2.0 2.0
1.967939941406242 2.0 2.0 2.0
1.989272623697909 2.0 2.0 2.0
1.99981689825654 2.0 2.0 2.0

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.MID)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -1.978606282552083 -1.978606282552083 -1.978606282552083
-1.957273600260416 -1.957273600260416 -1.957273600260416 -1.957273600260416
-1.93594091796875 -1.93594091796875 -1.93594091796875 -1.93594091796875
-1.914608235677083 -1.914608235677083 -1.914608235677083 -1.914608235677083
-1.893275553385417 -1.893275553385417 -1.893275553385417 -1.893275553385417
-1.87194287109375 -1.87194287109375 -1.87194287109375 -1.87194287109375
-1.850610188802083 -1.850610188802083 -1.850610188802083 -1.850610188802083
-1.829277506510417 -1.829277506510417 -1.829277506510417 -1.829277506510417
-1.80794482421875 -1.80794482421875 -1.80794482421875 -1.80794482421875
-1.786612141927083 -1.786612141927083 -1.786612141927083 -1.786612141927083
-1.765279459635417 -1.765279459635417 -1.765279459635417 -1.765279459635417
-1.74394677734375 -1.74394677734375 -1.74394677734375 -1.74394677734375
-1.722614095052083 -1.722614095052083 -1.722614095052083 -1.722614095052083
-1.701281412760417 -1.701281412760417 -1.701281412760417 -1.701281412760417
-1.67994873046875 -1.67994873046875 -1.67994873046875 -1.67994873046875
-1.658616048177083 -1.658616048177083 -1.658616048177083 -1.658616048177083
-1.637283365885417 -1.637283365885417 -1.637283365885417 -1.637283365885417
-1.61595068359375 -1.61595068359375 -1.61595068359375 -1.61595068359375
-1.594618001302083 -1.594618001302083 -1.594618001302083 -1.594618001302083
-1.573285319010417 -1.573285319010417 -1.573285319010417 -1.573285319010417
-1.55195263671875 -1.55195263671875 -1.55195263671875 -1.55195263671875
-1.530619954427083 -1.530619954427083 -1.530619954427083 -1.530619954427083
-1.509287272135417 -1.509287272135417 -1.509287272135417 -1.509287272135417
-1.48795458984375 -1.48795458984375 -1.48795458984375 -1.48795458984375
-1.466621907552084 -1.466621907552084 -1.466621907552084 -1.466621907552084
-1.445289225260417 -1.445289225260417 -1.445289225260417 -1.445289225260417
-1.42395654296875 -1.42395654296875 -1.42395654296875 -1.42395654296875
-1.402623860677084 -1.402623860677084 -1.402623860677084 -1.402623860677084
-1.381291178385417 -1.381291178385417 -1.381291178385417 -1.381291178385417
-1.35995849609375 -1.35995849609375 -1.35995849609375 -1.35995849609375
-1.338625813802083 -1.338625813802083 -1.338625813802083 -1.338625813802083
-1.317293131510417 -1.317293131510417 -1.317293131510417 -1.317293131510417
-1.29596044921875 -1.29596044921875 -1.29596044921875 -1.29596044921875
-1.274627766927084 -1.274627766927084 -1.274627766927084 -1.274627766927084
-1.253295084635417 -1.253295084635417 -1.253295084635417 -1.253295084635417
-1.23196240234375 -1.23196240234375 -1.23196240234375 -1.23196240234375
-1.210629720052084 -1.210629720052084 -1.210629720052084 -1.210629720052084
-1.189297037760417 -1.189297037760417 -1.189297037760417 -1.189297037760417
-1.16796435546875 -1.16796435546875 -1.16796435546875 -1.16796435546875
-1.146631673177084 -1.146631673177084 -1.146631673177084 -1.146631673177084
-1.125298990885417 -1.125298990885417 -1.125298990885417 -1.125298990885417
-1.10396630859375 -1.10396630859375 -1.10396630859375 -1.10396630859375
-1.082633626302084 -1.082633626302084 -1.082633626302084 -1.082633626302084
-1.061300944010417 -1.061300944010417 -1.061300944010417 -1.061300944010417
-1.039968261718751 -1.039968261718751 -1.039968261718751 -1.039968261718751
-1.018635579427084 -1.018635579427084 -1.018635579427084 -1.018635579427084
-0.9973028971354172 -0.9973028971354172 -0.9973028971354172 -0.9973028971354172
-0.9759702148437505 -0.9759702148437505 -0.9759702148437505 -0.9759702148437505
-0.9546375325520838 -0.9546375325520838 -0.9546375325520838 -0.9546375325520838
-0.9333048502604168 -0.9333048502604168 -0.9333048502604168 -0.9333048502604168
-0.9119721679687501 -0.9119721679687501 -0.9119721679687501 -0.9119721679687501
-0.8906394856770833 -0.8906394856770833 -0.8906394856770833 -0.8906394856770833
-0.8693068033854166 -0.8693068033854166 -0.8693068033854166 -0.8693068033854166
-0.8479741210937499 -0.8479741210937499 -0.8479741210937499 -0.8479741210937499
-0.8266414388020831 -0.8266414388020831 -0.8266414388020831 -0.8266414388020831
-0.8053087565104164 -0.8053087565104164 -0.8053087565104164 -0.8053087565104164
-0.7839760742187497 -0.7839760742187497 -0.7839760742187497 -0.7839760742187497
-0.7626433919270829 -0.7626433919270829 -0.7626433919270829 -0.7626433919270829
-0.7413107096354159 -0.7413107096354159 -0.7413107096354159 -0.7413107096354159
-0.7199780273437493 -0.7199780273437493 -0.7199780273437493 -0.7199780273437493
-0.6986453450520828 -0.6986453450520828 -0.6986453450520828 -0.6986453450520828
-0.6773126627604157 -0.6773126627604157 -0.6773126627604157 -0.6773126627604157
-0.6559799804687488 -0.6559799804687488 -0.6559799804687488 -0.6559799804687488
-0.6346472981770823 -0.6346472981770823 -0.6346472981770823 -0.6346472981770823
-0.6133146158854156 -0.6133146158854156 -0.6133146158854156 -0.6133146158854156
-0.5919819335937487 -0.5919819335937487 -0.5919819335937487 -0.5919819335937487
-0.5706492513020819 -0.5706492513020819 -0.5706492513020819 -0.5706492513020819
-0.5493165690104153 -0.5493165690104153 -0.5493165690104153 -0.5493165690104153
-0.5279838867187485 -0.5279838867187485 -0.5279838867187485 -0.5279838867187485
-0.5066512044270817 -0.5066512044270817 -0.5066512044270817 -0.5066512044270817
-0.4853185221354149 -0.4853185221354149 -0.4853185221354149 -0.4853185221354149
-0.4639858398437481 -0.4639858398437481 -0.4639858398437481 -0.4639858398437481
-0.4426531575520815 -0.4426531575520815 -0.4426531575520815 -0.4426531575520815
-0.4213204752604147 -0.4213204752604147 -0.4213204752604147 -0.4213204752604147
-0.3999877929687479 -0.3999877929687479 -0.3999877929687479 -0.3999877929687479
-0.3786551106770811 -0.3786551106770811 -0.3786551106770811 -0.3786551106770811
-0.3573224283854145 -0.3573224283854145 -0.3573224283854145 -0.3573224283854145
-0.3359897460937477 -0.3359897460937477 -0.3359897460937477 -0.3359897460937477
-0.3146570638020807 -0.3146570638020807 -0.3146570638020807 -0.3146570638020807
-0.2933243815104141 -0.2933243815104141 -0.2933243815104141 -0.2933243815104141
-0.2719916992187476 -0.2719916992187476 -0.2719916992187476 -0.2719916992187476
-0.2506590169270807 -0.2506590169270807 -0.2506590169270807 -0.2506590169270807
-0.2293263346354136 -0.2293263346354136 -0.2293263346354136 -0.2293263346354136
-0.2079936523437471 -0.2079936523437471 -0.2079936523437471 -0.2079936523437471
-0.1866609700520805 -0.1866609700520805 -0.1866609700520805 -0.1866609700520805
-0.1653282877604135 -0.1653282877604135 -0.1653282877604135 -0.1653282877604135
-0.1439956054687467 -0.1439956054687467 -0.1439956054687467 -0.1439956054687467
-0.1226629231770801 -0.1226629231770801 -0.1226629231770801 -0.1226629231770801
-0.1013302408854133 -0.1013302408854133 -0.1013302408854133 -0.1013302408854133
-0.07999755859374647 -0.07999755859374647 -0.07999755859374647 -0.07999755859374647
-0.05866487630207972 -0.05866487630207972 -0.05866487630207972 -0.05866487630207972
-0.0373321940104131 -0.0373321940104131 -0.0373321940104131 -0.0373321940104131
-0.01599951171874625 -0.01599951171874625 -0.01599951171874625 -0.01599951171874625
0.005333170572920487 0.005333170572920487 0.005333170572920487 0.005333170572920487
0.026665852864587 0.026665852864587 0.026665852864587 0.026665852864587
0.04799853515625363 0.04799853515625363 0.04799853515625363 0.04799853515625363
0.06933121744792015 0.06933121744792015 0.06933121744792015 0.06933121744792015
0.09066389973958666 0.09066389973958666 0.09066389973958666 0.09066389973958666
0.1119965820312533 0.1119965820312533 0.1119965820312533 0.1119965820312533
0.1333292643229198 0.1333292643229198 0.1333292643229198 0.1333292643229198
0.1546619466145862 0.1546619466145862 0.1546619466145862 0.1546619466145862
0.1759946289062527 0.1759946289062527 0.1759946289062527 0.1759946289062527
0.1973273111979195 0.1973273111979195 0.1973273111979195 0.1973273111979195
0.2186599934895859 0.2186599934895859 0.2186599934895859 0.2186599934895859
0.2399926757812524 0.2399926757812524 0.2399926757812524 0.2399926757812524
0.261325358072919 0.261325358072919 0.261325358072919 0.261325358072919
0.2826580403645855 0.2826580403645855 0.2826580403645855 0.2826580403645855
0.303990722656252 0.303990722656252 0.303990722656252 0.303990722656252
0.3253234049479187 0.3253234049479187 0.3253234049479187 0.3253234049479187
0.3466560872395852 0.3466560872395852 0.3466560872395852 0.3466560872395852
0.3679887695312516 0.3679887695312516 0.3679887695312516 0.3679887695312516
0.3893214518229181 0.3893214518229181 0.3893214518229181 0.3893214518229181
0.4106541341145848 0.4106541341145848 0.4106541341145848 0.4106541341145848
0.4319868164062513 0.4319868164062513 0.4319868164062513 0.4319868164062513
0.4533194986979177 0.4533194986979177 0.4533194986979177 0.4533194986979177
0.4746521809895844 0.4746521809895844 0.4746521809895844 0.4746521809895844
0.4959848632812509 0.4959848632812509 0.4959848632812509 0.4959848632812509
0.5173175455729173 0.5173175455729173 0.5173175455729173 0.5173175455729173
0.5386502278645841 0.5386502278645841 0.5386502278645841 0.5386502278645841
0.5599829101562506 0.5599829101562506 0.5599829101562506 0.5599829101562506
0.581315592447917 0.581315592447917 0.581315592447917 0.581315592447917
0.6026482747395835 0.6026482747395835 0.6026482747395835 0.6026482747395835
0.6239809570312501 0.6239809570312501 0.6239809570312501 0.6239809570312501
0.6453136393229166 0.6453136393229166 0.6453136393229166 0.6453136393229166
0.6666463216145831 0.6666463216145831 0.6666463216145831 0.6666463216145831
0.6879790039062498 0.6879790039062498 0.6879790039062498 0.6879790039062498
0.7093116861979163 0.7093116861979163 0.7093116861979163 0.7093116861979163
0.7306443684895827 0.7306443684895827 0.7306443684895827 0.7306443684895827
0.7519770507812495 0.7519770507812495 0.7519770507812495 0.7519770507812495
0.773309733072916 0.773309733072916 0.773309733072916 0.773309733072916
0.7946424153645824 0.7946424153645824 0.7946424153645824 0.7946424153645824
0.8159750976562488 0.8159750976562488 0.8159750976562488 0.8159750976562488
0.8373077799479155 0.8373077799479155 0.8373077799479155 0.8373077799479155
0.858640462239582 0.858640462239582 0.858640462239582 0.858640462239582
0.8799731445312485 0.8799731445312485 0.8799731445312485 0.8799731445312485
0.9013058268229152 0.9013058268229152 0.9013058268229152 0.9013058268229152
0.9226385091145817 0.9226385091145817 0.9226385091145817 0.9226385091145817
0.9439711914062482 0.9439711914062482 0.9439711914062482 0.9439711914062482
0.9653038736979148 0.9653038736979148 0.9653038736979148 0.9653038736979148
0.9866365559895813 0.9866365559895813 0.9866365559895813 0.9866365559895813
1.007969238281248 1.007969238281248 1.007969238281248 1.007969238281248
1.029301920572914 1.029301920572914 1.029301920572914 1.029301920572914
1.050634602864581 1.050634602864581 1.050634602864581 1.050634602864581
1.071967285156247 1.071967285156247 1.071967285156247 1.071967285156247
1.093299967447914 1.093299967447914 1.093299967447914 1.093299967447914
1.114632649739581 1.114632649739581 1.114632649739581 1.114632649739581
1.135965332031247 1.135965332031247 1.135965332031247 1.135965332031247
1.157298014322913 1.157298014322913 1.157298014322913 1.157298014322913
1.17863069661458 1.17863069661458 1.17863069661458 1.17863069661458
1.199963378906247 1.199963378906247 1.199963378906247 1.199963378906247
1.221296061197913 1.221296061197913 1.221296061197913 1.221296061197913
1.24262874348958 1.24262874348958 1.24262874348958 1.24262874348958
1.263961425781246 1.263961425781246 1.263961425781246 1.263961425781246
1.285294108072913 1.285294108072913 1.285294108072913 1.285294108072913
1.306626790364579 1.306626790364579 1.306626790364579 1.306626790364579
1.327959472656246 1.327959472656246 1.327959472656246 1.327959472656246
1.349292154947912 1.349292154947912 1.349292154947912 1.349292154947912
1.370624837239579 1.370624837239579 1.370624837239579 1.370624837239579
1.391957519531245 1.391957519531245 1.391957519531245 1.391957519531245
1.413290201822912 1.413290201822912 1.413290201822912 1.413290201822912
1.434622884114579 1.434622884114579 1.434622884114579 1.434622884114579
1.455955566406245 1.455955566406245 1.455955566406245 1.455955566406245
1.477288248697912 1.477288248697912 1.477288248697912 1.477288248697912
1.498620930989578 1.498620930989578 1.498620930989578 1.498620930989578
1.519953613281245 1.519953613281245 1.519953613281245 1.519953613281245
1.541286295572911 1.541286295572911 1.541286295572911 1.541286295572911
1.562618977864578 1.562618977864578 1.562618977864578 1.562618977864578
1.583951660156244 1.583951660156244 1.583951660156244 1.583951660156244
1.605284342447911 1.605284342447911 1.605284342447911 1.605284342447911
1.626617024739577 1.626617024739577 1.626617024739577 1.626617024739577
1.647949707031244 1.647949707031244 1.647949707031244 1.647949707031244
1.66928238932291 1.66928238932291 1.66928238932291 1.66928238932291
1.690615071614577 1.690615071614577 1.690615071614577 1.690615071614577
1.711947753906244 1.711947753906244 1.711947753906244 1.711947753906244
1.73328043619791 1.73328043619791 1.73328043619791 1.73328043619791
1.754613118489577 1.754613118489577 1.754613118489577 1.754613118489577
1.775945800781243 1.775945800781243 1.775945800781243 1.775945800781243
1.79727848307291 1.79727848307291 1.79727848307291 1.79727848307291
1.818611165364576 1.818611165364576 1.818611165364576 1.818611165364576
1.839943847656243 1.839943847656243 1.839943847656243 1.839943847656243
1.861276529947909 1.861276529947909 1.861276529947909 1.861276529947909
1.882609212239576 1.882609212239576 1.882609212239576 1.882609212239576
1.903941894531243 1.903941894531243 1.903941894531243 1.903941894531243
1.925274576822909 1.925274576822909 1.925274576822909 1.925274576822909
1.946607259114575 1.946607259114575 1.946607259114575 1.946607259114575
1.967939941406242 1.967939941406242 1.967939941406242 1.967939941406242
1.989272623697909 1.989272623697909 1.989272623697909 1.989272623697909
1.99981689825654 1.99981689825654 1.99981689825654 1.99981689825654

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.MIN)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -3.0 -3.0 -3.0
-1.957273600260416 -3.0 -3.0 -3.0
-1.93594091796875 -3.0 -3.0 -3.0
-1.914608235677083 -3.0 -3.0 -3.0
-1.893275553385417 -3.0 -3.0 -3.0
-1.87194287109375 -3.0 -3.0 -3.0
-1.850610188802083 -3.0 -3.0 -3.0
-1.829277506510417 -3.0 -3.0 -3.0
-1.80794482421875 -3.0 -3.0 -3.0
-1.786612141927083 -3.0 -3.0 -3.0
-1.765279459635417 -3.0 -3.0 -3.0
-1.74394677734375 -3.0 -3.0 -3.0
-1.722614095052083 -3.0 -3.0 -3.0
-1.701281412760417 -3.0 -3.0 -3.0
-1.67994873046875 -3.0 -3.0 -3.0
-1.658616048177083 -3.0 -3.0 -3.0
-1.637283365885417 -3.0 -3.0 -3.0
-1.61595068359375 -3.0 -3.0 -3.0
-1.594618001302083 -3.0 -3.0 -3.0
-1.573285319010417 -3.0 -3.0 -3.0
-1.55195263671875 -3.0 -3.0 -3.0
-1.530619954427083 -3.0 -3.0 -3.0
-1.509287272135417 -3.0 -3.0 -3.0
-1.48795458984375 -3.0 -3.0 -3.0
-1.466621907552084 -3.0 -3.0 -3.0
-1.445289225260417 -3.0 -3.0 -3.0
-1.42395654296875 -3.0 -3.0 -3.0
-1.402623860677084 -3.0 -3.0 -3.0
-1.381291178385417 -3.0 -3.0 -3.0
-1.35995849609375 -3.0 -3.0 -3.0
-1.338625813802083 -3.0 -3.0 -3.0
-1.317293131510417 -3.0 -3.0 -3.0
-1.29596044921875 -3.0 -3.0 -3.0
-1.274627766927084 -3.0 -3.0 -3.0
-1.253295084635417 -3.0 -3.0 -3.0
-1.23196240234375 -3.0 -3.0 -3.0
-1.210629720052084 -3.0 -3.0 -3.0
-1.189297037760417 -3.0 -3.0 -3.0
-1.16796435546875 -3.0 -3.0 -3.0
-1.146631673177084 -3.0 -3.0 -3.0
-1.125298990885417 -3.0 -3.0 -3.0
-1.10396630859375 -3.0 -3.0 -3.0
-1.082633626302084 -3.0 -3.0 -3.0
-1.061300944010417 -3.0 -3.0 -3.0
-1.039968261718751 -3.0 -3.0 -3.0
-1.018635579427084 -3.0 -3.0 -3.0
-0.9973028971354172 -3.0 -3.0 -3.0
-0.9759702148437505 -3.0 -3.0 -3.0
-0.9546375325520838 -3.0 -3.0 -3.0
-0.9333048502604168 -3.0 -3.0 -3.0
-0.9119721679687501 -3.0 -3.0 -3.0
-0.8906394856770833 -3.0 -3.0 -3.0
-0.8693068033854166 -3.0 -3.0 -3.0
-0.8479741210937499 -3.0 -3.0 -3.0
-0.8266414388020831 -3.0 -3.0 -3.0
-0.8053087565104164 -3.0 -3.0 -3.0
-0.7839760742187497 -3.0 -3.0 -3.0
-0.7626433919270829 -3.0 -3.0 -3.0
-0.7413107096354159 -3.0 -3.0 -3.0
-0.7199780273437493 -3.0 -3.0 -3.0
-0.6986453450520828 -3.0 -3.0 -3.0
-0.6773126627604157 -3.0 -3.0 -3.0
-0.6559799804687488 -3.0 -3.0 -3.0
-0.6346472981770823 -3.0 -3.0 -3.0
-0.6133146158854156 -3.0 -3.0 -3.0
-0.5919819335937487 -3.0 -3.0 -3.0
-0.5706492513020819 -3.0 -3.0 -3.0
-0.5493165690104153 -3.0 -3.0 -3.0
-0.5279838867187485 -3.0 -3.0 -3.0
-0.5066512044270817 -3.0 -3.0 -3.0
-0.4853185221354149 -3.0 -3.0 -3.0
-0.4639858398437481 -3.0 -3.0 -3.0
-0.4426531575520815 -3.0 -3.0 -3.0
-0.4213204752604147 -3.0 -3.0 -3.0
-0.3999877929687479 -3.0 -3.0 -3.0
-0.3786551106770811 -3.0 -3.0 -3.0
-0.3573224283854145 -3.0 -3.0 -3.0
-0.3359897460937477 -3.0 -3.0 -3.0
-0.3146570638020807 -3.0 -3.0 -3.0
-0.2933243815104141 -3.0 -3.0 -3.0
-0.2719916992187476 -3.0 -3.0 -3.0
-0.2506590169270807 -3.0 -3.0 -3.0
-0.2293263346354136 -3.0 -3.0 -3.0
-0.2079936523437471 -3.0 -3.0 -3.0
-0.1866609700520805 -3.0 -3.0 -3.0
-0.1653282877604135 -3.0 -3.0 -3.0
-0.1439956054687467 -3.0 -3.0 -3.0
-0.1226629231770801 -3.0 -3.0 -3.0
-0.1013302408854133 -3.0 -3.0 -3.0
-0.07999755859374647 -3.0 -3.0 -3.0
-0.05866487630207972 -3.0 -3.0 -3.0
-0.0373321940104131 -3.0 -3.0 -3.0
-0.01599951171874625 -3.0 -3.0 -3.0
0.005333170572920487 -3.0 -3.0 -3.0
0.026665852864587 -3.0 -3.0 -3.0
0.04799853515625363 -3.0 -3.0 -3.0
0.06933121744792015 -3.0 -3.0 -3.0
0.09066389973958666 -3.0 -3.0 -3.0
0.1119965820312533 -3.0 -3.0 -3.0
0.1333292643229198 -3.0 -3.0 -3.0
0.1546619466145862 -3.0 -3.0 -3.0
0.1759946289062527 -3.0 -3.0 -3.0
0.1973273111979195 -3.0 -3.0 -3.0
0.2186599934895859 -3.0 -3.0 -3.0
0.2399926757812524 -3.0 -3.0 -3.0
0.261325358072919 -3.0 -3.0 -3.0
0.2826580403645855 -3.0 -3.0 -3.0
0.303990722656252 -3.0 -3.0 -3.0
0.3253234049479187 -3.0 -3.0 -3.0
0.3466560872395852 -3.0 -3.0 -3.0
0.3679887695312516 -3.0 -3.0 -3.0
0.3893214518229181 -3.0 -3.0 -3.0
0.4106541341145848 -3.0 -3.0 -3.0
0.4319868164062513 -3.0 -3.0 -3.0
0.4533194986979177 -3.0 -3.0 -3.0
0.4746521809895844 -3.0 -3.0 -3.0
0.4959848632812509 -3.0 -3.0 -3.0
0.5173175455729173 -3.0 -3.0 -3.0
0.5386502278645841 -3.0 -3.0 -3.0
0.5599829101562506 -3.0 -3.0 -3.0
0.581315592447917 -3.0 -3.0 -3.0
0.6026482747395835 -3.0 -3.0 -3.0
0.6239809570312501 -3.0 -3.0 -3.0
0.6453136393229166 -3.0 -3.0 -3.0
0.6666463216145831 -3.0 -3.0 -3.0
0.6879790039062498 -3.0 -3.0 -3.0
0.7093116861979163 -3.0 -3.0 -3.0
0.7306443684895827 -3.0 -3.0 -3.0
0.7519770507812495 -3.0 -3.0 -3.0
0.773309733072916 -3.0 -3.0 -3.0
0.7946424153645824 -3.0 -3.0 -3.0
0.8159750976562488 -3.0 -3.0 -3.0
0.8373077799479155 -3.0 -3.0 -3.0
0.858640462239582 -3.0 -3.0 -3.0
0.8799731445312485 -3.0 -3.0 -3.0
0.9013058268229152 -3.0 -3.0 -3.0
0.9226385091145817 -3.0 -3.0 -3.0
0.9439711914062482 -3.0 -3.0 -3.0
0.9653038736979148 -3.0 -3.0 -3.0
0.9866365559895813 -3.0 -3.0 -3.0
1.007969238281248 -3.0 -3.0 -3.0
1.029301920572914 -3.0 -3.0 -3.0
1.050634602864581 -3.0 -3.0 -3.0
1.071967285156247 -3.0 -3.0 -3.0
1.093299967447914 -3.0 -3.0 -3.0
1.114632649739581 -3.0 -3.0 -3.0
1.135965332031247 -3.0 -3.0 -3.0
1.157298014322913 -3.0 -3.0 -3.0
1.17863069661458 -3.0 -3.0 -3.0
1.199963378906247 -3.0 -3.0 -3.0
1.221296061197913 -3.0 -3.0 -3.0
1.24262874348958 -3.0 -3.0 -3.0
1.263961425781246 -3.0 -3.0 -3.0
1.285294108072913 -3.0 -3.0 -3.0
1.306626790364579 -3.0 -3.0 -3.0
1.327959472656246 -3.0 -3.0 -3.0
1.349292154947912 -3.0 -3.0 -3.0
1.370624837239579 -3.0 -3.0 -3.0
1.391957519531245 -3.0 -3.0 -3.0
1.413290201822912 -3.0 -3.0 -3.0
1.434622884114579 -3.0 -3.0 -3.0
1.455955566406245 -3.0 -3.0 -3.0
1.477288248697912 -3.0 -3.0 -3.0
1.498620930989578 -3.0 -3.0 -3.0
1.519953613281245 -3.0 -3.0 -3.0
1.541286295572911 -3.0 -3.0 -3.0
1.562618977864578 -3.0 -3.0 -3.0
1.583951660156244 -3.0 -3.0 -3.0
1.605284342447911 -3.0 -3.0 -3.0
1.626617024739577 -3.0 -3.0 -3.0
1.647949707031244 -3.0 -3.0 -3.0
1.66928238932291 -3.0 -3.0 -3.0
1.690615071614577 -3.0 -3.0 -3.0
1.711947753906244 -3.0 -3.0 -3.0
1.73328043619791 -3.0 -3.0 -3.0
1.754613118489577 -3.0 -3.0 -3.0
1.775945800781243 -3.0 -3.0 -3.0
1.79727848307291 -3.0 -3.0 -3.0
1.818611165364576 -3.0 -3.0 -3.0
1.839943847656243 -3.0 -3.0 -3.0
1.861276529947909 -3.0 -3.0 -3.0
1.882609212239576 -3.0 -3.0 -3.0
1.903941894531243 -3.0 -3.0 -3.0
1.925274576822909 -3.0 -3.0 -3.0
1.946607259114575 -3.0 -3.0 -3.0
1.967939941406242 -3.0 -3.0 -3.0
1.989272623697909 -3.0 -3.0 -3.0
1.99981689825654 -3.0 -3.0 -3.0

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.MUL_DIV)

View File

@ -0,0 +1,188 @@
-1.978606282552083 1.319070855034722 2.967909423828125 3.032437556127117
-1.957273600260416 1.304849066840278 2.935910400390625 3.065488646657113
-1.93594091796875 1.290627278645833 2.903911376953125 3.099268135876475
-1.914608235677083 1.276405490451389 2.871912353515625 3.133800371373706
-1.893275553385417 1.262183702256945 2.839913330078125 3.169110798093409
-1.87194287109375 1.2479619140625 2.807914306640625 3.205226020863706
-1.850610188802083 1.233740125868056 2.775915283203125 3.242173871248301
-1.829277506510417 1.219518337673611 2.743916259765625 3.279983479076269
-1.80794482421875 1.205296549479167 2.711917236328125 3.318685349035872
-1.786612141927083 1.191074761284722 2.679918212890625 3.358311442755703
-1.765279459635417 1.176852973090278 2.647919189453125 3.398895266837343
-1.74394677734375 1.162631184895833 2.615920166015625 3.440471967349115
-1.722614095052083 1.148409396701389 2.583921142578125 3.483078431341054
-1.701281412760417 1.134187608506944 2.551922119140625 3.526753395997368
-1.67994873046875 1.1199658203125 2.519923095703125 3.571537566105271
-1.658616048177083 1.105744032118056 2.487924072265625 3.617473740588941
-1.637283365885417 1.091522243923611 2.455925048828125 3.664606948935376
-1.61595068359375 1.077300455729167 2.423926025390625 3.712984598426272
-1.594618001302083 1.063078667534722 2.391927001953125 3.762656633187828
-1.573285319010417 1.048856879340278 2.359927978515625 3.813675706180205
-1.55195263671875 1.034635091145834 2.327928955078125 3.866097365371685
-1.530619954427083 1.020413302951389 2.295929931640625 3.919980255481395
-1.509287272135417 1.006191514756945 2.263930908203125 3.975386336830955
-1.48795458984375 0.9919697265625 2.231931884765625 4.032381123022081
-1.466621907552084 0.9777479383680557 2.199932861328126 4.091033939356946
-1.445289225260417 0.9635261501736112 2.167933837890625 4.151418204144504
-1.42395654296875 0.9493043619791669 2.135934814453126 4.213611735292734
-1.402623860677084 0.9350825737847224 2.103935791015625 4.277697084878937
-1.381291178385417 0.9208607855902779 2.071936767578125 4.343761904722627
-1.35995849609375 0.9066389973958335 2.039937744140626 4.411899346365335
-1.338625813802083 0.892417209201389 2.007938720703125 4.48220849929546
-1.317293131510417 0.8781954210069445 1.975939697265625 4.554794871753685
-1.29596044921875 0.8639736328125002 1.943940673828125 4.629770919025352
-1.274627766927084 0.8497518446180559 1.911941650390626 4.707256624783096
-1.253295084635417 0.8355300564236114 1.879942626953126 4.787380141800681
-1.23196240234375 0.8213082682291667 1.847943603515625 4.870278499234461
-1.210629720052084 0.8070864800347225 1.815944580078126 4.956098384683525
-1.189297037760417 0.7928646918402782 1.783945556640626 5.044997010417758
-1.16796435546875 0.7786429036458334 1.751946533203125 5.137143074534978
-1.146631673177084 0.764421115451389 1.719947509765625 5.232717829410047
-1.125298990885417 0.7501993272569448 1.687948486328126 5.331916271673744
-1.10396630859375 0.7359775390625002 1.655949462890626 5.434948470160194
-1.082633626302084 0.721755750868056 1.623950439453126 5.542041050853005
-1.061300944010417 0.7075339626736113 1.591951416015626 5.653438860920402
-1.039968261718751 0.6933121744791672 1.559952392578126 5.769406837554666
-1.018635579427084 0.6790903862847225 1.527953369140626 5.890232111639581
-0.9973028971354172 0.6648685980902781 1.495954345703126 6.016226381407273
-0.9759702148437505 0.6506468098958337 1.463955322265626 6.147728597394317
-0.9546375325520838 0.6364250217013891 1.431956298828126 6.285108007391956
-0.9333048502604168 0.6222032335069446 1.399957275390625 6.428767618989487
-0.9119721679687501 0.6079814453125001 1.367958251953125 6.579148148088657
-0.8906394856770833 0.5937596571180555 1.335959228515625 6.736732534869225
-0.8693068033854166 0.5795378689236111 1.303960205078125 6.902051124681966
-0.8479741210937499 0.5653160807291666 1.271961181640625 7.075687630963274
-0.8266414388020831 0.5510942925347221 1.239962158203125 7.258286021439748
-0.8053087565104164 0.5368725043402776 1.207963134765625 7.45055849882888
-0.7839760742187497 0.5226507161458331 1.175964111328125 7.653294784511298
-0.7626433919270829 0.5084289279513886 1.143965087890624 7.867372960301827
-0.7413107096354159 0.4942071397569439 1.111966064453124 8.09377218218102
-0.7199780273437493 0.4799853515624995 1.079967041015624 8.333587654245642
-0.6986453450520828 0.4657635633680552 1.047968017578124 8.588048345978331
-0.6773126627604157 0.4515417751736105 1.015968994140624 8.858538057662694
-0.6559799804687488 0.4373199869791659 0.9839699707031233 9.146620596123272
-0.6346472981770823 0.4230981987847215 0.9519709472656235 9.454070027925734
-0.6133146158854156 0.4088764105902771 0.9199719238281235 9.782907246288367
-0.5919819335937487 0.3946546223958325 0.8879729003906231 10.13544444435282
-0.5706492513020819 0.3804328342013879 0.8559738769531229 10.51433956376788
-0.5493165690104153 0.3662110460069435 0.8239748535156227 10.92266343032198
-0.5279838867187485 0.351989257812499 0.7919758300781227 11.36398316488044
-0.5066512044270817 0.3377674696180544 0.7599768066406225 11.84246666655962
-0.4853185221354149 0.32354568142361 0.7279777832031225 12.36301465190291
-0.4639858398437481 0.3093238932291654 0.6959787597656222 12.93142911865707
-0.4426531575520815 0.2951021050347209 0.6639797363281222 13.55463052196585
-0.4213204752604147 0.2808803168402765 0.6319807128906221 14.24094092814134
-0.3999877929687479 0.2666585286458319 0.5999816894531218 15.00045777764222
-0.3786551106770811 0.2524367404513874 0.5679826660156218 15.84555399046714
-0.3573224283854145 0.238214952256943 0.5359836425781217 16.79155721377862
-0.3359897460937477 0.2239931640624985 0.5039846191406214 17.85768783052648
-0.3146570638020807 0.2097713758680538 0.4719855957031211 19.06837853090119
-0.2933243815104141 0.1955495876736094 0.4399865722656211 20.45516969678492
-0.2719916992187476 0.181327799479165 0.4079875488281213 22.05949673182688
-0.2506590169270807 0.1671060112847205 0.375988525390621 23.93690070900367
-0.2293263346354136 0.1528842230902757 0.3439895019531205 26.16358914705059
-0.2079936523437471 0.1386624348958314 0.3119904785156207 28.84703418777375
-0.1866609700520805 0.124440646701387 0.2799914550781208 32.14383809494793
-0.1653282877604135 0.1102188585069424 0.2479924316406203 36.29143010719942
-0.1439956054687467 0.09599707031249778 0.21599340820312 41.66793827122913
-0.1226629231770801 0.08177528211805337 0.1839943847656201 48.91453623144307
-0.1013302408854133 0.06755349392360888 0.15199536132812 59.21233333279988
-0.07999755859374647 0.05333170572916432 0.1199963378906197 75.00228888821401
-0.05866487630207972 0.03910991753471982 0.08799731445311959 102.27584848393
-0.0373321940104131 0.0248881293402754 0.05599829101561965 160.7191904747526
-0.01599951171874625 0.01066634114583084 0.02399926757811937 375.0114444411414
0.005333170572920487 -0.003555447048613658 -0.007999755859380731 -1125.034333322355
0.026665852864587 -0.017777235243058 -0.03999877929688051 -225.0068666646011
0.04799853515625363 -0.03199902343750241 -0.07199780273438044 -125.003814813675
0.06933121744792015 -0.04622081163194677 -0.1039968261718802 -86.54110256331569
0.09066389973958666 -0.06044259982639111 -0.13599584960938 -66.17849019547759
0.1119965820312533 -0.07466438802083553 -0.1679948730468799 -53.5730634915775
0.1333292643229198 -0.08888617621527988 -0.1999938964843797 -45.00137333292536
0.1546619466145862 -0.1031079644097241 -0.2319929199218793 -38.79428735597033
0.1759946289062527 -0.1173297526041685 -0.2639919433593791 -34.0919494946407
0.1973273111979195 -0.131551540798613 -0.2959909667968792 -30.40633333305796
0.2186599934895859 -0.1457733289930573 -0.3279899902343788 -27.43986178836945
0.2399926757812524 -0.1599951171875016 -0.3599890136718786 -25.00076296273665
0.261325358072919 -0.174216905381946 -0.3919880371093785 -22.95988435353368
0.2826580403645855 -0.1884386935763903 -0.4239870605468782 -21.22706289288966
0.303990722656252 -0.2026604817708347 -0.4559860839843781 -19.73744444426584
0.3253234049479187 -0.2168822699652791 -0.487985107421878 -18.44318579218285
0.3466560872395852 -0.2311040581597235 -0.5199841308593777 -17.30822051266392
0.3679887695312516 -0.2453258463541677 -0.5519831542968774 -16.30484541048052
0.3893214518229181 -0.2595476345486121 -0.5839821777343772 -15.41142922360488
0.4106541341145848 -0.2737694227430565 -0.615981201171877 -14.61083549770333
0.4319868164062513 -0.2879912109375009 -0.6479802246093769 -13.88931275707601
0.4533194986979177 -0.3022129991319451 -0.6799792480468767 -13.23569803909597
0.4746521809895844 -0.3164347873263896 -0.7119782714843765 -12.64083520587818
0.4959848632812509 -0.3306565755208339 -0.7439772949218764 -12.09714336906622
0.5173175455729173 -0.3448783637152782 -0.775976318359376 -11.59829209611504
0.5386502278645841 -0.3591001519097227 -0.807975341796876 -11.1389537952788
0.5599829101562506 -0.373321940104167 -0.8399743652343759 -10.7146126983158
0.581315592447917 -0.3875437282986113 -0.8719733886718755 -10.32141590204734
0.6026482747395835 -0.4017655164930557 -0.9039724121093753 -9.956056047107612
0.6239809570312501 -0.4159873046875001 -0.9359714355468752 -9.615678062591114
0.6453136393229166 -0.4302090928819444 -0.967970458984375 -9.297804407629426
0.6666463216145831 -0.4444308810763888 -0.9999694824218748 -9.000274666585286
0.6879790039062498 -0.4586526692708332 -1.031968505859375 -8.721196382350085
0.7093116861979163 -0.4728744574652775 -1.063967529296874 -8.458904761828279
0.7306443684895827 -0.4870962456597218 -1.095966552734374 -8.211929440315048
0.7519770507812495 -0.5013180338541662 -1.127965576171874 -7.978966903001144
0.773309733072916 -0.5155398220486106 -1.159964599609374 -7.758857471194218
0.7946424153645824 -0.5297616102430549 -1.191963623046874 -7.550565995457462
0.8159750976562488 -0.5439833984374992 -1.223962646484373 -7.353165577275569
0.8373077799479155 -0.5582051866319437 -1.255961669921873 -7.165823779128421
0.858640462239582 -0.5724269748263881 -1.287960693359373 -6.987790890205977
0.8799731445312485 -0.5866487630208324 -1.319959716796873 -6.818389898928257
0.9013058268229152 -0.6008705512152767 -1.351958740234373 -6.657007889486168
0.9226385091145817 -0.6150923394097211 -1.383957763671873 -6.503088631925795
0.9439711914062482 -0.6293141276041654 -1.415956787109372 -6.356126176967021
0.9653038736979148 -0.6435359157986099 -1.447955810546872 -6.21565930012797
0.9866365559895813 -0.6577577039930542 -1.479954833984372 -6.081266666611691
1.007969238281248 -0.6719794921874986 -1.511953857421872 -5.952562610175466
1.029301920572914 -0.6862012803819427 -1.543952880859371 -5.829193436907581
1.050634602864581 -0.7004230685763874 -1.575951904296871 -5.710834179305396
1.071967285156247 -0.7146448567708315 -1.607950927734371 -5.597185737926186
1.093299967447914 -0.7288666449652759 -1.639949951171871 -5.487972357673968
1.114632649739581 -0.7430884331597204 -1.671948974609371 -5.382939393890733
1.135965332031247 -0.7573102213541647 -1.703947998046871 -5.281851330155697
1.157298014322913 -0.771532009548609 -1.73594702148437 -5.184490015314118
1.17863069661458 -0.7857537977430535 -1.76794604492187 -5.090653091960015
1.199963378906247 -0.7999755859374979 -1.79994506835937 -5.000152592547393
1.221296061197913 -0.814197374131942 -1.83194409179687 -4.912813682633903
1.24262874348958 -0.8284191623263863 -1.863943115234369 -4.828473533575811
1.263961425781246 -0.8426409505208309 -1.89594213867187 -4.746980309380437
1.285294108072913 -0.8568627387152752 -1.927941162109369 -4.668192254452962
1.306626790364579 -0.8710845269097195 -1.959940185546869 -4.591976870706792
1.327959472656246 -0.885306315104164 -1.991939208984369 -4.51821017398861
1.349292154947912 -0.8995281032986084 -2.023938232421869 -4.446776021040174
1.370624837239579 -0.9137498914930525 -2.055937255859368 -4.377565499311923
1.391957519531245 -0.9279716796874968 -2.087936279296868 -4.310476372885687
1.413290201822912 -0.9421934678819413 -2.119935302734368 -4.245412578577977
1.434622884114579 -0.9564152560763857 -2.151934326171868 -4.182283767000611
1.455955566406245 -0.97063704427083 -2.183933349609367 -4.121004883967635
1.477288248697912 -0.9848588324652745 -2.215932373046868 -4.061495788170268
1.498620930989578 -0.9990806206597188 -2.247931396484367 -4.003680901505923
1.519953613281245 -1.013302408854163 -2.279930419921867 -3.947488888853209
1.541286295572911 -1.027524197048608 -2.311929443359367 -3.892852364440015
1.562618977864578 -1.041745985243052 -2.343928466796867 -3.83970762226336
1.583951660156244 -1.055967773437496 -2.375927490234366 -3.787994388293483
1.605284342447911 -1.07018956163194 -2.407926513671866 -3.737655592435763
1.626617024739577 -1.084411349826385 -2.439925537109366 -3.688637158436605
1.647949707031244 -1.098633138020829 -2.471924560546866 -3.640887810107329
1.66928238932291 -1.112854926215274 -2.503923583984365 -3.594358892406277
1.690615071614577 -1.127076714409718 -2.535922607421866 -3.549004206066765
1.711947753906244 -1.141298502604162 -2.567921630859365 -3.504779854589298
1.73328043619791 -1.155520290798607 -2.599920654296865 -3.461644102532815
1.754613118489577 -1.169742078993051 -2.631919677734365 -3.419557244143358
1.775945800781243 -1.183963867187495 -2.663918701171865 -3.378481481450945
1.79727848307291 -1.19818565538194 -2.695917724609364 -3.338380811047967
1.818611165364576 -1.212407443576384 -2.727916748046864 -3.299220918836261
1.839943847656243 -1.226629231770828 -2.759915771484364 -3.26096908209613
1.861276529947909 -1.240851019965273 -2.791914794921864 -3.223594078289871
1.882609212239576 -1.255072808159717 -2.823913818359364 -3.187066100065624
1.903941894531243 -1.269294596354162 -2.855912841796864 -3.151356675975252
1.925274576822909 -1.283516384548606 -2.887911865234363 -3.116438596463061
1.946607259114575 -1.29773817274305 -2.919910888671863 -3.082285844721
1.967939941406242 -1.311959960937495 -2.951909912109363 -3.048873532041097
1.989272623697909 -1.326181749131939 -2.983908935546863 -3.01617783732752
1.99981689825654 -1.33321126550436 -2.99972534738481 -3.000274677762178

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.OFFSET_SCALE)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -0.06418115234374988 -9.957212565104166 1.978606282552083
-1.957273600260416 -0.1281791992187504 -9.914547200520833 1.957273600260416
-1.93594091796875 -0.1921772460937503 -9.871881835937501 1.93594091796875
-1.914608235677083 -0.2561752929687495 -9.829216471354167 1.914608235677083
-1.893275553385417 -0.3201733398437494 -9.786551106770833 1.893275553385417
-1.87194287109375 -0.3841713867187506 -9.7438857421875 1.87194287109375
-1.850610188802083 -0.4481694335937498 -9.701220377604166 1.850610188802083
-1.829277506510417 -0.5121674804687498 -9.658555013020834 1.829277506510417
-1.80794482421875 -0.5761655273437503 -9.6158896484375 1.80794482421875
-1.786612141927083 -0.6401635742187501 -9.573224283854167 1.786612141927083
-1.765279459635417 -0.70416162109375 -9.530558919270833 1.765279459635417
-1.74394677734375 -0.7681596679687505 -9.487893554687499 1.74394677734375
-1.722614095052083 -0.8321577148437505 -9.445228190104167 1.722614095052083
-1.701281412760417 -0.8961557617187497 -9.402562825520834 1.701281412760417
-1.67994873046875 -0.9601538085937495 -9.3598974609375 1.67994873046875
-1.658616048177083 -1.02415185546875 -9.317232096354166 1.658616048177083
-1.637283365885417 -1.08814990234375 -9.274566731770832 1.637283365885417
-1.61595068359375 -1.152147949218749 -9.231901367187501 1.61595068359375
-1.594618001302083 -1.21614599609375 -9.189236002604167 1.594618001302083
-1.573285319010417 -1.28014404296875 -9.146570638020833 1.573285319010417
-1.55195263671875 -1.344142089843749 -9.103905273437501 1.55195263671875
-1.530619954427083 -1.40814013671875 -9.061239908854166 1.530619954427083
-1.509287272135417 -1.472138183593749 -9.018574544270834 1.509287272135417
-1.48795458984375 -1.53613623046875 -8.9759091796875 1.48795458984375
-1.466621907552084 -1.600134277343749 -8.933243815104166 1.466621907552084
-1.445289225260417 -1.66413232421875 -8.890578450520835 1.445289225260417
-1.42395654296875 -1.728130371093749 -8.847913085937501 1.42395654296875
-1.402623860677084 -1.792128417968749 -8.805247721354167 1.402623860677084
-1.381291178385417 -1.85612646484375 -8.762582356770833 1.381291178385417
-1.35995849609375 -1.920124511718749 -8.7199169921875 1.35995849609375
-1.338625813802083 -1.98412255859375 -8.677251627604168 1.338625813802083
-1.317293131510417 -2.04812060546875 -8.634586263020834 1.317293131510417
-1.29596044921875 -2.112118652343749 -8.5919208984375 1.29596044921875
-1.274627766927084 -2.176116699218749 -8.549255533854168 1.274627766927084
-1.253295084635417 -2.240114746093749 -8.506590169270835 1.253295084635417
-1.23196240234375 -2.30411279296875 -8.463924804687501 1.23196240234375
-1.210629720052084 -2.368110839843749 -8.421259440104167 1.210629720052084
-1.189297037760417 -2.432108886718748 -8.378594075520834 1.189297037760417
-1.16796435546875 -2.496106933593749 -8.3359287109375 1.16796435546875
-1.146631673177084 -2.560104980468749 -8.293263346354166 1.146631673177084
-1.125298990885417 -2.624103027343748 -8.250597981770834 1.125298990885417
-1.10396630859375 -2.688101074218749 -8.207932617187501 1.10396630859375
-1.082633626302084 -2.752099121093748 -8.165267252604167 1.082633626302084
-1.061300944010417 -2.816097167968749 -8.122601888020835 1.061300944010417
-1.039968261718751 -2.880095214843748 -8.079936523437501 1.039968261718751
-1.018635579427084 -2.944093261718749 -8.037271158854168 1.018635579427084
-0.9973028971354172 -3.008091308593749 -7.994605794270834 0.9973028971354172
-0.9759702148437505 -3.072089355468748 -7.951940429687501 0.9759702148437505
-0.9546375325520838 -3.136087402343749 -7.909275065104167 0.9546375325520838
-0.9333048502604168 -3.200085449218749 -7.866609700520834 0.9333048502604168
-0.9119721679687501 -3.26408349609375 -7.8239443359375 0.9119721679687501
-0.8906394856770833 -3.32808154296875 -7.781278971354166 0.8906394856770833
-0.8693068033854166 -3.39207958984375 -7.738613606770834 0.8693068033854166
-0.8479741210937499 -3.45607763671875 -7.6959482421875 0.8479741210937499
-0.8266414388020831 -3.520075683593751 -7.653282877604166 0.8266414388020831
-0.8053087565104164 -3.584073730468751 -7.610617513020832 0.8053087565104164
-0.7839760742187497 -3.648071777343751 -7.5679521484375 0.7839760742187497
-0.7626433919270829 -3.712069824218751 -7.525286783854166 0.7626433919270829
-0.7413107096354159 -3.776067871093752 -7.482621419270831 0.7413107096354159
-0.7199780273437493 -3.840065917968752 -7.439956054687499 0.7199780273437493
-0.6986453450520828 -3.904063964843751 -7.397290690104166 0.6986453450520828
-0.6773126627604157 -3.968062011718753 -7.354625325520831 0.6773126627604157
-0.6559799804687488 -4.032060058593753 -7.311959960937497 0.6559799804687488
-0.6346472981770823 -4.096058105468753 -7.269294596354165 0.6346472981770823
-0.6133146158854156 -4.160056152343753 -7.226629231770831 0.6133146158854156
-0.5919819335937487 -4.224054199218754 -7.183963867187497 0.5919819335937487
-0.5706492513020819 -4.288052246093755 -7.141298502604164 0.5706492513020819
-0.5493165690104153 -4.352050292968753 -7.098633138020831 0.5493165690104153
-0.5279838867187485 -4.416048339843755 -7.055967773437497 0.5279838867187485
-0.5066512044270817 -4.480046386718755 -7.013302408854163 0.5066512044270817
-0.4853185221354149 -4.544044433593756 -6.97063704427083 0.4853185221354149
-0.4639858398437481 -4.608042480468756 -6.927971679687496 0.4639858398437481
-0.4426531575520815 -4.672040527343755 -6.885306315104163 0.4426531575520815
-0.4213204752604147 -4.736038574218756 -6.842640950520829 0.4213204752604147
-0.3999877929687479 -4.800036621093756 -6.799975585937496 0.3999877929687479
-0.3786551106770811 -4.864034667968757 -6.757310221354162 0.3786551106770811
-0.3573224283854145 -4.928032714843756 -6.714644856770829 0.3573224283854145
-0.3359897460937477 -4.992030761718757 -6.671979492187496 0.3359897460937477
-0.3146570638020807 -5.056028808593758 -6.629314127604161 0.3146570638020807
-0.2933243815104141 -5.120026855468758 -6.586648763020828 0.2933243815104141
-0.2719916992187476 -5.184024902343757 -6.543983398437495 0.2719916992187476
-0.2506590169270807 -5.248022949218758 -6.501318033854162 0.2506590169270807
-0.2293263346354136 -5.312020996093759 -6.458652669270827 0.2293263346354136
-0.2079936523437471 -5.376019042968759 -6.415987304687494 0.2079936523437471
-0.1866609700520805 -5.440017089843758 -6.373321940104161 0.1866609700520805
-0.1653282877604135 -5.50401513671876 -6.330656575520827 0.1653282877604135
-0.1439956054687467 -5.56801318359376 -6.287991210937493 0.1439956054687467
-0.1226629231770801 -5.632011230468759 -6.24532584635416 0.1226629231770801
-0.1013302408854133 -5.696009277343761 -6.202660481770827 0.1013302408854133
-0.07999755859374647 -5.76000732421876 -6.159995117187493 0.07999755859374647
-0.05866487630207972 -5.824005371093762 -6.117329752604159 0.05866487630207972
-0.0373321940104131 -5.88800341796876 -6.074664388020826 0.0373321940104131
-0.01599951171874625 -5.952001464843761 -6.031999023437493 0.01599951171874625
0.005333170572920487 -6.015999511718761 -5.989333658854159 -0.005333170572920487
0.026665852864587 -6.07999755859376 -5.946668294270826 -0.026665852864587
0.04799853515625363 -6.143995605468762 -5.904002929687493 -0.04799853515625363
0.06933121744792015 -6.20799365234376 -5.86133756510416 -0.06933121744792015
0.09066389973958666 -6.271991699218759 -5.818672200520827 -0.09066389973958666
0.1119965820312533 -6.335989746093761 -5.776006835937493 -0.1119965820312533
0.1333292643229198 -6.399987792968759 -5.73334147135416 -0.1333292643229198
0.1546619466145862 -6.463985839843758 -5.690676106770828 -0.1546619466145862
0.1759946289062527 -6.527983886718758 -5.648010742187495 -0.1759946289062527
0.1973273111979195 -6.591981933593758 -5.605345377604161 -0.1973273111979195
0.2186599934895859 -6.655979980468757 -5.562680013020828 -0.2186599934895859
0.2399926757812524 -6.719978027343757 -5.520014648437495 -0.2399926757812524
0.261325358072919 -6.783976074218757 -5.477349283854162 -0.261325358072919
0.2826580403645855 -6.847974121093756 -5.434683919270829 -0.2826580403645855
0.303990722656252 -6.911972167968756 -5.392018554687496 -0.303990722656252
0.3253234049479187 -6.975970214843756 -5.349353190104162 -0.3253234049479187
0.3466560872395852 -7.039968261718755 -5.30668782552083 -0.3466560872395852
0.3679887695312516 -7.103966308593755 -5.264022460937497 -0.3679887695312516
0.3893214518229181 -7.167964355468754 -5.221357096354164 -0.3893214518229181
0.4106541341145848 -7.231962402343754 -5.17869173177083 -0.4106541341145848
0.4319868164062513 -7.295960449218754 -5.136026367187497 -0.4319868164062513
0.4533194986979177 -7.359958496093753 -5.093361002604165 -0.4533194986979177
0.4746521809895844 -7.423956542968753 -5.050695638020831 -0.4746521809895844
0.4959848632812509 -7.487954589843753 -5.008030273437498 -0.4959848632812509
0.5173175455729173 -7.551952636718752 -4.965364908854165 -0.5173175455729173
0.5386502278645841 -7.615950683593752 -4.922699544270832 -0.5386502278645841
0.5599829101562506 -7.679948730468752 -4.880034179687499 -0.5599829101562506
0.581315592447917 -7.743946777343751 -4.837368815104166 -0.581315592447917
0.6026482747395835 -7.80794482421875 -4.794703450520833 -0.6026482747395835
0.6239809570312501 -7.871942871093751 -4.7520380859375 -0.6239809570312501
0.6453136393229166 -7.93594091796875 -4.709372721354167 -0.6453136393229166
0.6666463216145831 -7.999938964843749 -4.666707356770834 -0.6666463216145831
0.6879790039062498 -8.06393701171875 -4.6240419921875 -0.6879790039062498
0.7093116861979163 -8.127935058593749 -4.581376627604167 -0.7093116861979163
0.7306443684895827 -8.191933105468749 -4.538711263020835 -0.7306443684895827
0.7519770507812495 -8.255931152343749 -4.496045898437501 -0.7519770507812495
0.773309733072916 -8.319929199218748 -4.453380533854168 -0.773309733072916
0.7946424153645824 -8.383927246093748 -4.410715169270835 -0.7946424153645824
0.8159750976562488 -8.447925292968746 -4.368049804687502 -0.8159750976562488
0.8373077799479155 -8.511923339843747 -4.325384440104169 -0.8373077799479155
0.858640462239582 -8.575921386718747 -4.282719075520836 -0.858640462239582
0.8799731445312485 -8.639919433593745 -4.240053710937503 -0.8799731445312485
0.9013058268229152 -8.703917480468746 -4.197388346354169 -0.9013058268229152
0.9226385091145817 -8.767915527343746 -4.154722981770837 -0.9226385091145817
0.9439711914062482 -8.831913574218744 -4.112057617187504 -0.9439711914062482
0.9653038736979148 -8.895911621093745 -4.06939225260417 -0.9653038736979148
0.9866365559895813 -8.959909667968745 -4.026726888020837 -0.9866365559895813
1.007969238281248 -9.023907714843743 -3.984061523437505 -1.007969238281248
1.029301920572914 -9.087905761718742 -3.941396158854172 -1.029301920572914
1.050634602864581 -9.151903808593744 -3.898730794270838 -1.050634602864581
1.071967285156247 -9.215901855468742 -3.856065429687505 -1.071967285156247
1.093299967447914 -9.279899902343741 -3.813400065104172 -1.093299967447914
1.114632649739581 -9.343897949218743 -3.770734700520839 -1.114632649739581
1.135965332031247 -9.407895996093741 -3.728069335937506 -1.135965332031247
1.157298014322913 -9.47189404296874 -3.685403971354173 -1.157298014322913
1.17863069661458 -9.535892089843742 -3.642738606770839 -1.17863069661458
1.199963378906247 -9.59989013671874 -3.600073242187507 -1.199963378906247
1.221296061197913 -9.663888183593739 -3.557407877604174 -1.221296061197913
1.24262874348958 -9.727886230468739 -3.514742513020841 -1.24262874348958
1.263961425781246 -9.791884277343739 -3.472077148437507 -1.263961425781246
1.285294108072913 -9.855882324218738 -3.429411783854174 -1.285294108072913
1.306626790364579 -9.919880371093738 -3.386746419270842 -1.306626790364579
1.327959472656246 -9.983878417968738 -3.344081054687508 -1.327959472656246
1.349292154947912 -10.04787646484374 -3.301415690104175 -1.349292154947912
1.370624837239579 -10.11187451171874 -3.258750325520842 -1.370624837239579
1.391957519531245 -10.17587255859373 -3.21608496093751 -1.391957519531245
1.413290201822912 -10.23987060546874 -3.173419596354176 -1.413290201822912
1.434622884114579 -10.30386865234374 -3.130754231770843 -1.434622884114579
1.455955566406245 -10.36786669921873 -3.08808886718751 -1.455955566406245
1.477288248697912 -10.43186474609374 -3.045423502604176 -1.477288248697912
1.498620930989578 -10.49586279296873 -3.002758138020844 -1.498620930989578
1.519953613281245 -10.55986083984373 -2.960092773437511 -1.519953613281245
1.541286295572911 -10.62385888671873 -2.917427408854177 -1.541286295572911
1.562618977864578 -10.68785693359373 -2.874762044270844 -1.562618977864578
1.583951660156244 -10.75185498046873 -2.832096679687512 -1.583951660156244
1.605284342447911 -10.81585302734373 -2.789431315104179 -1.605284342447911
1.626617024739577 -10.87985107421873 -2.746765950520845 -1.626617024739577
1.647949707031244 -10.94384912109373 -2.704100585937512 -1.647949707031244
1.66928238932291 -11.00784716796873 -2.661435221354179 -1.66928238932291
1.690615071614577 -11.07184521484373 -2.618769856770846 -1.690615071614577
1.711947753906244 -11.13584326171873 -2.576104492187513 -1.711947753906244
1.73328043619791 -11.19984130859373 -2.53343912760418 -1.73328043619791
1.754613118489577 -11.26383935546873 -2.490773763020846 -1.754613118489577
1.775945800781243 -11.32783740234373 -2.448108398437514 -1.775945800781243
1.79727848307291 -11.39183544921873 -2.405443033854181 -1.79727848307291
1.818611165364576 -11.45583349609373 -2.362777669270848 -1.818611165364576
1.839943847656243 -11.51983154296873 -2.320112304687514 -1.839943847656243
1.861276529947909 -11.58382958984373 -2.277446940104181 -1.861276529947909
1.882609212239576 -11.64782763671873 -2.234781575520849 -1.882609212239576
1.903941894531243 -11.71182568359373 -2.192116210937515 -1.903941894531243
1.925274576822909 -11.77582373046873 -2.149450846354182 -1.925274576822909
1.946607259114575 -11.83982177734373 -2.106785481770849 -1.946607259114575
1.967939941406242 -11.90381982421873 -2.064120117187516 -1.967939941406242
1.989272623697909 -11.96781787109373 -2.021454752604183 -1.989272623697909
1.99981689825654 -11.99945069476962 -2.000366203486919 -1.99981689825654

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.PRODUCT)

View File

@ -0,0 +1,188 @@
-1.978606282552083 11.8716376953125 11.8716376953125 11.8716376953125
-1.957273600260416 11.7436416015625 11.7436416015625 11.7436416015625
-1.93594091796875 11.6156455078125 11.6156455078125 11.6156455078125
-1.914608235677083 11.4876494140625 11.4876494140625 11.4876494140625
-1.893275553385417 11.3596533203125 11.3596533203125 11.3596533203125
-1.87194287109375 11.2316572265625 11.2316572265625 11.2316572265625
-1.850610188802083 11.1036611328125 11.1036611328125 11.1036611328125
-1.829277506510417 10.9756650390625 10.9756650390625 10.9756650390625
-1.80794482421875 10.8476689453125 10.8476689453125 10.8476689453125
-1.786612141927083 10.7196728515625 10.7196728515625 10.7196728515625
-1.765279459635417 10.5916767578125 10.5916767578125 10.5916767578125
-1.74394677734375 10.4636806640625 10.4636806640625 10.4636806640625
-1.722614095052083 10.3356845703125 10.3356845703125 10.3356845703125
-1.701281412760417 10.2076884765625 10.2076884765625 10.2076884765625
-1.67994873046875 10.0796923828125 10.0796923828125 10.0796923828125
-1.658616048177083 9.9516962890625 9.9516962890625 9.9516962890625
-1.637283365885417 9.823700195312501 9.823700195312501 9.823700195312501
-1.61595068359375 9.695704101562502 9.695704101562502 9.695704101562502
-1.594618001302083 9.567708007812501 9.567708007812501 9.567708007812501
-1.573285319010417 9.439711914062499 9.439711914062499 9.439711914062499
-1.55195263671875 9.3117158203125 9.3117158203125 9.3117158203125
-1.530619954427083 9.183719726562501 9.183719726562501 9.183719726562501
-1.509287272135417 9.055723632812501 9.055723632812501 9.055723632812501
-1.48795458984375 8.9277275390625 8.9277275390625 8.9277275390625
-1.466621907552084 8.799731445312503 8.799731445312503 8.799731445312503
-1.445289225260417 8.6717353515625 8.6717353515625 8.6717353515625
-1.42395654296875 8.543739257812502 8.543739257812502 8.543739257812502
-1.402623860677084 8.415743164062501 8.415743164062501 8.415743164062501
-1.381291178385417 8.2877470703125 8.2877470703125 8.2877470703125
-1.35995849609375 8.159750976562503 8.159750976562503 8.159750976562503
-1.338625813802083 8.0317548828125 8.0317548828125 8.0317548828125
-1.317293131510417 7.903758789062501 7.903758789062501 7.903758789062501
-1.29596044921875 7.775762695312501 7.775762695312501 7.775762695312501
-1.274627766927084 7.647766601562503 7.647766601562503 7.647766601562503
-1.253295084635417 7.519770507812503 7.519770507812503 7.519770507812503
-1.23196240234375 7.391774414062501 7.391774414062501 7.391774414062501
-1.210629720052084 7.263778320312502 7.263778320312502 7.263778320312502
-1.189297037760417 7.135782226562504 7.135782226562504 7.135782226562504
-1.16796435546875 7.007786132812502 7.007786132812502 7.007786132812502
-1.146631673177084 6.879790039062502 6.879790039062502 6.879790039062502
-1.125298990885417 6.751793945312503 6.751793945312503 6.751793945312503
-1.10396630859375 6.623797851562502 6.623797851562502 6.623797851562502
-1.082633626302084 6.495801757812504 6.495801757812504 6.495801757812504
-1.061300944010417 6.367805664062502 6.367805664062502 6.367805664062502
-1.039968261718751 6.239809570312504 6.239809570312504 6.239809570312504
-1.018635579427084 6.111813476562503 6.111813476562503 6.111813476562503
-0.9973028971354172 5.983817382812503 5.983817382812503 5.983817382812503
-0.9759702148437505 5.855821289062503 5.855821289062503 5.855821289062503
-0.9546375325520838 5.727825195312502 5.727825195312502 5.727825195312502
-0.9333048502604168 5.599829101562501 5.599829101562501 5.599829101562501
-0.9119721679687501 5.471833007812501 5.471833007812501 5.471833007812501
-0.8906394856770833 5.3438369140625 5.3438369140625 5.3438369140625
-0.8693068033854166 5.2158408203125 5.2158408203125 5.2158408203125
-0.8479741210937499 5.0878447265625 5.0878447265625 5.0878447265625
-0.8266414388020831 4.959848632812498 4.959848632812498 4.959848632812498
-0.8053087565104164 4.831852539062498 4.831852539062498 4.831852539062498
-0.7839760742187497 4.703856445312498 4.703856445312498 4.703856445312498
-0.7626433919270829 4.575860351562497 4.575860351562497 4.575860351562497
-0.7413107096354159 4.447864257812496 4.447864257812496 4.447864257812496
-0.7199780273437493 4.319868164062496 4.319868164062496 4.319868164062496
-0.6986453450520828 4.191872070312496 4.191872070312496 4.191872070312496
-0.6773126627604157 4.063875976562494 4.063875976562494 4.063875976562494
-0.6559799804687488 3.935879882812493 3.935879882812493 3.935879882812493
-0.6346472981770823 3.807883789062494 3.807883789062494 3.807883789062494
-0.6133146158854156 3.679887695312494 3.679887695312494 3.679887695312494
-0.5919819335937487 3.551891601562493 3.551891601562493 3.551891601562493
-0.5706492513020819 3.423895507812492 3.423895507812492 3.423895507812492
-0.5493165690104153 3.295899414062491 3.295899414062491 3.295899414062491
-0.5279838867187485 3.167903320312491 3.167903320312491 3.167903320312491
-0.5066512044270817 3.03990722656249 3.03990722656249 3.03990722656249
-0.4853185221354149 2.91191113281249 2.91191113281249 2.91191113281249
-0.4639858398437481 2.783915039062489 2.783915039062489 2.783915039062489
-0.4426531575520815 2.655918945312489 2.655918945312489 2.655918945312489
-0.4213204752604147 2.527922851562488 2.527922851562488 2.527922851562488
-0.3999877929687479 2.399926757812487 2.399926757812487 2.399926757812487
-0.3786551106770811 2.271930664062487 2.271930664062487 2.271930664062487
-0.3573224283854145 2.143934570312487 2.143934570312487 2.143934570312487
-0.3359897460937477 2.015938476562486 2.015938476562486 2.015938476562486
-0.3146570638020807 1.887942382812484 1.887942382812484 1.887942382812484
-0.2933243815104141 1.759946289062484 1.759946289062484 1.759946289062484
-0.2719916992187476 1.631950195312485 1.631950195312485 1.631950195312485
-0.2506590169270807 1.503954101562484 1.503954101562484 1.503954101562484
-0.2293263346354136 1.375958007812482 1.375958007812482 1.375958007812482
-0.2079936523437471 1.247961914062483 1.247961914062483 1.247961914062483
-0.1866609700520805 1.119965820312483 1.119965820312483 1.119965820312483
-0.1653282877604135 0.9919697265624812 0.9919697265624812 0.9919697265624812
-0.1439956054687467 0.8639736328124801 0.8639736328124801 0.8639736328124801
-0.1226629231770801 0.7359775390624803 0.7359775390624803 0.7359775390624803
-0.1013302408854133 0.6079814453124799 0.6079814453124799 0.6079814453124799
-0.07999755859374647 0.4799853515624788 0.4799853515624788 0.4799853515624788
-0.05866487630207972 0.3519892578124784 0.3519892578124784 0.3519892578124784
-0.0373321940104131 0.2239931640624786 0.2239931640624786 0.2239931640624786
-0.01599951171874625 0.0959970703124775 0.0959970703124775 0.0959970703124775
0.005333170572920487 -0.03199902343752292 -0.03199902343752292 -0.03199902343752292
0.026665852864587 -0.159995117187522 -0.159995117187522 -0.159995117187522
0.04799853515625363 -0.2879912109375218 -0.2879912109375218 -0.2879912109375218
0.06933121744792015 -0.4159873046875209 -0.4159873046875209 -0.4159873046875209
0.09066389973958666 -0.54398339843752 -0.54398339843752 -0.54398339843752
0.1119965820312533 -0.6719794921875197 -0.6719794921875197 -0.6719794921875197
0.1333292643229198 -0.7999755859375188 -0.7999755859375188 -0.7999755859375188
0.1546619466145862 -0.9279716796875173 -0.9279716796875173 -0.9279716796875173
0.1759946289062527 -1.055967773437516 -1.055967773437516 -1.055967773437516
0.1973273111979195 -1.183963867187517 -1.183963867187517 -1.183963867187517
0.2186599934895859 -1.311959960937515 -1.311959960937515 -1.311959960937515
0.2399926757812524 -1.439956054687514 -1.439956054687514 -1.439956054687514
0.261325358072919 -1.567952148437514 -1.567952148437514 -1.567952148437514
0.2826580403645855 -1.695948242187513 -1.695948242187513 -1.695948242187513
0.303990722656252 -1.823944335937512 -1.823944335937512 -1.823944335937512
0.3253234049479187 -1.951940429687512 -1.951940429687512 -1.951940429687512
0.3466560872395852 -2.079936523437511 -2.079936523437511 -2.079936523437511
0.3679887695312516 -2.20793261718751 -2.20793261718751 -2.20793261718751
0.3893214518229181 -2.335928710937509 -2.335928710937509 -2.335928710937509
0.4106541341145848 -2.463924804687508 -2.463924804687508 -2.463924804687508
0.4319868164062513 -2.591920898437508 -2.591920898437508 -2.591920898437508
0.4533194986979177 -2.719916992187507 -2.719916992187507 -2.719916992187507
0.4746521809895844 -2.847913085937506 -2.847913085937506 -2.847913085937506
0.4959848632812509 -2.975909179687505 -2.975909179687505 -2.975909179687505
0.5173175455729173 -3.103905273437504 -3.103905273437504 -3.103905273437504
0.5386502278645841 -3.231901367187504 -3.231901367187504 -3.231901367187504
0.5599829101562506 -3.359897460937503 -3.359897460937503 -3.359897460937503
0.581315592447917 -3.487893554687502 -3.487893554687502 -3.487893554687502
0.6026482747395835 -3.615889648437501 -3.615889648437501 -3.615889648437501
0.6239809570312501 -3.7438857421875 -3.7438857421875 -3.7438857421875
0.6453136393229166 -3.8718818359375 -3.8718818359375 -3.8718818359375
0.6666463216145831 -3.999877929687499 -3.999877929687499 -3.999877929687499
0.6879790039062498 -4.127874023437498 -4.127874023437498 -4.127874023437498
0.7093116861979163 -4.255870117187498 -4.255870117187498 -4.255870117187498
0.7306443684895827 -4.383866210937496 -4.383866210937496 -4.383866210937496
0.7519770507812495 -4.511862304687496 -4.511862304687496 -4.511862304687496
0.773309733072916 -4.639858398437496 -4.639858398437496 -4.639858398437496
0.7946424153645824 -4.767854492187494 -4.767854492187494 -4.767854492187494
0.8159750976562488 -4.895850585937493 -4.895850585937493 -4.895850585937493
0.8373077799479155 -5.023846679687493 -5.023846679687493 -5.023846679687493
0.858640462239582 -5.151842773437492 -5.151842773437492 -5.151842773437492
0.8799731445312485 -5.279838867187491 -5.279838867187491 -5.279838867187491
0.9013058268229152 -5.407834960937491 -5.407834960937491 -5.407834960937491
0.9226385091145817 -5.53583105468749 -5.53583105468749 -5.53583105468749
0.9439711914062482 -5.663827148437488 -5.663827148437488 -5.663827148437488
0.9653038736979148 -5.791823242187489 -5.791823242187489 -5.791823242187489
0.9866365559895813 -5.919819335937488 -5.919819335937488 -5.919819335937488
1.007969238281248 -6.047815429687486 -6.047815429687486 -6.047815429687486
1.029301920572914 -6.175811523437485 -6.175811523437485 -6.175811523437485
1.050634602864581 -6.303807617187486 -6.303807617187486 -6.303807617187486
1.071967285156247 -6.431803710937484 -6.431803710937484 -6.431803710937484
1.093299967447914 -6.559799804687483 -6.559799804687483 -6.559799804687483
1.114632649739581 -6.687795898437484 -6.687795898437484 -6.687795898437484
1.135965332031247 -6.815791992187482 -6.815791992187482 -6.815791992187482
1.157298014322913 -6.943788085937481 -6.943788085937481 -6.943788085937481
1.17863069661458 -7.071784179687482 -7.071784179687482 -7.071784179687482
1.199963378906247 -7.19978027343748 -7.19978027343748 -7.19978027343748
1.221296061197913 -7.327776367187479 -7.327776367187479 -7.327776367187479
1.24262874348958 -7.455772460937477 -7.455772460937477 -7.455772460937477
1.263961425781246 -7.583768554687478 -7.583768554687478 -7.583768554687478
1.285294108072913 -7.711764648437477 -7.711764648437477 -7.711764648437477
1.306626790364579 -7.839760742187475 -7.839760742187475 -7.839760742187475
1.327959472656246 -7.967756835937476 -7.967756835937476 -7.967756835937476
1.349292154947912 -8.095752929687475 -8.095752929687475 -8.095752929687475
1.370624837239579 -8.223749023437474 -8.223749023437474 -8.223749023437474
1.391957519531245 -8.351745117187471 -8.351745117187471 -8.351745117187471
1.413290201822912 -8.479741210937473 -8.479741210937473 -8.479741210937473
1.434622884114579 -8.607737304687472 -8.607737304687472 -8.607737304687472
1.455955566406245 -8.735733398437469 -8.735733398437469 -8.735733398437469
1.477288248697912 -8.863729492187471 -8.863729492187471 -8.863729492187471
1.498620930989578 -8.99172558593747 -8.99172558593747 -8.99172558593747
1.519953613281245 -9.119721679687467 -9.119721679687467 -9.119721679687467
1.541286295572911 -9.247717773437468 -9.247717773437468 -9.247717773437468
1.562618977864578 -9.375713867187468 -9.375713867187468 -9.375713867187468
1.583951660156244 -9.503709960937465 -9.503709960937465 -9.503709960937465
1.605284342447911 -9.631706054687463 -9.631706054687463 -9.631706054687463
1.626617024739577 -9.759702148437466 -9.759702148437466 -9.759702148437466
1.647949707031244 -9.887698242187463 -9.887698242187463 -9.887698242187463
1.66928238932291 -10.01569433593746 -10.01569433593746 -10.01569433593746
1.690615071614577 -10.14369042968746 -10.14369042968746 -10.14369042968746
1.711947753906244 -10.27168652343746 -10.27168652343746 -10.27168652343746
1.73328043619791 -10.39968261718746 -10.39968261718746 -10.39968261718746
1.754613118489577 -10.52767871093746 -10.52767871093746 -10.52767871093746
1.775945800781243 -10.65567480468746 -10.65567480468746 -10.65567480468746
1.79727848307291 -10.78367089843746 -10.78367089843746 -10.78367089843746
1.818611165364576 -10.91166699218746 -10.91166699218746 -10.91166699218746
1.839943847656243 -11.03966308593746 -11.03966308593746 -11.03966308593746
1.861276529947909 -11.16765917968745 -11.16765917968745 -11.16765917968745
1.882609212239576 -11.29565527343745 -11.29565527343745 -11.29565527343745
1.903941894531243 -11.42365136718746 -11.42365136718746 -11.42365136718746
1.925274576822909 -11.55164746093745 -11.55164746093745 -11.55164746093745
1.946607259114575 -11.67964355468745 -11.67964355468745 -11.67964355468745
1.967939941406242 -11.80763964843745 -11.80763964843745 -11.80763964843745
1.989272623697909 -11.93563574218745 -11.93563574218745 -11.93563574218745
1.99981689825654 -11.99890138953924 -11.99890138953924 -11.99890138953924

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.SCALE_OFFSET)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -6.957212565104166 7.93581884765625 -7.978606282552083
-1.957273600260416 -6.914547200520833 7.87182080078125 -7.957273600260416
-1.93594091796875 -6.8718818359375 7.807822753906249 -7.93594091796875
-1.914608235677083 -6.829216471354167 7.74382470703125 -7.914608235677083
-1.893275553385417 -6.786551106770833 7.679826660156251 -7.893275553385417
-1.87194287109375 -6.7438857421875 7.615828613281249 -7.87194287109375
-1.850610188802083 -6.701220377604167 7.551830566406251 -7.850610188802083
-1.829277506510417 -6.658555013020834 7.48783251953125 -7.829277506510417
-1.80794482421875 -6.6158896484375 7.42383447265625 -7.80794482421875
-1.786612141927083 -6.573224283854167 7.35983642578125 -7.786612141927083
-1.765279459635417 -6.530558919270833 7.29583837890625 -7.765279459635416
-1.74394677734375 -6.487893554687499 7.23184033203125 -7.74394677734375
-1.722614095052083 -6.445228190104166 7.167842285156249 -7.722614095052084
-1.701281412760417 -6.402562825520834 7.10384423828125 -7.701281412760417
-1.67994873046875 -6.3598974609375 7.039846191406251 -7.67994873046875
-1.658616048177083 -6.317232096354166 6.97584814453125 -7.658616048177083
-1.637283365885417 -6.274566731770833 6.91185009765625 -7.637283365885416
-1.61595068359375 -6.231901367187501 6.847852050781251 -7.61595068359375
-1.594618001302083 -6.189236002604167 6.78385400390625 -7.594618001302083
-1.573285319010417 -6.146570638020833 6.71985595703125 -7.573285319010417
-1.55195263671875 -6.1039052734375 6.65585791015625 -7.551952636718751
-1.530619954427083 -6.061239908854167 6.59185986328125 -7.530619954427083
-1.509287272135417 -6.018574544270834 6.527861816406251 -7.509287272135417
-1.48795458984375 -5.9759091796875 6.46386376953125 -7.48795458984375
-1.466621907552084 -5.933243815104167 6.399865722656251 -7.466621907552083
-1.445289225260417 -5.890578450520834 6.33586767578125 -7.445289225260417
-1.42395654296875 -5.847913085937501 6.271869628906251 -7.42395654296875
-1.402623860677084 -5.805247721354167 6.207871582031251 -7.402623860677084
-1.381291178385417 -5.762582356770833 6.14387353515625 -7.381291178385417
-1.35995849609375 -5.719916992187501 6.079875488281251 -7.35995849609375
-1.338625813802083 -5.677251627604167 6.01587744140625 -7.338625813802084
-1.317293131510417 -5.634586263020834 5.95187939453125 -7.317293131510417
-1.29596044921875 -5.5919208984375 5.887881347656251 -7.29596044921875
-1.274627766927084 -5.549255533854168 5.823883300781251 -7.274627766927084
-1.253295084635417 -5.506590169270835 5.759885253906251 -7.253295084635417
-1.23196240234375 -5.4639248046875 5.69588720703125 -7.231962402343751
-1.210629720052084 -5.421259440104167 5.631889160156251 -7.210629720052084
-1.189297037760417 -5.378594075520835 5.567891113281252 -7.189297037760417
-1.16796435546875 -5.3359287109375 5.503893066406251 -7.16796435546875
-1.146631673177084 -5.293263346354167 5.439895019531251 -7.146631673177083
-1.125298990885417 -5.250597981770834 5.375896972656252 -7.125298990885417
-1.10396630859375 -5.207932617187501 5.311898925781251 -7.10396630859375
-1.082633626302084 -5.165267252604168 5.247900878906252 -7.082633626302083
-1.061300944010417 -5.122601888020834 5.183902832031251 -7.061300944010418
-1.039968261718751 -5.079936523437501 5.119904785156252 -7.039968261718751
-1.018635579427084 -5.037271158854168 5.055906738281251 -7.018635579427084
-0.9973028971354172 -4.994605794270834 4.991908691406252 -6.997302897135417
-0.9759702148437505 -4.951940429687501 4.927910644531251 -6.97597021484375
-0.9546375325520838 -4.909275065104167 4.863912597656251 -6.954637532552084
-0.9333048502604168 -4.866609700520834 4.799914550781251 -6.933304850260416
-0.9119721679687501 -4.8239443359375 4.735916503906251 -6.91197216796875
-0.8906394856770833 -4.781278971354166 4.67191845703125 -6.890639485677084
-0.8693068033854166 -4.738613606770834 4.60792041015625 -6.869306803385417
-0.8479741210937499 -4.6959482421875 4.54392236328125 -6.84797412109375
-0.8266414388020831 -4.653282877604166 4.479924316406249 -6.826641438802083
-0.8053087565104164 -4.610617513020832 4.41592626953125 -6.805308756510416
-0.7839760742187497 -4.5679521484375 4.351928222656249 -6.783976074218749
-0.7626433919270829 -4.525286783854166 4.287930175781248 -6.762643391927083
-0.7413107096354159 -4.482621419270831 4.223932128906248 -6.741310709635416
-0.7199780273437493 -4.439956054687499 4.159934082031247 -6.71997802734375
-0.6986453450520828 -4.397290690104166 4.095936035156248 -6.698645345052083
-0.6773126627604157 -4.354625325520831 4.031937988281247 -6.677312662760416
-0.6559799804687488 -4.311959960937497 3.967939941406247 -6.655979980468749
-0.6346472981770823 -4.269294596354165 3.903941894531247 -6.634647298177082
-0.6133146158854156 -4.226629231770831 3.839943847656247 -6.613314615885415
-0.5919819335937487 -4.183963867187497 3.775945800781246 -6.591981933593749
-0.5706492513020819 -4.141298502604164 3.711947753906246 -6.570649251302082
-0.5493165690104153 -4.098633138020831 3.647949707031246 -6.549316569010415
-0.5279838867187485 -4.055967773437497 3.583951660156246 -6.527983886718749
-0.5066512044270817 -4.013302408854163 3.519953613281245 -6.506651204427081
-0.4853185221354149 -3.97063704427083 3.455955566406245 -6.485318522135415
-0.4639858398437481 -3.927971679687496 3.391957519531244 -6.463985839843748
-0.4426531575520815 -3.885306315104163 3.327959472656244 -6.442653157552082
-0.4213204752604147 -3.842640950520829 3.263961425781244 -6.421320475260415
-0.3999877929687479 -3.799975585937496 3.199963378906244 -6.399987792968748
-0.3786551106770811 -3.757310221354162 3.135965332031244 -6.378655110677081
-0.3573224283854145 -3.714644856770829 3.071967285156243 -6.357322428385414
-0.3359897460937477 -3.671979492187496 3.007969238281243 -6.335989746093747
-0.3146570638020807 -3.629314127604161 2.943971191406242 -6.31465706380208
-0.2933243815104141 -3.586648763020828 2.879973144531242 -6.293324381510415
-0.2719916992187476 -3.543983398437495 2.815975097656242 -6.271991699218748
-0.2506590169270807 -3.501318033854162 2.751977050781242 -6.250659016927081
-0.2293263346354136 -3.458652669270827 2.687979003906241 -6.229326334635414
-0.2079936523437471 -3.415987304687494 2.623980957031241 -6.207993652343747
-0.1866609700520805 -3.373321940104161 2.559982910156242 -6.18666097005208
-0.1653282877604135 -3.330656575520827 2.495984863281241 -6.165328287760413
-0.1439956054687467 -3.287991210937493 2.43198681640624 -6.143995605468747
-0.1226629231770801 -3.24532584635416 2.36798876953124 -6.12266292317708
-0.1013302408854133 -3.202660481770827 2.30399072265624 -6.101330240885414
-0.07999755859374647 -3.159995117187493 2.239992675781239 -6.079997558593746
-0.05866487630207972 -3.117329752604159 2.175994628906239 -6.05866487630208
-0.0373321940104131 -3.074664388020826 2.111996582031239 -6.037332194010413
-0.01599951171874625 -3.031999023437493 2.047998535156239 -6.015999511718746
0.005333170572920487 -2.989333658854159 1.984000488281239 -5.99466682942708
0.026665852864587 -2.946668294270826 1.920002441406239 -5.973334147135413
0.04799853515625363 -2.904002929687493 1.856004394531239 -5.952001464843747
0.06933121744792015 -2.86133756510416 1.79200634765624 -5.93066878255208
0.09066389973958666 -2.818672200520827 1.72800830078124 -5.909336100260413
0.1119965820312533 -2.776006835937493 1.66401025390624 -5.888003417968747
0.1333292643229198 -2.73334147135416 1.600012207031241 -5.86667073567708
0.1546619466145862 -2.690676106770828 1.536014160156241 -5.845338053385413
0.1759946289062527 -2.648010742187495 1.472016113281242 -5.824005371093747
0.1973273111979195 -2.605345377604161 1.408018066406242 -5.802672688802081
0.2186599934895859 -2.562680013020828 1.344020019531242 -5.781340006510414
0.2399926757812524 -2.520014648437495 1.280021972656243 -5.760007324218748
0.261325358072919 -2.477349283854162 1.216023925781243 -5.738674641927081
0.2826580403645855 -2.434683919270829 1.152025878906243 -5.717341959635414
0.303990722656252 -2.392018554687496 1.088027832031244 -5.696009277343748
0.3253234049479187 -2.349353190104162 1.024029785156244 -5.674676595052081
0.3466560872395852 -2.30668782552083 0.9600317382812445 -5.653343912760414
0.3679887695312516 -2.264022460937497 0.8960336914062452 -5.632011230468748
0.3893214518229181 -2.221357096354164 0.8320356445312456 -5.610678548177082
0.4106541341145848 -2.17869173177083 0.7680375976562459 -5.589345865885416
0.4319868164062513 -2.136026367187497 0.7040395507812462 -5.568013183593749
0.4533194986979177 -2.093361002604165 0.6400415039062466 -5.546680501302082
0.4746521809895844 -2.050695638020831 0.5760434570312469 -5.525347819010416
0.4959848632812509 -2.008030273437498 0.5120454101562473 -5.504015136718749
0.5173175455729173 -1.965364908854165 0.4480473632812481 -5.482682454427083
0.5386502278645841 -1.922699544270832 0.384049316406248 -5.461349772135416
0.5599829101562506 -1.880034179687499 0.3200512695312483 -5.440017089843749
0.581315592447917 -1.837368815104166 0.2560532226562491 -5.418684407552083
0.6026482747395835 -1.794703450520833 0.1920551757812494 -5.397351725260417
0.6239809570312501 -1.7520380859375 0.1280571289062498 -5.37601904296875
0.6453136393229166 -1.709372721354167 0.0640590820312501 -5.354686360677084
0.6666463216145831 -1.666707356770834 6.103515625044409e-05 -5.333353678385417
0.6879790039062498 -1.6240419921875 -0.06393701171874921 -5.31202099609375
0.7093116861979163 -1.581376627604167 -0.1279350585937489 -5.290688313802084
0.7306443684895827 -1.538711263020835 -0.1919331054687481 -5.269355631510417
0.7519770507812495 -1.496045898437501 -0.2559311523437482 -5.24802294921875
0.773309733072916 -1.453380533854168 -0.3199291992187479 -5.226690266927084
0.7946424153645824 -1.410715169270835 -0.3839272460937471 -5.205357584635418
0.8159750976562488 -1.368049804687502 -0.4479252929687467 -5.184024902343751
0.8373077799479155 -1.325384440104169 -0.5119233398437464 -5.162692220052085
0.858640462239582 -1.282719075520836 -0.575921386718746 -5.141359537760418
0.8799731445312485 -1.240053710937503 -0.6399194335937457 -5.120026855468751
0.9013058268229152 -1.19738834635417 -0.7039174804687454 -5.098694173177085
0.9226385091145817 -1.154722981770837 -0.767915527343745 -5.077361490885418
0.9439711914062482 -1.112057617187504 -0.8319135742187441 -5.056028808593751
0.9653038736979148 -1.06939225260417 -0.8959116210937443 -5.034696126302086
0.9866365559895813 -1.026726888020837 -0.959909667968744 -5.013363444010419
1.007969238281248 -0.9840615234375045 -1.023907714843743 -4.992030761718752
1.029301920572914 -0.9413961588541717 -1.087905761718742 -4.970698079427086
1.050634602864581 -0.898730794270838 -1.151903808593743 -4.949365397135419
1.071967285156247 -0.8560654296875052 -1.215901855468742 -4.928032714843752
1.093299967447914 -0.8134000651041724 -1.279899902343741 -4.906700032552086
1.114632649739581 -0.7707347005208387 -1.343897949218742 -4.885367350260419
1.135965332031247 -0.7280693359375059 -1.407895996093741 -4.864034667968753
1.157298014322913 -0.6854039713541731 -1.47189404296874 -4.842701985677087
1.17863069661458 -0.6427386067708394 -1.535892089843741 -4.82136930338542
1.199963378906247 -0.6000732421875066 -1.59989013671874 -4.800036621093753
1.221296061197913 -0.5574078776041738 -1.663888183593739 -4.778703938802087
1.24262874348958 -0.514742513020841 -1.727886230468739 -4.757371256510421
1.263961425781246 -0.4720771484375073 -1.791884277343739 -4.736038574218753
1.285294108072913 -0.4294117838541744 -1.855882324218738 -4.714705891927087
1.306626790364579 -0.3867464192708416 -1.919880371093738 -4.693373209635421
1.327959472656246 -0.3440810546875079 -1.983878417968738 -4.672040527343754
1.349292154947912 -0.3014156901041751 -2.047876464843737 -4.650707845052088
1.370624837239579 -0.2587503255208423 -2.111874511718737 -4.629375162760422
1.391957519531245 -0.2160849609375095 -2.175872558593736 -4.608042480468755
1.413290201822912 -0.1734195963541758 -2.239870605468736 -4.586709798177088
1.434622884114579 -0.130754231770843 -2.303868652343736 -4.565377115885422
1.455955566406245 -0.08808886718751019 -2.367866699218735 -4.544044433593755
1.477288248697912 -0.04542350260417649 -2.431864746093735 -4.522711751302088
1.498620930989578 -0.002758138020843681 -2.495862792968735 -4.501379069010422
1.519953613281245 0.03990722656248913 -2.559860839843734 -4.480046386718755
1.541286295572911 0.08257259114582283 -2.623858886718734 -4.458713704427089
1.562618977864578 0.1252379557291556 -2.687856933593734 -4.437381022135423
1.583951660156244 0.1679033203124884 -2.751854980468733 -4.416048339843756
1.605284342447911 0.2105686848958213 -2.815853027343731 -4.394715657552089
1.626617024739577 0.253234049479155 -2.879851074218733 -4.373382975260423
1.647949707031244 0.2958994140624878 -2.943849121093732 -4.352050292968756
1.66928238932291 0.3385647786458206 -3.00784716796873 -4.330717610677089
1.690615071614577 0.3812301432291543 -3.071845214843732 -4.309384928385423
1.711947753906244 0.4238955078124871 -3.135843261718731 -4.288052246093756
1.73328043619791 0.4665608723958199 -3.199841308593729 -4.26671956380209
1.754613118489577 0.5092262369791536 -3.263839355468731 -4.245386881510424
1.775945800781243 0.5518916015624864 -3.32783740234373 -4.224054199218757
1.79727848307291 0.5945569661458192 -3.391835449218728 -4.20272151692709
1.818611165364576 0.637222330729152 -3.455833496093728 -4.181388834635424
1.839943847656243 0.6798876953124857 -3.519831542968729 -4.160056152343757
1.861276529947909 0.7225530598958185 -3.583829589843727 -4.13872347005209
1.882609212239576 0.7652184244791513 -3.647827636718727 -4.117390787760424
1.903941894531243 0.807883789062485 -3.711825683593728 -4.096058105468757
1.925274576822909 0.8505491536458178 -3.775823730468726 -4.074725423177091
1.946607259114575 0.8932145182291507 -3.839821777343726 -4.053392740885425
1.967939941406242 0.9358798828124844 -3.903819824218727 -4.032060058593758
1.989272623697909 0.9785452473958172 -3.967817871093725 -4.010727376302091
1.99981689825654 0.9996337965130806 -3.999450694769621 -4.00018310174346

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
mathop_test(MathOperation.SUM)

View File

@ -0,0 +1,188 @@
-1.978606282552083 -2.978606282552083 -2.978606282552083 -2.978606282552083
-1.957273600260416 -2.957273600260416 -2.957273600260416 -2.957273600260416
-1.93594091796875 -2.93594091796875 -2.93594091796875 -2.93594091796875
-1.914608235677083 -2.914608235677083 -2.914608235677083 -2.914608235677083
-1.893275553385417 -2.893275553385417 -2.893275553385417 -2.893275553385417
-1.87194287109375 -2.87194287109375 -2.87194287109375 -2.87194287109375
-1.850610188802083 -2.850610188802083 -2.850610188802083 -2.850610188802083
-1.829277506510417 -2.829277506510417 -2.829277506510417 -2.829277506510417
-1.80794482421875 -2.80794482421875 -2.80794482421875 -2.80794482421875
-1.786612141927083 -2.786612141927083 -2.786612141927083 -2.786612141927083
-1.765279459635417 -2.765279459635416 -2.765279459635416 -2.765279459635416
-1.74394677734375 -2.74394677734375 -2.74394677734375 -2.74394677734375
-1.722614095052083 -2.722614095052083 -2.722614095052084 -2.722614095052083
-1.701281412760417 -2.701281412760417 -2.701281412760417 -2.701281412760417
-1.67994873046875 -2.67994873046875 -2.67994873046875 -2.67994873046875
-1.658616048177083 -2.658616048177083 -2.658616048177083 -2.658616048177083
-1.637283365885417 -2.637283365885417 -2.637283365885416 -2.637283365885417
-1.61595068359375 -2.61595068359375 -2.61595068359375 -2.61595068359375
-1.594618001302083 -2.594618001302083 -2.594618001302083 -2.594618001302083
-1.573285319010417 -2.573285319010417 -2.573285319010417 -2.573285319010417
-1.55195263671875 -2.55195263671875 -2.551952636718751 -2.55195263671875
-1.530619954427083 -2.530619954427083 -2.530619954427083 -2.530619954427083
-1.509287272135417 -2.509287272135417 -2.509287272135417 -2.509287272135417
-1.48795458984375 -2.48795458984375 -2.48795458984375 -2.48795458984375
-1.466621907552084 -2.466621907552084 -2.466621907552083 -2.466621907552084
-1.445289225260417 -2.445289225260417 -2.445289225260417 -2.445289225260417
-1.42395654296875 -2.42395654296875 -2.42395654296875 -2.42395654296875
-1.402623860677084 -2.402623860677084 -2.402623860677084 -2.402623860677084
-1.381291178385417 -2.381291178385417 -2.381291178385417 -2.381291178385417
-1.35995849609375 -2.35995849609375 -2.35995849609375 -2.35995849609375
-1.338625813802083 -2.338625813802083 -2.338625813802084 -2.338625813802083
-1.317293131510417 -2.317293131510417 -2.317293131510417 -2.317293131510417
-1.29596044921875 -2.29596044921875 -2.29596044921875 -2.29596044921875
-1.274627766927084 -2.274627766927084 -2.274627766927084 -2.274627766927084
-1.253295084635417 -2.253295084635417 -2.253295084635417 -2.253295084635417
-1.23196240234375 -2.23196240234375 -2.231962402343751 -2.23196240234375
-1.210629720052084 -2.210629720052084 -2.210629720052084 -2.210629720052084
-1.189297037760417 -2.189297037760417 -2.189297037760417 -2.189297037760417
-1.16796435546875 -2.16796435546875 -2.16796435546875 -2.16796435546875
-1.146631673177084 -2.146631673177084 -2.146631673177083 -2.146631673177084
-1.125298990885417 -2.125298990885417 -2.125298990885417 -2.125298990885417
-1.10396630859375 -2.10396630859375 -2.10396630859375 -2.10396630859375
-1.082633626302084 -2.082633626302084 -2.082633626302083 -2.082633626302084
-1.061300944010417 -2.061300944010417 -2.061300944010418 -2.061300944010417
-1.039968261718751 -2.039968261718751 -2.039968261718751 -2.039968261718751
-1.018635579427084 -2.018635579427084 -2.018635579427084 -2.018635579427084
-0.9973028971354172 -1.997302897135417 -1.997302897135417 -1.997302897135417
-0.9759702148437505 -1.97597021484375 -1.97597021484375 -1.97597021484375
-0.9546375325520838 -1.954637532552084 -1.954637532552084 -1.954637532552084
-0.9333048502604168 -1.933304850260417 -1.933304850260417 -1.933304850260417
-0.9119721679687501 -1.91197216796875 -1.91197216796875 -1.91197216796875
-0.8906394856770833 -1.890639485677083 -1.890639485677083 -1.890639485677083
-0.8693068033854166 -1.869306803385417 -1.869306803385417 -1.869306803385417
-0.8479741210937499 -1.84797412109375 -1.84797412109375 -1.84797412109375
-0.8266414388020831 -1.826641438802083 -1.826641438802083 -1.826641438802083
-0.8053087565104164 -1.805308756510416 -1.805308756510416 -1.805308756510416
-0.7839760742187497 -1.78397607421875 -1.78397607421875 -1.78397607421875
-0.7626433919270829 -1.762643391927083 -1.762643391927083 -1.762643391927083
-0.7413107096354159 -1.741310709635416 -1.741310709635416 -1.741310709635416
-0.7199780273437493 -1.719978027343749 -1.719978027343749 -1.719978027343749
-0.6986453450520828 -1.698645345052083 -1.698645345052083 -1.698645345052083
-0.6773126627604157 -1.677312662760416 -1.677312662760416 -1.677312662760416
-0.6559799804687488 -1.655979980468749 -1.655979980468749 -1.655979980468749
-0.6346472981770823 -1.634647298177082 -1.634647298177082 -1.634647298177082
-0.6133146158854156 -1.613314615885416 -1.613314615885415 -1.613314615885416
-0.5919819335937487 -1.591981933593749 -1.591981933593749 -1.591981933593749
-0.5706492513020819 -1.570649251302082 -1.570649251302082 -1.570649251302082
-0.5493165690104153 -1.549316569010415 -1.549316569010415 -1.549316569010415
-0.5279838867187485 -1.527983886718749 -1.527983886718749 -1.527983886718749
-0.5066512044270817 -1.506651204427082 -1.506651204427082 -1.506651204427082
-0.4853185221354149 -1.485318522135415 -1.485318522135415 -1.485318522135415
-0.4639858398437481 -1.463985839843748 -1.463985839843748 -1.463985839843748
-0.4426531575520815 -1.442653157552082 -1.442653157552082 -1.442653157552082
-0.4213204752604147 -1.421320475260415 -1.421320475260415 -1.421320475260415
-0.3999877929687479 -1.399987792968748 -1.399987792968748 -1.399987792968748
-0.3786551106770811 -1.378655110677081 -1.378655110677081 -1.378655110677081
-0.3573224283854145 -1.357322428385415 -1.357322428385415 -1.357322428385415
-0.3359897460937477 -1.335989746093748 -1.335989746093748 -1.335989746093748
-0.3146570638020807 -1.314657063802081 -1.31465706380208 -1.314657063802081
-0.2933243815104141 -1.293324381510414 -1.293324381510414 -1.293324381510414
-0.2719916992187476 -1.271991699218748 -1.271991699218748 -1.271991699218748
-0.2506590169270807 -1.250659016927081 -1.250659016927081 -1.250659016927081
-0.2293263346354136 -1.229326334635414 -1.229326334635414 -1.229326334635414
-0.2079936523437471 -1.207993652343747 -1.207993652343747 -1.207993652343747
-0.1866609700520805 -1.18666097005208 -1.18666097005208 -1.18666097005208
-0.1653282877604135 -1.165328287760413 -1.165328287760413 -1.165328287760413
-0.1439956054687467 -1.143995605468747 -1.143995605468747 -1.143995605468747
-0.1226629231770801 -1.12266292317708 -1.12266292317708 -1.12266292317708
-0.1013302408854133 -1.101330240885413 -1.101330240885413 -1.101330240885413
-0.07999755859374647 -1.079997558593746 -1.079997558593746 -1.079997558593746
-0.05866487630207972 -1.05866487630208 -1.05866487630208 -1.05866487630208
-0.0373321940104131 -1.037332194010413 -1.037332194010413 -1.037332194010413
-0.01599951171874625 -1.015999511718746 -1.015999511718746 -1.015999511718746
0.005333170572920487 -0.9946668294270795 -0.9946668294270795 -0.9946668294270795
0.026665852864587 -0.973334147135413 -0.973334147135413 -0.973334147135413
0.04799853515625363 -0.9520014648437463 -0.9520014648437463 -0.9520014648437463
0.06933121744792015 -0.9306687825520799 -0.9306687825520799 -0.9306687825520799
0.09066389973958666 -0.9093361002604134 -0.9093361002604134 -0.9093361002604134
0.1119965820312533 -0.8880034179687467 -0.8880034179687467 -0.8880034179687467
0.1333292643229198 -0.8666707356770802 -0.8666707356770802 -0.8666707356770802
0.1546619466145862 -0.8453380533854137 -0.8453380533854137 -0.8453380533854137
0.1759946289062527 -0.8240053710937474 -0.8240053710937474 -0.8240053710937472
0.1973273111979195 -0.8026726888020805 -0.8026726888020805 -0.8026726888020805
0.2186599934895859 -0.7813400065104141 -0.7813400065104141 -0.7813400065104141
0.2399926757812524 -0.7600073242187477 -0.7600073242187477 -0.7600073242187476
0.261325358072919 -0.7386746419270809 -0.7386746419270809 -0.738674641927081
0.2826580403645855 -0.7173419596354145 -0.7173419596354145 -0.7173419596354145
0.303990722656252 -0.6960092773437481 -0.6960092773437481 -0.696009277343748
0.3253234049479187 -0.6746765950520812 -0.6746765950520812 -0.6746765950520813
0.3466560872395852 -0.6533439127604148 -0.6533439127604148 -0.6533439127604148
0.3679887695312516 -0.6320112304687484 -0.6320112304687484 -0.6320112304687484
0.3893214518229181 -0.610678548177082 -0.610678548177082 -0.6106785481770819
0.4106541341145848 -0.5893458658854152 -0.5893458658854152 -0.5893458658854152
0.4319868164062513 -0.5680131835937487 -0.5680131835937487 -0.5680131835937487
0.4533194986979177 -0.5466805013020823 -0.5466805013020823 -0.5466805013020823
0.4746521809895844 -0.5253478190104155 -0.5253478190104155 -0.5253478190104156
0.4959848632812509 -0.5040151367187491 -0.5040151367187491 -0.5040151367187491
0.5173175455729173 -0.4826824544270827 -0.4826824544270827 -0.4826824544270827
0.5386502278645841 -0.4613497721354158 -0.4613497721354158 -0.4613497721354159
0.5599829101562506 -0.4400170898437494 -0.4400170898437494 -0.4400170898437494
0.581315592447917 -0.418684407552083 -0.418684407552083 -0.418684407552083
0.6026482747395835 -0.3973517252604166 -0.3973517252604166 -0.3973517252604165
0.6239809570312501 -0.3760190429687498 -0.3760190429687498 -0.3760190429687499
0.6453136393229166 -0.3546863606770834 -0.3546863606770834 -0.3546863606770834
0.6666463216145831 -0.333353678385417 -0.333353678385417 -0.3333536783854169
0.6879790039062498 -0.3120209960937501 -0.3120209960937501 -0.3120209960937502
0.7093116861979163 -0.2906883138020837 -0.2906883138020837 -0.2906883138020837
0.7306443684895827 -0.2693556315104173 -0.2693556315104173 -0.2693556315104173
0.7519770507812495 -0.2480229492187505 -0.2480229492187505 -0.2480229492187505
0.773309733072916 -0.226690266927084 -0.226690266927084 -0.226690266927084
0.7946424153645824 -0.2053575846354176 -0.2053575846354176 -0.2053575846354176
0.8159750976562488 -0.1840249023437512 -0.1840249023437512 -0.1840249023437511
0.8373077799479155 -0.1626922200520844 -0.1626922200520844 -0.1626922200520845
0.858640462239582 -0.141359537760418 -0.141359537760418 -0.141359537760418
0.8799731445312485 -0.1200268554687516 -0.1200268554687516 -0.1200268554687515
0.9013058268229152 -0.09869417317708473 -0.09869417317708473 -0.09869417317708484
0.9226385091145817 -0.07736149088541833 -0.07736149088541833 -0.07736149088541833
0.9439711914062482 -0.05602880859375192 -0.05602880859375192 -0.05602880859375192
0.9653038736979148 -0.03469612630208507 -0.03469612630208507 -0.03469612630208518
0.9866365559895813 -0.01336344401041867 -0.01336344401041867 -0.01336344401041867
1.007969238281248 0.007969238281247737 0.007969238281247737 0.007969238281247737
1.029301920572914 0.02930192057291414 0.02930192057291414 0.02930192057291414
1.050634602864581 0.05063460286458099 0.05063460286458099 0.05063460286458099
1.071967285156247 0.0719672851562474 0.0719672851562474 0.0719672851562474
1.093299967447914 0.0932999674479138 0.0932999674479138 0.0932999674479138
1.114632649739581 0.1146326497395806 0.1146326497395806 0.1146326497395806
1.135965332031247 0.1359653320312471 0.1359653320312471 0.1359653320312471
1.157298014322913 0.1572980143229135 0.1572980143229135 0.1572980143229135
1.17863069661458 0.1786306966145803 0.1786306966145803 0.1786306966145803
1.199963378906247 0.1999633789062467 0.1999633789062467 0.1999633789062467
1.221296061197913 0.2212960611979131 0.2212960611979131 0.2212960611979131
1.24262874348958 0.2426287434895795 0.2426287434895795 0.2426287434895795
1.263961425781246 0.2639614257812464 0.2639614257812464 0.2639614257812464
1.285294108072913 0.2852941080729128 0.2852941080729128 0.2852941080729128
1.306626790364579 0.3066267903645792 0.3066267903645792 0.3066267903645792
1.327959472656246 0.327959472656246 0.327959472656246 0.327959472656246
1.349292154947912 0.3492921549479124 0.3492921549479124 0.3492921549479124
1.370624837239579 0.3706248372395788 0.3706248372395788 0.3706248372395788
1.391957519531245 0.3919575195312452 0.3919575195312452 0.3919575195312452
1.413290201822912 0.4132902018229121 0.4132902018229121 0.4132902018229121
1.434622884114579 0.4346228841145785 0.4346228841145785 0.4346228841145785
1.455955566406245 0.4559555664062449 0.4559555664062449 0.4559555664062449
1.477288248697912 0.4772882486979118 0.4772882486979118 0.4772882486979118
1.498620930989578 0.4986209309895782 0.4986209309895782 0.4986209309895782
1.519953613281245 0.5199536132812446 0.5199536132812446 0.5199536132812446
1.541286295572911 0.5412862955729114 0.5412862955729114 0.5412862955729114
1.562618977864578 0.5626189778645778 0.5626189778645778 0.5626189778645778
1.583951660156244 0.5839516601562442 0.5839516601562442 0.5839516601562442
1.605284342447911 0.6052843424479106 0.6052843424479106 0.6052843424479106
1.626617024739577 0.6266170247395775 0.6266170247395775 0.6266170247395775
1.647949707031244 0.6479497070312439 0.6479497070312439 0.6479497070312439
1.66928238932291 0.6692823893229103 0.6692823893229103 0.6692823893229103
1.690615071614577 0.6906150716145771 0.6906150716145771 0.6906150716145771
1.711947753906244 0.7119477539062435 0.7119477539062435 0.7119477539062435
1.73328043619791 0.7332804361979099 0.7332804361979099 0.7332804361979099
1.754613118489577 0.7546131184895768 0.7546131184895768 0.7546131184895768
1.775945800781243 0.7759458007812432 0.7759458007812432 0.7759458007812432
1.79727848307291 0.7972784830729096 0.7972784830729096 0.7972784830729096
1.818611165364576 0.818611165364576 0.818611165364576 0.818611165364576
1.839943847656243 0.8399438476562429 0.8399438476562429 0.8399438476562429
1.861276529947909 0.8612765299479094 0.8612765299479094 0.8612765299479094
1.882609212239576 0.8826092122395757 0.8826092122395757 0.8826092122395757
1.903941894531243 0.9039418945312425 0.9039418945312425 0.9039418945312425
1.925274576822909 0.925274576822909 0.925274576822909 0.925274576822909
1.946607259114575 0.9466072591145753 0.9466072591145753 0.9466072591145753
1.967939941406242 0.9679399414062422 0.9679399414062422 0.9679399414062422
1.989272623697909 0.9892726236979087 0.9892726236979087 0.9892726236979087
1.99981689825654 0.9998168982565403 0.9998168982565403 0.9998168982565403

View File

@ -1,30 +1,30 @@
()
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
(Note(frequency=830.6076004423605, panning=0.0, tremolo_rate=0.0, tremolo_depth=0.0, bend_rate=0.0, bend_depth=0.0, bend_mode=synthio.BendMode.VIBRATO, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_waveform=None),)
[-16383, -16383, -16383, -16383, 16383, 16383, 16383, 16383, 16383, -16383, -16383, -16383, -16383, -16383, 16383, 16383, 16383, 16383, 16383, -16383, -16383, -16383, -16383, -16383]
(Note(frequency=830.6076004423605, panning=0.0, tremolo_rate=0.0, tremolo_depth=0.0, bend_rate=0.0, bend_depth=0.0, bend_mode=synthio.BendMode.VIBRATO, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_waveform=None), Note(frequency=830.6076004423605, panning=0.0, tremolo_rate=0.0, tremolo_depth=0.0, bend_rate=0.0, bend_depth=0.0, bend_mode=synthio.BendMode.VIBRATO, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_waveform=None))
[0, 0, 0, 0, 0, 0, 0, 0, 28045, 0, 0, 0, 0, -28046, 0, 0, 0, 0, 28045, 0, 0, 0, 0, -28046]
(Note(frequency=830.6076004423605, panning=0.0, tremolo_rate=0.0, tremolo_depth=0.0, bend_rate=0.0, bend_depth=0.0, bend_mode=synthio.BendMode.VIBRATO, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_waveform=None),)
[0, 0, 0, 28045, 0, 0, 0, 0, 0, 0, 0, 0, 28045, 0, 0, 0, 0, -28046, 0, 0, 0, 0, 28045, 0]
(-5242, 5242)
(-10485, 10484)
(-15727, 15727)
(-16383, 16383)
(-14286, 14286)
(-13106, 13106)
(-13106, 13106)
(-13106, 13106)
(-13106, 13106)
(-13106, 13106)
(-13106, 13106)
(-13106, 13106)
(-13106, 13106)
(-11009, 11009)
(-8912, 8912)
(-6815, 6815)
(-4718, 4718)
(-2621, 2621)
(-524, 524)
(Note(frequency=830.6076004423605, panning=0.0, amplitude=1.0, bend=0.0, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_bend=0.0, ring_waveform=None),)
[-16383, -16383, -16383, -16383, 16382, 16382, 16382, 16382, 16382, -16383, -16383, -16383, -16383, -16383, 16382, 16382, 16382, 16382, 16382, -16383, -16383, -16383, -16383, -16383]
(Note(frequency=830.6076004423605, panning=0.0, amplitude=1.0, bend=0.0, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_bend=0.0, ring_waveform=None), Note(frequency=830.6076004423605, panning=0.0, amplitude=1.0, bend=0.0, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_bend=0.0, ring_waveform=None))
[-1, -1, -1, -1, -1, -1, -1, -1, 28045, -1, -1, -1, -1, -28046, -1, -1, -1, -1, 28045, -1, -1, -1, -1, -28046]
(Note(frequency=830.6076004423605, panning=0.0, amplitude=1.0, bend=0.0, waveform=None, envelope=None, filter=True, ring_frequency=0.0, ring_bend=0.0, ring_waveform=None),)
[-1, -1, -1, 28045, -1, -1, -1, -1, -1, -1, -1, -1, 28045, -1, -1, -1, -1, -28046, -1, -1, -1, -1, 28045, -1]
(-5242, 5241)
(-10484, 10484)
(-15727, 15726)
(-16383, 16382)
(-14286, 14285)
(-13106, 13105)
(-13106, 13105)
(-13106, 13105)
(-13106, 13105)
(-13106, 13105)
(-13106, 13105)
(-13106, 13105)
(-13106, 13105)
(-11009, 11008)
(-8912, 8911)
(-6815, 6814)
(-4718, 4717)
(-2621, 2620)
(-524, 523)
(0, 0)
(0, 0)
(0, 0)

View File

@ -0,0 +1,21 @@
import array
from math import sin, pi
from synthio import LFO, lfo_tick
bend_out = array.array("h", [0, 32767])
bend_in = array.array("h", [32767, 0])
triangle = array.array("h", [0, 32767, 0, -32767])
sine = array.array("h", [int(32767 * sin(i * 2 * pi / 600)) for i in range(600)])
lfos = [
LFO(bend_out, once=True, rate=4),
LFO(bend_in, once=True, rate=2.5, scale=2),
LFO(triangle, rate=3),
LFO(bend_in, interpolate=False, rate=5),
LFO(bend_in, interpolate=True, rate=5),
]
lfos[2].rate = lfos[1]
lfos[2].offset = lfos[0]
for i in range(100):
print(i * 256 / 48000, *list(lfo_tick(*lfos)) + [l.phase for l in lfos])

View File

@ -0,0 +1,100 @@
0.0 0.02133268229166667 1.973273111979167 0.06342789066420661 0.999969482421875 0.9466377766927083 0.02133333333333333 0.01333333333333333 0.01052412326388889 0.02666666666666667 0.02666666666666667
0.005333333333333333 0.04266536458333333 1.946607259114583 0.1262869271612167 0.999969482421875 0.8933060709635416 0.04266666666666667 0.02666666666666667 0.02090602864583333 0.05333333333333333 0.05333333333333333
0.01066666666666667 0.06399804687500001 1.91994140625 0.1885771094910304 0.999969482421875 0.8399743652343751 0.064 0.03999999999999999 0.03114571614583333 0.07999999999999998 0.07999999999999998
0.016 0.08533072916666667 1.893275553385417 0.2502984376536475 0.999969482421875 0.7866426595052083 0.08533333333333333 0.05333333333333333 0.04124318576388888 0.1066666666666667 0.1066666666666667
0.02133333333333333 0.1066634114583333 1.866609700520833 0.3114509116490682 0.999969482421875 0.7333109537760417 0.1066666666666667 0.06666666666666666 0.05119843749999999 0.1333333333333333 0.1333333333333333
0.02666666666666667 0.12799609375 1.83994384765625 0.3720345314772924 0.999969482421875 0.6799792480468749 0.128 0.08 0.06101147135416667 0.16 0.16
0.032 0.1493287760416667 1.813277994791667 0.4320492971383201 0.999969482421875 0.6266475423177083 0.1493333333333333 0.09333333333333334 0.07068228732638888 0.1866666666666667 0.1866666666666667
0.03733333333333333 0.1706614583333334 1.786612141927083 0.4914952086321512 0.999969482421875 0.5733158365885416 0.1706666666666667 0.1066666666666667 0.08021088541666666 0.2133333333333333 0.2133333333333333
0.04266666666666667 0.191994140625 1.7599462890625 0.550372265958786 0.999969482421875 0.519984130859375 0.192 0.12 0.08959726562499998 0.24 0.24
0.048 0.2133268229166667 1.733280436197917 0.6086804691182243 0.999969482421875 0.4666524251302083 0.2133333333333334 0.1333333333333333 0.09884142795138889 0.2666666666666667 0.2666666666666667
0.05333333333333333 0.2346595052083334 1.706614583333333 0.666419818110466 0.999969482421875 0.4133207194010416 0.2346666666666667 0.1466666666666667 0.1079433723958333 0.2933333333333334 0.2933333333333334
0.05866666666666667 0.2559921875000001 1.67994873046875 0.7235903129355112 0.999969482421875 0.3599890136718749 0.256 0.16 0.1169030989583333 0.32 0.32
0.064 0.2773248697916667 1.653282877604167 0.78019195359336 0.999969482421875 0.3066573079427083 0.2773333333333334 0.1733333333333333 0.1257206076388889 0.3466666666666667 0.3466666666666667
0.06933333333333334 0.2986575520833333 1.626617024739583 0.8362247400840124 0.999969482421875 0.2533256022135416 0.2986666666666667 0.1866666666666667 0.1343958984375 0.3733333333333333 0.3733333333333333
0.07466666666666667 0.319990234375 1.599951171875 0.8916886724074683 0.999969482421875 0.199993896484375 0.32 0.2 0.1429289713541666 0.4 0.4
0.08 0.3413229166666667 1.573285319010417 0.9465837505637273 0.999969482421875 0.1466621907552083 0.3413333333333333 0.2133333333333333 0.1513198263888889 0.4266666666666667 0.4266666666666667
0.08533333333333333 0.3626555989583333 1.546619466145833 1.00090997455279 0.999969482421875 0.09333048502604161 0.3626666666666666 0.2266666666666667 0.1595684635416666 0.4533333333333333 0.4533333333333333
0.09066666666666666 0.3839882812499999 1.51995361328125 1.054667344374657 0.999969482421875 0.03999877929687493 0.384 0.24 0.1676748828125 0.4800000000000001 0.4800000000000001
0.096 0.4053209635416666 1.493287760416667 1.107855860029326 0.0 0.01333292643229175 0.4053333333333333 0.2533333333333334 0.1756390842013889 0.5066666666666667 0.5066666666666667
0.1013333333333333 0.4266536458333333 1.466621907552083 1.1604755215168 0.0 0.06666463216145832 0.4266666666666666 0.2666666666666667 0.1834610677083333 0.5333333333333333 0.5333333333333333
0.1066666666666667 0.4479863281249999 1.4399560546875 1.212526328837077 0.0 0.1199963378906249 0.4479999999999999 0.28 0.1911408333333333 0.56 0.56
0.112 0.4693190104166666 1.413290201822917 1.264008281990157 0.0 0.1733280436197915 0.4693333333333332 0.2933333333333333 0.1986783810763889 0.5866666666666665 0.5866666666666665
0.1173333333333333 0.4906516927083332 1.386624348958333 1.314921380976041 0.0 0.226659749348958 0.4906666666666665 0.3066666666666666 0.2060737109375 0.6133333333333332 0.6133333333333332
0.1226666666666667 0.5119843749999999 1.35995849609375 1.365265625794728 0.0 0.2799914550781246 0.5119999999999999 0.3199999999999999 0.2133268229166667 0.6399999999999998 0.6399999999999998
0.128 0.5333170572916666 1.333292643229167 1.415041016446219 0.0 0.3333231608072911 0.5333333333333332 0.3333333333333332 0.2204377170138889 0.6666666666666664 0.6666666666666664
0.1333333333333333 0.5546497395833332 1.306626790364584 1.464247552930514 0.0 0.3866548665364577 0.5546666666666665 0.3466666666666665 0.2274063932291666 0.693333333333333 0.693333333333333
0.1386666666666667 0.5759824218749998 1.2799609375 1.512885235247612 0.0 0.4399865722656243 0.5759999999999998 0.3599999999999998 0.2342328515625 0.7199999999999997 0.7199999999999997
0.144 0.5973151041666664 1.253295084635417 1.560954063397513 0.0 0.4933182779947908 0.5973333333333332 0.3733333333333331 0.2409170920138889 0.7466666666666662 0.7466666666666662
0.1493333333333333 0.6186477864583332 1.226629231770834 1.608454037380218 0.0 0.5466499837239574 0.6186666666666665 0.3866666666666664 0.2474591145833333 0.7733333333333329 0.7733333333333329
0.1546666666666667 0.6399804687499998 1.199963378906251 1.624514745148023 0.0 0.599981689453124 0.6399999999999998 0.3999999999999997 0.2538589192708333 0.7999999999999995 0.7999999999999995
0.16 0.6613131510416665 1.173297526041667 1.620817844083044 0.0 0.6533133951822906 0.6613333333333332 0.413333333333333 0.2601165060763889 0.826666666666666 0.826666666666666
0.1653333333333333 0.682645833333333 1.146631673177084 1.617689797185262 0.0 0.7066451009114571 0.6826666666666664 0.4266666666666664 0.266231875 0.8533333333333328 0.8533333333333328
0.1706666666666667 0.7039785156249997 1.1199658203125 1.615130604454676 0.0 0.7599768066406237 0.7039999999999997 0.4399999999999997 0.2722050260416667 0.8799999999999994 0.8799999999999994
0.176 0.7253111979166665 1.093299967447918 1.613140265891287 0.0 0.8133085123697903 0.725333333333333 0.453333333333333 0.2780359592013889 0.9066666666666659 0.9066666666666659
0.1813333333333333 0.7466438802083331 1.066634114583334 1.611718781495094 0.0 0.8666402180989568 0.7466666666666663 0.4666666666666663 0.2837246744791667 0.9333333333333325 0.9333333333333325
0.1866666666666667 0.7679765624999996 1.039968261718751 1.610866151266098 0.0 0.9199719238281235 0.7679999999999997 0.4799999999999996 0.289271171875 0.9599999999999993 0.9599999999999993
0.192 0.7893092447916663 1.013302408854167 1.610582375204298 0.0 0.97330362955729 0.789333333333333 0.4933333333333329 0.2946754513888889 0.9866666666666658 0.9866666666666658
0.1973333333333333 0.810641927083333 0.9866365559895842 1.610867453309694 0.999969482421875 0.9733036295572933 0.8106666666666664 0.5066666666666663 0.2999375130208333 0.01333333333333253 0.01333333333333253
0.2026666666666666 0.8319746093749997 0.9599707031250009 1.611721385582288 0.999969482421875 0.9199719238281267 0.8319999999999997 0.5199999999999996 0.3050573567708334 0.0399999999999992 0.0399999999999992
0.208 0.8533072916666663 0.9333048502604175 1.613144172022077 0.999969482421875 0.86664021809896 0.853333333333333 0.5333333333333329 0.3100349826388889 0.06666666666666586 0.06666666666666586
0.2133333333333333 0.874639973958333 0.9066389973958342 1.615135812629064 0.999969482421875 0.8133085123697935 0.8746666666666663 0.5466666666666661 0.314870390625 0.0933333333333325 0.0933333333333325
0.2186666666666667 0.8959726562499995 0.879973144531251 1.617696307403246 0.999969482421875 0.7599768066406266 0.8959999999999996 0.5599999999999995 0.3195635807291667 0.1199999999999992 0.1199999999999992
0.224 0.9173053385416662 0.8533072916666677 1.620825656344625 0.999969482421875 0.70664510091146 0.9173333333333328 0.5733333333333328 0.3241145529513889 0.1466666666666659 0.1466666666666659
0.2293333333333333 0.9386380208333328 0.8266414388020845 1.624523859453201 0.999969482421875 0.6533133951822933 0.9386666666666661 0.5866666666666661 0.3285233072916667 0.1733333333333325 0.1733333333333325
0.2346666666666667 0.9599707031249995 0.7999755859375012 1.628790916728973 0.999969482421875 0.5999816894531267 0.9599999999999994 0.5999999999999995 0.33278984375 0.1999999999999992 0.1999999999999992
0.24 0.9813033854166662 0.7733097330729178 1.633626828171941 0.999969482421875 0.5466499837239599 0.9813333333333329 0.6133333333333328 0.3369141623263889 0.2266666666666659 0.2266666666666659
0.2453333333333333 0.9999389657750726 0.7466438802083346 1.636334491848846 0.999969482421875 0.4933182779947932 0.999969482421875 0.626666666666666 0.3408962630208334 0.2533333333333325 0.2533333333333325
0.2506666666666666 0.9999389657750726 0.7199780273437513 1.620975429334541 0.999969482421875 0.4399865722656266 0.999969482421875 0.6399999999999993 0.3447361458333334 0.2799999999999992 0.2799999999999992
0.256 0.9999389657750726 0.6933121744791681 1.606185220987432 0.999969482421875 0.3866548665364599 0.999969482421875 0.6533333333333326 0.348433810763889 0.3066666666666658 0.3066666666666658
0.2613333333333333 0.9999389657750726 0.6666463216145847 1.59196386680752 0.999969482421875 0.3333231608072933 0.999969482421875 0.666666666666666 0.3519892578125001 0.3333333333333325 0.3333333333333325
0.2666666666666667 0.9999389657750726 0.6399804687500015 1.578311366794804 0.999969482421875 0.2799914550781266 0.999969482421875 0.6799999999999993 0.3554024869791668 0.3599999999999992 0.3599999999999992
0.272 0.9999389657750726 0.6133146158854181 1.565227720949285 0.999969482421875 0.2266597493489599 0.999969482421875 0.6933333333333326 0.358673498263889 0.3866666666666659 0.3866666666666659
0.2773333333333333 0.9999389657750726 0.5866487630208349 1.552712929270962 0.999969482421875 0.1733280436197932 0.999969482421875 0.7066666666666659 0.3618022916666668 0.4133333333333326 0.4133333333333326
0.2826666666666667 0.9999389657750726 0.5599829101562515 1.540766991759836 0.999969482421875 0.1199963378906266 0.999969482421875 0.7199999999999992 0.3647888671875001 0.4399999999999992 0.4399999999999992
0.288 0.9999389657750726 0.5333170572916684 1.529389908415906 0.999969482421875 0.06666463216145988 0.999969482421875 0.7333333333333325 0.3676332248263891 0.4666666666666659 0.4666666666666659
0.2933333333333334 0.9999389657750726 0.506651204427085 1.518581679239173 0.999969482421875 0.0133329264322932 0.999969482421875 0.7466666666666658 0.3703353645833335 0.4933333333333326 0.4933333333333326
0.2986666666666667 0.9999389657750726 0.4799853515625018 1.508342304229636 0.0 0.03999877929687348 0.999969482421875 0.7599999999999991 0.3728952864583335 0.5199999999999992 0.5199999999999992
0.304 0.9999389657750726 0.4533194986979185 1.498671783387296 0.0 0.09333048502604004 0.999969482421875 0.7733333333333325 0.375312990451389 0.5466666666666659 0.5466666666666659
0.3093333333333334 0.9999389657750726 0.4266536458333352 1.489570116712152 0.0 0.1466621907552066 0.999969482421875 0.7866666666666657 0.3775884765625002 0.5733333333333325 0.5733333333333325
0.3146666666666667 0.9999389657750726 0.3999877929687519 1.481037304204205 0.0 0.1999938964843732 0.999969482421875 0.799999999999999 0.3797217447916668 0.5999999999999991 0.5999999999999991
0.32 0.9999389657750726 0.3733219401041686 1.473073345863454 0.0 0.2533256022135397 0.999969482421875 0.8133333333333324 0.381712795138889 0.6266666666666657 0.6266666666666657
0.3253333333333333 0.9999389657750726 0.3466560872395854 1.4656782416899 0.0 0.3066573079427063 0.999969482421875 0.8266666666666657 0.3835616276041669 0.6533333333333323 0.6533333333333323
0.3306666666666667 0.9999389657750726 0.3199902343750021 1.458851991683542 0.0 0.3599890136718729 0.999969482421875 0.839999999999999 0.3852682421875002 0.6799999999999989 0.6799999999999989
0.336 0.9999389657750726 0.2933243815104188 1.452594595844381 0.0 0.4133207194010394 0.999969482421875 0.8533333333333323 0.3868326388888891 0.7066666666666656 0.7066666666666656
0.3413333333333333 0.9999389657750726 0.2666585286458355 1.446906054172416 0.0 0.466652425130206 0.999969482421875 0.8666666666666655 0.3882548177083335 0.7333333333333321 0.7333333333333321
0.3466666666666667 0.9999389657750726 0.2399926757812522 1.441786366667647 0.0 0.5199841308593726 0.999969482421875 0.8799999999999988 0.3895347786458335 0.7599999999999988 0.7599999999999988
0.352 0.9999389657750726 0.2133268229166689 1.437235533330075 0.0 0.5733158365885391 0.999969482421875 0.8933333333333323 0.3906725217013891 0.7866666666666654 0.7866666666666654
0.3573333333333333 0.9999389657750726 0.1866609700520856 1.4332535541597 0.0 0.6266475423177057 0.999969482421875 0.9066666666666656 0.3916680468750002 0.813333333333332 0.813333333333332
0.3626666666666667 0.9999389657750726 0.1599951171875024 1.429840429156521 0.0 0.6799792480468723 0.999969482421875 0.9199999999999989 0.3925213541666669 0.8399999999999986 0.8399999999999986
0.368 0.9999389657750726 0.1333292643229191 1.426996158320538 0.0 0.7333109537760389 0.999969482421875 0.9333333333333321 0.3932324435763892 0.8666666666666652 0.8666666666666652
0.3733333333333333 0.9999389657750726 0.1066634114583358 1.424720741651752 0.0 0.7866426595052054 0.999969482421875 0.9466666666666654 0.393801315104167 0.8933333333333319 0.8933333333333319
0.3786666666666667 0.9999389657750726 0.07999755859375251 1.423014179150163 0.0 0.8399743652343719 0.999969482421875 0.9599999999999987 0.3942279687500003 0.9199999999999985 0.9199999999999985
0.384 0.9999389657750726 0.05333170572916924 1.42187647081577 0.0 0.8933060709635384 0.999969482421875 0.973333333333332 0.3945124045138892 0.9466666666666651 0.9466666666666651
0.3893333333333333 0.9999389657750726 0.02666585286458595 1.421307616648573 0.0 0.9466377766927051 0.999969482421875 0.9866666666666653 0.3946546223958336 0.9733333333333317 0.9733333333333317
0.3946666666666667 0.9999389657750726 6.103329360485077e-05 1.421306314644712 0.0 0.9999694824218716 0.999969482421875 0.999969482421875 0.3946549479067329 0.999999999999998 0.999999999999998
0.4 0.9999389657750726 6.103329360485077e-05 1.42130501264085 0.999969482421875 0.9466377766927115 0.999969482421875 0.999969482421875 0.3946552734176321 0.02666666666666506 0.02666666666666506
0.4053333333333333 0.9999389657750726 6.103329360485077e-05 1.421303710636988 0.999969482421875 0.8933060709635448 0.999969482421875 0.999969482421875 0.3946555989285314 0.05333333333333172 0.05333333333333172
0.4106666666666666 0.9999389657750726 6.103329360485077e-05 1.421302408633126 0.999969482421875 0.8399743652343782 0.999969482421875 0.999969482421875 0.3946559244394306 0.07999999999999839 0.07999999999999839
0.416 0.9999389657750726 6.103329360485077e-05 1.421301106629265 0.999969482421875 0.7866426595052117 0.999969482421875 0.999969482421875 0.3946562499503298 0.106666666666665 0.106666666666665
0.4213333333333333 0.9999389657750726 6.103329360485077e-05 1.421299804625403 0.999969482421875 0.7333109537760448 0.999969482421875 0.999969482421875 0.3946565754612291 0.1333333333333317 0.1333333333333317
0.4266666666666667 0.9999389657750726 6.103329360485077e-05 1.421298502621541 0.999969482421875 0.6799792480468783 0.999969482421875 0.999969482421875 0.3946569009721283 0.1599999999999984 0.1599999999999984
0.432 0.9999389657750726 6.103329360485077e-05 1.42129720061768 0.999969482421875 0.6266475423177114 0.999969482421875 0.999969482421875 0.3946572264830275 0.1866666666666651 0.1866666666666651
0.4373333333333333 0.9999389657750726 6.103329360485077e-05 1.421295898613818 0.999969482421875 0.5733158365885449 0.999969482421875 0.999969482421875 0.3946575519939268 0.2133333333333317 0.2133333333333317
0.4426666666666667 0.9999389657750726 6.103329360485077e-05 1.421294596609956 0.999969482421875 0.5199841308593781 0.999969482421875 0.999969482421875 0.394657877504826 0.2399999999999984 0.2399999999999984
0.448 0.9999389657750726 6.103329360485077e-05 1.421293294606095 0.999969482421875 0.4666524251302116 0.999969482421875 0.999969482421875 0.3946582030157252 0.2666666666666651 0.2666666666666651
0.4533333333333333 0.9999389657750726 6.103329360485077e-05 1.421291992602233 0.999969482421875 0.4133207194010449 0.999969482421875 0.999969482421875 0.3946585285266245 0.2933333333333317 0.2933333333333317
0.4586666666666667 0.9999389657750726 6.103329360485077e-05 1.421290690598371 0.999969482421875 0.3599890136718782 0.999969482421875 0.999969482421875 0.3946588540375237 0.3199999999999984 0.3199999999999984
0.4640000000000001 0.9999389657750726 6.103329360485077e-05 1.421289388594509 0.999969482421875 0.3066573079427115 0.999969482421875 0.999969482421875 0.3946591795484229 0.3466666666666651 0.3466666666666651
0.4693333333333333 0.9999389657750726 6.103329360485077e-05 1.421288086590648 0.999969482421875 0.2533256022135448 0.999969482421875 0.999969482421875 0.3946595050593222 0.3733333333333317 0.3733333333333317
0.4746666666666667 0.9999389657750726 6.103329360485077e-05 1.421286784586786 0.999969482421875 0.1999938964843782 0.999969482421875 0.999969482421875 0.3946598305702214 0.3999999999999984 0.3999999999999984
0.48 0.9999389657750726 6.103329360485077e-05 1.421285482582924 0.999969482421875 0.1466621907552115 0.999969482421875 0.999969482421875 0.3946601560811207 0.4266666666666651 0.4266666666666651
0.4853333333333333 0.9999389657750726 6.103329360485077e-05 1.421284180579062 0.999969482421875 0.09333048502604482 0.999969482421875 0.999969482421875 0.3946604815920199 0.4533333333333317 0.4533333333333317
0.4906666666666666 0.9999389657750726 6.103329360485077e-05 1.421282878575201 0.999969482421875 0.03999877929687814 0.999969482421875 0.999969482421875 0.3946608071029191 0.4799999999999985 0.4799999999999985
0.496 0.9999389657750726 6.103329360485077e-05 1.421281576571339 0.0 0.01333292643228842 0.999969482421875 0.999969482421875 0.3946611326138184 0.506666666666665 0.506666666666665
0.5013333333333333 0.9999389657750726 6.103329360485077e-05 1.421280274567477 0.0 0.066664632161455 0.999969482421875 0.999969482421875 0.3946614581247176 0.5333333333333316 0.5333333333333316
0.5066666666666667 0.9999389657750726 6.103329360485077e-05 1.421278972563615 0.0 0.1199963378906216 0.999969482421875 0.999969482421875 0.3946617836356168 0.5599999999999983 0.5599999999999983
0.512 0.9999389657750726 6.103329360485077e-05 1.421277670559754 0.0 0.1733280436197881 0.999969482421875 0.999969482421875 0.3946621091465161 0.5866666666666649 0.5866666666666649
0.5173333333333333 0.9999389657750726 6.103329360485077e-05 1.421276368555892 0.0 0.2266597493489547 0.999969482421875 0.999969482421875 0.3946624346574153 0.6133333333333315 0.6133333333333315
0.5226666666666667 0.9999389657750726 6.103329360485077e-05 1.42127506655203 0.0 0.2799914550781212 0.999969482421875 0.999969482421875 0.3946627601683145 0.6399999999999981 0.6399999999999981
0.528 0.9999389657750726 6.103329360485077e-05 1.421273764548169 0.0 0.3333231608072878 0.999969482421875 0.999969482421875 0.3946630856792138 0.6666666666666647 0.6666666666666647

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
lfo_test("offset")

View File

@ -0,0 +1,188 @@
0.005333170572916667 0.01599951171875 0.18274755859375
0.01066634114583333 0.0319990234375 0.3608259277343749
0.01599951171875 0.04799853515625 0.5297185058593748
0.02133268229166667 0.06399804687500001 0.6851223144531248
0.02666585286458333 0.07999755859375001 0.8231005859374999
0.0319990234375 0.0959970703125 0.94029638671875
0.03733219401041667 0.11199658203125 1.033810546875
0.04266536458333333 0.12799609375 1.101537353515625
0.04799853515625001 0.14399560546875 1.1419814453125
0.05333170572916668 0.1599951171875 1.154471435546875
0.05866487630208335 0.17599462890625 1.139098876953125
0.06399804687500001 0.1919941406250001 1.096779296875
0.06933121744791668 0.2079936523437501 1.029099609375
0.07466438802083333 0.2239931640625001 0.9384401855468752
0.07999755859375001 0.2399926757812501 0.8277307128906251
0.08533072916666667 0.2559921875000001 0.7006027832031252
0.09066389973958334 0.2719916992187501 0.5609931640625001
0.09599707031249999 0.2879912109375002 0.4132963867187502
0.1013302408854166 0.3039907226562502 0.2621206054687502
0.1066634114583333 0.3199902343750002 0.1121044921875002
0.11199658203125 0.3359897460937502 -0.03211328124999924
0.1173297526041666 0.3519892578125002 -0.1660161132812494
0.1226629231770833 0.3679887695312502 -0.2853925781249989
0.12799609375 0.3839882812500002 -0.386489013671874
0.1333292643229167 0.3999877929687503 -0.4660095214843738
0.1386624348958333 0.4159873046875003 -0.5212380371093741
0.1439956054687499 0.4319868164062503 -0.5502519531249993
0.1493287760416666 0.4479863281250003 -0.5517390136718747
0.1546619466145833 0.4639858398437503 -0.5252414550781252
0.1599951171874999 0.4799853515625003 -0.4710339355468756
0.1653282877604166 0.4959848632812504 -0.3901845703125013
0.1706614583333333 0.5119843750000004 -0.2844938964843768
0.1759946289062499 0.5279838867187504 -0.1565253906250021
0.1813277994791666 0.5439833984375003 -0.009361328125003677
0.1866609700520833 0.5599829101562504 0.153275146484371
0.1919941406249999 0.5759824218750004 0.3273251953124958
0.1973273111979166 0.5919819335937504 0.5083332519531194
0.2026604817708332 0.6079814453125004 0.6916301269531204
0.2079936523437499 0.6239809570312504 0.8726381835937456
0.2133268229166666 0.6399804687500005 1.046688232421871
0.2186599934895832 0.6559799804687505 1.209324707031246
0.2239931640624999 0.6719794921875005 1.356488769531247
0.2293263346354165 0.6879790039062506 1.484457275390623
0.2346595052083332 0.7039785156250005 1.590147949218748
0.2399926757812499 0.7199780273437505 1.670997314453124
0.2453258463541665 0.7359775390625005 1.725204833984375
0.2506590169270832 0.7519770507812505 1.751702392578126
0.2559921874999999 0.7679765625000005 1.750215332031251
0.2613253580729165 0.7839760742187506 1.721201416015627
0.2666585286458333 0.7999755859375006 1.665972900390628
0.2719916992187499 0.8159750976562506 1.586452392578129
0.2773248697916666 0.8319746093750007 1.485355957031254
0.2826580403645833 0.8479741210937506 1.365979492187505
0.2879912109375 0.8639736328125005 1.232076660156255
0.2933243815104167 0.8799731445312506 1.087858886718755
0.2986575520833334 0.8959726562500007 0.9378427734375055
0.3039907226562501 0.9119721679687506 0.7866669921875054
0.3093238932291668 0.9279716796875007 0.6389702148437558
0.3146570638020835 0.9439711914062507 0.4993605957031305
0.3199902343750002 0.9599707031250007 0.3722326660156305
0.3253234049479168 0.9759702148437508 0.26152319335938
0.3306565755208335 0.9919697265625008 0.1708637695312545
0.3359897460937503 1.007969238281251 0.1031840820312535
0.3413229166666669 1.023968750000001 0.06086450195312764
0.3466560872395836 1.039968261718751 0.04549194335937646
0.3519892578125003 1.055967773437501 0.05798193359375037
0.357322428385417 1.071967285156251 0.09842602539062407
0.3626555989583337 1.087966796875001 0.1661528320312475
0.3679887695312503 1.103966308593751 0.2596669921874963
0.3733219401041671 1.119965820312501 0.3768627929687453
0.3786551106770837 1.135965332031251 0.5148410644531184
0.3839882812500004 1.151964843750001 0.6702448730468674
0.3893214518229172 1.167964355468751 0.8391374511718668
0.3946546223958338 1.183963867187501 1.01721582031249
0.3999877929687505 1.199963378906251 1.19996337890624
0.4053209635416672 1.215962890625001 1.382710937499991
0.4106541341145839 1.231962402343751 1.560789306640616
0.4159873046875006 1.247961914062501 1.729681884765617
0.4213204752604173 1.263961425781251 1.885085693359368
0.426653645833334 1.279960937500001 2.023063964843744
0.4319868164062506 1.295960449218751 2.140259765624995
0.4373199869791674 1.311959960937501 2.233773925781247
0.4426531575520841 1.327959472656251 2.301500732421874
0.4479863281250007 1.343958984375001 2.34194482421875
0.4533194986979174 1.359958496093751 2.354434814453127
0.4586526692708341 1.375958007812501 2.339062255859379
0.4639858398437508 1.391957519531251 2.296742675781255
0.4693190104166675 1.407957031250001 2.229062988281257
0.4746521809895841 1.423956542968751 2.138403564453133
0.4799853515625009 1.439956054687501 2.027694091796884
0.4853185221354176 1.455955566406251 1.900566162109385
0.4906516927083342 1.471955078125001 1.760956542968761
0.495984863281251 1.487954589843751 1.613259765625011
0.5013180338541677 1.503954101562501 1.462083984375011
0.5066512044270842 1.519953613281251 1.312067871093762
0.5119843750000009 1.535953125000001 1.167850097656261
0.5173175455729176 1.551952636718751 1.033947265625011
0.5226507161458342 1.567952148437501 0.9145708007812598
0.5279838867187508 1.583951660156251 0.8134743652343838
0.5333170572916675 1.599951171875001 0.7339538574218824
0.5386502278645841 1.615950683593751 0.6787253417968806
0.5439833984375007 1.631950195312501 0.6497114257812537
0.5493165690104174 1.647949707031251 0.6482243652343765
0.554649739583334 1.663949218750001 0.6747219238281246
0.5599829101562506 1.679948730468751 0.7289294433593721
0.5653160807291673 1.695948242187501 0.8097788085937447
0.5706492513020839 1.711947753906251 0.9154694824218678
0.5759824218750005 1.727947265625001 1.043437988281241
0.5813155924479172 1.743946777343751 1.190602050781238
0.5866487630208338 1.759946289062501 1.353238525390612
0.5919819335937504 1.775945800781251 1.527288574218737
0.597315104166667 1.791945312500001 1.708296630859361
0.6026482747395837 1.807944824218751 1.89159350585936
0.6079814453125003 1.823944335937501 2.072601562499986
0.6133146158854169 1.839943847656252 2.246651611328112
0.6186477864583336 1.855943359375001 2.409288085937488
0.6239809570312502 1.871942871093751 2.55645214843749
0.6293141276041668 1.887942382812501 2.684420654296867
0.6346472981770836 1.903941894531251 2.790111328124994
0.6399804687500001 1.919941406250001 2.870960693359372
0.6453136393229167 1.935940917968751 2.925168212890624
0.6506468098958333 1.951940429687502 2.951665771484377
0.6559799804687501 1.967939941406252 2.950178710937505
0.6613131510416666 1.983939453125002 2.921164794921882
0.6666463216145832 1.999877931550145 2.865875246003278
0.6719794921875 1.999877931550145 2.77035522647203
0.6773126627604166 1.999877931550145 2.653259279206408
0.6826458333333331 1.999877931550145 2.517883302643909
0.6879790039062499 1.999877931550145 2.36798095889391
0.6933121744791665 1.999877931550145 2.207763673737661
0.698645345052083 1.999877931550145 2.041748048737661
0.7039785156249997 1.999877931550145 1.874572755768911
0.7093116861979164 1.999877931550145 1.71087646670641
0.714644856770833 1.999877931550145 1.555267335847035
0.7199780273437496 1.999877931550145 1.412139894440784
0.7253111979166663 1.999877931550145 1.285430910065782
0.7306443684895829 1.999877931550145 1.178771974518905
0.7359775390624995 1.999877931550145 1.095092775300153
0.7413107096354162 1.999877931550145 1.036773683503275
0.7466438802083328 1.999877931550145 1.005401613190772
0.7519770507812495 1.999877931550145 1.001892091706394
0.757310221354166 1.999877931550145 1.026336671784516
0.7626433919270827 1.999877931550145 1.078063966706388
0.7679765624999994 1.999877931550145 1.155578615143885
0.773309733072916 1.999877931550145 1.256774904206382
0.7786429036458326 1.999877931550145 1.378753663972005
0.7839760742187493 1.999877931550145 1.518157960847002
0.7893092447916659 1.999877931550145 1.67105102725325
0.7946424153645825 1.999877931550145 1.833129884675124
0.7999755859374992 1.999877931550145 1.999877931550124
0.8053087565104157 1.999877931550145 2.166625978425124
0.8106419270833324 1.999877931550145 2.328704835847
0.815975097656249 1.999877931550145 2.481597902253251
0.8213082682291656 1.999877931550145 2.621002199128253
0.8266414388020824 1.999877931550145 2.742980958893881
0.8319746093749989 1.999877931550145 2.844177247956384
0.8373077799479155 1.999877931550145 2.921691896393887
0.8426409505208323 1.999877931550145 2.973419191315765
0.8479741210937489 1.999877931550145 2.997863771393894
0.8533072916666654 1.999877931550145 2.994354249909522
0.8586404622395822 1.999877931550145 2.962982179597026
0.8639736328124988 1.999877931550145 2.904663087800154
0.8693068033854153 1.999877931550145 2.820983888581407
0.8746399739583321 1.999877931550145 2.714324953034535
0.8799731445312487 1.999877931550145 2.587615968659537
0.8853063151041653 1.999877931550145 2.444488527253289
0.890639485677082 1.999877931550145 2.288879396393915
0.8959726562499986 1.999877931550145 2.125183107331416
0.9013058268229152 1.999877931550145 1.958007814362666
0.9066389973958319 1.999877931550145 1.791992189362666
0.9119721679687485 1.999877931550145 1.631774904206416
0.9173053385416651 1.999877931550145 1.481872560456414
0.9226385091145819 1.999877931550145 1.346496583893912
0.9279716796874984 1.999877931550145 1.229400636628285
0.933304850260415 1.999877931550145 1.133880617097032
0.9386380208333318 1.999877931550145 1.062652589753279
0.9439711914062483 1.999877931550145 1.0176391620189
0.9493043619791649 1.999877931550145 1.000152589753271
0.9546375325520815 1.999877931550145 1.010650636628267
0.9599707031249983 1.999877931550145 1.048858644440763
0.9653038736979148 1.999877931550145 1.113708497956384
0.9706370442708314 1.999877931550145 1.203399660065755
0.9759702148437482 1.999877931550145 1.315368654206376
0.9813033854166648 1.999877931550145 1.446533204987623
0.9866365559895813 1.999877931550145 1.593170167878246
0.9919697265624981 1.999877931550145 1.75122070498762
0.9973028971354147 1.999877931550145 1.916229249909493
0.9999389657750726 1.999877931550145 2.083526613190743

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
lfo_test("phase_offset")

View File

@ -0,0 +1,188 @@
0.005333170572916667 0.01599951171875 0.2648468941450119
0.01066634114583333 0.0319990234375 0.5107979476451874
0.01599951171875 0.04799853515625 0.7202511847019196
0.02133268229166667 0.06399804687500001 0.8782473087310791
0.02666585286458333 0.07999755859375001 0.9735376834869385
0.0319990234375 0.0959970703125 0.9992316007614136
0.03733219401041667 0.11199658203125 0.9535648584365845
0.04266536458333333 0.12799609375 0.8397716045379637
0.04799853515625001 0.14399560546875 0.6659934997558594
0.05333170572916668 0.1599951171875 0.4446379542350767
0.05866487630208335 0.17599462890625 0.191494324803352
0.06399804687500001 0.1919941406250001 -0.07526237964630139
0.06933121744791668 0.2079936523437501 -0.3366994023323058
0.07466438802083333 0.2239931640625001 -0.5740737140178678
0.07999755859375001 0.2399926757812501 -0.7704477906227112
0.08533072916666667 0.2559921875000001 -0.9117594718933105
0.09066389973958334 0.2719916992187501 -0.9879498600959778
0.09599707031249999 0.2879912109375002 -0.993554699420929
0.1013302408854166 0.3039907226562502 -0.9281892985105516
0.1066634114583333 0.3199902343750002 -0.7965151071548462
0.11199658203125 0.3359897460937502 -0.6079369992017748
0.1173297526041666 0.3519892578125002 -0.3759292483329777
0.1226629231770833 0.3679887695312502 -0.1170743107795711
0.12799609375 0.3839882812500002 0.1501225709915152
0.1333292643229167 0.3999877929687503 0.4066375792026513
0.1386624348958333 0.4159873046875003 0.6340812325477597
0.1439956054687499 0.4319868164062503 0.8162488311529156
0.1493287760416666 0.4479863281250003 0.9400766611099241
0.1546619466145833 0.4639858398437503 0.9967825502157211
0.1599951171874999 0.4799853515625003 0.9822556674480438
0.1653282877604166 0.4959848632812504 0.897545513510704
0.1706614583333333 0.5119843750000004 0.7487346649169919
0.1759946289062499 0.5279838867187504 0.5464466869831082
0.1813277994791666 0.5439833984375003 0.3050981819629667
0.1866609700520833 0.5599829101562504 0.04197713732719421
0.1919941406249999 0.5759824218750004 -0.2241353392601011
0.1973273111979166 0.5919819335937504 -0.4742717653512956
0.2026604817708332 0.6079814453125004 -0.6905037820339201
0.2079936523437499 0.6239809570312504 -0.8574032306671141
0.2133268229166666 0.6399804687500005 -0.9630706310272215
0.2186599934895832 0.6559799804687505 -0.9999443352222443
0.2239931640624999 0.6719794921875005 -0.9653600990772247
0.2293263346354165 0.6879790039062506 -0.8618161618709559
0.2346595052083332 0.7039785156250005 -0.6967093229293821
0.2399926757812499 0.7199780273437505 -0.4818406701087942
0.2453258463541665 0.7359775390625005 -0.2325470328330984
0.2506590169270832 0.7519770507812505 0.0333519607782382
0.2559921874999999 0.7679765625000005 0.29686851501465
0.2613253580729165 0.7839760742187506 0.5391983419656766
0.2666585286458333 0.7999755859375006 0.7429997622966775
0.2719916992187499 0.8159750976562506 0.8937102973461156
0.2773248697916666 0.8319746093750007 0.9805967569351198
0.2826580403645833 0.8479741210937506 0.9974352151155472
0.2879912109375 0.8639736328125005 0.9429876506328583
0.2933243815104167 0.8799731445312506 0.821201354265213
0.2986575520833334 0.8959726562500007 0.640732264518738
0.3039907226562501 0.9119721679687506 0.4145088762044906
0.3093238932291668 0.9279716796875007 0.1586474716663362
0.3146570638020835 0.9439711914062507 -0.1085054248571398
0.3199902343750002 0.9599707031250007 -0.3679313659667974
0.3253234049479168 0.9759702148437508 -0.6010590612888343
0.3306565755208335 0.9919697265625008 -0.7912848472595223
0.3359897460937503 1.007969238281251 -0.9249622702598575
0.3413229166666669 1.023968750000001 -0.9925424575805666
0.3466560872395836 1.039968261718751 -0.9892551898956297
0.3519892578125003 1.055967773437501 -0.9152791857719418
0.357322428385417 1.071967285156251 -0.7759051352739338
0.3626555989583337 1.087966796875001 -0.5811199426651007
0.3679887695312503 1.103966308593751 -0.3448092401027677
0.3733219401041671 1.119965820312501 -0.08386272192001464
0.3786551106770837 1.135965332031251 0.1830197185277934
0.3839882812500004 1.151964843750001 0.436892795562743
0.3893214518229172 1.167964355468751 0.659535548090934
0.3946546223958338 1.183963867187501 0.835056281089782
0.3999877929687505 1.199963378906251 0.9509468674659725
0.4053209635416672 1.215962890625001 0.998878288269043
0.4106541341145839 1.231962402343751 0.9754490494728094
0.4159873046875006 1.247961914062501 0.8823510468006145
0.4213204752604173 1.263961425781251 0.7262172013521216
0.426653645833334 1.279960937500001 0.5182142257690453
0.4319868164062506 1.295960449218751 0.273157685995105
0.4373199869791674 1.311959960937501 0.008625489473345752
0.4426531575520841 1.327959472656251 -0.2565163254737818
0.4479863281250007 1.343958984375001 -0.5033604621887179
0.4533194986979174 1.359958496093751 -0.7142631113529175
0.4586526692708341 1.375958007812501 -0.8740972161293012
0.4639858398437508 1.391957519531251 -0.9715259075164784
0.4693190104166675 1.407957031250001 -0.9995126962661745
0.4746521809895841 1.423956542968751 -0.9561228483915343
0.4799853515625009 1.439956054687501 -0.844445765018466
0.4853185221354176 1.455955566406251 -0.6724051415920295
0.4906516927083342 1.471955078125001 -0.4523329973220872
0.495984863281251 1.487954589843751 -0.1999619960784966
0.5013180338541677 1.503954101562501 0.066662037372583
0.5066512044270842 1.519953613281251 0.3285517096519417
0.5119843750000009 1.535953125000001 0.5669812202453559
0.5173175455729176 1.551952636718751 0.7649154067039442
0.5226507161458342 1.567952148437501 0.9081746101379366
0.5279838867187508 1.583951660156251 0.9865846186876283
0.5333170572916675 1.599951171875001 0.9945067167282112
0.5386502278645841 1.615950683593751 0.9313567727804212
0.5439833984375007 1.631950195312501 0.8016954302787823
0.5493165690104174 1.647949707031251 0.6147811114788119
0.554649739583334 1.663949218750001 0.3839068174362252
0.5599829101562506 1.679948730468751 0.1256243586540305
0.5653160807291673 1.695948242187501 -0.1415845155715852
0.5706492513020839 1.711947753906251 -0.3987413585185924
0.5759824218750005 1.727947265625001 -0.6273850083351061
0.5813155924479172 1.743946777343751 -0.8112369775772041
0.5866487630208338 1.759946289062501 -0.9371063411235772
0.5919819335937504 1.775945800781251 -0.9960507780313483
0.597315104166667 1.791945312500001 -0.9838399410247822
0.6026482747395837 1.807944824218751 -0.9013213992118876
0.6079814453125003 1.823944335937501 -0.7544295668602059
0.6133146158854169 1.839943847656252 -0.5536377578973849
0.6186477864583336 1.855943359375001 -0.3133080720901593
0.6239809570312502 1.871942871093751 -0.05057747960091872
0.6293141276041668 1.887942382812501 0.2157110273837934
0.6346472981770836 1.903941894531251 0.4666443347930801
0.6399804687500001 1.919941406250001 0.6842399835586463
0.6453136393229167 1.935940917968751 0.8529374569654401
0.6506468098958333 1.951940429687502 0.960706794261929
0.6559799804687501 1.967939941406252 0.9998652279376982
0.6613131510416666 1.983939453125002 0.9675708174705537
0.6666463216145832 1.999877931550145 0.8663772882655508
0.6719794921875 1.999877931550145 0.7709623203177363
0.6773126627604166 1.999877931550145 0.6539602489351815
0.6826458333333331 1.999877931550145 0.5186580319950938
0.6879790039062499 1.999877931550145 0.3688138018869942
0.6933121744791665 1.999877931550145 0.2086345141119875
0.698645345052083 1.999877931550145 0.04263453509249916
0.7039785156249997 1.999877931550145 -0.1245452281563965
0.7093116861979164 1.999877931550145 -0.2882661037597
0.714644856770833 1.999877931550145 -0.44392217256061
0.7199780273437496 1.999877931550145 -0.5871166681690525
0.7253111979166663 1.999877931550145 -0.7139061175866843
0.7306443684895829 1.999877931550145 -0.8206656344368486
0.7359775390624995 1.999877931550145 -0.9044543555191806
0.7413107096354162 1.999877931550145 -0.9628941448800031
0.7466438802083328 1.999877931550145 -0.994391383036597
0.7519770507812495 1.999877931550145 -0.9980305426452121
0.757310221354166 1.999877931550145 -0.9737111304111812
0.7626433919270827 1.999877931550145 -0.9221090033334004
0.7679765624999994 1.999877931550145 -0.8447061118995558
0.773309733072916 1.999877931550145 -0.743612639280419
0.7786429036458326 1.999877931550145 -0.621721049977646
0.7839760742187493 1.999877931550145 -0.4823905127250588
0.7893092447916659 1.999877931550145 -0.3295510896805634
0.7946424153645825 1.999877931550145 -0.1675035242197132
0.7999755859374992 1.999877931550145 -0.0007666530450788009
0.8053087565104157 1.999877931550145 0.1659903343902136
0.8106419270833324 1.999877931550145 0.3281027189131851
0.815975097656249 1.999877931550145 0.4810471935411165
0.8213082682291656 1.999877931550145 0.620520779758383
0.8266414388020824 1.999877931550145 0.7425867099868594
0.8319746093749989 1.999877931550145 0.8438835803526496
0.8373077799479155 1.999877931550145 0.9215144560739517
0.8426409505208323 1.999877931550145 0.9733624485597751
0.8479741210937489 1.999877931550145 0.9979344316220681
0.8533072916666654 1.999877931550145 0.9945523131218613
0.8586404622395822 1.999877931550145 0.9633076457935294
0.8639736328124988 1.999877931550145 0.9051070164205303
0.8693068033854153 1.999877931550145 0.8215395742054367
0.8746399739583321 1.999877931550145 0.7149789848217795
0.8799731445312487 1.999877931550145 0.5883571709096317
0.8853063151041653 1.999877931550145 0.4452945485655028
0.890639485677082 1.999877931550145 0.2897345907877371
0.8959726562499986 1.999877931550145 0.1260651234061148
0.9013058268229152 1.999877931550145 -0.04110346414241525
0.9066389973958319 1.999877931550145 -0.2071347351229272
0.9119721679687485 1.999877931550145 -0.3673877825203467
0.9173053385416651 1.999877931550145 -0.517346004772175
0.9226385091145819 1.999877931550145 -0.6527979760971613
0.9279716796874984 1.999877931550145 -0.7699855641057849
0.933304850260415 1.999877931550145 -0.865608400080399
0.9386380208333318 1.999877931550145 -0.9369548898480252
0.9439711914062483 1.999877931550145 -0.9820912502864228
0.9493043619791649 1.999877931550145 -0.9997052255362167
0.9546375325520815 1.999877931550145 -0.9893345816453859
0.9599707031249983 1.999877931550145 -0.9512517416769819
0.9653038736979148 1.999877931550145 -0.8865203505852335
0.9706370442708314 1.999877931550145 -0.796938710339443
0.9759702148437482 1.999877931550145 -0.6850658272219636
0.9813033854166648 1.999877931550145 -0.553981741483347
0.9866365559895813 1.999877931550145 -0.4074073625147701
0.9919697265624981 1.999877931550145 -0.2493992930667849
0.9973028971354147 1.999877931550145 -0.08441309954564256
0.9999389657750726 1.999877931550145 0.0828842637356076

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
lfo_test("rate")

View File

@ -0,0 +1,188 @@
0.005333170572916667 0.01599951171875 0.0005359211444854738
0.01066634114583333 0.0319990234375 0.001607763433456421
0.01599951171875 0.04799853515625 0.003215526866912843
0.02133268229166667 0.06399804687500001 0.005359211444854736
0.02666585286458333 0.07999755859375001 0.008038817167282106
0.0319990234375 0.0959970703125 0.01125434403419495
0.03733219401041667 0.11199658203125 0.01500579204559326
0.04266536458333333 0.12799609375 0.01929316120147706
0.04799853515625001 0.14399560546875 0.02411645150184631
0.05333170572916668 0.1599951171875 0.02947566294670105
0.05866487630208335 0.17599462890625 0.03537079553604126
0.06399804687500001 0.1919941406250001 0.04180184926986694
0.06933121744791668 0.2079936523437501 0.04874871129989625
0.07466438802083333 0.2239931640625001 0.05624120259284975
0.07999755859375001 0.2399926757812501 0.06427563095092774
0.08533072916666667 0.2559921875000001 0.07282537002563477
0.09066389973958334 0.2719916992187501 0.08190946779251099
0.09599707031249999 0.2879912109375002 0.09152792425155642
0.1013302408854166 0.3039907226562502 0.101680739402771
0.1066634114583333 0.3199902343750002 0.1123449740409852
0.11199658203125 0.3359897460937502 0.1235084619522095
0.1173297526041666 0.3519892578125002 0.1351956052780152
0.1226629231770833 0.3679887695312502 0.1474099916458131
0.12799609375 0.3839882812500002 0.1601221036911011
0.1333292643229167 0.3999877929687503 0.1733443713188172
0.1386624348958333 0.4159873046875003 0.1870455803394318
0.1439956054687499 0.4319868164062503 0.2012515609741212
0.1493287760416666 0.4479863281250003 0.2159271082878114
0.1546619466145833 0.4639858398437503 0.2310980525016785
0.1599951171874999 0.4799853515625003 0.2467045526504518
0.1653282877604166 0.4959848632812504 0.2627732749938966
0.1706614583333333 0.5119843750000004 0.2792902519226075
0.1759946289062499 0.5279838867187504 0.2962317531585695
0.1813277994791666 0.5439833984375003 0.3135974402427675
0.1866609700520833 0.5599829101562504 0.3313484210968018
0.1919941406249999 0.5759824218750004 0.3495028429985048
0.1973273111979166 0.5919819335937504 0.3680298004150391
0.2026604817708332 0.6079814453125004 0.3868823050975801
0.2079936523437499 0.6239809570312504 0.4060828037261964
0.2133268229166666 0.6399804687500005 0.4255867166519167
0.2186599934895832 0.6559799804687505 0.4453749857902529
0.2239931640624999 0.6719794921875005 0.4654109336853029
0.2293263346354165 0.6879790039062506 0.4856908130645754
0.2346595052083332 0.7039785156250005 0.5061703529357913
0.2399926757812499 0.7199780273437505 0.526830803871155
0.2453258463541665 0.7359775390625005 0.5476323281288149
0.2506590169270832 0.7519770507812505 0.5685354618072511
0.2559921874999999 0.7679765625000005 0.5895078556060794
0.2613253580729165 0.7839760742187506 0.610535811185837
0.2666585286458333 0.7999755859375006 0.6315292382240298
0.2719916992187499 0.8159750976562506 0.6524982434272768
0.2773248697916666 0.8319746093750007 0.6733724214553836
0.2826580403645833 0.8479741210937506 0.6940973254203797
0.2879912109375 0.8639736328125005 0.7146625905036927
0.2933243815104167 0.8799731445312506 0.7349555463790893
0.2986575520833334 0.8959726562500007 0.7549765506744386
0.3039907226562501 0.9119721679687506 0.7746560891628266
0.3093238932291668 0.9279716796875007 0.7939425514221191
0.3146570638020835 0.9439711914062507 0.8127821922302246
0.3199902343750002 0.9599707031250007 0.8310877380371092
0.3253234049479168 0.9759702148437508 0.8488329054832459
0.3306565755208335 0.9919697265625008 0.8659471261024475
0.3359897460937503 1.007969238281251 0.8823176284790039
0.3413229166666669 1.023968750000001 0.8979310684204101
0.3466560872395836 1.039968261718751 0.9127359642982483
0.3519892578125003 1.055967773437501 0.9266164445400239
0.357322428385417 1.071967285156251 0.9394941648483277
0.3626555989583337 1.087966796875001 0.9513732780456545
0.3679887695312503 1.103966308593751 0.9620836577415467
0.3733219401041671 1.119965820312501 0.9716567802429202
0.3786551106770837 1.135965332031251 0.9799323863983156
0.3839882812500004 1.151964843750001 0.9868842210769655
0.3893214518229172 1.167964355468751 0.9924245046138765
0.3946546223958338 1.183963867187501 0.9965223062038422
0.3999877929687505 1.199963378906251 0.9990432357788086
0.4053209635416672 1.215962890625001 0.9999576799392699
0.4106541341145839 1.231962402343751 0.9991764253616333
0.4159873046875006 1.247961914062501 0.9966722283840179
0.4213204752604173 1.263961425781251 0.9923318614959715
0.426653645833334 1.279960937500001 0.9861583995819089
0.4319868164062506 1.295960449218751 0.9780215210437772
0.4373199869791674 1.311959960937501 0.9679302793979641
0.4426531575520841 1.327959472656251 0.9558028239250181
0.4479863281250007 1.343958984375001 0.9416040492057796
0.4533194986979174 1.359958496093751 0.9253174390792843
0.4586526692708341 1.375958007812501 0.9068358436584468
0.4639858398437508 1.391957519531251 0.8862287553787226
0.4693190104166675 1.407957031250001 0.8633790241241449
0.4746521809895841 1.423956542968751 0.838337660789489
0.4799853515625009 1.439956054687501 0.8110803127288813
0.4853185221354176 1.455955566406251 0.7815831980705253
0.4906516927083342 1.471955078125001 0.7498737560272208
0.495984863281251 1.487954589843751 0.7159841267585745
0.5013180338541677 1.503954101562501 0.6799054906368247
0.5066512044270842 1.519953613281251 0.641685115814208
0.5119843750000009 1.535953125000001 0.6013763595581044
0.5173175455729176 1.551952636718751 0.5590313894748677
0.5226507161458342 1.567952148437501 0.5147318117618552
0.5279838867187508 1.583951660156251 0.4685239028930655
0.5333170572916675 1.599951171875001 0.4205106806755056
0.5386502278645841 1.615950683593751 0.3707897278785696
0.5439833984375007 1.631950195312501 0.3194791543960562
0.5493165690104174 1.647949707031251 0.2666798967361439
0.554649739583334 1.663949218750001 0.2125530385971059
0.5599829101562506 1.679948730468751 0.1572374179363243
0.5653160807291673 1.695948242187501 0.1009079602241508
0.5706492513020839 1.711947753906251 0.04370106258392271
0.5759824218750005 1.727947265625001 -0.0141730673789986
0.5813155924479172 1.743946777343751 -0.07252943181991649
0.5866487630208338 1.759946289062501 -0.1311827611923228
0.5919819335937504 1.775945800781251 -0.1899132472991953
0.597315104166667 1.791945312500001 -0.2484922042846694
0.6026482747395837 1.807944824218751 -0.3066866287708292
0.6079814453125003 1.823944335937501 -0.3642530059814467
0.6133146158854169 1.839943847656252 -0.4209442992210398
0.6186477864583336 1.855943359375001 -0.476507924175264
0.6239809570312502 1.871942871093751 -0.5306713529109969
0.6293141276041668 1.887942382812501 -0.5831926224708571
0.6346472981770836 1.903941894531251 -0.6337927379608167
0.6399804687500001 1.919941406250001 -0.6822163305282607
0.6453136393229167 1.935940917968751 -0.728188266706468
0.6506468098958333 1.951940429687502 -0.7714168461322794
0.6559799804687501 1.967939941406252 -0.8116716575622569
0.6613131510416666 1.983939453125002 -0.8486754179000865
0.6666463216145832 1.999877931550145 -0.8821773529345601
0.6719794921875 1.999877931550145 -0.9117239237348265
0.6773126627604166 1.999877931550145 -0.9371762991611837
0.6826458333333331 1.999877931550145 -0.9584190011730247
0.6879790039062499 1.999877931550145 -0.9753641129231257
0.6933121744791665 1.999877931550145 -0.9879348278613181
0.698645345052083 1.999877931550145 -0.996067500153913
0.7039785156249997 1.999877931550145 -0.9997211575639085
0.7093116861979164 1.999877931550145 -0.9988967895245878
0.714644856770833 1.999877931550145 -0.9935671567225654
0.7199780273437496 1.999877931550145 -0.9838083981207092
0.7253111979166663 1.999877931550145 -0.9696048257901566
0.7306443684895829 1.999877931550145 -0.9510738370343461
0.7359775390624995 1.999877931550145 -0.9282358523949373
0.7413107096354162 1.999877931550145 -0.9012530322805109
0.7466438802083328 1.999877931550145 -0.8702429528057113
0.7519770507812495 1.999877931550145 -0.8352882379440423
0.757310221354166 1.999877931550145 -0.7965986006667672
0.7626433919270827 1.999877931550145 -0.7543339244661195
0.7679765624999994 1.999877931550145 -0.7086859455841491
0.773309733072916 1.999877931550145 -0.6598651399255703
0.7786429036458326 1.999877931550145 -0.6080582250160679
0.7839760742187493 1.999877931550145 -0.5535281884667733
0.7893092447916659 1.999877931550145 -0.49652716983401
0.7946424153645825 1.999877931550145 -0.4372966752351231
0.7999755859374992 1.999877931550145 -0.3760827764730514
0.8053087565104157 1.999877931550145 -0.3131953700267354
0.8106419270833324 1.999877931550145 -0.2488907320279421
0.815975097656249 1.999877931550145 -0.1834746819839012
0.8213082682291656 1.999877931550145 -0.1172516327424122
0.8266414388020824 1.999877931550145 -0.05047249601157423
0.8319746093749989 1.999877931550145 0.01649044951772869
0.8373077799479155 1.999877931550145 0.08338775840056392
0.8426409505208323 1.999877931550145 0.1499326369270383
0.8479741210937489 1.999877931550145 0.2158008835185647
0.8533072916666654 1.999877931550145 0.2807064673987006
0.8586404622395822 1.999877931550145 0.344349577209865
0.8639736328124988 1.999877931550145 0.406449486995549
0.8693068033854153 1.999877931550145 0.4667140982259265
0.8746399739583321 1.999877931550145 0.5248871347692297
0.8799731445312487 1.999877931550145 0.5807123204936913
0.8853063151041653 1.999877931550145 0.6339115878399724
0.890639485677082 1.999877931550145 0.6842878599725708
0.8959726562499986 1.999877931550145 0.7315787930063353
0.9013058268229152 1.999877931550145 0.7755785483002886
0.9066389973958319 1.999877931550145 0.8161155597957965
0.9119721679687485 1.999877931550145 0.852964665035868
0.9173053385416651 1.999877931550145 0.8860178127040836
0.9226385091145819 1.999877931550145 0.9150661480805852
0.9279716796874984 1.999877931550145 0.9399922620061249
0.933304850260415 1.999877931550145 0.9607174405235117
0.9386380208333318 1.999877931550145 0.9771250374069487
0.9439711914062483 1.999877931550145 0.9891752248055122
0.9493043619791649 1.999877931550145 0.9967621925145064
0.9546375325520815 1.999877931550145 0.9998656750325608
0.9599707031249983 1.999877931550145 0.9984948633064052
0.9653038736979148 1.999877931550145 0.9926089282553225
0.9706370442708314 1.999877931550145 0.9823056095152431
0.9759702148437482 1.999877931550145 0.9675677051744069
0.9813033854166648 1.999877931550145 0.9484997260704413
0.9866365559895813 1.999877931550145 0.9251813873903313
0.9919697265624981 1.999877931550145 0.8976710660117543
0.9973028971354147 1.999877931550145 0.8661878089496907
0.9999389657750726 1.999877931550145 0.8307594276964677

View File

@ -0,0 +1,3 @@
from synthblockhelper import *
lfo_test("scale")

View File

@ -0,0 +1,188 @@
0.005333170572916667 0.01599951171875 0.002667887330055236
0.01066634114583333 0.0319990234375 0.01052213981747627
0.01599951171875 0.04799853515625 0.02312185294926166
0.02133268229166667 0.06399804687500001 0.03975073999166488
0.02666585286458333 0.07999755859375001 0.05944642797112465
0.0319990234375 0.0959970703125 0.08105026084184647
0.03733219401041667 0.11199658203125 0.1032400133311749
0.04266536458333333 0.12799609375 0.124609478354454
0.04799853515625001 0.14399560546875 0.1437055752575398
0.05333170572916668 0.1599951171875 0.1591113550961018
0.05866487630208335 0.17599462890625 0.1695011747330427
0.06399804687500001 0.1919941406250001 0.1737134485244751
0.06933121744791668 0.2079936523437501 0.17078482696414
0.07466438802083333 0.2239931640625001 0.1600312488973141
0.07999755859375001 0.2399926757812501 0.1410528241842986
0.08533072916666667 0.2559921875000001 0.1138168389797211
0.09066389973958334 0.2719916992187501 0.07860599949955943
0.09599707031249999 0.2879912109375002 0.0360867893099785
0.1013302408854166 0.3039907226562502 -0.01272812718153
0.1066634114583333 0.3199902343750002 -0.06652140736579899
0.11199658203125 0.3359897460937502 -0.1236788426935671
0.1173297526041666 0.3519892578125002 -0.1823323261141776
0.1226629231770833 0.3679887695312502 -0.2404369981586931
0.12799609375 0.3839882812500002 -0.2958542522192
0.1333292643229167 0.3999877929687503 -0.3463883545249699
0.1386624348958333 0.4159873046875003 -0.3898738438189029
0.1439956054687499 0.4319868164062503 -0.4243141990005971
0.1493287760416666 0.4479863281250003 -0.4478632850050928
0.1546619466145833 0.4639858398437503 -0.4589874572306877
0.1599951171874999 0.4799853515625003 -0.4564753268659122
0.1653282877604166 0.4959848632812504 -0.43952662536502
0.1706614583333333 0.5119843750000004 -0.4077844300270094
0.1759946289062499 0.5279838867187504 -0.3614098687469975
0.1813277994791666 0.5439833984375003 -0.3010103448629402
0.1866609700520833 0.5599829101562504 -0.2277493970841195
0.1919941406249999 0.5759824218750004 -0.1432221915721921
0.1973273111979166 0.5919819335937504 -0.04951850830018875
0.2026604817708332 0.6079814453125004 0.05085684636234935
0.2079936523437499 0.6239809570312504 0.1551573742032022
0.2133268229166666 0.6399804687500005 0.2602850252389881
0.2186599934895832 0.6559799804687505 0.362983062922952
0.2239931640624999 0.6719794921875005 0.4599761965870836
0.2293263346354165 0.6879790039062506 0.5479603278487905
0.2346595052083332 0.7039785156250005 0.6238442424535738
0.2399926757812499 0.7199780273437505 0.6847129902988664
0.2453258463541665 0.7359775390625005 0.7280490700900554
0.2506590169270832 0.7519770507812505 0.7517705141156918
0.2559921874999999 0.7679765625000005 0.7543363537788403
0.2613253580729165 0.7839760742187506 0.7347622441202421
0.2666585286458333 0.7999755859375006 0.6927767090499426
0.2719916992187499 0.8159750976562506 0.6286902859658035
0.2773248697916666 0.8319746093750007 0.5435966914892233
0.2826580403645833 0.8479741210937506 0.4392551492750681
0.2879912109375 0.8639736328125005 0.3180313097834627
0.2933243815104167 0.8799731445312506 0.1829338702559513
0.2986575520833334 0.8959726562500007 0.03751448011398744
0.3039907226562501 0.9119721679687506 -0.1142748328149277
0.3093238932291668 0.9279716796875007 -0.2681851747631981
0.3146570638020835 0.9439711914062507 -0.4196995937377172
0.3199902343750002 0.9599707031250007 -0.5642112967371899
0.3253234049479168 0.9759702148437508 -0.6972790130525793
0.3306565755208335 0.9919697265625008 -0.8145122516751259
0.3359897460937503 1.007969238281251 -0.911995604753492
0.3413229166666669 1.023968750000001 -0.9861886529922474
0.3466560872395836 1.039968261718751 -1.034223808124661
0.3519892578125003 1.055967773437501 -1.053840885221959
0.357322428385417 1.071967285156251 -1.043604381218555
0.3626555989583337 1.087966796875001 -1.002902986645702
0.3679887695312503 1.103966308593751 -0.93207799968124
0.3733219401041671 1.119965820312501 -0.8322499915957518
0.3786551106770837 1.135965332031251 -0.7055756348520607
0.3839882812500004 1.151964843750001 -0.5549244707822899
0.3893214518229172 1.167964355468751 -0.3840581033378947
0.3946546223958338 1.183963867187501 -0.1974236624241001
0.3999877929687505 1.199963378906251 -1.285182707021075e-14
0.4053209635416672 1.215962890625001 0.202759437084186
0.4106541341145839 1.231962402343751 0.405102382972825
0.4159873046875006 1.247961914062501 0.6011681766807927
0.4213204752604173 1.263961425781251 0.7850771148353719
0.426653645833334 1.279960937500001 0.9511428475379864
0.4319868164062506 1.295960449218751 1.094178521364921
0.4373199869791674 1.311959960937501 1.209383013308044
0.4426531575520841 1.327959472656251 1.292823337927459
0.4479863281250007 1.343958984375001 1.341252035737038
0.4533194986979174 1.359958496093751 1.352446518316867
0.4586526692708341 1.375958007812501 1.325191002458339
0.4639858398437508 1.391957519531251 1.259422501802451
0.4693190104166675 1.407957031250001 1.156081905603418
0.4746521809895841 1.423956542968751 1.017341510847222
0.4799853515625009 1.439956054687501 0.8463169451058034
0.4853185221354176 1.455955566406251 0.6473332716971768
0.4906516927083342 1.471955078125001 0.425397173762336
0.495984863281251 1.487954589843751 0.1864484114349039
0.5013180338541677 1.503954101562501 -0.06297073447702799
0.5066512044270842 1.519953613281251 -0.3159766849875294
0.5119843750000009 1.535953125000001 -0.5653889951705783
0.5173175455729176 1.551952636718751 -0.8039198015034055
0.5226507161458342 1.567952148437501 -1.024470687806594
0.5279838867187508 1.583951660156251 -1.220398790404189
0.5333170572916675 1.599951171875001 -1.385553418099871
0.5386502278645841 1.615950683593751 -1.51450993175804
0.5439833984375007 1.631950195312501 -1.60296475178003
0.5493165690104174 1.647949707031251 -1.647497084125877
0.554649739583334 1.663949218750001 -1.646023984551434
0.5599829101562506 1.679948730468751 -1.597663644030698
0.5653160807291673 1.695948242187501 -1.502897493183625
0.5706492513020839 1.711947753906251 -1.363529187902824
0.5759824218750005 1.727947265625001 -1.182795934081097
0.5813155924479172 1.743946777343751 -0.9650037526488536
0.5866487630208338 1.759946289062501 -0.71578381940725
0.5919819335937504 1.775945800781251 -0.4416017573476108
0.597315104166667 1.791945312500001 -0.1498938629627505
0.6026482747395837 1.807944824218751 0.1512322010248609
0.6079814453125003 1.823944335937501 0.4535369399785713
0.6133146158854169 1.839943847656252 0.7483194475620717
0.6186477864583336 1.855943359375001 1.026976470708822
0.6239809570312502 1.871942871093751 1.281362261921146
0.6293141276041668 1.887942382812501 1.503705085724575
0.6346472981770836 1.903941894531251 1.687215110272156
0.6399804687500001 1.919941406250001 1.825901307463638
0.6453136393229167 1.935940917968751 1.915085597410795
0.6506468098958333 1.951940429687502 1.951404313236477
0.6559799804687501 1.967939941406252 1.932986906558282
0.6613131510416666 1.983939453125002 1.859398332059396
0.6666463216145832 1.999877931550145 1.731888917956512
0.6719794921875 1.999877931550145 1.540860538874731
0.6773126627604166 1.999877931550145 1.306682938064252
0.6826458333333331 1.999877931550145 1.035947510074861
0.6879790039062499 1.999877931550145 0.7361611209215951
0.6933121744791665 1.999877931550145 0.4157461080847357
0.698645345052083 1.999877931550145 0.08373512335473171
0.7039785156249997 1.999877931550145 -0.2505950557539017
0.7093116861979164 1.999877931550145 -0.57796765172665
0.714644856770833 1.999877931550145 -0.8891669184800135
0.7199780273437496 1.999877931550145 -1.175404329947612
0.7253111979166663 1.999877931550145 -1.42880683152831
0.7306443684895829 1.999877931550145 -1.642111682931139
0.7359775390624995 1.999877931550145 -1.809459866778509
0.7413107096354162 1.999877931550145 -1.926090931451133
0.7466438802083328 1.999877931550145 -1.988831242536147
0.7519770507812495 1.999877931550145 -1.995849857103055
0.757310221354166 1.999877931550145 -1.946963680858809
0.7626433919270827 1.999877931550145 -1.843515405285772
0.7679765624999994 1.999877931550145 -1.688495570503754
0.773309733072916 1.999877931550145 -1.486115345252897
0.7786429036458326 1.999877931550145 -1.242172715479771
0.7839760742187493 1.999877931550145 -0.9633811385961975
0.7893092447916659 1.999877931550145 -0.6576136692033123
0.7946424153645825 1.999877931550145 -0.3334757390744438
0.7999755859374992 1.999877931550145 -4.28381162119136e-14
0.8053087565104157 1.999877931550145 0.3334757390743597
0.8106419270833324 1.999877931550145 0.6576136692032318
0.815975097656249 1.999877931550145 0.9633811385961248
0.8213082682291656 1.999877931550145 1.242172715479706
0.8266414388020824 1.999877931550145 1.486115345252841
0.8319746093749989 1.999877931550145 1.68849557050371
0.8373077799479155 1.999877931550145 1.84351540528574
0.8426409505208323 1.999877931550145 1.946963680858791
0.8479741210937489 1.999877931550145 1.995849857103051
0.8533072916666654 1.999877931550145 1.988831242536155
0.8586404622395822 1.999877931550145 1.926090931451154
0.8639736328124988 1.999877931550145 1.809459866778543
0.8693068033854153 1.999877931550145 1.642111682931183
0.8746399739583321 1.999877931550145 1.428806831528363
0.8799731445312487 1.999877931550145 1.175404329947673
0.8853063151041653 1.999877931550145 0.8891669184800811
0.890639485677082 1.999877931550145 0.5779676517267206
0.8959726562499986 1.999877931550145 0.2505950557539749
0.9013058268229152 1.999877931550145 -0.08373512335465684
0.9066389973958319 1.999877931550145 -0.4157461080846623
0.9119721679687485 1.999877931550145 -0.7361611209215242
0.9173053385416651 1.999877931550145 -1.035947510074796
0.9226385091145819 1.999877931550145 -1.306682938064193
0.9279716796874984 1.999877931550145 -1.540860538874681
0.933304850260415 1.999877931550145 -1.731888917956473
0.9386380208333318 1.999877931550145 -1.874336277949095
0.9439711914062483 1.999877931550145 -1.964357638698507
0.9493043619791649 1.999877931550145 -1.999328648670995
0.9546375325520815 1.999877931550145 -1.978333836401312
0.9599707031249983 1.999877931550145 -1.901922484768606
0.9653038736979148 1.999877931550145 -1.772230693858455
0.9706370442708314 1.999877931550145 -1.592859318100838
0.9759702148437482 1.999877931550145 -1.368934997701141
0.9813033854166648 1.999877931550145 -1.106621907192037
0.9866365559895813 1.999877931550145 -0.8133658811575424
0.9919697265624981 1.999877931550145 -0.497284099922859
0.9973028971354147 1.999877931550145 -0.1672871524164043
0.9999389657750726 1.999877931550145 0.1672871524162952

View File

@ -0,0 +1,8 @@
from synthio import *
for values in ((-1, 4, 9), (4, -1, 9), (9, 4, -1), (0, 0, 0), (3, 2, 1), (2, 1), (1,)):
for op in MathOperation.__dict__.values():
o = Math(op, *values)
print(op, o)
print(lfo_tick(o))
print()

View File

@ -0,0 +1,203 @@
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=-1.0, b=4.0, c=9.0)
(12.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=-1.0, b=4.0, c=9.0)
(-6.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=-1.0, b=4.0, c=9.0)
(-36.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=-1.0, b=4.0, c=9.0)
(-0.4444444444444445,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=-1.0, b=4.0, c=9.0)
(5.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=-1.0, b=4.0, c=9.0)
(27.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=-1.0, b=4.0, c=9.0)
(44.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=-1.0, b=4.0, c=9.0)
(4.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=-1.0, b=4.0, c=9.0)
(8.75,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=-1.0, b=4.0, c=9.0)
(0.3333333333333333,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=-1.0, b=4.0, c=9.0)
(4.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=-1.0, b=4.0, c=9.0)
(9.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=-1.0, b=4.0, c=9.0)
(-1.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=-1.0, b=4.0, c=9.0)
(1.0,)
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=4.0, b=-1.0, c=9.0)
(12.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=4.0, b=-1.0, c=9.0)
(-6.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=4.0, b=-1.0, c=9.0)
(-36.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=4.0, b=-1.0, c=9.0)
(-0.4444444444444445,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=4.0, b=-1.0, c=9.0)
(5.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=4.0, b=-1.0, c=9.0)
(27.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=4.0, b=-1.0, c=9.0)
(-41.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=4.0, b=-1.0, c=9.0)
(-1.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=4.0, b=-1.0, c=9.0)
(5.0,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=4.0, b=-1.0, c=9.0)
(0.3333333333333333,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=4.0, b=-1.0, c=9.0)
(4.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=4.0, b=-1.0, c=9.0)
(9.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=4.0, b=-1.0, c=9.0)
(-1.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=4.0, b=-1.0, c=9.0)
(4.0,)
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=9.0, b=4.0, c=-1.0)
(12.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=9.0, b=4.0, c=-1.0)
(14.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=9.0, b=4.0, c=-1.0)
(-36.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=9.0, b=4.0, c=-1.0)
(-36.0,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=9.0, b=4.0, c=-1.0)
(35.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=9.0, b=4.0, c=-1.0)
(-13.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=9.0, b=4.0, c=-1.0)
(14.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=9.0, b=4.0, c=-1.0)
(9.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=9.0, b=4.0, c=-1.0)
(1.25,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=9.0, b=4.0, c=-1.0)
(-13.0,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=9.0, b=4.0, c=-1.0)
(4.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=9.0, b=4.0, c=-1.0)
(9.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=9.0, b=4.0, c=-1.0)
(-1.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=9.0, b=4.0, c=-1.0)
(9.0,)
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=0.0, b=0.0, c=0.0)
(0.0,)
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=3.0, b=2.0, c=1.0)
(6.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=3.0, b=2.0, c=1.0)
(4.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=3.0, b=2.0, c=1.0)
(6.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=3.0, b=2.0, c=1.0)
(6.0,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=3.0, b=2.0, c=1.0)
(7.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=3.0, b=2.0, c=1.0)
(5.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=3.0, b=2.0, c=1.0)
(2.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=3.0, b=2.0, c=1.0)
(2.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=3.0, b=2.0, c=1.0)
(2.5,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=3.0, b=2.0, c=1.0)
(5.0,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=3.0, b=2.0, c=1.0)
(2.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=3.0, b=2.0, c=1.0)
(3.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=3.0, b=2.0, c=1.0)
(1.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=3.0, b=2.0, c=1.0)
(3.0,)
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=2.0, b=1.0, c=1.0)
(4.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=2.0, b=1.0, c=1.0)
(2.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=2.0, b=1.0, c=1.0)
(2.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=2.0, b=1.0, c=1.0)
(2.0,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=2.0, b=1.0, c=1.0)
(3.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=2.0, b=1.0, c=1.0)
(3.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=2.0, b=1.0, c=1.0)
(1.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=2.0, b=1.0, c=1.0)
(1.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=2.0, b=1.0, c=1.0)
(3.0,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=2.0, b=1.0, c=1.0)
(3.0,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=2.0, b=1.0, c=1.0)
(1.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=2.0, b=1.0, c=1.0)
(2.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=2.0, b=1.0, c=1.0)
(1.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=2.0, b=1.0, c=1.0)
(2.0,)
synthio.MathOperation.SUM Math(operation=synthio.MathOperation.SUM, a=1.0, b=0.0, c=1.0)
(2.0,)
synthio.MathOperation.ADD_SUB Math(operation=synthio.MathOperation.ADD_SUB, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.PRODUCT Math(operation=synthio.MathOperation.PRODUCT, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.MUL_DIV Math(operation=synthio.MathOperation.MUL_DIV, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.SCALE_OFFSET Math(operation=synthio.MathOperation.SCALE_OFFSET, a=1.0, b=0.0, c=1.0)
(1.0,)
synthio.MathOperation.OFFSET_SCALE Math(operation=synthio.MathOperation.OFFSET_SCALE, a=1.0, b=0.0, c=1.0)
(1.0,)
synthio.MathOperation.LERP Math(operation=synthio.MathOperation.LERP, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.CONSTRAINED_LERP Math(operation=synthio.MathOperation.CONSTRAINED_LERP, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.DIV_ADD Math(operation=synthio.MathOperation.DIV_ADD, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.ADD_DIV Math(operation=synthio.MathOperation.ADD_DIV, a=1.0, b=0.0, c=1.0)
(1.0,)
synthio.MathOperation.MID Math(operation=synthio.MathOperation.MID, a=1.0, b=0.0, c=1.0)
(1.0,)
synthio.MathOperation.MAX Math(operation=synthio.MathOperation.MAX, a=1.0, b=0.0, c=1.0)
(1.0,)
synthio.MathOperation.MIN Math(operation=synthio.MathOperation.MIN, a=1.0, b=0.0, c=1.0)
(0.0,)
synthio.MathOperation.ABS Math(operation=synthio.MathOperation.ABS, a=1.0, b=0.0, c=1.0)
(1.0,)

View File

@ -887,6 +887,7 @@ the last matching regex is used:
os.environ["MICROPYPATH"] = os.pathsep.join(
[
"",
"testlib",
".frozen",
base_path("../frozen/Adafruit_CircuitPython_asyncio"),
base_path("../frozen/Adafruit_CircuitPython_Ticks"),

View File

@ -0,0 +1,31 @@
import array
from math import sin, pi
from synthio import LFO, MathOperation, lfo_tick
bend_out = array.array("h", [0, 32767])
bend_in = array.array("h", [32767, 0])
sweep = array.array("h", [-32767, 32767])
triangle = array.array("h", [0, 32767, 0, -32767])
sine = array.array("h", [int(32767 * sin(i * 2 * pi / 600)) for i in range(600)])
def print_result(*blocks):
for i in range(48000 / 256):
print(*lfo_tick(*blocks))
def mathop_test(kind):
v = LFO(sweep, rate=1, scale=2, once=True)
varying_a = kind(v, 2, -3)
varying_b = kind(-3, v, 2)
varying_c = kind(2, -3, v)
print_result(v, varying_a, varying_b, varying_c)
def lfo_test(sweep_input_name, **inputs):
inputs.setdefault("rate", 5)
t = LFO(bend_out, rate=1, once=True)
v = LFO(bend_out, rate=1.5, scale=2, once=True)
test = LFO(sine, **inputs)
setattr(test, sweep_input_name, v)
print_result(t, v, test)