Forum Replies Created
-
AuthorPosts
-
yeah, that’s what I meant (cc number 6 sends the value of the parameter selected with MSB and LSB).
Values for MSB/LSB are set in the field “Midi Controller number” (enter decimal values here).
MSB 0 and LSB 1 represents the decimal number 1. MSB 1 and LSB 0 represents the decimal number 128. It is not that hard to understand if you have minimal knowledge of binary notation. The calculator in Ctrlr (Tools -> Midi Calculator) helps you to find out the right number. Set the checkbox “16bit” and Enter 127 in the field “Decimal”. You see that it will display 0000000001111111. Ignore the last two zeroes (NRPN CC’s are 2x7bit = 14 bit). So look at it like 00000001111111. The zeroes are the MSB (most significant bits) and 1111111 are the LSB (least significant bits). Another example: 3:127 represents the decimal number 511: MSB = 0000011, LSB = 1111111.
I don’t know max and don’t know what 176 is good for. But the other numbers seem to match: cc 99 is MSB (0) and cc 98 is LSB (1), cc 6 is the value (is there no value?)
I just tried, it works on my pc. I am using Windows10
0 could be MSB and 3 LSB. Just a guess. As these seem to be 7-bit values you have to delete the last line of the NRPN template and change the third to “direct”. like this:
CC,ByteValue,MSB7bitValue,99,-2
CC,ByteValue,LSB7bitValue,98,-2
CC,Direct,Direct,6,-1Hi Carl. First I want to thank you for your great Prophet08 panel. I used a lot of lua code for my own panels.
The issue I described only happens in the vst plugin. I just select “output to plugin host”. Input, Output and Controller are set to –None. But it still sends Midi messages twice.
Disabling “output to plugin host” and selecting an “Output” is not an ideal workaround as the vst-host already uses the Midi-port where the synth is connected to. There may be a way with virtual Midiports, re-feeding into the vst-host.
Btw. same prob with sysex:
[19:22:57:000301]: Dev:[VST OUTPUT] Ch:[–] RAW:[f0 41 39 00 24 30 01 19 69 f7]
[19:22:57:000301]: Dev:[VST OUTPUT] Ch:[–] RAW:[f0 41 39 00 24 30 01 19 69 f7]But it works as expected with Lua generated sysex:
[19:26:23:000288]: Dev:[VST OUTPUT] Ch:[–] RAW:[f0 41 38 00 24 20 01 20 46 41 54 20 46 49 46 54 48 20 38 00 00 60 4e 05 00 40 00 00 40 00 00 73 7f 7f 35 00 00 00 62 55 6d 68 63 00 00 00 00 00 00 00 00 00 00 00 00 7f 00 7f 00 7f 00 23 63 00 29 16 41 71 36 00 00 00 60 00 60 00 60 60 00 20 20 00 00 00 00 20 00 00 00 00 50 50 20 50 50 40 60 40 20 00 10 00 00 00 00 10 00 00 f7]
Thanky you for your answer dasfaker. Well this makes me thinking that the bug could be related to my vst-host (Reaper). Ctrlr MidiMonitor shows this:
[17:50:32:000842]: Dev:[VST OUTPUT] Ch:[ 1] RAW:[b0 63 00]
[17:50:32:000842]: Dev:[VST OUTPUT] Ch:[ 1] RAW:[b0 63 00]
[17:50:32:000842]: Dev:[VST OUTPUT] Ch:[ 1] RAW:[b0 62 05]
[17:50:32:000842]: Dev:[VST OUTPUT] Ch:[ 1] RAW:[b0 62 05]
[17:50:32:000842]: Dev:[VST OUTPUT] Ch:[ 1] RAW:[b0 06 01]
[17:50:32:000842]: Dev:[VST OUTPUT] Ch:[ 1] RAW:[b0 06 01]This should be 3 messages not 6. I will test this on Cubase maybe it reacts differently. Most people here seem to use Ableton Live, maybe this works best…
April 3, 2016 at 4:49 pm in reply to: Is it possible to prevent running the OnModulatorValueChange method? #68841Thank you goodweather. I have no experience with timers, looks like a much nicer way than mine.
April 2, 2016 at 6:26 pm in reply to: Is it possible to prevent running the OnModulatorValueChange method? #68830I had the same prob. When getting a patch from the synth, all OnModulatorValueChange scripts would execute (which I did not want to happen). As OnModulatorValueChange executes AFTER the MidiMessageReceived-script I found no way to prevent this. My solution: MidiMessageReceived changes all sliders-scripts to “OnMouseDrag”. You can set it back manually to ValueChange with a button.
April 2, 2016 at 6:19 pm in reply to: Error opening file for writing (installing ctrlr x64 on win7 x64) #68829well, as atom said. You have to run the installer as administrator. Right click installer -> run as administrator.
your code looks nice jbeuckm. I didn’t knew shiftBits – very useful.
I did this for 4-bit nibbleized 12bit vaule. It is not the same thing, but maybe it is of some use for you. Modulator “OSC2 Det” set to min=0, max=4095.
–decompose the 12-Bit value into three 4-bit nibbles:
value=CtrlrLuaBigInteger(panel:getModulatorByName(“OSC2_Det”):getModulatorValue())
low=string.format(“%.2x”, value:getBitRangeAsInt(0,4))
mid=string.format(“%.2x”, value:getBitRangeAsInt(4,4))
hig=string.format(“%.2x”, value:getBitRangeAsInt(8,4))
panel:sendMidiMessageNow(CtrlrMidiMessage(“f0″..”00″..”00″..”2F”..”01″..low..mid..hig….”f7″))–compose the 12-Bit value out of three 4-bit nibbles (from a sysex-dump):
mid=DumpData:getByte(4)
low=DumpData:getByte(5)
hig=DumpData:getByte(7)
val = (low)+(mid*16)+(hig*256)
panel:getModulatorByName(“OSC2_Det”):setModulatorValue(val,false,false,false)- This reply was modified 8 years, 1 month ago by Possemo.
@goodweather, this is just an excerpt of a procedure that puts all modulator-values including the patchname into a Lua table that will later be converted into a memoryblock. It can then be saved to disk or sent to the synth as sysex dump.
That seems to do the trick, nice. Can someone explain what L(…) actually does?
btw I would even do it this way:
getname=function(comp)
sName= L(comp:getOwner():getName())
console(“Name “..sName)
endI used it to get a Patchname from an uiLabel without knowing what it does (copied from another panel):
— GET the Patch Name
PatchName=L(panel:getModulatorByName(“PatchName”):getComponent():getProperty
(“uiLabelText”))— Make all characters UPPERCASE. The SuperJX cannot display lowercase characters
PatchNameUp=string.upper(PatchName)— from ASCII to numerical code
char1 =string.byte(PatchNameUp, 1)
char2 =string.byte(PatchNameUp, 2)
char3 =string.byte(PatchNameUp, 3)
char4 =string.byte(PatchNameUp, 4)
char5 =string.byte(PatchNameUp, 5)
char6 =string.byte(PatchNameUp, 6)
char7 =string.byte(PatchNameUp, 7)
char8 =string.byte(PatchNameUp, 8)
char9 =string.byte(PatchNameUp, 9)
char10=string.byte(PatchNameUp,10)
char11=string.byte(PatchNameUp,11)
char12=string.byte(PatchNameUp,12)
char13=string.byte(PatchNameUp,13)
char14=string.byte(PatchNameUp,14)
char15=string.byte(PatchNameUp,15)
char16=string.byte(PatchNameUp,16)
char17=string.byte(PatchNameUp,17)
char18=string.byte(PatchNameUp,18)— Check for empty chars and put each char value in PatchDataValuesTable
if char1 == nil then char1 =32 end PatchDataValuesTable[8] =string.format(“%.2x”, char1)
if char2 == nil then char2 =32 end PatchDataValuesTable[9] =string.format(“%.2x”, char2)
if char3 == nil then char3 =32 end PatchDataValuesTable[10]=string.format(“%.2x”, char3)
if char4 == nil then char4 =32 end PatchDataValuesTable[11]=string.format(“%.2x”, char4)
if char5 == nil then char5 =32 end PatchDataValuesTable[12]=string.format(“%.2x”, char5)
if char6 == nil then char6 =32 end PatchDataValuesTable[13]=string.format(“%.2x”, char6)
if char7 == nil then char7 =32 end PatchDataValuesTable[14]=string.format(“%.2x”, char7)
if char8 == nil then char8 =32 end PatchDataValuesTable[15]=string.format(“%.2x”, char8)
if char9 == nil then char9 =32 end PatchDataValuesTable[16]=string.format(“%.2x”, char9)
if char10== nil then char10=32 end PatchDataValuesTable[17]=string.format(“%.2x”,char10)
if char11== nil then char11=32 end PatchDataValuesTable[18]=string.format(“%.2x”,char11)
if char12== nil then char12=32 end PatchDataValuesTable[19]=string.format(“%.2x”,char12)
if char13== nil then char13=32 end PatchDataValuesTable[20]=string.format(“%.2x”,char13)
if char14== nil then char14=32 end PatchDataValuesTable[21]=string.format(“%.2x”,char14)
if char15== nil then char15=32 end PatchDataValuesTable[22]=string.format(“%.2x”,char15)
if char16== nil then char16=32 end PatchDataValuesTable[23]=string.format(“%.2x”,char16)
if char17== nil then char17=32 end PatchDataValuesTable[24]=string.format(“%.2x”,char17)
if char18== nil then char18=32 end PatchDataValuesTable[25]=string.format(“%.2x”,char18)For my Moog Source panel I just did a similar thing for a parameter with 12Bit resolution (4096 values). uiSlider set to min value 0, max value 4095:
value=CtrlrLuaBigInteger(panel:getModulatorByName(“VCF_Cutoff”):getModulatorValue())
low=string.format(“%.2x”, value:getBitRangeAsInt(0,4))
mid=string.format(“%.2x”, value:getBitRangeAsInt(4,4))
hig=string.format(“%.2x”, value:getBitRangeAsInt(8,4))you could then compose an IPR-Sysex message similar to this:
panel:sendMidiMessageNow(CtrlrMidiMessage(“f0″..”41″..”39”..hig..mid..low..”f7″))“Program Snapshot” saves a snapshot of all current modulator values. It is a simple way of storing patches and send them to the synth. In the newer Ctrlr releases the menu is broken so it is not possible to send the snapshot to the synth. But you can view the snapshots in the menu “Midi Library”. Not all synths will appreciate being hit by a ton of parameter values, so it is not the best way of storing and sending patches anyway.
you have to define txtCurrentValue, as goodweather in his PanelLoaded method:
txtCurrentValue = panel:getModulatorByName(“txtCurrentValue”)This looks interesting but I don’t understand the following line at all:
Osc1Pitch_OnChange = function(–[[ CtrlrModulator –]] mod, –[[ number –]] value, –[[ number –]] source)I guess you want to know how you have to configure a slider to be able to change the 16bit value. I still learning too and cannot give you a ready solution. According to goodweathers excel-file, as a first step I would set the minimum value of the uiSlider to -65535 and the max to 65535. Maybe you can just put a message in the “SysEx Forumula” field but I don’t know the correct formula for this. I know that there are prebuilt variables for lsb and msb but this won’t cut it for your high resolution parameter (here from the evolver panel:
f0 01 20 01 01 11 ls ms f7).If there is no other way I would try to make a Lua script using bit extraction.
I just did this for single bits, but maybe it gets you on track:
Set the modulator value:
byte40=CtrlrLuaBigInteger(PatchBlock:getByte(40)) bit1=byte40:getBitRangeAsInt(0,1) panel:getModulatorByName("HoldSwitch"):setModulatorValue(bit1,false,false,false)
Read the modulator value:
byte40=CtrlrLuaBigInteger(0) Hold=panel:getModulatorByName("HoldSwitch"):getModulatorValue() if Hold==0 then byte40:setBit(0,false) elseif Hold==1 then byte40:setBit(0,true) end byte40Int=byte40:getBitRangeAsInt(0,8)
getBitRangeAsInt(0,1)
starts from bit 0 (the least significant bit) and has a range of 1 bit.
setBit(0,true)
sets bit 0 to the value 1.setBit(0,false)
sets the value to 0.Thanks dasfaker. I will try this out. Btw. I am on a Moog Source with the Encore SMK MIDI interface. It sends and receives two 4-bit nibbleized sysex bytes for each parameter. So most parameters have a resolution of 256 steps. To put this dump together will probably make some lag anyway. I will see how the SMK-Source reacts to this. The SMK upgrade dates from 1991, it is therefore already “vintage” itself altough the firmware has been updated from time to time.
- This reply was modified 8 years, 2 months ago by Possemo.
March 2, 2016 at 11:29 pm in reply to: Called to calculate new modulator value from a MIDI value #68551imho the plugin version of Ctrlr is quite buggy. For my panel (SuperJX OS4.x editor) I advise people to use the standalone version. With a multiclient MIDI-interface (I think all interfaces today are multiclient capable) you can run Ctrlr and a sequencer like Cubase in parallel. Sure, you cannot automate faders as with a plugin but for me the much smoother working standalone ver. outweights the lack of plugin specific features.
-
AuthorPosts