Home › Forums › General › Programming › How to prog that ?
- This topic has 16 replies, 2 voices, and was last updated 6 years, 5 months ago by Sylvain Fortin.
-
AuthorPosts
-
November 20, 2017 at 4:05 am #73585
Hi,
After one year of absence i come back with CTRLR !
I have no problem with GUI but prog and learning LUA + CTRLR its different.
I started a project by bloc. One of these blocks is that: Click on button to see one choice by section and with final choice it appeared in LCD. See pic to understand.
The choice send MIDI SysEx to midi out.
I have no idea to start that.
Give me in order what do i need to make and learn.
I know it’s hard but i can.
Step by step i can succeedThanks,
Sylvain- This topic was modified 6 years, 5 months ago by Sylvain Fortin.
Attachments:
You must be logged in to view attached files.November 20, 2017 at 11:46 pm #73596Can you attach a panel of what you are trying to do?
November 21, 2017 at 1:57 am #73598I work on this panel. It’s just a draft but i will reorganize that.
Attachments:
You must be logged in to view attached files.November 21, 2017 at 3:24 am #73600That’s a nice design, but the actual .bpanelz file
November 21, 2017 at 7:37 pm #73614The bpanelz file in attachments
The idea is to select patch bank by category like XG Works. It’s more efficient!
But how to write that?
ThanksAttachments:
You must be logged in to view attached files.November 22, 2017 at 1:46 am #73617Is this something like what you are after?
It took me a while to figure out how to return the selected combo name and print it to the uiLCDLabel(the id is easy enough) and also there is probably a better way to dynamically add content to the second dynamic combo using
combo:additem
perhaps?I hope this will set you on the way. 🙂
Attachments:
You must be logged in to view attached files.November 22, 2017 at 2:36 am #73620Thanks dnaldoog!
It’s near to be that.
Just like “spectrum synth editor” —> click on preset menu and the first row appear, the second and the third choice made the same things. The choice appear on the LCD and send the sysex on the output.
“Melody” –> “Piano” –> “Grand piano” = “Patch = 1 / MSB = 0 / LSB = 0”
“Melody” –> “Piano” –> “Mellow grand piano” = “Patch =1 / MSB = 0 / LSB = 18”When we are going to have the right recipe I will do the rest of the long work. Write all the banks with all the sysex referrals.
Thank you very much for your response!
Together we will succeed!November 22, 2017 at 4:16 am #73625Glad to be of help! Good luck!
November 22, 2017 at 5:36 am #73626I watch your programming in LUA.
I watch Spectrum Synth programming in LUA.
I start to understand the meaning of how to do my programming.
I’m going to test something.November 22, 2017 at 5:44 am #73627Great, hope it goes well. A good starting place is here. 🙂
November 25, 2017 at 5:03 pm #73650It’s a begin !
I write what i want.
But how to send 3 sysex messages?
You choose Grand Piano and 3 sysex goes out but what is the syntax to use.
{0xF0, 0x43, 0x10, 0x4C, 0x08, 0x00, 0x01, MSB, 0xF7}
{0xF0, 0x43, 0x10, 0x4C, 0x08, 0x00, 0x02, LSB, 0xF7}
{0xF0, 0x43, 0x10, 0x4C, 0x08, 0x00, 0x03, Patch, 0xF7}See bpSelect at line 48
Attachments:
You must be logged in to view attached files.November 26, 2017 at 12:20 am #73652Hi Sylvain,
I think you just need to send three separate messages???
I didn’t know about PopupMenu()!!
panel:sendMidiMessageNow(CtrlrMidiMessage( {0xF0, 0x43, 0x10, 0x4C, 0x08, 0x00, 0x01, MSB, 0xF7})) panel:sendMidiMessageNow(CtrlrMidiMessage( {0xF0, 0x43, 0x10, 0x4C, 0x08, 0x00, 0x02, LSB, 0xF7})) panel:sendMidiMessageNow(CtrlrMidiMessage( {0xF0, 0x43, 0x10, 0x4C, 0x08, 0x00, 0x03, Patch, 0xF7}))
Regards.
November 27, 2017 at 5:42 am #73657Yes it works.
My programming is progressing wellAttachments:
You must be logged in to view attached files.November 27, 2017 at 5:45 am #73659Great to hear – looks good too!
November 29, 2017 at 6:08 am #73672Another questions ?
How to attribute first button with the first lcd
2nd with 2nd lcd
And so on.and
How to send value channel of the buttons to syxex ?
ex: button #1(CVB_1) = CH1
— SYSX: F0 43 10 4C 08 CH XX vv F7
— XX = 01 = MSB
— XX = 02 = LSB
— XX = 03 = Patch no.-1
— CH = Channel number
patchChange = CtrlrMidiMessage({0xF0, 0x43, 0x10, 0x4C, 0x08, CH, 0x01, MSB, 0xF7})
After that I will write all the voices
A long jobAttachments:
You must be logged in to view attached files.November 29, 2017 at 3:39 pm #73676Maybe this code can help, but I’m not sure if it directly solves your problem, but with these two functions you can synchronise between a channel change using uiSlider etc and Ctrlr’s channels as set in the menu.
-- -- Called when a modulator value changes -- @mod http://ctrlr.org/api/class_ctrlr_modulator.html -- @value new numeric value of the modulator -- CH=1 -- global channel initialised at startup myChangeChannel = function(mod,value,source)--called from Ctrlr uiButton etc local inc=value+1 if _disableProgChange == true then --prevents infinite loop if midi channel changed through menu _disableProgChange = false else panel:setPropertyInt("panelMidiOutputChannelDevice", inc) end CH=inc end --function --------------------------------------------------------- function below is called through the luaPanelMidiChannelChanged callback area in Ctrlr panelMidiChannelChanged = function(--[[ number --]] channelType, --[[ number --]] newChannel) -- This variable stops index issues during panel bootup if panel:getRestoreState() == true or panel:getProgramState() == true then return end local dec=newChannel-1 --INFINITE LOOP BELOW CRASHES PANEL FIX BELOW _disableProgChange=true --global SylvainsChannelChangeButtonOnCtrlr:setModulatorValue((dec), false, true, false) end --function --------------------------------------------------------- patchChange = CtrlrMidiMessage({0xF0, 0x43, 0x10, 0x4C, 0x08, CH, 0x01, MSB, 0xF7}) -- global CH is picked up
November 30, 2017 at 4:42 am #73680I will watch your programming tomorrow.
In the meantime I have made an flow chart of what I want.Attachments:
You must be logged in to view attached files. -
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.