ref: 110cdabd5a76e5f918490555a9490955666a9c71
parent: 046ef871c7d91b3fc4189909fcf50370006ae967
parent: 28a98f6fa701caeb29a21909020e820bad80be86
author: Лu Лinveгa <aliceffekt@gmail.com>
date: Thu Jan 3 05:14:38 EST 2019
Merge pull request #5 from npisanti/master osc operator = redesign
--- a/sim.c
+++ b/sim.c
@@ -370,9 +370,9 @@
END_OPERATOR
BEGIN_OPERATOR(osc)
- PORT(0, -2, IN | PARAM);
- PORT(0, -1, IN | PARAM);
- Usz len = index_of(PEEK(0, -1)) + 1;
+ PORT(0, 2, IN | PARAM);
+ PORT(0, 1, IN | PARAM);
+ Usz len = index_of(PEEK(0, 1)) + 1;
if (len > Oevent_osc_int_count)
len = Oevent_osc_int_count;
for (Usz i = 0; i < len; ++i) {
@@ -379,14 +379,14 @@
PORT(0, (Isz)i + 1, IN);
}
STOP_IF_NOT_BANGED;
- Glyph g = PEEK(0, -2);
+ Glyph g = PEEK(0, 2);
if (g != '.') {
- Usz len = index_of(PEEK(0, -1)) + 1;
+ Usz len = index_of(PEEK(0, 1)) + 1;
if (len > Oevent_osc_int_count)
len = Oevent_osc_int_count;
U8 buff[Oevent_osc_int_count];
for (Usz i = 0; i < len; ++i) {
- buff[i] = (U8)index_of(PEEK(0, (Isz)i + 1));
+ buff[i] = (U8)index_of(PEEK(0, (Isz)i + 3));
}
Oevent_osc_ints* oe =
&oevent_list_alloc_item(extra_params->oevent_list)->osc_ints;