Velocity to CC?

Discuss music production with Ableton Live.
aioffermann
Posts: 386
Joined: Tue Mar 13, 2012 11:47 pm

Velocity to CC?

Post by aioffermann » Sat Jun 08, 2013 12:58 am

Curious if anyone knows of any way to convert velocity data to CC. I thought MidiPipe might be able to do it but I believe I am wrong. It'd be awesome to take the velocity values from a specific midi channel and convert them into CC values to be sent to a specific channel.

yur2die4
Posts: 7161
Joined: Sat Oct 03, 2009 3:02 am
Location: Menasha, Wisconsin
Contact:

Re: Velocity to CC?

Post by yur2die4 » Sat Jun 08, 2013 2:56 am

The closest I can think of is the Max4Live modulation devices. One of the midi ones that comes with the pack has a lot of midi parameter options which can translate to modulating other devices.

Honestly, I'm not 100% positive that Velocity is one of the parameters on the list (pb, mod, aftertouch, key are I think)

wiffbi
Posts: 238
Joined: Wed Aug 18, 2004 4:53 pm

Re: Velocity to CC?

Post by wiffbi » Sun Jun 09, 2013 8:47 pm

What do you mean by convert velocity data to CC? With MidiPipe using the "Message Converter" you can e.g. transform Note On events to CC (although only a fixed CC number) and use the velocity as the value of the CC.

If you want to change any Note On/Off to its corresponding CC (by that I mean, translate MIDI Note number 65 with velocity 110 to MIDI CC 65 with a value of 110) then I think you need to use applescript to convert a midi note to a CC. Within MidiPipe you can execute AppleScript and modify the MIDI message. From the top of my head I think you need to change to first message byte, which contains the channel and that it’s a note-event encoded into one byte to a byte with channel and the info, that it’s a CC, encoded. How exactly this is done, I do not know. From a quick look at the examples in MidiPipe, when you set the first byte of message to 176 + <channel>, it should turn it into a CC.

Copy and paste this into the "AppleScript Trigger":

Code: Select all

on runme(message)
	set channel to ((item 1 of message) mod 16)
	set (item 1 of message) to (channel + 176)
	return message
end runme
You can of course add a "Message Filter" in front, that only lets note-events through.

Hope that helps.

aioffermann
Posts: 386
Joined: Tue Mar 13, 2012 11:47 pm

Re: Velocity to CC?

Post by aioffermann » Sun Jun 09, 2013 9:06 pm

Wow dope! Some keen insight! Thanks! I'll try it later. Danke schön!

Gelido
Posts: 1
Joined: Tue Nov 09, 2010 1:41 am

Re: Velocity to CC?

Post by Gelido » Thu Dec 25, 2014 3:36 pm

Use the Max For Live Device named: Expression Control. It allows you to Map any MIDI Message to a parameter of any instrument device.

Stromkraft
Posts: 7033
Joined: Wed Jun 25, 2014 11:34 am

Re: Velocity to CC?

Post by Stromkraft » Thu Dec 25, 2014 7:54 pm

aioffermann wrote:Curious if anyone knows of any way to convert velocity data to CC.
Why would I want to do that? Some kind of sidechain trigger or?
Make some music!

J0J0 Todos
Posts: 20
Joined: Fri Nov 18, 2016 2:45 pm
Contact:

Re: Velocity to CC?

Post by J0J0 Todos » Sun Aug 20, 2017 9:26 am

Thanks! I will give this one a try: Volca Beats, unfortunately doesn't support velocity control! The Volume of each part can only be controlled by a CC.
Last edited by J0J0 Todos on Mon Aug 28, 2017 7:52 am, edited 1 time in total.
interested in music, coding and electronics? check out my blog: https://blog.jojotodos.net

J0J0 Todos
Posts: 20
Joined: Fri Nov 18, 2016 2:45 pm
Contact:

Re: Velocity to CC?

Post by J0J0 Todos » Thu Aug 24, 2017 10:01 am

Hi again,
I wanted to share what I came up with to realize Velocity Control for my Volca Beats:

Code: Select all

on runme(message)
	#set message to {144, 36, 100}
	#Kick,Snare,LoTom,HiTom,ClHat,OpHat,Clap,Claves,Agogo,Crash
	set note_list to {36, 38, 43, 50, 42, 46, 39, 75, 67, 49}
	set CC_list to {40, 41, 42, 43, 44, 45, 46, 47, 48, 49}
	set cnt to 1
	repeat with drum in note_list
		if (item 2 of message) is (drum as integer) then
			# returns 0 for channel 1, 1 for channel 2, etc.
			set channel to ((item 1 of message) mod 16)
			# 176 is CC on channel 1	
			set first_byte to (channel + 176)
			set CC_no to (item cnt of CC_list)
			set CC_val to (item 3 of message)
			#display dialog "channel:" & channel + 1 & " " & ¬
			"CC_no:" & " " & CC_no & " " & "CC_val:" & CC_val
			set (item 1 of message) to first_byte
			set (item 2 of message) to CC_no
			set (item 3 of message) to CC_val
		end if
		set cnt to (cnt + 1)
	end repeat
	return message
end runme
I know I could have spared some variables but wanted to make it more readable when realizing the debug "display dialog".
You can comment out the lines "on runme(message)" and "end runme", and comment in the "set message to {144, 36, 100}" line to try it out and debug in apples "Script Editor"

"Pass Through" has to be enabled for the "AppleScript Trigger" tool.

