en-US/PSMidi-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-PSNoteIndexFromNoteName</command:name>
      <command:verb>Get</command:verb>
      <command:noun>PSNoteIndexFromNoteName</command:noun>
      <maml:description>
        <maml:para>This command calculates the note index in Midi from a note name.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This command calculates the note index in Midi from a note name.</maml:para>
      <maml:para>The octave / note name is aligned with the Midi class [Microsoft.Windows.Devices.Midi2.Messages.MidiMessageHelper]::GetNoteOctaveFromNoteIndex(), so third octave is middle C.</maml:para>
      <maml:para>The given note must be in the format '&lt;Note&gt;&lt;octave&gt;', f.eg 'C3', 'D#4', 'Eb5'.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-PSNoteIndexFromNoteName</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
          <maml:name>NoteName</maml:name>
          <maml:description>
            <maml:para>The note to calculate in '&lt;Note&gt;&lt;octave&gt;' format, f.eg 'C3', 'D#4', 'Eb5'.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
        <maml:name>NoteName</maml:name>
        <maml:description>
          <maml:para>The note to calculate in '&lt;Note&gt;&lt;octave&gt;' format, f.eg 'C3', 'D#4', 'Eb5'.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Get-PSNoteIndexFromNoteName -NoteName C3</dev:code>
        <dev:remarks>
          <maml:para>This command will output a 'Chprd' type object with the following properties</maml:para>
          <maml:para>BaseChord Octave Alt MidiNote --------- ------ --- -------- C 3 60</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>New-PSMidiMessage</command:name>
      <command:verb>New</command:verb>
      <command:noun>PSMidiMessage</command:noun>
      <maml:description>
        <maml:para>This command outputs a single midi2.0 message object, containing metadata and midi words</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This command outputs a single midi2.0 message object, containing metadata and midi words.</maml:para>
      <maml:para>If no parameters are given the output words will be a NoteOn (press a button down), with note C3, Channel and Group 0, and velocity at max level.</maml:para>
      <maml:para>This object can then be used as a packet to send as midi output.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>New-PSMidiMessage</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>AttributeData</maml:name>
          <maml:description>
            <maml:para>If Pitch is set, this is the value sent as metadata in the attribute field (Implemented, not verified functioning.)</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Group</maml:name>
          <maml:description>
            <maml:para>Midi group, 0 - 15</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>MessageStatus</maml:name>
          <maml:description>
            <maml:para>The message type of the Midi2.0 package. Most common is NoteOn (press key down) and NoteOff (release key)</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">RegisteredPerNoteController</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">AssignablePerNoteController</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RegisteredController</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">AssignableController</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RelativeRegisteredController</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RelativeAssignableController</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PerNotePitchBend</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">NoteOff</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">NoteOn</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PolyPressure</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ControlChange</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ProgramChange</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ChannelPressure</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PitchBend</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PerNoteManagement</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">Midi2ChannelVoiceMessageStatus</command:parameterValue>
          <dev:type>
            <maml:name>Midi2ChannelVoiceMessageStatus</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>MidiChannel</maml:name>
          <maml:description>
            <maml:para>Midi channel.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Note</maml:name>
          <maml:description>
            <maml:para>Which base note to set in Word0</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">C</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">C#</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">D</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">D#</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">E</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">F</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">F#</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">G</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">G#</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">A</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">A#</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">B</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Octave</maml:name>
          <maml:description>
            <maml:para>Which octave to set in Word0. This octave aligns with the Windows 11 Midi2.0 class and uses 3 as centre key.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Pitch</maml:name>
          <maml:description>
            <maml:para>This switch sets the last 8 bits of Word0 to 0x3, which is a pitch change. According to the spec there are no more standard values for this setting yet.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Velocity</maml:name>
          <maml:description>
            <maml:para>Velocity of key strike</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt32</command:parameterValue>
          <dev:type>
            <maml:name>UInt32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>AttributeData</maml:name>
        <maml:description>
          <maml:para>If Pitch is set, this is the value sent as metadata in the attribute field (Implemented, not verified functioning.)</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Group</maml:name>
        <maml:description>
          <maml:para>Midi group, 0 - 15</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>MessageStatus</maml:name>
        <maml:description>
          <maml:para>The message type of the Midi2.0 package. Most common is NoteOn (press key down) and NoteOff (release key)</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Midi2ChannelVoiceMessageStatus</command:parameterValue>
        <dev:type>
          <maml:name>Midi2ChannelVoiceMessageStatus</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>MidiChannel</maml:name>
        <maml:description>
          <maml:para>Midi channel.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Note</maml:name>
        <maml:description>
          <maml:para>Which base note to set in Word0</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Octave</maml:name>
        <maml:description>
          <maml:para>Which octave to set in Word0. This octave aligns with the Windows 11 Midi2.0 class and uses 3 as centre key.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Pitch</maml:name>
        <maml:description>
          <maml:para>This switch sets the last 8 bits of Word0 to 0x3, which is a pitch change. According to the spec there are no more standard values for this setting yet.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Velocity</maml:name>
        <maml:description>
          <maml:para>Velocity of key strike</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt32</command:parameterValue>
        <dev:type>
          <maml:name>UInt32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; New-PSMidiMessage</dev:code>
        <dev:remarks>
          <maml:para>This command will output a MidiMessage64 type object containing the words for a NoteOn, note C3, Channel and Group 0, and velocity at max level.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>PS C:\&gt; New-PSMidiMessage -Note F -Octave 5 -MidiChannel 2 -Group 1 -MessageStatus NoteOff -Velocity 32768</dev:code>
        <dev:remarks>
          <maml:para>This command will output a MidiMessage64 type object containing the words for a NoteOff, note F5, Channel 2, Group 1, and velocity at 50 % level.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Send-PSMidiMessage</command:name>
      <command:verb>Send</command:verb>
      <command:noun>PSMidiMessage</command:noun>
      <maml:description>
        <maml:para>This is a wrapper around the built in Send-MidiMessage command, adding functionality to accept pipeline input and accepting full MidiMessage64 objects as output by New-PSMidiMessage.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This is a wrapper around the built in Send-MidiMessage command, adding functionality to accept pipeline input and accepting full MidiMessage64 objects as output by New-PSMidiMessage.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Send-PSMidiMessage</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
          <maml:name>Connection</maml:name>
          <maml:description>
            <maml:para>A connection as started by following the guide in the Midi PowerShell module (https://microsoft.github.io/MIDI/tools/powershell/)</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">MidiEndpointConnection</command:parameterValue>
          <dev:type>
            <maml:name>MidiEndpointConnection</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
          <maml:name>Message</maml:name>
          <maml:description>
            <maml:para>A message as output by New-PSMidiMessage</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">MidiMessage64</command:parameterValue>
          <dev:type>
            <maml:name>MidiMessage64</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
        <maml:name>Connection</maml:name>
        <maml:description>
          <maml:para>A connection as started by following the guide in the Midi PowerShell module (https://microsoft.github.io/MIDI/tools/powershell/)</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">MidiEndpointConnection</command:parameterValue>
        <dev:type>
          <maml:name>MidiEndpointConnection</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
        <maml:name>Message</maml:name>
        <maml:description>
          <maml:para>A message as output by New-PSMidiMessage</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">MidiMessage64</command:parameterValue>
        <dev:type>
          <maml:name>MidiMessage64</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>Microsoft.Windows.Devices.Midi2.MidiMessage64</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; $MidiMessage = New-PSMidiMessage
PS C:\&gt; Send-PSMidiMessage -Connection $connection -Message $MidiMessage</dev:code>
        <dev:remarks>
          <maml:para>This command will first create a message using New-PSMidiMessage, then send this message to output.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>