Replies: 7 comments 2 replies
-
0x01 0x00 0x00 0x00 = 262144? Could you write down the Bytes in HEX for FFFFFFFF? |
Beta Was this translation helpful? Give feedback.
-
Hi,
Doesn't give the right values yet so need to adapt the calculations of the different bytes but you get the philosophy. |
Beta Was this translation helpful? Give feedback.
-
I took it back this evening and by re-reading your post I saw you said it counts by 64.
test(panel:getModulatorByName("modulator-1"), 63) test(panel:getModulatorByName("modulator-1"), 64) test(panel:getModulatorByName("modulator-1"), 127) test(panel:getModulatorByName("modulator-1"), 128) test(panel:getModulatorByName("modulator-1"), 4095) test(panel:getModulatorByName("modulator-1"), 4096) /goodweather |
Beta Was this translation helpful? Give feedback.
-
.....and I thought you did that on purpose for me to find out it needed to be 64....lol I tested it, saw the result and thought....hey, that probably needs to be 64 instead of 128. Now with the uiImageSlider or uiSlider we can only have a maximum value of 65536....at least that is in the version of Ctrlr that I am working with 5.3.196 Is this any different on the most recent update? If not then I will ask about part 2 of the original question: How do we get the user input of the uiTextLabel as the value to do the above calculations on? The largest decimal value that I read in this sampler is 1044088 (H03 H3E H39 H38). Thanks a lot. This is really becoming more fun everyday. :D BAUS |
Beta Was this translation helpful? Give feedback.
-
How's this BAUS? test = function(mod, value, source)
-- panel:sendMidiMessageNow(CtrlrMidiMessage(msg)) end Geen dank he? :) |
Beta Was this translation helpful? Give feedback.
-
Well...I have a full day time job and could only do it quickly in the morning as I knew the answer but didn't have the time to test it further. You should move to 5.3.201 which is the latest stable version. Now, you should really check and understand the synth (this is the key when designing panels and it is possible even without having the synth). I mean:
Raising all those questions is where your panel design skills should shine in ;-) |
Beta Was this translation helpful? Give feedback.
-
Here's an alternative to goodweather's and Tedjuh's excellent suggestions using JUCE BigInteger class : This code will cover a full 16 bit unsigned value 0 ~ 65,535 or 0xFFFF as in the manual page 5 16 BIT Word Format: ensoniq16BitMask = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) local bv=BigInteger(value) local iByte1 = bv:getBitRangeAsInt(12,4) local iByte2 = bv:getBitRangeAsInt(6,6) local iByte3 = bv:getBitRangeAsInt(0,6) local msg = string.format("F0 0F 03 00 11 00 00 00 00 00 01 20 15 00 %.2x %.2x %.2x F7", iByte1, iByte2, iByte3) -- panel:sendMidiMessageNow(CtrlrMidiMessage(msg)) end This code will cover a 12 bit unsigned value 0 ~ 4,095 or 0xFFF as in the manual page 5 12 BIT Word Format: ensoniq12BitMask = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) local bv=BigInteger(value) local iByte2 = bv:getBitRangeAsInt(6,6) local iByte3 = bv:getBitRangeAsInt(0,6) local msg = string.format("F0 0F 03 00 11 00 00 00 00 00 01 20 15 00 00 %.2x %.2x F7", iByte2, iByte3) -- panel:sendMidiMessageNow(CtrlrMidiMessage(msg)) end |
Beta Was this translation helpful? Give feedback.
-
Okay...I might want to integrate a little bit of sample editing in the panel that I am working on and I've already been reading up on it and I think that the dec2hex won't work for this piece of gear.
Option 1 is to include a uiCombo with most common values that I use for editing but I wonder if it is possible to get a formula for the way that this Ensoniq unit handles the sysex. I will explain.
The value range is 0 - FFFFFFFF
The sysex command for sample start = 0 is:
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x00, 0x00, 0x00, 0xF7}
The way this unit counts is in steps of 64 (3F) so value = 63 is:
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x00, 0x00, 0x3F, 0xF7}
value = 64 is:
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x00, 0x01, 0x00, 0xF7}
value = 127 is:
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x00, 0x01, 0x3F, 0xF7}
value = 128 is:
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x00, 0x02, 0x00, 0xF7}
etc. until 02 reaches 3F
value = 4095 is
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x00, 0x3F, 0x3F, 0xF7}
value = 4096 is
{0xF0, 0x0F, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x15, 0x00, 0x01, 0x00, 0x00, 0xF7}
and going on like this.
How would I approach this in a method? Is it possible to convert the (decimal) user input of a uiLabel to a sysex table?
I have no idea how to look at this so any input is welcome.
There's no rush but if this is possible it means that the panel could also become a sample editor and that would be cool.
Thanks in advance,
BAUS
Beta Was this translation helpful? Give feedback.
All reactions