Skip to content

Instantly share code, notes, and snippets.

@StartAutomating
Created September 14, 2026 03:46
Show Gist options
  • Select an option

  • Save StartAutomating/716a5a019fca369e75d0f94fd2ac2d6f to your computer and use it in GitHub Desktop.

Select an option

Save StartAutomating/716a5a019fca369e75d0f94fd2ac2d6f to your computer and use it in GitHub Desktop.
Gist convert from midi note to frequency
<#
.SYNOPSIS
Converts Midi to a Frequency
.DESCRIPTION
Converts a Midi note value to an audio frequency
.LINK
https://en.wikipedia.org/wiki/MIDI_tuning_standard
#>
param(
# The midi note number
[ValidateRange(0,127)]
[double]$MidiNote = 69
)
# Multiply 440 by 2^(($MidiNote-19)/12)
440.0 * [Math]::Pow(
2,
(($MidiNote - 69)/12)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment