# Pioneer AS1 - help in getting bidirectional communication using a sysex dump

**URL:** <https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946>\
**Category:** Instruments\
**Created:** [September 22, 2021, 5:54pm UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946 "2021-09-22T17:54:42Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 7, 2021, 7:33am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/21 "2021-10-07T07:33:06Z")

</div>

Hi Martin,

Your template is working great!  
I am now trying to make send of the sysex dumps. And sysex in general.  
So far boolean’s and a range till 127 I understand.  
But it gets harder when multiple bytes are used.  
especially to point to the right starting bit when a byte is used for multiple parameters.  
Could you give me some hints on the following?

OSC2 FREQFINE range -127-0-127 (255) bytes 3 and 0  
so -127 to 0 are in byte3, its a negative value because byte3 is 00  
0 byte3 = 7F = 127  
but then this i do not get. the value is positive because byte0 has bit 6 set?  
127 byte 3=3E and byte0 = 04

How do I write this in the template? Not sure but is `parameterBitPosition` what and how it is passed to the ‘electra one knop/parameter’ and `byteBitPosition` where it is taken from?  
How do you count bit possitions? guessing from 0 to 7 for 1 -8.

`parameterBitPosition = bit position within the parameter value`  
`byteBitPosition = bit position in the SysEx byte, ie. where the value will be placed`

OSC2 FREQFINE  
{  
“type”:“nrpn”,  
“parameterNumber”:6,  
“parameterBitPosition”:0,  
“byte”:3,  
“byteBitPosition”:0,  
“bitWidth”:7  
},  
{  
“type”:“nrpn”,  
“parameterNumber”:6,  
“parameterBitPosition”:5,  
“byte”:0,  
“byteBitPosition”:5,  
“bitWidth”:1  
}

OSC1 SHAPE byte4 and byte0  
7F=SAW  
-127=TRI=00  
+127=Pulse= byte4=7E byte0=08

OSC1 SHAPE  
{  
“type”:“nrpn”,  
“parameterNumber”:3,  
“parameterBitPosition”:0,  
“byte”:4,  
“byteBitPosition”:0,  
“bitWidth”:7  
},  
{  
“type”:“nrpn”,  
“parameterNumber”:3,  
“parameterBitPosition”:4,  
“byte”:0,  
“byteBitPosition”:4,  
“bitWidth”:1  
}

Byte0 = 0C when: OSC2 FREQFINE at 127 and OSC1 SHAPE also at 127

04 = 0000 0100 OSC2 FREQFINE  
08 = 0000 1000 OSC1 SHAPE also at 127  
0000 1100 = 0C

```
Binary Hex.

```

0 0000 0 04 = 0000 0100 ( is this bit 5? )  
1 0001 1 08 = 0000 1000  
2 0010 2 0000 1100 = 0C  
3 0011 3  
4 0100 4  
5 0101 5  
6 0110 6  
7 0111 7  
8 1000 8  
9 1001 9  
10 1010 A  
11 1011 B  
12 1100 C  
13 1101 D  
14 1110 E  
15 1111 F

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 10, 2021, 11:10am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/22 "2021-10-10T11:10:19Z")

</div>

Hi Martin,  
Most of the parameters with a 7 or less bit range work however on your template the OSC1 PW does not work.

With your example AS1 127 gives 128 on the electra  
AS1 128 gives 0 on the electra  
AS1 255 give electra 128

Can you help me to get OSC1 PW to work?  
I made several dumps and the results are below.

```
                    {
                       "type":"nrpn",
                       "parameterNumber":4,
                       "parameterBitPosition":0,
                       "byte":0,
                       "byteBitPosition":0,
                       "bitWidth":1
                    },
                    {
                       "type":"nrpn",
                       "parameterNumber":4,
                       "parameterBitPosition":7,
                       "byte":6,
                       "byteBitPosition":6,
                       "bitWidth":7
                    }

```

PW OSC1 range 0-255

0 bin 0000 0000 hex 00 00  
1 0000 1000 00 01  
127 0111 1111 00 7F  
128 1000 0000 20 00  
129 1000 0001 20 01  
254 ‭1111 1110‬ 20  
255 1111 1111 20 7F

Value on AS1 DEC = 0  
from dump  
byte 6 = 0  
byte 0 = 0

Value DEC = 1  
from dump  
byte 6 = 01  
byte 0 = 00

Value DEC = 127  
from dump  
byte 6 = 7F  
byte 0 = 00

Value DEC = 128  
from dump  
byte 6 = 00  
byte 0 = 20

Value DEC = 129  
from dump  
Byte 6 = 01  
byte 0 = 20

Value DEC 255  
from dump  
Byte 6 = 7F  
byte 0 = 20

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 10, 2021, 6:02pm UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/23 "2021-10-10T18:02:00Z")

</div>

Ok most of the 7bit NRPN’s are working. But no luck to get the 8 bits working.

