-
Notifications
You must be signed in to change notification settings - Fork 1
Note
AutumnSky1010 edited this page Dec 10, 2022
·
6 revisions
Namespace: SoundMaker.Sounds.Score
Assembly: SoundMaker.dll
The note.
public class Note : BasicSoundComponentBase
Object -> BasicSoundComponentBase -> Note
Declaration
public Note(Scale scale, uint scaleNumber, LengthType length, bool isDotted = false) : base(length, isDotted)
Parameters
Type | Desctiption |
---|---|
Scale | Scale of the note. |
uint | Sound height number. (C"4" is middle C.) |
LengthType | Length (ex. "quarter" note) |
bool | Is note/rest dotted. |
Exceptions
Exception | Desctiption |
---|---|
ArgumentException | Scale and scale number must be only the range of sound that the piano can produce. |
Easiness constructor(use case: construct Tie).Scale is "A4".
Declaration
public Note(LengthType length, bool isDotted = false) : base(length, isDotted)
Parameters
Type | Desctiption |
---|---|
LengthType | Length (ex. "quarter" note) |
bool | Is note/rest dotted. |
Declaration
public double Hertz { get; } = 0d;
Property Value
Type | Desctiption |
---|---|
double | Hertz of the sound. |
Declaration
public Scale Scale { get; }
Property Value
Type | Desctiption |
---|---|
Scale | Scale of the note. |
Declaration
public int ScaleNumber { get; }
Property Value
Type | Desctiption |
---|---|
int | Sound height number. (C"4" is middle C.) |
Declaration
public int Volume { get; set;}
Property Value
Type | Desctiption |
---|---|
int | Volume of the sound.(0 ~ 100) Default volume is 100; |
Declaration
public abstract ushort[] GenerateWave(SoundFormat format, int tempo, int length, WaveTypeBase waveType);
Parameters
Type | Desctiption |
---|---|
SoundFormat | The format of the sound. |
int | Quarter note/rest per minute. |
int | Length of the array. |
WaveTypeBase | Type of wave. |
Returns
Type | Desctiption |
---|---|
ushort[] | The array of wave data. |
Exceptions
Exception | Desctiption |
---|---|
ArgumentOutOfRangeException | Tempo must be non-negative and greater than 0. |
ArgumentOutOfRangeException | Length must be non-negative. |
Declaration
public abstract ushort[] GenerateWave(SoundFormat format, int tempo, WaveTypeBase waveType);
Parameters
Type | Desctiption |
---|---|
SoundFormat | The format of the sound. |
int | Quarter note/rest per minute. |
WaveTypeBase | Type of wave. |
Returns
Type | Desctiption |
---|---|
ushort[] | The array of wave data. |
Exceptions
Exception | Desctiption |
---|---|
ArgumentOutOfRangeException | Tempo must be non-negative and greater than 0. |
- Usage
- Kind of waves
- What is the SMSC format?
- kind of sound components.
- How to export the wave
- Use cases
SoundMaker.ScoreData.SMSC
SoundMaker.WaveFile
SoundMaker.Sounds
- Sounds.BitRateType
- Sounds.ChannelType
- IWave
- MixerBase
- MonauralMixer
- MonauralWave
- Sounds.SamplingFrequencyType
- SoundDirectionType
- SoundFormat
- StereoMixer
- StereoWave