SEnding MIDI message command #240
-
Hi Amazing library and much better than some out there! I've got my program sending notes etc. to a soft synth and that is all working well but what I don't know how to do is send a command. For example, say a knob on a soft synth hosted in Ableton live is mapped to a specific MIDI number, how would I send a command to alter the knob? I hope that makes sense and if someone could point me in the right direction I'd be most happy! Bipman |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
Hi,
Can you please clarify what do you mean? Are you talking about MIDI controller numbers (MIDI CC)? If yes, just try to send _outputDevice.SendEvent(new ControlChangeEvent(
(SevenBitNumber)controllerNumber,
(SevenBitNumber)controllerValue) { Channel = (FourBitNumber)channel }); Set Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi I'll give it a go thanks. Bipman |
Beta Was this translation helpful? Give feedback.
-
Hmmm, not working. The item I am trying to change is a MIDI CC item if that makes a difference. For instance CC 77 is vibrato depth and 93 is chorus depth. Also, in your code above I couldn't get the channel to work as it says the constructor does not take 3 arguments. Bipman |
Beta Was this translation helpful? Give feedback.
-
Hi, The code is using System; // ... using (var outputDevice = OutputDevice.GetByName("Gloving"))
} void OnEventReceived(object sender, MidiEventReceivedEventArgs e) void OnEventSent(object sender, MidiEventSentEventArgs e) It's going through loopMidi and I have the logs from there if it helps. I'm going to switch on logging in Ableton too. Bipman |
Beta Was this translation helpful? Give feedback.
-
Hi The answer seems to be that although I am setting the controllerValue in the loop to the count variable, it remains at 0. I'm obviously setting it wrong somehow. Bipman |
Beta Was this translation helpful? Give feedback.
-
Hi Got it working. I was stupidly trying to send a float as the value on the synth can be 0.00 to 1.00. I changed to int and all OK! I'm used to using c++ (as an extension to C) as is probably evident in my code but c# has better libraries so am trying to switch from c++ to c# for when I don't need performance. Great library by the way and thanks for the support. Bipman |
Beta Was this translation helpful? Give feedback.
Hi,
Can you please clarify what do you mean? Are you talking about MIDI controller numbers (MIDI CC)? If yes, just try to send
ControlChangeEvent
like this:Set
controllerNumber
,controllerValue
andchannel
to required values. Please note that channel in DryWetMIDI is a number from 0 to 15, not from 1 to 16.Thanks,
Max