Thank you Royce! I'm using a Yamaha A4000 sampler. I don't know why is the value split but all "data" within a SysEx message should be "nibblized"... There are several data types (short/long, signed/unsigned), and the data I'm dealing with here is an unsigned 1-byte long - i.e, two nibbles. What was your idea of a work-around? Thanks again, Have a nice weekend, Gil --- In bc2000@yahoogroups.com, "Royce" <rpcfender@...> wrote: > > Hi Gil > > However, I can't figure out the way you did it. > > The BC encoders have 96 'notches' per rotation. > If you set the resolution to 96 all output values are sent. > If you set the resolution for 96 x 2 = 192 then depending on where you started (default 1 or 0) it would output only odd or even values. > > Imagine you had a circle with 128 marks around it. If you counted up to 128 you would be back to where you started. > If you set the resolution for 96 x 128 = 12288 then it would keep repeating the default number for every one of its 96 'notches'. > > The BC value (val...) is 14 bits wide. Two 7bit bytes because Midi data is always less than $80, so we have 2 7bit values we can use. > > If you set the resolution for 96 x 127 = 12192 then it would be just 1 short and val (bits 0 to 6 of our 14 bit value)would creep back. > > The number of the high byte increases when the low byte goes over 127. > So if the low byte starts at $7f it only needs 1 to increase the high byte, but if we give it 127 then the high byte goes up by 1 and the low byte goes down by 1 to $7e > > > Unfortunately you have a problem in that you want to break up the value bytes into nibbles. > > val0.3 bits 0 to 3 4 bits > val4.7 bits 4 to 7 4 bits we are in trouble here because bit 7 belongs to the high byte of out 14 bit value > val8.11 bits 8 to 11 4 bits > val12.13 bits 12 and 13 2 bits > > What you need is > val0.3 bits 0 to 3 4 bits > val4.6 bits 4 to 6 3 bits > val7.10 bits 7 to 10 4 bits > val11.13 bits 11 to 13 3 bits > but the BC can't do that. > > > > Can you please relate to the following passage that I'm actually using > > in my setup? > > > > First .tx command selects a certain sample. > > Second .tx command changes Out2 from 0 to 127. > > I would like to add a third .tx command (in red) that changes Out1 from > > 127 to 0. > > [Default is Out1=127, Out2=0] > > [Data is one Byte ordered as MSB,LSB - see in blue] > > > > $encoder 17 > > .minmax 0 127 > > .default 0 > > .tx $F0 $43 $11 $58 $00 $5F $4E $65 $77 $53 $61 $6D $70 $6C $65 $20 $20 > > $20 $20 $20 $20 $10 $F7 > > .tx $F0 $43 $11 $58 $01 $02 $52 $00 $00 $00 $00 val4.7 val0.3 $F7 > > .tx $F0 $43 $11 $58 $01 $02 $50 $00 $00 $00 $00 val4.7 val0.3 $F7 > > .resolution 96 96 96 96 > > .showvalue on > > .mode bar > > > Normally it should be something like ... > $encoder 17 > .showvalue on > .mode 1dot > .minmax 127 16256 > .default 127 > .resolution 12193 > .tx $F0 $43 $11 $58 $00 $5F $4E $65 $77 $53 $61 $6D $70 $6C $65 $20 $20 $20 $20 $20 $20 $10 $F7 > .tx $F0 $43 $11 $58 $01 $02 $52 $00 $00 $00 $00 val7.13 $F7 ; out 1 going up > .tx $F0 $43 $11 $58 $01 $02 $50 $00 $00 $00 $00 val $F7 ; out 2 going down > > > Why is the value split? > If you can give more details of the sysex there might be a work around. > > > All the best > Royce >
Message
Re: Is there a way to send 127-val?
2012-05-06 by Gil Brand
Attachments
- No local attachments were found for this message.