Here LFO Frequency: going from 0-255

On the as1: 0 - 127,works 128 give 0 and 255 gives 127 on the electra one

```
                    {

                       "type":"nrpn",

                       "parameterNumber":88,

                       "parameterBitPosition":0,

                       "byte":68,

                       "byteBitPosition":0,

                       "bitWidth":7

                    },

                    {

                       "type":"nrpn",

                       "parameterNumber":88,

                       "parameterBitPosition":7,

                       "byte":64,

                       "byteBitPosition":6,

                       "bitWidth":1

                    }
```

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 18, 2021, 7:24am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/24 "2021-10-18T07:24:37Z")

</div>

Hi Martin, I got my template almost complete. also included some global parameters that require a different request message,  
I am waiting for you help to finish it of with the 8 bit messages.

In case you need anything let me know.

Cheers

Tim

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [October 23, 2021, 8:58am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/25 "2021-10-23T08:58:10Z")

</div>

Hi Tim, would you share the latest version of the preset with me or make it public? It would be then easier for me to review it and possibly suggest changes. Thanks!

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 23, 2021, 9:29am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/26 "2021-10-23T09:29:21Z")

</div>

Hi Martin I uploaded the latest and made it public: [Electra One App](https://app.electra.one/preset/11zYMdiP6zUKccGMoSYO)

Thanks for you effort,

Cheers

Tim

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 29, 2021, 1:22pm UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/27 "2021-10-29T13:22:03Z")

</div>

@martin yes I got OSC PWM to work.

You and @oldgearguy thanks.  
It took me some time but I think the fast way todo it is to just determine the MSB and write it down in binary. Then dump some values like 0, 127, 128, 255 and you will see what bit is flipped which is the byteBitPosition

```
                    {
                       "type":"nrpn",
                       "parameterNumber":4,
                       "parameterBitPosition":0,
                       "byte":6,
                       "byteBitPosition":0,
                       "bitWidth":7
                    },
                    {
                       "type":"nrpn",
                       "parameterNumber":4,
                       "parameterBitPosition":7,
                       "byte":0,
                       "byteBitPosition":5,
                       "bitWidth":1
                    }

```

I started a tutorial on git and will let you know when its finished so you can have a look at it.

Cheers

Tim

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 29, 2021, 9:08pm UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/28 "2021-10-29T21:08:09Z")

</div>

Template completed, but needs some testing

[https://app.electra.one/preset/SsNm04AIB002RMhGLdDs](https://app.electra.one/preset/SsNm04AIB002RMhGLdDs)

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [October 31, 2021, 5:58am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/29 "2021-10-31T05:58:29Z")

</div>

This is great!

One more thing you could do, as your first Lua steps, would be adding the functions for handling the MIDI channel in the patch request, response, etc.

The idea is mentioned in the following thread:

> [@Controlling params.. multiple channels of FM (TX816)](https://forum.electra.one/t/controlling-params-multiple-channels-of-fm-tx816/383/27):
>
> @lobit please test [WIP: Yamaha TX7](https://app.electra.one/preset/rw0Mj4IuwUNIQabITks1) preset. It is a working version of the existing TX7 preset. This one, however, reflects settings of the device MIDI channel when composing outgoing parameter change SysEx messages. The requesting and parsing patches still needs doing. I think you should do following to get it working with your TX816: Load this preset to 8 preset slots in Electra Name the slots as Voice 1 … Voice 8 Change the Midi Channel for each preset (voice) according to your TX816 setti…

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 31, 2021, 10:04am UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/30 "2021-10-31T10:04:40Z")

</div>

Yeah I am definitely going to play with Lua first.  
But the AS1 does not have a channel byte in the sysex data.  
So there is no real benefit of having a channel selector here.  
But I can try this on the Ensoniq Mirage Soundprocess preset. There you have to specify the patch number you want a dump from.

---

<div class="post-metadata">

**Author:** ![Flyweight](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/flyweight/32/342_2.png) [@Flyweight](https://forum.electra.one/u/Flyweight)\
**Post date:** [October 31, 2021, 5:46pm UTC](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946/31 "2021-10-31T17:46:09Z")

</div>

> [@martin](#):
>
> One more thing you could do, as your first Lua steps, would be adding the functions for handling the MIDI channel in the patch request, response, etc.

Ok I added a Midi channel selector to the template using the `device:setChannel()`  
Also to the Pioneer Toraiz SP16.

Some idea I have is to make a midi channel learn call.  
Also checking if its possible to add virtual parameters or a map to retain all values when swapping channels,

so 16x 33 Parameters that are controlled from a single page.

Anyhow really appreciate the beauty of the E.one schema of the devices. You can see its build to jam with a large setup 🙂

Anyhow I did my homework hahaha

[Previous page](https://forum.electra.one/t/pioneer-as1-help-in-getting-bidirectional-communication-using-a-sysex-dump/946.md?page=1)
