Example #1
0
File: Song.cs Project: rmc00/gsf
 /// <summary>
 /// Creates a new song with a 3/4 measure size, a tempo of 240 quarter-notes per minute,
 /// mezzo-forte prevailing dynamic level, using a basic note timbre and the specified
 /// audio format settings.
 /// </summary>
 /// <param name="sampleRate">Desired sample rate</param>
 /// <param name="bitsPerSample">Desired bits-per-sample</param>
 /// <param name="channels">Desired data channels</param>
 public Song(SampleRate sampleRate, BitsPerSample bitsPerSample, DataChannels channels)
     : base(sampleRate, bitsPerSample, channels)
 {
     m_measureSize = new MeasureSize(3, NoteValue.Quarter);
     m_tempo = new Tempo(240, NoteValue.Quarter);
     m_dynamic = (double)Music.Dynamic.MezzoForte / 100.0D;
     m_timbre = Music.Timbre.BasicNote;
     m_damping = Music.Damping.Natural;
     m_noteQueue = new List<Note>();
 }
Example #2
0
 /// <summary>
 /// Creates a new empty in-memory wave file in Pulse Code Modulation (PCM) audio format.
 /// </summary>
 /// <param name="sampleRate">Desired sample rate.</param>
 /// <param name="bitsPerSample">Desired bits-per-sample.</param>
 /// <param name="channels">Desired data channels.</param>
 public WaveFile(SampleRate sampleRate, BitsPerSample bitsPerSample, DataChannels channels)
     : this((int)sampleRate, (short)bitsPerSample, (short)channels, (ushort)WaveFormat.PCM)
 {
 }
Example #3
0
 public WaveFile(SampleRate sampleRate, BitsPerSample bitsPerSample, DataChannels channels, WaveFormat audioFormat)
     : this((int)sampleRate, (short)bitsPerSample, (short)channels, (ushort)audioFormat)
 {
 }
Example #4
0
 public Builder BitsPerSample(BitsPerSample value)
 {
     bitsPerSample = value;
     return this;
 }