<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Can I send any CC values with Midi unit&#x2F;Core3s&#x2F;UIflow 2.0?]]></title><description><![CDATA[<p dir="auto">Hi everyone,</p>
<p dir="auto">I have received with my core3s and midi unit recently and I want to start my first project with UIflow 2.0. My project is about sending midi messages to a synthesizer in order to make a sequence of sound, as simple as that.</p>
<p dir="auto">UIflow made it easy to send note message and some other messages. However, I want to be able to send less common messages such as for Portamento (CC = 5) and I don't know how to do that.</p>
<p dir="auto">I am a newbie and it is possible that I have just asked a dumb question. Any useful information would be appreciated!</p>
<p dir="auto">Thank you</p>
]]></description><link>https://community.m5stack.com/topic/7895/can-i-send-any-cc-values-with-midi-unit-core3s-uiflow-2-0</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 11:06:07 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7895.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Nov 2025 18:10:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can I send any CC values with Midi unit&#x2F;Core3s&#x2F;UIflow 2.0? on Tue, 18 Nov 2025 03:02:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kcuk220" aria-label="Profile: kcuk220">@<bdi>kcuk220</bdi></a> No dumb questions at all! To send Portamento Time (CC 5) with your M5Stack Core3S and MIDI Unit in UIFlow 2.0, you'll need to use the cmd_write method to send raw MIDI control change messages. Here's how:<br />
Step 1: Understand the MIDI CC Message Structure<br />
Portamento Time (CC 5) uses this MIDI message format:Bn 05h cc</p>
<p dir="auto">Bn: Status byte (B = Control Change, n = MIDI channel 0-15 → hex 0-F)<br />
05h: CC number (5 for Portamento Time)<br />
cc: Value (0-127, where 0 = fastest portamento, 127 = slowest)</p>
<p dir="auto">Step 2: UIFlow 2.0 Implementation</p>
<p dir="auto">Initialize the MIDI Unit (if not already done):Use the "MIDI Unit" block under "Units" to set up the MIDI Unit with your UART port (e.g., Port A).</p>
<p dir="auto">Send Portamento CC Message using cmd_write:The cmd_write method accepts a list of MIDI bytes. For Portamento Time on Channel 1 (hex 0), with a value of 64 (medium speed):</p>
<p dir="auto">Bytes = [0xB0, 0x05, 0x40]<br />
0xB0 = Channel 1 (0xBn where n=0), Control Change<br />
0x05 = CC number 5 (Portamento Time)<br />
0x40 = Value 64 (hex for 64)</p>
<p dir="auto">Example Code (Blockly &amp; Python)<br />
Blockly:</p>
<p dir="auto">Add a "MIDI Unit" → "cmd_write" block.<br />
Set the input to [176, 5, 64] (decimal equivalent of 0xB0, 0x05, 0x40).</p>
<p dir="auto">Python (Advanced):<br />
from m5stack import *<br />
from m5ui import *<br />
from uiflow import *<br />
import unit</p>
<h1>Initialize MIDI Unit (adjust port if needed)</h1>
<p dir="auto">midi = unit.get(unit.MIDI, unit.PORTA)</p>
<h1>Send Portamento Time (CC 5) on Channel 1, value 64</h1>
<p dir="auto">midi.cmd_write([0xB0, 0x05, 0x40])  # B0=Ch1, 05=CC5, 40=64</p>
<p dir="auto">Key Notes:</p>
<p dir="auto">Channel Adjustment: Change the first byte to target different channels. For example:<br />
Channel 2 → 0xB1 (hex) or 177 (decimal)<br />
Channel 10 (drums) → 0xB9 (hex) or 185 (decimal).</p>
<p dir="auto">Value Range: Use 0-127 for cc (e.g., 0x00 = 0 = fastest, 0x7F = 127 = slowest).</p>
<p dir="auto">Verification<br />
Test with a MIDI monitor (e.g., MIDI-OX on Windows, MIDI Monitor on macOS) to confirm the CC 5 message is received. Most synths require Portamento to be enabled (via CC 65, "Portamento On/Off") before CC 5 takes effect.<br />
<a href="https://chat.m5stack.com/" target="_blank" rel="noopener noreferrer nofollow ugc">https://chat.m5stack.com/</a></p>
]]></description><link>https://community.m5stack.com/post/30199</link><guid isPermaLink="true">https://community.m5stack.com/post/30199</guid><dc:creator><![CDATA[yuyun2000]]></dc:creator><pubDate>Tue, 18 Nov 2025 03:02:38 GMT</pubDate></item></channel></rss>