選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

78 行
5.8KB

  1. #include "glockenspiel_samples.h"
  2. const AudioSynthWavetable::sample_data glockenspiel_samples[2] = {
  3. {
  4. (int16_t*)sample_0_glockenspiel_sinetick, // sample
  5. false, // LOOP
  6. 7, // LENGTH_BITS
  7. (1 << (32 - 7)) * WAVETABLE_CENTS_SHIFT(11) * 44100.0 / WAVETABLE_NOTE_TO_FREQUENCY(52) / AUDIO_SAMPLE_RATE_EXACT + 0.5, // PER_HERTZ_PHASE_INCREMENT
  8. ((uint32_t)72 - 1) << (32 - 7), // MAX_PHASE
  9. ((uint32_t)68 - 1) << (32 - 7), // LOOP_PHASE_END
  10. (((uint32_t)68 - 1) << (32 - 7)) - (((uint32_t)7 - 1) << (32 - 7)), // LOOP_PHASE_LENGTH
  11. uint16_t(UINT16_MAX * WAVETABLE_DECIBEL_SHIFT(-5.2)), // INITIAL_ATTENUATION_SCALAR
  12. uint32_t(0.00 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // DELAY_COUNT
  13. uint32_t(6.20 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // ATTACK_COUNT
  14. uint32_t(240.09 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // HOLD_COUNT
  15. uint32_t(1269.42 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // DECAY_COUNT
  16. uint32_t(306.01 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // RELEASE_COUNT
  17. int32_t((1.0 - WAVETABLE_DECIBEL_SHIFT(-14.9)) * AudioSynthWavetable::UNITY_GAIN), // SUSTAIN_MULT
  18. uint32_t(0.00 * AudioSynthWavetable::SAMPLES_PER_MSEC / (2 * AudioSynthWavetable::LFO_PERIOD)), // VIBRATO_DELAY
  19. uint32_t(0.1 * AudioSynthWavetable::LFO_PERIOD * (UINT32_MAX / AUDIO_SAMPLE_RATE_EXACT)), // VIBRATO_INCREMENT
  20. (WAVETABLE_CENTS_SHIFT(0) - 1.0) * 4, // VIBRATO_PITCH_COEFFICIENT_INITIAL
  21. (1.0 - WAVETABLE_CENTS_SHIFT(0)) * 4, // VIBRATO_COEFFICIENT_SECONDARY
  22. uint32_t(0.00 * AudioSynthWavetable::SAMPLES_PER_MSEC / (2 * AudioSynthWavetable::LFO_PERIOD)), // MODULATION_DELAY
  23. uint32_t(5.4 * AudioSynthWavetable::LFO_PERIOD * (UINT32_MAX / AUDIO_SAMPLE_RATE_EXACT)), // MODULATION_INCREMENT
  24. (WAVETABLE_CENTS_SHIFT(0) - 1.0) * 4, // MODULATION_PITCH_COEFFICIENT_INITIAL
  25. (1.0 - WAVETABLE_CENTS_SHIFT(0)) * 4, // MODULATION_PITCH_COEFFICIENT_SECOND
  26. int32_t(UINT16_MAX * (WAVETABLE_DECIBEL_SHIFT(0) - 1.0)) * 4, // MODULATION_AMPLITUDE_INITIAL_GAIN
  27. int32_t(UINT16_MAX * (1.0 - WAVETABLE_DECIBEL_SHIFT(0))) * 4, // MODULATION_AMPLITUDE_FINAL_GAIN
  28. },
  29. {
  30. (int16_t*)sample_1_glockenspiel_sinetick, // sample
  31. false, // LOOP
  32. 7, // LENGTH_BITS
  33. (1 << (32 - 7)) * WAVETABLE_CENTS_SHIFT(11) * 44100.0 / WAVETABLE_NOTE_TO_FREQUENCY(52) / AUDIO_SAMPLE_RATE_EXACT + 0.5, // PER_HERTZ_PHASE_INCREMENT
  34. ((uint32_t)72 - 1) << (32 - 7), // MAX_PHASE
  35. ((uint32_t)68 - 1) << (32 - 7), // LOOP_PHASE_END
  36. (((uint32_t)68 - 1) << (32 - 7)) - (((uint32_t)7 - 1) << (32 - 7)), // LOOP_PHASE_LENGTH
  37. uint16_t(UINT16_MAX * WAVETABLE_DECIBEL_SHIFT(-5.2)), // INITIAL_ATTENUATION_SCALAR
  38. uint32_t(0.00 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // DELAY_COUNT
  39. uint32_t(6.20 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // ATTACK_COUNT
  40. uint32_t(240.09 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // HOLD_COUNT
  41. uint32_t(1269.42 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // DECAY_COUNT
  42. uint32_t(306.01 * AudioSynthWavetable::SAMPLES_PER_MSEC / AudioSynthWavetable::ENVELOPE_PERIOD + 0.5), // RELEASE_COUNT
  43. int32_t((1.0 - WAVETABLE_DECIBEL_SHIFT(-14.9)) * AudioSynthWavetable::UNITY_GAIN), // SUSTAIN_MULT
  44. uint32_t(0.00 * AudioSynthWavetable::SAMPLES_PER_MSEC / (2 * AudioSynthWavetable::LFO_PERIOD)), // VIBRATO_DELAY
  45. uint32_t(0.1 * AudioSynthWavetable::LFO_PERIOD * (UINT32_MAX / AUDIO_SAMPLE_RATE_EXACT)), // VIBRATO_INCREMENT
  46. (WAVETABLE_CENTS_SHIFT(0) - 1.0) * 4, // VIBRATO_PITCH_COEFFICIENT_INITIAL
  47. (1.0 - WAVETABLE_CENTS_SHIFT(0)) * 4, // VIBRATO_COEFFICIENT_SECONDARY
  48. uint32_t(0.00 * AudioSynthWavetable::SAMPLES_PER_MSEC / (2 * AudioSynthWavetable::LFO_PERIOD)), // MODULATION_DELAY
  49. uint32_t(5.4 * AudioSynthWavetable::LFO_PERIOD * (UINT32_MAX / AUDIO_SAMPLE_RATE_EXACT)), // MODULATION_INCREMENT
  50. (WAVETABLE_CENTS_SHIFT(0) - 1.0) * 4, // MODULATION_PITCH_COEFFICIENT_INITIAL
  51. (1.0 - WAVETABLE_CENTS_SHIFT(0)) * 4, // MODULATION_PITCH_COEFFICIENT_SECOND
  52. int32_t(UINT16_MAX * (WAVETABLE_DECIBEL_SHIFT(0) - 1.0)) * 4, // MODULATION_AMPLITUDE_INITIAL_GAIN
  53. int32_t(UINT16_MAX * (1.0 - WAVETABLE_DECIBEL_SHIFT(0))) * 4, // MODULATION_AMPLITUDE_FINAL_GAIN
  54. },
  55. };
  56. const uint32_t sample_0_glockenspiel_sinetick[128] = {
  57. 0x00000000,0x78bc7a66,0x723075f8,0x676e6d4c,0x590760a7,0x4751508b,0x33203d8a,0x1cfa283a,
  58. 0x05e51191,0xee80fa2b,0xd7d7e316,0xc29bccf0,0xaf84b8bc,0x9f67a704,0x92bb9899,0x8a098ddb,
  59. 0x85968746,0x85988505,0x8a068740,0x92b18dce,0x9f579891,0xaf73a6f6,0xc274b8ac,0xd7c4ccdc,
  60. 0xee6be304,0x05d2fa17,0x1ce8117e,0x330c2827,0x47423d63,0x58f7507a,0x67656097,0x72236d43,
  61. 0x78b875f5,0x7aff7a68,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
  62. 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
  63. 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
  64. 0x00000000,0x00000000,0x00000000,
  65. };
  66. const uint32_t sample_1_glockenspiel_sinetick[128] = {
  67. 0x00000000,0x78bc7a66,0x723075f8,0x676e6d4c,0x590760a7,0x4751508b,0x33203d8a,0x1cfa283a,
  68. 0x05e51191,0xee80fa2b,0xd7d7e316,0xc29bccf0,0xaf84b8bc,0x9f67a704,0x92bb9899,0x8a098ddb,
  69. 0x85968746,0x85988505,0x8a068740,0x92b18dce,0x9f579891,0xaf73a6f6,0xc274b8ac,0xd7c4ccdc,
  70. 0xee6be304,0x05d2fa17,0x1ce8117e,0x330c2827,0x47423d63,0x58f7507a,0x67656097,0x72236d43,
  71. 0x78b875f5,0x7aff7a68,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
  72. 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
  73. 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
  74. 0x00000000,0x00000000,0x00000000,
  75. };