Forum Replies Created
-
AuthorPosts
-
Uncheck Panel edit -> MIDI -> Panel Snapshot after load
Or send your panel and I will check what is the problem.
- This reply was modified 4 years, 9 months ago by daimondamps.
This is the only workaround for me:
function resetMIDIdevice() -- Trick to avoid doubled MIDI messages local sMIDIDeviceName=panel:getProperty("panelMidiOutputDevice") panel:setPropertyString("panelMidiOutputDevice","-- None") panel:setPropertyString("panelMidiOutputDevice",sMIDIDeviceName) local sMIDIDeviceName=panel:getProperty("panelMidiControllerDevice") panel:setPropertyString("panelMidiControllerDevice","-- None") panel:setPropertyString("panelMidiControllerDevice",sMIDIDeviceName) local sMIDIDeviceName=panel:getProperty("panelMidiInputDevice") panel:setPropertyString("panelMidiInputDevice","-- None") panel:setPropertyString("panelMidiInputDevice",sMIDIDeviceName) end
- This reply was modified 4 years, 9 months ago by daimondamps.
- This reply was modified 4 years, 9 months ago by daimondamps.
bump
I think it could be 5.2 acording to the github. It is no longer avaliable.
You can use my script by modifying it a bit.
if panel:getProperty("panelMidiOutputDevice")=="-- None" or panel:getProperty("panelMidiInputDevice")=="-- None" then saMidiInputDevices = StringArray() for i=0,(utils.getMidiInputDevices():size()) do saMidiInputDevices:set(i, utils.getMidiInputDevices():get(i)) end saMidiOutputDevices = StringArray() for i=0,(utils.getMidiOutputDevices():size()) do saMidiOutputDevices:set(i, utils.getMidiOutputDevices():get(i)) end modalWindow = AlertWindow("\nFirst time run setup.\nPlease select you MIDI Input and Otput Device", " ", AlertWindow.InfoIcon) modalWindow:addButton(" OK ", 1, KeyPress(KeyPress.returnKey),KeyPress()) modalWindow:addButton("Cancel", 0, KeyPress(KeyPress.escapeKey),KeyPress()) modalWindow:addComboBox ("cmbMidiInputDevices", saMidiInputDevices, "MIDI Input Device") modalWindow:addComboBox ("cmbMidiOutputDevices", saMidiOutputDevices, "MIDI Output Device") modalWindow:addTextBlock ("Program will be closed to save changes.") ret = modalWindow:runModalLoop() if ret == 1 then panel:setPropertyString("panelMidiInputDevice",modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText()) panel:setPropertyString("panelMidiOutputDevice",modalWindow:getComboBoxComponent("cmbMidiOutputDevices"):getText()) panel:setPropertyString("panelMidiControllerDevice",modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText()) end modalWindow:setVisible (false) end end
- This reply was modified 4 years, 11 months ago by daimondamps.
The only working and stable version for linux for me is : Ctrlr-x86_64-5.3.201.sh.
I’m afraid not . CTRLR open only one device for each type (input , Output , Ctlr). With Lua you can not open another MIDI thread/port. But there are some MIDI routing apps. MIDI yoke is one of them.
Was this function removed?
You have to select this method(function) in the right men in Panel Edit Mode “luaPanelMidiRecived” “Called when a panel recives midi message”.
Hi , you need to create LUA function and selest it in the main panel recive message method.
Example routine could be like this:-- -- Called when a panel receives a midi message (does not need to match any modulator mask) -- @midi CtrlrMidiMessage object -- Recivelist = function(midiMessage) if panel:getRestoreState() == true or panel:getProgramState() == true then return end local messageType = midiMessage:getType() if (messageType == 5 and midiMessage:getSize()~=2) then local s = midiMessage:getSize() -- Size of the midi dump received console ("memory block is "..midiMessage:getSize().." bytes, data:") local recKPAID = midiMessage:getLuaData():getRange(1,3) local recFunctionCode = midiMessage:getLuaData():getByte(6) local Instance = midiMessage:getLuaData():getByte(7) local recNrpnMSB = midiMessage:getLuaData():getByte(8) local recNrpnLSB = midiMessage:getLuaData():getByte(9) if (recFunctionCode == 0x7e and Instance == 0x00) then if (recNrpnMSB == 04 and recNrpnLSB ==03) then local partialmessage=midiMessage:getData():getRange(10,s-12) elseif (recNrpnMSB == 06 and recNrpnLSB ==03) then else end end end end
- This reply was modified 5 years, 1 month ago by daimondamps.
@Roman just please do not remove luabind from the project .
I’m using their oo-system in lua http://luabind.sourceforge.net/docs.html#class_lua .- This reply was modified 5 years, 2 months ago by daimondamps.
- This reply was modified 5 years, 2 months ago by daimondamps.
- This reply was modified 5 years, 2 months ago by daimondamps.
- This reply was modified 5 years, 2 months ago by daimondamps.
I just uploaded the 6.0 upciming release
What a great news!! Happy to hear you are back !!
Hi , did you completed all info fields of the panel?
September 5, 2018 at 5:24 pm in reply to: Is it possible to thin data or add a delay between CC messages in streams ? #85175You could use a Timer and a table of CC messages. When timer reach max count send the message and restart the timer. Add + 1 to table counter.
function timerStart() timer:setCallback (4, queryNextParametersFromList) timer:stopTimer(4) timer:startTimer(4,timerQueryTime) console("TimerStart") end
function queryNextParametersFromList() local isConnectedBtn=panel:getModulatorByName("StartComm"):getValue() if isConnectedBtn ==1 and isMessageProcessed==true then queryCounterUpdate() sendMidiSysex(queryList[queryIndex]) end end
function queryCounterUpdate() if queryIndex<queryListSize then queryIndex=queryIndex+1 else queryIndex = 1 end end
- This reply was modified 5 years, 7 months ago by daimondamps.
I talked to github the repo is back up without the VST code
Dzięki Romek !
Ctrlr repository is back !! Thanks @Atom
- This reply was modified 5 years, 8 months ago by daimondamps.
Count from 0 :
enum CtrlrMidiMessageType { CC, Aftertouch, ChannelPressure, NoteOn, NoteOff, SysEx, Multi, ProgramChange, PitchWheel, None, MidiClock, MidiClockContinue, MidiClockStop, MidiClockStart, ActiveSense, kMidiMessageType, };
- This reply was modified 5 years, 9 months ago by daimondamps.
UPDATE: So we have two objects. One is CtrlrMidiMessage()
Object type [CtrlrMidiMessage] ----------------------------------------------------------------- Members: getData: function getPropertyDouble: function getProperty: function getNumber: function setChannel: function getPropertyInt: function getPropertyString: function setPropertyString: function getInitializationResult: function setProperty: function getMidiMessageType: function setPropertyColour: function getValue: function __init: function getSize: function getChannel: function removeProperty: function setPropertyInt: function getLuaData: function getObjectTree: function getType: function toString: function setNumber: function setPropertyDouble: function setValue: function
And the other is MidiMessage():
Object type [MidiMessage] ----------------------------------------------------------------- Members: isKeySignatureMetaEvent: function __init: function isAllSoundOff: function isAftertouch: function getSongPositionPointerMidiBeat: function getPitchWheelValue: function isSysEx: function getChannel: function getMetaEventType: function isMidiStart: function isMidiStop: function multiplyVelocity: function getQuarterFrameSequenceNumber: function isNoteOnOrOff: function getTempoMetaEventTickLength: function isAllNotesOff: function getFloatVelocity: function getMidiMachineControlCommand: function isMidiMachineControlMessage: function getRawData: function isControllerOfType: function getProgramChangeNumber: function setNoteNumber: function getRawDataSize: function isSostenutoPedalOn: function setTimeStamp: function isController: function isSostenutoPedalOff: function isMidiContinue: function isTempoMetaEvent: function isNoteOff: function isSoftPedalOn: function getQuarterFrameValue: function getTimeStamp: function getMidiChannelMetaEventChannel: function getNoteNumber: function setVelocity: function getAfterTouchValue: function isProgramChange: function getMetaEventLength: function isMidiChannelMetaEvent: function getVelocity: function getChannelPressureValue: function isTextMetaEvent: function getTextFromTextMetaEvent: function isFullFrame: function isSoftPedalOff: function setChannel: function isActiveSense: function isForChannel: function isSustainPedalOff: function isTrackNameEvent: function isMidiClock: function getMetaEventData: function isEndOfTrackMetaEvent: function isMidiMachineControlGoto: function getTempoSecondsPerQuarterNote: function addToTimeStamp: function isTimeSignatureMetaEvent: function getKeySignatureNumberOfSharpsOrFlats: function isMetaEvent: function isPitchWheel: function getSysExDataSize: function getControllerNumber: function isTrackMetaEvent: function isSongPositionPointer: function getTimeSignatureInfo: function isChannelPressure: function isSustainPedalOn: function isNoteOn: function isQuarterFrame: function getControllerValue: function getSysExData: function
- This reply was modified 5 years, 9 months ago by daimondamps.
This does not work:
if midiMessage:isController() then...
Error message:
attempt to call method ‘isController’ (a nil value)Has someone got this working?
It is a little bit tricky but is
workingfor me :midiMessageReceived = function(midi) ourMidiClassAndMessage= MidiMessage() if ourMidiClassAndMessage:isSysEx() then console("sysex") end; end
Note that midi is not the same as MidiMessage() which is a class
You can check methods of x with what(ourMidiClassAndMessage)
I wonder if we could do the ourMidiClassAndMessage= MidiMessage() part on init only?
EDIT: MidiMessage() object is not working when recive callback is called. It doesn’t contain any data.
Maybe it was half implemented 🙁- This reply was modified 5 years, 9 months ago by daimondamps.
- This reply was modified 5 years, 9 months ago by daimondamps.
- This reply was modified 5 years, 9 months ago by daimondamps.
- This reply was modified 5 years, 9 months ago by daimondamps.
- This reply was modified 5 years, 9 months ago by daimondamps.
- This reply was modified 5 years, 9 months ago by daimondamps.
- This reply was modified 5 years, 9 months ago by daimondamps.
-
AuthorPosts