instrument_key
![code/modules/instruments/instrument_data/_instrument_key.dm 5](git.png)
Instrument key datums contain everything needed to know how to play a specific note of an instrument.*
Vars | |
deviation | Deviation up/down from the pivot point that uses its sample. Used to calculate frequency. |
---|---|
frequency | The frequency to play the sample to get our desired note. |
key | The numerical key of what this is, from 1 to 127 on a standard piano keyboard. |
sample | The actual sample file that will be loaded when playing. |
Procs | |
calculate | Calculates and stores our deviation. |
Var Details
deviation
![code/modules/instruments/instrument_data/_instrument_key.dm 15](git.png)
Deviation up/down from the pivot point that uses its sample. Used to calculate frequency.
frequency
![code/modules/instruments/instrument_data/_instrument_key.dm 11](git.png)
The frequency to play the sample to get our desired note.
key
![code/modules/instruments/instrument_data/_instrument_key.dm 7](git.png)
The numerical key of what this is, from 1 to 127 on a standard piano keyboard.
sample
![code/modules/instruments/instrument_data/_instrument_key.dm 9](git.png)
The actual sample file that will be loaded when playing.
Proc Details
calculate
Calculates and stores our deviation.