<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Modartt user forum - YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
	<link rel="self" href="https://forum.modartt.com/extern.php?action=feed&amp;tid=12022&amp;type=atom"/>
	<updated>2025-08-13T19:10:56Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.modartt.com/viewtopic.php?id=12022</id>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1003398#p1003398"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Shuttle wrote:</cite><blockquote><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><p> I don’t know why and I also am very curious to know why . I remember having a post on another forum (pw P525 thread) who contacted Yamaha support about the issue. He copied the reply which in a nutshell said ‘ the keyboard was intended principally ti be used&nbsp; with the internal sound libraries and not so much to be used as a midi controller ‘</p></blockquote></div><p>Sorry to activate this thread again, but I&#039;m in the market for a new digital piano and midi compatibility is definitely required.</p><p>I currently still have the P250 but it&#039;s showing it&#039;s age, so the P525 looked like a nice update, but this topic got me worried.</p><p>Does the Aftertouch 18 and Note Off 64 messages have a negative impact on using it for Pianoteq? Or other midi software?</p></blockquote></div><p> I don’t think aftertouch message creates issues with&nbsp; Pianoteq but it is known to create some issues when you use it to control other keyboards. That said , it is quite annoying that they transmit useless midi messages with a serial protocol when the keyboard doesn’t have aftertouch sensors .&nbsp; Fixed note off is a limitation , but I believe Pianoteq has implemented an algorithm that allows a partial estimation of release speed&nbsp; ( maybe less precise) for the keyboards not capable of transmitting note off variable&nbsp; velocity .&nbsp; Hope it helps</p></blockquote></div><p>Thanks a lot Pianistically.</p><p>I really enjoy the keyboard action on the P525, but my slightly (or perhaps not so slightly) autistic side has trouble accepting those potential drawbacks. Knowing Yamaha, they probably consider it a feature, so I doubt it will be changed.</p><p>I may explore other instruments, but so far I haven’t found anything that feels quite like the P525. Or I might just wait another year or two to see if a new model comes along.</p>]]></content>
			<author>
				<name><![CDATA[Shuttle]]></name>
				<uri>https://forum.modartt.com/profile.php?id=10399</uri>
			</author>
			<updated>2025-08-13T19:10:56Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1003398#p1003398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1003396#p1003396"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Shuttle wrote:</cite><blockquote><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Paulo164 wrote:</cite><blockquote><p>You are right. I should have said “I find it weird that the P525 sends a fixed PA value whereas other Yamaha DPs already send a more detailed set of PA values”. To be correct…<br />Still, I wonder why Yamaha restricted this on the P525. Simple omission or different sensor technology ?…</p></blockquote></div><p> I don’t know why and I also am very curious to know why . I remember having a post on another forum (pw P525 thread) who contacted Yamaha support about the issue. He copied the reply which in a nutshell said ‘ the keyboard was intended principally ti be used&nbsp; with the internal sound libraries and not so much to be used as a midi controller ‘</p></blockquote></div><p>Sorry to activate this thread again, but I&#039;m in the market for a new digital piano and midi compatibility is definitely required.</p><p>I currently still have the P250 but it&#039;s showing it&#039;s age, so the P525 looked like a nice update, but this topic got me worried.</p><p>Does the Aftertouch 18 and Note Off 64 messages have a negative impact on using it for Pianoteq? Or other midi software?</p></blockquote></div><p> I don’t think aftertouch message creates issues with&nbsp; Pianoteq but it is known to create some issues when you use it to control other keyboards. That said , it is quite annoying that they transmit useless midi messages with a serial protocol when the keyboard doesn’t have aftertouch sensors .&nbsp; Fixed note off is a limitation , but I believe Pianoteq has implemented an algorithm that allows a partial estimation of release speed&nbsp; ( maybe less precise) for the keyboards not capable of transmitting note off variable&nbsp; velocity .&nbsp; Hope it helps</p>]]></content>
			<author>
				<name><![CDATA[Pianistically]]></name>
				<uri>https://forum.modartt.com/profile.php?id=9183</uri>
			</author>
			<updated>2025-08-13T12:15:27Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1003396#p1003396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1003356#p1003356"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Paulo164 wrote:</cite><blockquote><p>You are right. I should have said “I find it weird that the P525 sends a fixed PA value whereas other Yamaha DPs already send a more detailed set of PA values”. To be correct…<br />Still, I wonder why Yamaha restricted this on the P525. Simple omission or different sensor technology ?…</p><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><p>EDIT : according to the midi chart on the new CLP 8xx series, the poly aftertouch data is transmitted , and note off is still fixed value 64 to keep some level of compliance with midi protocol. Yamaha should really have released a new version of the firmware when they introduced the P525 with the ´old’ CLP 745 GTS firmware . Maybe if enough users were asking the support , they would maybe do it , but I guess the majority of owners are not even aware of the issue and couldn’t care less <i class="far fa-smile-wink smiley"></i></p></blockquote></div></blockquote></div><p> I don’t know why and I also am very curious to know why . I remember having a post on another forum (pw P525 thread) who contacted Yamaha support about the issue. He copied the reply which in a nutshell said ‘ the keyboard was intended principally ti be used&nbsp; with the internal sound libraries and not so much to be used as a midi controller ‘</p></blockquote></div><p>Sorry to activate this thread again, but I&#039;m in the market for a new digital piano and midi compatibility is definitely required.</p><p>I currently still have the P250 but it&#039;s showing it&#039;s age, so the P525 looked like a nice update, but this topic got me worried.</p><p>Does the Aftertouch 18 and Note Off 64 messages have a negative impact on using it for Pianoteq? Or other midi software?</p>]]></content>
			<author>
				<name><![CDATA[Shuttle]]></name>
				<uri>https://forum.modartt.com/profile.php?id=10399</uri>
			</author>
			<updated>2025-08-11T19:35:42Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1003356#p1003356</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000215#p1000215"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Paulo164 wrote:</cite><blockquote><p>You are right. I should have said “I find it weird that the P525 sends a fixed PA value whereas other Yamaha DPs already send a more detailed set of PA values”. To be correct…<br />Still, I wonder why Yamaha restricted this on the P525. Simple omission or different sensor technology ?…</p><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><p> for what it’s worth, it is not a bug but a feature as the midi implementation chart of the p525 says it always send a fixed value of 18 for midi output instead of a variable value</p></blockquote></div><p>EDIT : according to the midi chart on the new CLP 8xx series, the poly aftertouch data is transmitted , and note off is still fixed value 64 to keep some level of compliance with midi protocol. Yamaha should really have released a new version of the firmware when they introduced the P525 with the ´old’ CLP 745 GTS firmware . Maybe if enough users were asking the support , they would maybe do it , but I guess the majority of owners are not even aware of the issue and couldn’t care less <i class="far fa-smile-wink smiley"></i></p></blockquote></div></blockquote></div><p> I don’t know why and I also am very curious to know why . I remember having a post on another forum (pw P525 thread) who contacted Yamaha support about the issue. He copied the reply which in a nutshell said ‘ the keyboard was intended principally ti be used&nbsp; with the internal sound libraries and not so much to be used as a midi controller ‘</p>]]></content>
			<author>
				<name><![CDATA[Pianistically]]></name>
				<uri>https://forum.modartt.com/profile.php?id=9183</uri>
			</author>
			<updated>2025-01-03T20:02:06Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000215#p1000215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000198#p1000198"/>
			<content type="html"><![CDATA[<p>You are right. I should have said “I find it weird that the P525 sends a fixed PA value whereas other Yamaha DPs already send a more detailed set of PA values”. To be correct…<br />Still, I wonder why Yamaha restricted this on the P525. Simple omission or different sensor technology ?…</p><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Paulo164 wrote:</cite><blockquote><p>It’s weird that your P525 doesn’t send full poly-aftertouch messages.<br />My RSC3 silent system send more than just one PA message. If I remember correctly, about 5 messages ranging from 20 to 36.<br />Your script is a good idea but the real good solution would be for Modartt to upgrade the PianoTeq engine to allow to dampen the sound when encountering incoming PA messages. A kind of « Yamaha’s Grand Expression modeling compatibility mode ».<br />Converting PA messages into one single note-off velocity is flawed because the note-off event always occurs well « after the fact » in the case of slow dampening.</p></blockquote></div><p> for what it’s worth, it is not a bug but a feature as the midi implementation chart of the p525 says it always send a fixed value of 18 for midi output instead of a variable value</p></blockquote></div><p>EDIT : according to the midi chart on the new CLP 8xx series, the poly aftertouch data is transmitted , and note off is still fixed value 64 to keep some level of compliance with midi protocol. Yamaha should really have released a new version of the firmware when they introduced the P525 with the ´old’ CLP 745 GTS firmware . Maybe if enough users were asking the support , they would maybe do it , but I guess the majority of owners are not even aware of the issue and couldn’t care less <i class="far fa-smile-wink smiley"></i></p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Paulo164]]></name>
				<uri>https://forum.modartt.com/profile.php?id=6619</uri>
			</author>
			<updated>2025-01-02T21:33:43Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000198#p1000198</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000197#p1000197"/>
			<content type="html"><![CDATA[<p>My $.02 is that Pianoteq should not be spending time customizing their MIDI processing to suit the peculiar MIDI implementation of a particular keyboard manufacturer, especially something as far out as rewriting Note Off messages with velocity values based on the value of a (normally) unrelated message and the time between it and the Note Off. If the OP wants to enjoy the effect of Note Off Velocity as implemented in any given synth, he should just get a keyboard that transmits the full range... and a DAW that records and plays it back. I mention this latter fact since I discovered some time ago that while my RD-700NX transmits Note Off Velocity, my preferred DAW Sonar does not record it and always sends 64. I&#039;m working on them to remedy that.</p>]]></content>
			<author>
				<name><![CDATA[brundlefly]]></name>
				<uri>https://forum.modartt.com/profile.php?id=8366</uri>
			</author>
			<updated>2025-01-02T20:56:27Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000197#p1000197</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000122#p1000122"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Pianistically wrote:</cite><blockquote><div class="quotebox"><cite>Paulo164 wrote:</cite><blockquote><div class="quotebox"><cite>Olivier W wrote:</cite><blockquote><p>Hi,</p><p>In Yamaha P525, the note OFF velocity is fixed at 64.</p><p>But...</p><p>Yamaha simulate smooth release with Poly aftertouch.</p><p>When the Damper is near the escapement or string (virtual) , P525 send a Aftertouch value at 18. (just before note off value fixed at vel 64)</p><p>With this NOTE OFF 64 and aftertouch at 18, you can make a midi script to simulate smooth release. (how fast you have value between aftertouch and note off, or with a note off velocity curve)</p><p>Just convert Poly Aftertouch for example to a note off value for each preleased key at 18. And you will have two note off velocity value (18 and 64)&nbsp; and you can simulate a smooth damper release with a xript , midi timing, or note off velocity curve ...</p><p>(set a note off velocity curve in PIANOTEQ with the converted Aftertouch value and the fixed note off 64 value)</p><p>But Pianoteq can&#039;t convert MIDI poly aftertouch to note off velocity....</p><p>It would be great to have this feature.</p><p>Instead i make a midi script in Logic 11.</p><p>And in P525 you have key acceleration in Controller 19. (for internal sound CFX and others for Grand expression, more advanced than single velocity value)</p><p>Just make a script with the key midi information played with the controller 19 value, and you can simulate Velocity/keyacceleration in Pianoteq.<br />But Pianoteq don&#039;t allow to use this and make a script to use both note on per key information with the near Controller 19 value.</p><p>Please improve midi script in Pianoteq, and add poly aftertouch conversion (only mono aftertouch in current PTQ release midi conversion ) to note off velocity in next Pianoteq update. With this i can make a nice preset for Yamaha P525, with smooth release and Grand expression, like Yamaha internal CFX.</p><p>Regards,</p><p>Olivier F.</p></blockquote></div><p>It’s weird that your P525 doesn’t send full poly-aftertouch messages.<br />My RSC3 silent system send more than just one PA message. If I remember correctly, about 5 messages ranging from 20 to 36.<br />Your script is a good idea but the real good solution would be for Modartt to upgrade the PianoTeq engine to allow to dampen the sound when encountering incoming PA messages. A kind of « Yamaha’s Grand Expression modeling compatibility mode ».<br />Converting PA messages into one single note-off velocity is flawed because the note-off event always occurs well « after the fact » in the case of slow dampening.</p></blockquote></div><p> for what it’s worth, it is not a bug but a feature as the midi implementation chart of the p525 says it always send a fixed value of 18 for midi output instead of a variable value</p></blockquote></div><p>EDIT : according to the midi chart on the new CLP 8xx series, the poly aftertouch data is transmitted , and note off is still fixed value 64 to keep some level of compliance with midi protocol. Yamaha should really have released a new version of the firmware when they introduced the P525 with the ´old’ CLP 745 GTS firmware . Maybe if enough users were asking the support , they would maybe do it , but I guess the majority of owners are not even aware of the issue and couldn’t care less <i class="far fa-smile-wink smiley"></i></p>]]></content>
			<author>
				<name><![CDATA[Pianistically]]></name>
				<uri>https://forum.modartt.com/profile.php?id=9183</uri>
			</author>
			<updated>2024-12-30T19:26:47Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000122#p1000122</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000116#p1000116"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Paulo164 wrote:</cite><blockquote><div class="quotebox"><cite>Olivier W wrote:</cite><blockquote><p>Hi,</p><p>In Yamaha P525, the note OFF velocity is fixed at 64.</p><p>But...</p><p>Yamaha simulate smooth release with Poly aftertouch.</p><p>When the Damper is near the escapement or string (virtual) , P525 send a Aftertouch value at 18. (just before note off value fixed at vel 64)</p><p>With this NOTE OFF 64 and aftertouch at 18, you can make a midi script to simulate smooth release. (how fast you have value between aftertouch and note off, or with a note off velocity curve)</p><p>Just convert Poly Aftertouch for example to a note off value for each preleased key at 18. And you will have two note off velocity value (18 and 64)&nbsp; and you can simulate a smooth damper release with a xript , midi timing, or note off velocity curve ...</p><p>(set a note off velocity curve in PIANOTEQ with the converted Aftertouch value and the fixed note off 64 value)</p><p>But Pianoteq can&#039;t convert MIDI poly aftertouch to note off velocity....</p><p>It would be great to have this feature.</p><p>Instead i make a midi script in Logic 11.</p><p>And in P525 you have key acceleration in Controller 19. (for internal sound CFX and others for Grand expression, more advanced than single velocity value)</p><p>Just make a script with the key midi information played with the controller 19 value, and you can simulate Velocity/keyacceleration in Pianoteq.<br />But Pianoteq don&#039;t allow to use this and make a script to use both note on per key information with the near Controller 19 value.</p><p>Please improve midi script in Pianoteq, and add poly aftertouch conversion (only mono aftertouch in current PTQ release midi conversion ) to note off velocity in next Pianoteq update. With this i can make a nice preset for Yamaha P525, with smooth release and Grand expression, like Yamaha internal CFX.</p><p>Regards,</p><p>Olivier F.</p></blockquote></div><p>It’s weird that your P525 doesn’t send full poly-aftertouch messages.<br />My RSC3 silent system send more than just one PA message. If I remember correctly, about 5 messages ranging from 20 to 36.<br />Your script is a good idea but the real good solution would be for Modartt to upgrade the PianoTeq engine to allow to dampen the sound when encountering incoming PA messages. A kind of « Yamaha’s Grand Expression modeling compatibility mode ».<br />Converting PA messages into one single note-off velocity is flawed because the note-off event always occurs well « after the fact » in the case of slow dampening.</p></blockquote></div><p> for what it’s worth, it is not a bug but a feature as the midi implementation chart of the p525 says it always send a fixed value of 18 for midi output instead of a variable value</p>]]></content>
			<author>
				<name><![CDATA[Pianistically]]></name>
				<uri>https://forum.modartt.com/profile.php?id=9183</uri>
			</author>
			<updated>2024-12-30T15:33:11Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000116#p1000116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000109#p1000109"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Olivier W wrote:</cite><blockquote><p>Hi,</p><p>In Yamaha P525, the note OFF velocity is fixed at 64.</p><p>But...</p><p>Yamaha simulate smooth release with Poly aftertouch.</p><p>When the Damper is near the escapement or string (virtual) , P525 send a Aftertouch value at 18. (just before note off value fixed at vel 64)</p><p>With this NOTE OFF 64 and aftertouch at 18, you can make a midi script to simulate smooth release. (how fast you have value between aftertouch and note off, or with a note off velocity curve)</p><p>Just convert Poly Aftertouch for example to a note off value for each preleased key at 18. And you will have two note off velocity value (18 and 64)&nbsp; and you can simulate a smooth damper release with a xript , midi timing, or note off velocity curve ...</p><p>(set a note off velocity curve in PIANOTEQ with the converted Aftertouch value and the fixed note off 64 value)</p><p>But Pianoteq can&#039;t convert MIDI poly aftertouch to note off velocity....</p><p>It would be great to have this feature.</p><p>Instead i make a midi script in Logic 11.</p><p>And in P525 you have key acceleration in Controller 19. (for internal sound CFX and others for Grand expression, more advanced than single velocity value)</p><p>Just make a script with the key midi information played with the controller 19 value, and you can simulate Velocity/keyacceleration in Pianoteq.<br />But Pianoteq don&#039;t allow to use this and make a script to use both note on per key information with the near Controller 19 value.</p><p>Please improve midi script in Pianoteq, and add poly aftertouch conversion (only mono aftertouch in current PTQ release midi conversion ) to note off velocity in next Pianoteq update. With this i can make a nice preset for Yamaha P525, with smooth release and Grand expression, like Yamaha internal CFX.</p><p>Regards,</p><p>Olivier F.</p></blockquote></div><p>It’s weird that your P525 doesn’t send full poly-aftertouch messages.<br />My RSC3 silent system send more than just one PA message. If I remember correctly, about 5 messages ranging from 20 to 36.<br />Your script is a good idea but the real good solution would be for Modartt to upgrade the PianoTeq engine to allow to dampen the sound when encountering incoming PA messages. A kind of « Yamaha’s Grand Expression modeling compatibility mode ».<br />Converting PA messages into one single note-off velocity is flawed because the note-off event always occurs well « after the fact » in the case of slow dampening.</p>]]></content>
			<author>
				<name><![CDATA[Paulo164]]></name>
				<uri>https://forum.modartt.com/profile.php?id=6619</uri>
			</author>
			<updated>2024-12-30T13:06:59Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000109#p1000109</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000094#p1000094"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Olivier W wrote:</cite><blockquote><div class="quotebox"><cite>Borealis wrote:</cite><blockquote><p>Thanks for the info, Olivier. </p><p>Strange that modern DPs like the P525 don&#039;t have the full not off feature.</p></blockquote></div><p>No the Half damper position with Poly aftertouch is better :</p><p>here my soluce for pianoteq : (Apple Swift )</p><p>-----------<br />import Foundation<br />import CoreMIDI</p><p>class MIDIHandler {<br />&nbsp; &nbsp; private var client = MIDIClientRef()<br />&nbsp; &nbsp; private var inputPort = MIDIPortRef()<br />&nbsp; &nbsp; private var virtualSource = MIDIEndpointRef()<br />&nbsp; &nbsp; private var keyAcceleration: UInt8 = 0<br />&nbsp; &nbsp; private var noteOnFull: [(note: UInt8, velocity: UInt8, keyAcceleration: UInt8)] = []</p><p>&nbsp; &nbsp; init() {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Création du client MIDI<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIClientCreate(&quot;MIDI Poly Aftertouch Converter&quot; as CFString, nil, nil, &amp;client)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Création d&#039;un port d&#039;entrée<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIInputPortCreate(client, &quot;Input Port&quot; as CFString, midiReadCallback, Unmanaged.passUnretained(self).toOpaque(), &amp;inputPort)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Création d&#039;une source MIDI virtuelle visible pour les autres logiciels<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDISourceCreate(client, &quot;P525-SMART_release&quot; as CFString, &amp;virtualSource)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; func findMIDIEndpoint(named name: String) -&gt; MIDIEndpointRef? {<br />&nbsp; &nbsp; &nbsp; &nbsp; let sourceCount = MIDIGetNumberOfSources()<br />&nbsp; &nbsp; &nbsp; &nbsp; for i in 0..&lt;sourceCount {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let endpoint = MIDIGetSource(i)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if let endpointName = getMIDIEndpointName(endpoint), endpointName.contains(name) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return endpoint<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return nil<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func getMIDIEndpointName(_ endpoint: MIDIEndpointRef) -&gt; String? {<br />&nbsp; &nbsp; &nbsp; &nbsp; var name: Unmanaged&lt;CFString&gt;?<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIObjectGetStringProperty(endpoint, kMIDIPropertyName, &amp;name)<br />&nbsp; &nbsp; &nbsp; &nbsp; return name?.takeUnretainedValue() as String?<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; func connectToPSeries() {<br />&nbsp; &nbsp; &nbsp; &nbsp; guard let source = findMIDIEndpoint(named: &quot;P-Series&quot;) else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;P-Series MIDI device not found.&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; MIDIPortConnectSource(inputPort, source, nil)<br />&nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Connected to P-Series MIDI device.&quot;)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private let midiReadCallback: MIDIReadProc = { packetList, refCon, _ in<br />&nbsp; &nbsp; &nbsp; &nbsp; let handler = Unmanaged&lt;MIDIHandler&gt;.fromOpaque(refCon!).takeUnretainedValue()<br />&nbsp; &nbsp; &nbsp; &nbsp; let packets = packetList.pointee<br />&nbsp; &nbsp; &nbsp; &nbsp; var packet = packets.packet</p><p>&nbsp; &nbsp; &nbsp; &nbsp; for _ in 0..&lt;packets.numPackets {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Accès sûr aux données du paquet<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let midiMessage = withUnsafeBytes(of: &amp;packet.data) { rawBuffer -&gt; [UInt8] in<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let buffer = rawBuffer.bindMemory(to: UInt8.self)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return Array(buffer.prefix(Int(packet.length)))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if midiMessage.count &gt;= 3 {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var status = midiMessage[0] &amp; 0xF0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let channel = midiMessage[0] &amp; 0x0F<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let note = midiMessage[1]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let value = midiMessage[2]</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if status == 0xB0, midiMessage[1] == 19 { // Controller 19<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.keyAcceleration = value<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendMIDI(message: [0xB0 | channel, 19, value])<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if status == 0xA0 { // Polyphonic Aftertouch<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if value == 18 {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Poly Aftertouch (Note: \(note), Channel: \(channel)) | Converting 18 to 5&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendNoteOff(note: note, channel: channel, value: 5)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Converted Note Off (Note: \(note), Velocity: 5)&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendNoteOff(note: note, channel: channel, value: value)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if status == 0x80 { // Note Off<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Note Off (Note: \(note), Velocity: \(value))&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if value == 64 {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;___________________&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendMIDI(message: [0x80 | channel, note, value])<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if status == 0x90 { // Note On<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.noteOnFull.append((note: note, velocity: value, keyAcceleration: handler.keyAcceleration))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;NOTE ON FULL: \(handler.noteOnFull.last ?? (note: 0, velocity: 0, keyAcceleration: 0))&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendMIDI(message: [0x90 | channel, note, value]) // Forward Note On to virtual port<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.forwardMessage(midiMessage)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; packet = MIDIPacketNext(&amp;packet).pointee<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func sendNoteOff(note: UInt8, channel: UInt8, value: UInt8) {<br />&nbsp; &nbsp; &nbsp; &nbsp; let noteOffMessage: [UInt8] = [0x80 | channel, note, value]<br />&nbsp; &nbsp; &nbsp; &nbsp; sendMIDI(message: noteOffMessage)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func forwardMessage(_ message: [UInt8]) {<br />&nbsp; &nbsp; &nbsp; &nbsp; sendMIDI(message: message)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func sendMIDI(message: [UInt8]) {<br />&nbsp; &nbsp; &nbsp; &nbsp; var packetList = MIDIPacketList()<br />&nbsp; &nbsp; &nbsp; &nbsp; var packet = MIDIPacketListInit(&amp;packetList)<br />&nbsp; &nbsp; &nbsp; &nbsp; packet = MIDIPacketListAdd(&amp;packetList, 1024, packet, 0, message.count, message)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Envoi des données MIDI à la source virtuelle<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIReceived(virtualSource, &amp;packetList)<br />&nbsp; &nbsp; }<br />}</p><p>let handler = MIDIHandler()</p><p>print(&quot;MIDI Poly Aftertouch to Note Off Converter&quot;)<br />handler.connectToPSeries()</p><p>RunLoop.main.run()<br />-----------------------------</p><p>And in Pianoteq :</p><p>Choose the new midi P525-SMART-RELEASE midi port<br />And set the note off velocity curve like this :</p><p>Note-Off Velocity = [0, 64, 127; 0, 127, 127]</p></blockquote></div><p> it’s good to see an attempt to resolve the problem! However , there is something I don’t quite understand.<br />Of course , you cannot use key acceleration as it is related to key descent , so you are left with 2 fixed values being sent ( damper position : fixed value sent using aftertouch&nbsp; , and fixed not off . So is the logic is to evaluate velocity based on evaluated distance divided by the delta time reported by time stamps in pianoteq , I wonder how realistic and accurate it is given the time stamps are host based and not controller based therefore don’t represent the real difference of time between the 2 events in the source ( keyboard) . So probably the value you are generating is unreal but at least you introduce some variability in the note off which even if inaccurate might be better than fixed value .&nbsp; Maybe I am missing something. Thks for clarifying . I m interested more for intellectual understanding rather than than for the effect itself as considering the broad range of approximations in digital pianos attempt to reproduce acoustic sound , this is probably a very low priority.</p>]]></content>
			<author>
				<name><![CDATA[Pianistically]]></name>
				<uri>https://forum.modartt.com/profile.php?id=9183</uri>
			</author>
			<updated>2024-12-29T13:59:39Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000094#p1000094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000065#p1000065"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Borealis wrote:</cite><blockquote><p>Thanks for the info, Olivier. </p><p>Strange that modern DPs like the P525 don&#039;t have the full not off feature.</p></blockquote></div><p>No the Half damper position with Poly aftertouch is better :</p><p>here my soluce for pianoteq : (Apple Swift )</p><p>-----------<br />import Foundation<br />import CoreMIDI</p><p>class MIDIHandler {<br />&nbsp; &nbsp; private var client = MIDIClientRef()<br />&nbsp; &nbsp; private var inputPort = MIDIPortRef()<br />&nbsp; &nbsp; private var virtualSource = MIDIEndpointRef()<br />&nbsp; &nbsp; private var keyAcceleration: UInt8 = 0<br />&nbsp; &nbsp; private var noteOnFull: [(note: UInt8, velocity: UInt8, keyAcceleration: UInt8)] = []</p><p>&nbsp; &nbsp; init() {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Création du client MIDI<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIClientCreate(&quot;MIDI Poly Aftertouch Converter&quot; as CFString, nil, nil, &amp;client)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Création d&#039;un port d&#039;entrée<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIInputPortCreate(client, &quot;Input Port&quot; as CFString, midiReadCallback, Unmanaged.passUnretained(self).toOpaque(), &amp;inputPort)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Création d&#039;une source MIDI virtuelle visible pour les autres logiciels<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDISourceCreate(client, &quot;P525-SMART_release&quot; as CFString, &amp;virtualSource)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; func findMIDIEndpoint(named name: String) -&gt; MIDIEndpointRef? {<br />&nbsp; &nbsp; &nbsp; &nbsp; let sourceCount = MIDIGetNumberOfSources()<br />&nbsp; &nbsp; &nbsp; &nbsp; for i in 0..&lt;sourceCount {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let endpoint = MIDIGetSource(i)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if let endpointName = getMIDIEndpointName(endpoint), endpointName.contains(name) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return endpoint<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return nil<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func getMIDIEndpointName(_ endpoint: MIDIEndpointRef) -&gt; String? {<br />&nbsp; &nbsp; &nbsp; &nbsp; var name: Unmanaged&lt;CFString&gt;?<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIObjectGetStringProperty(endpoint, kMIDIPropertyName, &amp;name)<br />&nbsp; &nbsp; &nbsp; &nbsp; return name?.takeUnretainedValue() as String?<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; func connectToPSeries() {<br />&nbsp; &nbsp; &nbsp; &nbsp; guard let source = findMIDIEndpoint(named: &quot;P-Series&quot;) else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;P-Series MIDI device not found.&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; MIDIPortConnectSource(inputPort, source, nil)<br />&nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Connected to P-Series MIDI device.&quot;)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private let midiReadCallback: MIDIReadProc = { packetList, refCon, _ in<br />&nbsp; &nbsp; &nbsp; &nbsp; let handler = Unmanaged&lt;MIDIHandler&gt;.fromOpaque(refCon!).takeUnretainedValue()<br />&nbsp; &nbsp; &nbsp; &nbsp; let packets = packetList.pointee<br />&nbsp; &nbsp; &nbsp; &nbsp; var packet = packets.packet</p><p>&nbsp; &nbsp; &nbsp; &nbsp; for _ in 0..&lt;packets.numPackets {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Accès sûr aux données du paquet<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let midiMessage = withUnsafeBytes(of: &amp;packet.data) { rawBuffer -&gt; [UInt8] in<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let buffer = rawBuffer.bindMemory(to: UInt8.self)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return Array(buffer.prefix(Int(packet.length)))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if midiMessage.count &gt;= 3 {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var status = midiMessage[0] &amp; 0xF0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let channel = midiMessage[0] &amp; 0x0F<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let note = midiMessage[1]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let value = midiMessage[2]</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if status == 0xB0, midiMessage[1] == 19 { // Controller 19<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.keyAcceleration = value<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendMIDI(message: [0xB0 | channel, 19, value])<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if status == 0xA0 { // Polyphonic Aftertouch<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if value == 18 {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Poly Aftertouch (Note: \(note), Channel: \(channel)) | Converting 18 to 5&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendNoteOff(note: note, channel: channel, value: 5)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Converted Note Off (Note: \(note), Velocity: 5)&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendNoteOff(note: note, channel: channel, value: value)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if status == 0x80 { // Note Off<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Note Off (Note: \(note), Velocity: \(value))&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if value == 64 {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;___________________&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendMIDI(message: [0x80 | channel, note, value])<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if status == 0x90 { // Note On<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.noteOnFull.append((note: note, velocity: value, keyAcceleration: handler.keyAcceleration))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;NOTE ON FULL: \(handler.noteOnFull.last ?? (note: 0, velocity: 0, keyAcceleration: 0))&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.sendMIDI(message: [0x90 | channel, note, value]) // Forward Note On to virtual port<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handler.forwardMessage(midiMessage)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; packet = MIDIPacketNext(&amp;packet).pointee<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func sendNoteOff(note: UInt8, channel: UInt8, value: UInt8) {<br />&nbsp; &nbsp; &nbsp; &nbsp; let noteOffMessage: [UInt8] = [0x80 | channel, note, value]<br />&nbsp; &nbsp; &nbsp; &nbsp; sendMIDI(message: noteOffMessage)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func forwardMessage(_ message: [UInt8]) {<br />&nbsp; &nbsp; &nbsp; &nbsp; sendMIDI(message: message)<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; private func sendMIDI(message: [UInt8]) {<br />&nbsp; &nbsp; &nbsp; &nbsp; var packetList = MIDIPacketList()<br />&nbsp; &nbsp; &nbsp; &nbsp; var packet = MIDIPacketListInit(&amp;packetList)<br />&nbsp; &nbsp; &nbsp; &nbsp; packet = MIDIPacketListAdd(&amp;packetList, 1024, packet, 0, message.count, message)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Envoi des données MIDI à la source virtuelle<br />&nbsp; &nbsp; &nbsp; &nbsp; MIDIReceived(virtualSource, &amp;packetList)<br />&nbsp; &nbsp; }<br />}</p><p>let handler = MIDIHandler()</p><p>print(&quot;MIDI Poly Aftertouch to Note Off Converter&quot;)<br />handler.connectToPSeries()</p><p>RunLoop.main.run()<br />-----------------------------</p><p>And in Pianoteq :</p><p>Choose the new midi P525-SMART-RELEASE midi port<br />And set the note off velocity curve like this :</p><p>Note-Off Velocity = [0, 64, 127; 0, 127, 127]</p>]]></content>
			<author>
				<name><![CDATA[Olivier W]]></name>
				<uri>https://forum.modartt.com/profile.php?id=8021</uri>
			</author>
			<updated>2024-12-26T11:20:43Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000065#p1000065</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000054#p1000054"/>
			<content type="html"><![CDATA[<p>Thanks for the info, Olivier. </p><p>Strange that modern DPs like the P525 don&#039;t have the full not off feature.</p>]]></content>
			<author>
				<name><![CDATA[Borealis]]></name>
				<uri>https://forum.modartt.com/profile.php?id=7125</uri>
			</author>
			<updated>2024-12-25T17:30:34Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000054#p1000054</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[YAMAHA P525 : Damper release : poly aftertouch at 18 and Vel off at 64]]></title>
			<link rel="alternate" href="https://forum.modartt.com/viewtopic.php?pid=1000053#p1000053"/>
			<content type="html"><![CDATA[<p>Hi,</p><p>In Yamaha P525, the note OFF velocity is fixed at 64.</p><p>But...</p><p>Yamaha simulate smooth release with Poly aftertouch.</p><p>When the Damper is near the escapement or string (virtual) , P525 send a Aftertouch value at 18. (just before note off value fixed at vel 64)</p><p>With this NOTE OFF 64 and aftertouch at 18, you can make a midi script to simulate smooth release. (how fast you have value between aftertouch and note off, or with a note off velocity curve)</p><p>Just convert Poly Aftertouch for example to a note off value for each preleased key at 18. And you will have two note off velocity value (18 and 64)&nbsp; and you can simulate a smooth damper release with a xript , midi timing, or note off velocity curve ...</p><p>(set a note off velocity curve in PIANOTEQ with the converted Aftertouch value and the fixed note off 64 value)</p><p>But Pianoteq can&#039;t convert MIDI poly aftertouch to note off velocity....</p><p>It would be great to have this feature.</p><p>Instead i make a midi script in Logic 11.</p><p>And in P525 you have key acceleration in Controller 19. (for internal sound CFX and others for Grand expression, more advanced than single velocity value)</p><p>Just make a script with the key midi information played with the controller 19 value, and you can simulate Velocity/keyacceleration in Pianoteq.<br />But Pianoteq don&#039;t allow to use this and make a script to use both note on per key information with the near Controller 19 value.</p><p>Please improve midi script in Pianoteq, and add poly aftertouch conversion (only mono aftertouch in current PTQ release midi conversion ) to note off velocity in next Pianoteq update. With this i can make a nice preset for Yamaha P525, with smooth release and Grand expression, like Yamaha internal CFX.</p><p>Regards,</p><p>Olivier F.</p>]]></content>
			<author>
				<name><![CDATA[Olivier W]]></name>
				<uri>https://forum.modartt.com/profile.php?id=8021</uri>
			</author>
			<updated>2024-12-25T17:08:47Z</updated>
			<id>https://forum.modartt.com/viewtopic.php?pid=1000053#p1000053</id>
		</entry>
</feed>