It seems to work correctly but one thing that concerns me is that the Note On commands are always slightly ahead of the CC commands when watching with a midi monitor (or Alist tool in midipipe). This is not a surprise and actually what I expected but theoretically it would be better to first set the volume per CC command and THEN hit the drum, right?

I'd appreciate any ideas on how I could realize this!

One idea would be to deactivate "pass through" and have the AppleScript return two midi messages, first the CC then the Note. Is this possible?

Jojo
interested in music, coding and electronics? check out my blog: https://blog.jojotodos.net

ToBe
Posts: 55
Joined: Wed Nov 04, 2009 9:26 pm
Contact:

Re: Velocity to CC?

Post by ToBe » Fri Dec 15, 2017 9:21 am

Yep its possible with M4L - check this: http://blog.abletondrummer.com/velocity ... ve-device/
(FREE) MAX for LIVE devices
http://blog.abletondrummer.com/free-max ... e-devices/

ABLETON LIVE for (but not only) DRUMMERS
http://www.abletondrummer.com

J0J0 Todos
Posts: 20
Joined: Fri Nov 18, 2016 2:45 pm
Contact:

Re: Velocity to CC?

Post by J0J0 Todos » Tue Mar 06, 2018 9:54 am

ToBe wrote:Yep its possible with M4L - check this: http://blog.abletondrummer.com/velocity ... ve-device/
Nice! If I'd known last summer I would have went this way ;-)

J0J0 Todos wrote:
...

It seems to work correctly but one thing that concerns me is that the Note On commands are always slightly ahead of the CC commands when watching with a midi monitor (or Alist tool in midipipe). This is not a surprise and actually what I expected but theoretically it would be better to first set the volume per CC command and THEN hit the drum, right?

I'd appreciate any ideas on how I could realize this!

One idea would be to deactivate "pass through" and have the AppleScript return two midi messages, first the CC then the Note. Is this possible?

Jojo
Anyway, I never posted my final solution here and want to do that now. It is still based on MidiPipe: http://www.subtlesoft.square7.net/

I used two AppleScript Triggers to solve above mentioned issue. My suggested idea was not possible to do: The AppleScript Trigger can only return one message at a time and not generate new ones or double them. Correct me if I'm wrong!

I recently did a detailed blog post about how it works, you also can download the finished MidiPipe file and just use it: https://blog.jojotodos.net/volca-beats-velocity

HTH Jojo
Last edited by J0J0 Todos on Wed Mar 10, 2021 8:22 pm, edited 1 time in total.
interested in music, coding and electronics? check out my blog: https://blog.jojotodos.net

mareproduction
Posts: 76
Joined: Mon Oct 29, 2012 4:48 pm
Contact:

Re: Velocity to CC?

Post by mareproduction » Tue Mar 06, 2018 11:20 am

I dont know is this right topic. Does anybody know how to see Kontakt velocity automation in Midi track? I can only see in midi clip?
Thanks

J0J0 Todos
Posts: 20
Joined: Fri Nov 18, 2016 2:45 pm
Contact:

Re: Velocity to CC?

Post by J0J0 Todos » Tue Mar 06, 2018 11:42 am

mareproduction wrote:I dont know is this right topic. Does anybody know how to see Kontakt velocity automation in Midi track? I can only see in midi clip?
Thanks
Hi,

I don't think this is the right topic. I'd suggest you ask your question in a more detailed way and as a new topic in the "Music and Audio Production" forum.

HTH Jojo
interested in music, coding and electronics? check out my blog: https://blog.jojotodos.net

J0J0 Todos
Posts: 20
Joined: Fri Nov 18, 2016 2:45 pm
Contact:

Re: Velocity to CC?

Post by J0J0 Todos » Mon Mar 26, 2018 9:26 am

Hi,
I built a Max For Live device that does the Velocity to CC conversion for the Volca Beats. Did a blog post about it, read and download here:

http://blog.jojotodos.net/volca-beats-m4l-velocity/

Hope that helps someone!
all the best
Jojo
Last edited by J0J0 Todos on Mon Dec 14, 2020 8:52 pm, edited 1 time in total.
interested in music, coding and electronics? check out my blog: https://blog.jojotodos.net

djsplice
Posts: 1
Joined: Sat Dec 12, 2020 5:56 pm

Re: Velocity to CC?

Post by djsplice » Sat Dec 12, 2020 6:02 pm

This is a long dead thread, but in case like me, you're looking for a solution to this problem I created a simple Max 4 Live Plugin which you can grab here: https://maxforlive.com/library/device/6 ... to-midi-cc

It will take the MIDI Velocity value from a Note ON event and send it to the MIDI CC channel you select.

I was using a Novation Launchpad Pro with a Dreadbox Typhon analog mono-synth and the velocity values from the launchpad weren't having any effect on note volume in the Typhon.

There may be other solutions to this problem that don't require Max 4 live, but this works for me. Hopefully it helps someone else!

Big props to Daniel Dehaan for posting up a Max 4 Live instructional video - got me up and building really quickly. https://www.youtube.com/watch?v=N5dVUxra-no

sambaji
Posts: 31
Joined: Fri Jun 01, 2018 3:40 pm

Re: Velocity to CC?

Post by sambaji » Sat Mar 06, 2021 4:09 pm

J0J0 Todos wrote: I recently did a detailed blog post about how it works, you also can download the finished MidiPipe file and just use it: http://stuff-i-do.peek-a-boo.at/volca-beats-velocity
Thanks for sharing.
Firefox blocked your link from loading, saying that it is a security risk? Any chance of updating the website to make it acceptable for Firefox?

Post Reply