Updated API Note (markdown)

Vexatos 2014-04-30 09:28:23 -07:00
parent f92e455847
commit 9c1101c35e

@ -1,8 +1,8 @@
This API provides functionality to convert music notes into their respective MIDI code and/or their frequency in Hertz, among other things. It it used in combination with computer.beep and note blocks (using OpenComponents).
- `note.midi(n: number or string)`: Converts a note in string form (e.g. A#4 or Gb3, will be documented on the wiki) or a given frequency into the respective MIDI code
- `note.midi(n: number or string)`: Converts a note in string form (e.g. A#4 or Gb3, see below) or a given frequency into the respective MIDI code
- `note.freq(n: number or string)`: Converts a note in string form (e.g. A#4) or a given MIDI code into the respective frequency
- `note.name(n: number)`: Converts a MIDI value back into a string; if you have a frequency to convert, just use note.get(note.midi(frequency))
- `note.name(n: number)`: Converts a MIDI value back into a string; if you have a frequency to convert, just use `note.get(note.midi(frequency))`
- `note.ticks(n: number)`: Converts note block ticks (0-24) into MIDI code (34-58, respectively) and vice-versa. Useful for use with note blocks and OpenComponents
- `note.play(tone: string or number,duration: number)`: Plays a note from a string or MIDI code via computer.beep with the specified duration