소스 검색

Bring wavetable data structures into AudioSynthWavetable class

dds
PaulStoffregen 6 년 전
부모
커밋
0a35f52289
80개의 변경된 파일168개의 추가작업 그리고 167개의 파일을 삭제
  1. +1
    -1
      examples/Synthesis/Wavetable/MidiSynth/BasicFlute1_samples.cpp
  2. +2
    -2
      examples/Synthesis/Wavetable/MidiSynth/BasicFlute1_samples.h
  3. +1
    -1
      examples/Synthesis/Wavetable/MidiSynth/FrenchHorns_samples.cpp
  4. +2
    -2
      examples/Synthesis/Wavetable/MidiSynth/FrenchHorns_samples.h
  5. +1
    -1
      examples/Synthesis/Wavetable/MidiSynth/Ocarina_samples.cpp
  6. +2
    -2
      examples/Synthesis/Wavetable/MidiSynth/Ocarina_samples.h
  7. +1
    -1
      examples/Synthesis/Wavetable/MidiSynth/Pizzicato_samples.cpp
  8. +2
    -2
      examples/Synthesis/Wavetable/MidiSynth/Pizzicato_samples.h
  9. +1
    -1
      examples/Synthesis/Wavetable/MidiSynth/Viola_samples.cpp
  10. +2
    -2
      examples/Synthesis/Wavetable/MidiSynth/Viola_samples.h
  11. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthKeyboard/BasicFlute1_samples.cpp
  12. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthKeyboard/BasicFlute1_samples.h
  13. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthKeyboard/FrenchHorns_samples.cpp
  14. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthKeyboard/FrenchHorns_samples.h
  15. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthKeyboard/Ocarina_samples.cpp
  16. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthKeyboard/Ocarina_samples.h
  17. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthKeyboard/Pizzicato_samples.cpp
  18. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthKeyboard/Pizzicato_samples.h
  19. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthKeyboard/Viola_samples.cpp
  20. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthKeyboard/Viola_samples.h
  21. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/MidiSynthLarge.ino
  22. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/bassoon_samples.cpp
  23. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/bassoon_samples.h
  24. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/clarinet_samples.cpp
  25. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/clarinet_samples.h
  26. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/distortiongt_samples.cpp
  27. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/distortiongt_samples.h
  28. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/epiano_samples.cpp
  29. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/epiano_samples.h
  30. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/flute_samples.cpp
  31. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/flute_samples.h
  32. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/frenchhorn_samples.cpp
  33. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/frenchhorn_samples.h
  34. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/glockenspiel_samples.cpp
  35. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/glockenspiel_samples.h
  36. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/gtfretnoise_samples.cpp
  37. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/gtfretnoise_samples.h
  38. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/harmonica_samples.cpp
  39. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/harmonica_samples.h
  40. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/harp_samples.cpp
  41. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/harp_samples.h
  42. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/mutedgtr_samples.cpp
  43. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/mutedgtr_samples.h
  44. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/nylonstrgtr_samples.cpp
  45. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/nylonstrgtr_samples.h
  46. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/oboe_samples.cpp
  47. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/oboe_samples.h
  48. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/overdrivegt_samples.cpp
  49. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/overdrivegt_samples.h
  50. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/piano_samples.cpp
  51. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/piano_samples.h
  52. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/recorder_samples.cpp
  53. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/recorder_samples.h
  54. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/standard_DRUMS_samples.cpp
  55. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/standard_DRUMS_samples.h
  56. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/steelstrgtr_samples.cpp
  57. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/steelstrgtr_samples.h
  58. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/strings_samples.cpp
  59. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/strings_samples.h
  60. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/timpani_samples.cpp
  61. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/timpani_samples.h
  62. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/trombone_samples.cpp
  63. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/trombone_samples.h
  64. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/trumpet_samples.cpp
  65. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/trumpet_samples.h
  66. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/tuba_samples.cpp
  67. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/tuba_samples.h
  68. +1
    -1
      examples/Synthesis/Wavetable/MidiSynthLarge/vibraphone_samples.cpp
  69. +2
    -2
      examples/Synthesis/Wavetable/MidiSynthLarge/vibraphone_samples.h
  70. +1
    -1
      examples/Synthesis/Wavetable/SimpleWavetable/BasicFlute1_samples.cpp
  71. +2
    -2
      examples/Synthesis/Wavetable/SimpleWavetable/BasicFlute1_samples.h
  72. +1
    -1
      examples/Synthesis/Wavetable/Zelda/BasicFlute1_samples.cpp
  73. +2
    -2
      examples/Synthesis/Wavetable/Zelda/BasicFlute1_samples.h
  74. +1
    -1
      examples/Synthesis/Wavetable/Zelda/FrenchHorns_samples.cpp
  75. +2
    -2
      examples/Synthesis/Wavetable/Zelda/FrenchHorns_samples.h
  76. +1
    -1
      examples/Synthesis/Wavetable/Zelda/Pizzicato_samples.cpp
  77. +2
    -2
      examples/Synthesis/Wavetable/Zelda/Pizzicato_samples.h
  78. +1
    -1
      examples/Synthesis/Wavetable/Zelda/Viola_samples.cpp
  79. +2
    -2
      examples/Synthesis/Wavetable/Zelda/Viola_samples.h
  80. +49
    -48
      synth_wavetable.h

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynth/BasicFlute1_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "BasicFlute1_samples.h"
const sample_data BasicFlute1_samples[2] = {
const AudioSynthWavetable::sample_data BasicFlute1_samples[2] = {
{
(int16_t*)sample_0_BasicFlute1_BreathyFluteC2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynth/BasicFlute1_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data BasicFlute1_samples[2];
extern const AudioSynthWavetable::sample_data BasicFlute1_samples[2];
const uint8_t BasicFlute1_ranges[] = {54, 127, };

const instrument_data BasicFlute1 = {2, BasicFlute1_ranges, BasicFlute1_samples };
const AudioSynthWavetable::instrument_data BasicFlute1 = {2, BasicFlute1_ranges, BasicFlute1_samples };


extern const uint32_t sample_0_BasicFlute1_BreathyFluteC2[28544];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynth/FrenchHorns_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "FrenchHorns_samples.h"
const sample_data FrenchHorns_samples[1] = {
const AudioSynthWavetable::sample_data FrenchHorns_samples[1] = {
{
(int16_t*)sample_0_FrenchHorns_FrenchHornsA4L, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynth/FrenchHorns_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data FrenchHorns_samples[1];
extern const AudioSynthWavetable::sample_data FrenchHorns_samples[1];
const uint8_t FrenchHorns_ranges[] = {127, };

const instrument_data FrenchHorns = {1, FrenchHorns_ranges, FrenchHorns_samples };
const AudioSynthWavetable::instrument_data FrenchHorns = {1, FrenchHorns_ranges, FrenchHorns_samples };


extern const uint32_t sample_0_FrenchHorns_FrenchHornsA4L[55040];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynth/Ocarina_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Ocarina_samples.h"
const sample_data Ocarina_samples[3] = {
const AudioSynthWavetable::sample_data Ocarina_samples[3] = {
{
(int16_t*)sample_0_Ocarina_OcarinaF4, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynth/Ocarina_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Ocarina_samples[3];
extern const AudioSynthWavetable::sample_data Ocarina_samples[3];
const uint8_t Ocarina_ranges[] = {78, 101, 127, };

const instrument_data Ocarina = {3, Ocarina_ranges, Ocarina_samples };
const AudioSynthWavetable::instrument_data Ocarina = {3, Ocarina_ranges, Ocarina_samples };


extern const uint32_t sample_0_Ocarina_OcarinaF4[1536];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynth/Pizzicato_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Pizzicato_samples.h"
const sample_data Pizzicato_samples[4] = {
const AudioSynthWavetable::sample_data Pizzicato_samples[4] = {
{
(int16_t*)sample_0_Pizzicato_PizzViolinE3, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynth/Pizzicato_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Pizzicato_samples[4];
extern const AudioSynthWavetable::sample_data Pizzicato_samples[4];
const uint8_t Pizzicato_ranges[] = {68, 83, 93, 127, };

const instrument_data Pizzicato = {4, Pizzicato_ranges, Pizzicato_samples };
const AudioSynthWavetable::instrument_data Pizzicato = {4, Pizzicato_ranges, Pizzicato_samples };


extern const uint32_t sample_0_Pizzicato_PizzViolinE3[2944];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynth/Viola_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Viola_samples.h"
const sample_data Viola_samples[8] = {
const AudioSynthWavetable::sample_data Viola_samples[8] = {
{
(int16_t*)sample_0_Viola_ViolinBb2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynth/Viola_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Viola_samples[8];
extern const AudioSynthWavetable::sample_data Viola_samples[8];
const uint8_t Viola_ranges[] = {58, 65, 68, 73, 79, 92, 96, 127, };

const instrument_data Viola = {8, Viola_ranges, Viola_samples };
const AudioSynthWavetable::instrument_data Viola = {8, Viola_ranges, Viola_samples };


extern const uint32_t sample_0_Viola_ViolinBb2[768];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthKeyboard/BasicFlute1_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "BasicFlute1_samples.h"
const sample_data BasicFlute1_samples[2] = {
const AudioSynthWavetable::sample_data BasicFlute1_samples[2] = {
{
(int16_t*)sample_0_BasicFlute1_BreathyFluteC2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthKeyboard/BasicFlute1_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data BasicFlute1_samples[2];
extern const AudioSynthWavetable::sample_data BasicFlute1_samples[2];
const uint8_t BasicFlute1_ranges[] = {54, 127, };

const instrument_data BasicFlute1 = {2, BasicFlute1_ranges, BasicFlute1_samples };
const AudioSynthWavetable::instrument_data BasicFlute1 = {2, BasicFlute1_ranges, BasicFlute1_samples };


extern const uint32_t sample_0_BasicFlute1_BreathyFluteC2[28544];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthKeyboard/FrenchHorns_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "FrenchHorns_samples.h"
const sample_data FrenchHorns_samples[1] = {
const AudioSynthWavetable::sample_data FrenchHorns_samples[1] = {
{
(int16_t*)sample_0_FrenchHorns_FrenchHornsA4L, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthKeyboard/FrenchHorns_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data FrenchHorns_samples[1];
extern const AudioSynthWavetable::sample_data FrenchHorns_samples[1];
const uint8_t FrenchHorns_ranges[] = {127, };

const instrument_data FrenchHorns = {1, FrenchHorns_ranges, FrenchHorns_samples };
const AudioSynthWavetable::instrument_data FrenchHorns = {1, FrenchHorns_ranges, FrenchHorns_samples };


extern const uint32_t sample_0_FrenchHorns_FrenchHornsA4L[55040];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthKeyboard/Ocarina_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Ocarina_samples.h"
const sample_data Ocarina_samples[3] = {
const AudioSynthWavetable::sample_data Ocarina_samples[3] = {
{
(int16_t*)sample_0_Ocarina_OcarinaF4, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthKeyboard/Ocarina_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Ocarina_samples[3];
extern const AudioSynthWavetable::sample_data Ocarina_samples[3];
const uint8_t Ocarina_ranges[] = {78, 101, 127, };

const instrument_data Ocarina = {3, Ocarina_ranges, Ocarina_samples };
const AudioSynthWavetable::instrument_data Ocarina = {3, Ocarina_ranges, Ocarina_samples };


extern const uint32_t sample_0_Ocarina_OcarinaF4[1536];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthKeyboard/Pizzicato_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Pizzicato_samples.h"
const sample_data Pizzicato_samples[4] = {
const AudioSynthWavetable::sample_data Pizzicato_samples[4] = {
{
(int16_t*)sample_0_Pizzicato_PizzViolinE3, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthKeyboard/Pizzicato_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Pizzicato_samples[4];
extern const AudioSynthWavetable::sample_data Pizzicato_samples[4];
const uint8_t Pizzicato_ranges[] = {68, 83, 93, 127, };

const instrument_data Pizzicato = {4, Pizzicato_ranges, Pizzicato_samples };
const AudioSynthWavetable::instrument_data Pizzicato = {4, Pizzicato_ranges, Pizzicato_samples };


extern const uint32_t sample_0_Pizzicato_PizzViolinE3[2944];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthKeyboard/Viola_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Viola_samples.h"
const sample_data Viola_samples[8] = {
const AudioSynthWavetable::sample_data Viola_samples[8] = {
{
(int16_t*)sample_0_Viola_ViolinBb2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthKeyboard/Viola_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Viola_samples[8];
extern const AudioSynthWavetable::sample_data Viola_samples[8];
const uint8_t Viola_ranges[] = {58, 65, 68, 73, 79, 92, 96, 127, };

const instrument_data Viola = {8, Viola_ranges, Viola_samples };
const AudioSynthWavetable::instrument_data Viola = {8, Viola_ranges, Viola_samples };


extern const uint32_t sample_0_Viola_ViolinBb2[768];

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/MidiSynthLarge.ino 파일 보기

@@ -164,7 +164,7 @@ void OnPress(int key)
//Serial.println();
}

const instrument_data* const midi_map[] = {
const AudioSynthWavetable::instrument_data * const midi_map[] = {
&piano, &piano, &piano, &piano, &piano, &piano, &piano, &piano, // 000: pianos
&vibraphone, &vibraphone, &vibraphone, &vibraphone, &vibraphone, &vibraphone, &vibraphone, &vibraphone, // 008: chrom percus
&harmonica, &harmonica, &harmonica, &harmonica, &harmonica, &harmonica, &harmonica, &harmonica, // 016: organs
@@ -183,7 +183,7 @@ const instrument_data* const midi_map[] = {
&gtfretnoise, &gtfretnoise, &gtfretnoise, &gtfretnoise, &gtfretnoise, &gtfretnoise, &gtfretnoise, &gtfretnoise, // 120: sound effects
};

const instrument_data* channel_map[17] = {
const AudioSynthWavetable::instrument_data * channel_map[17] = {
&piano, &piano, &piano, &piano, &piano, &piano, &piano, &piano, &piano, &piano, &standard_DRUMS, &piano, &piano, &piano, &piano, &piano, &piano,
};


+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/bassoon_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "bassoon_samples.h"
const sample_data bassoon_samples[2] = {
const AudioSynthWavetable::sample_data bassoon_samples[2] = {
{
(int16_t*)sample_0_bassoon_bassoonc2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/bassoon_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data bassoon_samples[2];
extern const AudioSynthWavetable::sample_data bassoon_samples[2];
const uint8_t bassoon_ranges[] = {88, 127, };

const instrument_data bassoon = {2, bassoon_ranges, bassoon_samples };
const AudioSynthWavetable::instrument_data bassoon = {2, bassoon_ranges, bassoon_samples };


extern const uint32_t sample_0_bassoon_bassoonc2[640];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/clarinet_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "clarinet_samples.h"
const sample_data clarinet_samples[2] = {
const AudioSynthWavetable::sample_data clarinet_samples[2] = {
{
(int16_t*)sample_0_clarinet_clarinetd2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/clarinet_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data clarinet_samples[2];
extern const AudioSynthWavetable::sample_data clarinet_samples[2];
const uint8_t clarinet_ranges[] = {69, 127, };

const instrument_data clarinet = {2, clarinet_ranges, clarinet_samples };
const AudioSynthWavetable::instrument_data clarinet = {2, clarinet_ranges, clarinet_samples };


extern const uint32_t sample_0_clarinet_clarinetd2[384];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/distortiongt_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "distortiongt_samples.h"
const sample_data distortiongt_samples[4] = {
const AudioSynthWavetable::sample_data distortiongt_samples[4] = {
{
(int16_t*)sample_0_distortiongt_distgtra2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/distortiongt_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data distortiongt_samples[4];
extern const AudioSynthWavetable::sample_data distortiongt_samples[4];
const uint8_t distortiongt_ranges[] = {62, 66, 72, 127, };

const instrument_data distortiongt = {4, distortiongt_ranges, distortiongt_samples };
const AudioSynthWavetable::instrument_data distortiongt = {4, distortiongt_ranges, distortiongt_samples };


extern const uint32_t sample_0_distortiongt_distgtra2[1024];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/epiano_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "epiano_samples.h"
const sample_data epiano_samples[4] = {
const AudioSynthWavetable::sample_data epiano_samples[4] = {
{
(int16_t*)sample_0_epiano_coldglass7wave, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/epiano_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data epiano_samples[4];
extern const AudioSynthWavetable::sample_data epiano_samples[4];
const uint8_t epiano_ranges[] = {48, 60, 80, 127, };

const instrument_data epiano = {4, epiano_ranges, epiano_samples };
const AudioSynthWavetable::instrument_data epiano = {4, epiano_ranges, epiano_samples };


extern const uint32_t sample_0_epiano_coldglass7wave[128];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/flute_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "flute_samples.h"
const sample_data flute_samples[1] = {
const AudioSynthWavetable::sample_data flute_samples[1] = {
{
(int16_t*)sample_0_flute_flutec4, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/flute_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data flute_samples[1];
extern const AudioSynthWavetable::sample_data flute_samples[1];
const uint8_t flute_ranges[] = {127, };

const instrument_data flute = {1, flute_ranges, flute_samples };
const AudioSynthWavetable::instrument_data flute = {1, flute_ranges, flute_samples };


extern const uint32_t sample_0_flute_flutec4[768];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/frenchhorn_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "frenchhorn_samples.h"
const sample_data frenchhorn_samples[1] = {
const AudioSynthWavetable::sample_data frenchhorn_samples[1] = {
{
(int16_t*)sample_0_frenchhorn_frenchhorng4, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/frenchhorn_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data frenchhorn_samples[1];
extern const AudioSynthWavetable::sample_data frenchhorn_samples[1];
const uint8_t frenchhorn_ranges[] = {127, };

const instrument_data frenchhorn = {1, frenchhorn_ranges, frenchhorn_samples };
const AudioSynthWavetable::instrument_data frenchhorn = {1, frenchhorn_ranges, frenchhorn_samples };


extern const uint32_t sample_0_frenchhorn_frenchhorng4[768];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/glockenspiel_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "glockenspiel_samples.h"
const sample_data glockenspiel_samples[2] = {
const AudioSynthWavetable::sample_data glockenspiel_samples[2] = {
{
(int16_t*)sample_0_glockenspiel_sinetick, // sample
false, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/glockenspiel_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data glockenspiel_samples[2];
extern const AudioSynthWavetable::sample_data glockenspiel_samples[2];
const uint8_t glockenspiel_ranges[] = {59, 127, };

const instrument_data glockenspiel = {2, glockenspiel_ranges, glockenspiel_samples };
const AudioSynthWavetable::instrument_data glockenspiel = {2, glockenspiel_ranges, glockenspiel_samples };


extern const uint32_t sample_0_glockenspiel_sinetick[128];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/gtfretnoise_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "gtfretnoise_samples.h"
const sample_data gtfretnoise_samples[1] = {
const AudioSynthWavetable::sample_data gtfretnoise_samples[1] = {
{
(int16_t*)sample_0_gtfretnoise_guitarfret, // sample
false, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/gtfretnoise_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data gtfretnoise_samples[1];
extern const AudioSynthWavetable::sample_data gtfretnoise_samples[1];
const uint8_t gtfretnoise_ranges[] = {127, };

const instrument_data gtfretnoise = {1, gtfretnoise_ranges, gtfretnoise_samples };
const AudioSynthWavetable::instrument_data gtfretnoise = {1, gtfretnoise_ranges, gtfretnoise_samples };


extern const uint32_t sample_0_gtfretnoise_guitarfret[1792];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/harmonica_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "harmonica_samples.h"
const sample_data harmonica_samples[1] = {
const AudioSynthWavetable::sample_data harmonica_samples[1] = {
{
(int16_t*)sample_0_harmonica_harmonicaa3, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/harmonica_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data harmonica_samples[1];
extern const AudioSynthWavetable::sample_data harmonica_samples[1];
const uint8_t harmonica_ranges[] = {127, };

const instrument_data harmonica = {1, harmonica_ranges, harmonica_samples };
const AudioSynthWavetable::instrument_data harmonica = {1, harmonica_ranges, harmonica_samples };


extern const uint32_t sample_0_harmonica_harmonicaa3[512];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/harp_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "harp_samples.h"
const sample_data harp_samples[1] = {
const AudioSynthWavetable::sample_data harp_samples[1] = {
{
(int16_t*)sample_0_harp_pluckharp, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/harp_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data harp_samples[1];
extern const AudioSynthWavetable::sample_data harp_samples[1];
const uint8_t harp_ranges[] = {127, };

const instrument_data harp = {1, harp_ranges, harp_samples };
const AudioSynthWavetable::instrument_data harp = {1, harp_ranges, harp_samples };


extern const uint32_t sample_0_harp_pluckharp[1792];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/mutedgtr_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "mutedgtr_samples.h"
const sample_data mutedgtr_samples[1] = {
const AudioSynthWavetable::sample_data mutedgtr_samples[1] = {
{
(int16_t*)sample_0_mutedgtr_mgtr, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/mutedgtr_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data mutedgtr_samples[1];
extern const AudioSynthWavetable::sample_data mutedgtr_samples[1];
const uint8_t mutedgtr_ranges[] = {127, };

const instrument_data mutedgtr = {1, mutedgtr_ranges, mutedgtr_samples };
const AudioSynthWavetable::instrument_data mutedgtr = {1, mutedgtr_ranges, mutedgtr_samples };


extern const uint32_t sample_0_mutedgtr_mgtr[512];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/nylonstrgtr_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "nylonstrgtr_samples.h"
const sample_data nylonstrgtr_samples[3] = {
const AudioSynthWavetable::sample_data nylonstrgtr_samples[3] = {
{
(int16_t*)sample_0_nylonstrgtr_nguitrf2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/nylonstrgtr_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data nylonstrgtr_samples[3];
extern const AudioSynthWavetable::sample_data nylonstrgtr_samples[3];
const uint8_t nylonstrgtr_ranges[] = {56, 77, 127, };

const instrument_data nylonstrgtr = {3, nylonstrgtr_ranges, nylonstrgtr_samples };
const AudioSynthWavetable::instrument_data nylonstrgtr = {3, nylonstrgtr_ranges, nylonstrgtr_samples };


extern const uint32_t sample_0_nylonstrgtr_nguitrf2[1920];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/oboe_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "oboe_samples.h"
const sample_data oboe_samples[3] = {
const AudioSynthWavetable::sample_data oboe_samples[3] = {
{
(int16_t*)sample_0_oboe_oboecx3, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/oboe_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data oboe_samples[3];
extern const AudioSynthWavetable::sample_data oboe_samples[3];
const uint8_t oboe_ranges[] = {63, 68, 127, };

const instrument_data oboe = {3, oboe_ranges, oboe_samples };
const AudioSynthWavetable::instrument_data oboe = {3, oboe_ranges, oboe_samples };


extern const uint32_t sample_0_oboe_oboecx3[512];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/overdrivegt_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "overdrivegt_samples.h"
const sample_data overdrivegt_samples[3] = {
const AudioSynthWavetable::sample_data overdrivegt_samples[3] = {
{
(int16_t*)sample_0_overdrivegt_distgtra2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/overdrivegt_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data overdrivegt_samples[3];
extern const AudioSynthWavetable::sample_data overdrivegt_samples[3];
const uint8_t overdrivegt_ranges[] = {62, 66, 127, };

const instrument_data overdrivegt = {3, overdrivegt_ranges, overdrivegt_samples };
const AudioSynthWavetable::instrument_data overdrivegt = {3, overdrivegt_ranges, overdrivegt_samples };


extern const uint32_t sample_0_overdrivegt_distgtra2[1024];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/piano_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "piano_samples.h"
const sample_data piano_samples[4] = {
const AudioSynthWavetable::sample_data piano_samples[4] = {
{
(int16_t*)sample_0_piano_kpianob1, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/piano_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data piano_samples[4];
extern const AudioSynthWavetable::sample_data piano_samples[4];
const uint8_t piano_ranges[] = {54, 74, 88, 127, };

const instrument_data piano = {4, piano_ranges, piano_samples };
const AudioSynthWavetable::instrument_data piano = {4, piano_ranges, piano_samples };


extern const uint32_t sample_0_piano_kpianob1[8704];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/recorder_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "recorder_samples.h"
const sample_data recorder_samples[1] = {
const AudioSynthWavetable::sample_data recorder_samples[1] = {
{
(int16_t*)sample_0_recorder_recorderax2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/recorder_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data recorder_samples[1];
extern const AudioSynthWavetable::sample_data recorder_samples[1];
const uint8_t recorder_ranges[] = {127, };

const instrument_data recorder = {1, recorder_ranges, recorder_samples };
const AudioSynthWavetable::instrument_data recorder = {1, recorder_ranges, recorder_samples };


extern const uint32_t sample_0_recorder_recorderax2[768];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/standard_DRUMS_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "standard_DRUMS_samples.h"
const sample_data standard_DRUMS_samples[48] = {
const AudioSynthWavetable::sample_data standard_DRUMS_samples[48] = {
{
(int16_t*)sample_0_standard_DRUMS_filtersnap, // sample
false, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/standard_DRUMS_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data standard_DRUMS_samples[48];
extern const AudioSynthWavetable::sample_data standard_DRUMS_samples[48];
const uint8_t standard_DRUMS_ranges[] = {27, 28, 28, 29, 30, 31, 33, 34, 35, 36, 37, 39, 42, 45, 47, 48, 50, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 65, 67, 68, 69, 71, 72, 73, 74, 76, 78, 80, 81, 82, 83, 83, 84, 85, 85, 86, 87, 127, };

const instrument_data standard_DRUMS = {48, standard_DRUMS_ranges, standard_DRUMS_samples };
const AudioSynthWavetable::instrument_data standard_DRUMS = {48, standard_DRUMS_ranges, standard_DRUMS_samples };


extern const uint32_t sample_0_standard_DRUMS_filtersnap[256];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/steelstrgtr_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "steelstrgtr_samples.h"
const sample_data steelstrgtr_samples[2] = {
const AudioSynthWavetable::sample_data steelstrgtr_samples[2] = {
{
(int16_t*)sample_0_steelstrgtr_acgtrg2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/steelstrgtr_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data steelstrgtr_samples[2];
extern const AudioSynthWavetable::sample_data steelstrgtr_samples[2];
const uint8_t steelstrgtr_ranges[] = {72, 127, };

const instrument_data steelstrgtr = {2, steelstrgtr_ranges, steelstrgtr_samples };
const AudioSynthWavetable::instrument_data steelstrgtr = {2, steelstrgtr_ranges, steelstrgtr_samples };


extern const uint32_t sample_0_steelstrgtr_acgtrg2[2560];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/strings_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "strings_samples.h"
const sample_data strings_samples[3] = {
const AudioSynthWavetable::sample_data strings_samples[3] = {
{
(int16_t*)sample_0_strings_stringsg2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/strings_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data strings_samples[3];
extern const AudioSynthWavetable::sample_data strings_samples[3];
const uint8_t strings_ranges[] = {59, 72, 127, };

const instrument_data strings = {3, strings_ranges, strings_samples };
const AudioSynthWavetable::instrument_data strings = {3, strings_ranges, strings_samples };


extern const uint32_t sample_0_strings_stringsg2[4736];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/timpani_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "timpani_samples.h"
const sample_data timpani_samples[3] = {
const AudioSynthWavetable::sample_data timpani_samples[3] = {
{
(int16_t*)sample_0_timpani_timpani, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/timpani_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data timpani_samples[3];
extern const AudioSynthWavetable::sample_data timpani_samples[3];
const uint8_t timpani_ranges[] = {49, 63, 127, };

const instrument_data timpani = {3, timpani_ranges, timpani_samples };
const AudioSynthWavetable::instrument_data timpani = {3, timpani_ranges, timpani_samples };


extern const uint32_t sample_0_timpani_timpani[3968];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/trombone_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "trombone_samples.h"
const sample_data trombone_samples[4] = {
const AudioSynthWavetable::sample_data trombone_samples[4] = {
{
(int16_t*)sample_0_trombone_tromb2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/trombone_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data trombone_samples[4];
extern const AudioSynthWavetable::sample_data trombone_samples[4];
const uint8_t trombone_ranges[] = {52, 59, 64, 127, };

const instrument_data trombone = {4, trombone_ranges, trombone_samples };
const AudioSynthWavetable::instrument_data trombone = {4, trombone_ranges, trombone_samples };


extern const uint32_t sample_0_trombone_tromb2[768];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/trumpet_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "trumpet_samples.h"
const sample_data trumpet_samples[5] = {
const AudioSynthWavetable::sample_data trumpet_samples[5] = {
{
(int16_t*)sample_0_trumpet_htrumpetd2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/trumpet_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data trumpet_samples[5];
extern const AudioSynthWavetable::sample_data trumpet_samples[5];
const uint8_t trumpet_ranges[] = {64, 69, 74, 79, 127, };

const instrument_data trumpet = {5, trumpet_ranges, trumpet_samples };
const AudioSynthWavetable::instrument_data trumpet = {5, trumpet_ranges, trumpet_samples };


extern const uint32_t sample_0_trumpet_htrumpetd2[896];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/tuba_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "tuba_samples.h"
const sample_data tuba_samples[2] = {
const AudioSynthWavetable::sample_data tuba_samples[2] = {
{
(int16_t*)sample_0_tuba_tubaax1, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/tuba_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data tuba_samples[2];
extern const AudioSynthWavetable::sample_data tuba_samples[2];
const uint8_t tuba_ranges[] = {86, 127, };

const instrument_data tuba = {2, tuba_ranges, tuba_samples };
const AudioSynthWavetable::instrument_data tuba = {2, tuba_ranges, tuba_samples };


extern const uint32_t sample_0_tuba_tubaax1[1024];

+ 1
- 1
examples/Synthesis/Wavetable/MidiSynthLarge/vibraphone_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "vibraphone_samples.h"
const sample_data vibraphone_samples[2] = {
const AudioSynthWavetable::sample_data vibraphone_samples[2] = {
{
(int16_t*)sample_0_vibraphone_vibese2, // sample
true, // LOOP

+ 2
- 2
examples/Synthesis/Wavetable/MidiSynthLarge/vibraphone_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data vibraphone_samples[2];
extern const AudioSynthWavetable::sample_data vibraphone_samples[2];
const uint8_t vibraphone_ranges[] = {94, 127, };

const instrument_data vibraphone = {2, vibraphone_ranges, vibraphone_samples };
const AudioSynthWavetable::instrument_data vibraphone = {2, vibraphone_ranges, vibraphone_samples };


extern const uint32_t sample_0_vibraphone_vibese2[512];

+ 1
- 1
examples/Synthesis/Wavetable/SimpleWavetable/BasicFlute1_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "BasicFlute1_samples.h"
const sample_data BasicFlute1_samples[1] = {
const AudioSynthWavetable::sample_data BasicFlute1_samples[1] = {
{
(int16_t*)sample_0_BasicFlute1_BreathyFluteC2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/SimpleWavetable/BasicFlute1_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data BasicFlute1_samples[1];
extern const AudioSynthWavetable::sample_data BasicFlute1_samples[1];
const uint8_t BasicFlute1_ranges[] = {127,};

const instrument_data BasicFlute1 = {1, BasicFlute1_ranges, BasicFlute1_samples };
const AudioSynthWavetable::instrument_data BasicFlute1 = {1, BasicFlute1_ranges, BasicFlute1_samples };


extern const uint32_t sample_0_BasicFlute1_BreathyFluteC2[28544];

+ 1
- 1
examples/Synthesis/Wavetable/Zelda/BasicFlute1_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "BasicFlute1_samples.h"
const sample_data BasicFlute1_samples[2] = {
const AudioSynthWavetable::sample_data BasicFlute1_samples[2] = {
{
(int16_t*)sample_0_BasicFlute1_BreathyFluteC2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/Zelda/BasicFlute1_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data BasicFlute1_samples[2];
extern const AudioSynthWavetable::sample_data BasicFlute1_samples[2];
const uint8_t BasicFlute1_ranges[] = {54, 127, };

const instrument_data BasicFlute1 = {2, BasicFlute1_ranges, BasicFlute1_samples };
const AudioSynthWavetable::instrument_data BasicFlute1 = {2, BasicFlute1_ranges, BasicFlute1_samples };


extern const uint32_t sample_0_BasicFlute1_BreathyFluteC2[28544];

+ 1
- 1
examples/Synthesis/Wavetable/Zelda/FrenchHorns_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "FrenchHorns_samples.h"
const sample_data FrenchHorns_samples[1] = {
const AudioSynthWavetable::sample_data FrenchHorns_samples[1] = {
{
(int16_t*)sample_0_FrenchHorns_FrenchHornsA4L, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/Zelda/FrenchHorns_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data FrenchHorns_samples[1];
extern const AudioSynthWavetable::sample_data FrenchHorns_samples[1];
const uint8_t FrenchHorns_ranges[] = {127, };

const instrument_data FrenchHorns = {1, FrenchHorns_ranges, FrenchHorns_samples };
const AudioSynthWavetable::instrument_data FrenchHorns = {1, FrenchHorns_ranges, FrenchHorns_samples };


extern const uint32_t sample_0_FrenchHorns_FrenchHornsA4L[55040];

+ 1
- 1
examples/Synthesis/Wavetable/Zelda/Pizzicato_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Pizzicato_samples.h"
const sample_data Pizzicato_samples[4] = {
const AudioSynthWavetable::sample_data Pizzicato_samples[4] = {
{
(int16_t*)sample_0_Pizzicato_PizzViolinE3, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/Zelda/Pizzicato_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Pizzicato_samples[4];
extern const AudioSynthWavetable::sample_data Pizzicato_samples[4];
const uint8_t Pizzicato_ranges[] = {68, 83, 93, 127, };

const instrument_data Pizzicato = {4, Pizzicato_ranges, Pizzicato_samples };
const AudioSynthWavetable::instrument_data Pizzicato = {4, Pizzicato_ranges, Pizzicato_samples };


extern const uint32_t sample_0_Pizzicato_PizzViolinE3[2944];

+ 1
- 1
examples/Synthesis/Wavetable/Zelda/Viola_samples.cpp 파일 보기

@@ -1,5 +1,5 @@
#include "Viola_samples.h"
const sample_data Viola_samples[8] = {
const AudioSynthWavetable::sample_data Viola_samples[8] = {
{
(int16_t*)sample_0_Viola_ViolinBb2, //16-bit PCM encoded audio sample
true, //Whether or not to loop this sample

+ 2
- 2
examples/Synthesis/Wavetable/Zelda/Viola_samples.h 파일 보기

@@ -1,10 +1,10 @@
#pragma once
#include <Audio.h>

extern const sample_data Viola_samples[8];
extern const AudioSynthWavetable::sample_data Viola_samples[8];
const uint8_t Viola_ranges[] = {58, 65, 68, 73, 79, 92, 96, 127, };

const instrument_data Viola = {8, Viola_ranges, Viola_samples };
const AudioSynthWavetable::instrument_data Viola = {8, Viola_ranges, Viola_samples };


extern const uint32_t sample_0_Viola_ViolinBb2[768];

+ 49
- 48
synth_wavetable.h 파일 보기

@@ -2,7 +2,7 @@
* Copyright (c) 2017, TeensyAudio PSU Team
*
* Development of this audio library was sponsored by PJRC.COM, LLC.
* Please support PJRC's efforts to develop open source
* Please support PJRC's efforts to develop open source
* software by purchasing Teensy or other PJRC products.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,64 +31,64 @@
#include <math.h>
#include <stdint.h>

// TODO: move all this stuff into the AudioSynthWavetable class (used in sample data)
#define UNITY_GAIN INT32_MAX // Max amplitude / no attenuation
#define DEFAULT_AMPLITUDE 90
#define SAMPLES_PER_MSEC (AUDIO_SAMPLE_RATE_EXACT/1000.0)
#define TRIANGLE_INITIAL_PHASE (-0x40000000)
#define LFO_SMOOTHNESS 3
#define LFO_PERIOD (AUDIO_BLOCK_SAMPLES/(1 << (LFO_SMOOTHNESS-1)))

#define ENVELOPE_PERIOD 8

enum envelopeStateEnum { STATE_IDLE, STATE_DELAY, STATE_ATTACK, STATE_HOLD, STATE_DECAY, STATE_SUSTAIN, STATE_RELEASE };

#define CENTS_SHIFT(C) (pow(2.0, C/1200.0))
#define NOTE(N) (440.0 * pow(2.0, (N - 69) / 12.0))
#define DECIBEL_SHIFT(dB) (pow(10.0, dB/20.0))

// TODO: move all this stuff into the AudioSynthWavetable class, not global scope
struct sample_data {
// SAMPLE VALUES
const int16_t* sample;
const bool LOOP;
const int INDEX_BITS;
const float PER_HERTZ_PHASE_INCREMENT;
const uint32_t MAX_PHASE;
const uint32_t LOOP_PHASE_END;
const uint32_t LOOP_PHASE_LENGTH;
const uint16_t INITIAL_ATTENUATION_SCALAR;
// VOLUME ENVELOPE VALUES
const uint32_t DELAY_COUNT;
const uint32_t ATTACK_COUNT;
const uint32_t HOLD_COUNT;
const uint32_t DECAY_COUNT;
const uint32_t RELEASE_COUNT;
const int32_t SUSTAIN_MULT;

// VIRBRATO VALUES
const uint32_t VIBRATO_DELAY;
const uint32_t VIBRATO_INCREMENT;
const float VIBRATO_PITCH_COEFFICIENT_INITIAL;
const float VIBRATO_PITCH_COEFFICIENT_SECOND;

// MODULATION VALUES
const uint32_t MODULATION_DELAY;
const uint32_t MODULATION_INCREMENT;
const float MODULATION_PITCH_COEFFICIENT_INITIAL;
const float MODULATION_PITCH_COEFFICIENT_SECOND;
const int32_t MODULATION_AMPLITUDE_INITIAL_GAIN;
const int32_t MODULATION_AMPLITUDE_SECOND_GAIN;
};
// TODO: move all this stuff into the AudioSynthWavetable class (used in this file)
#define DEFAULT_AMPLITUDE 90
#define TRIANGLE_INITIAL_PHASE (-0x40000000)
enum envelopeStateEnum { STATE_IDLE, STATE_DELAY, STATE_ATTACK, STATE_HOLD, STATE_DECAY, STATE_SUSTAIN, STATE_RELEASE };

struct instrument_data {
const uint8_t sample_count;
const uint8_t* sample_note_ranges;
const sample_data* samples;
};

class AudioSynthWavetable : public AudioStream
{
public:
struct sample_data {
// SAMPLE VALUES
const int16_t* sample;
const bool LOOP;
const int INDEX_BITS;
const float PER_HERTZ_PHASE_INCREMENT;
const uint32_t MAX_PHASE;
const uint32_t LOOP_PHASE_END;
const uint32_t LOOP_PHASE_LENGTH;
const uint16_t INITIAL_ATTENUATION_SCALAR;

// VOLUME ENVELOPE VALUES
const uint32_t DELAY_COUNT;
const uint32_t ATTACK_COUNT;
const uint32_t HOLD_COUNT;
const uint32_t DECAY_COUNT;
const uint32_t RELEASE_COUNT;
const int32_t SUSTAIN_MULT;

// VIRBRATO VALUES
const uint32_t VIBRATO_DELAY;
const uint32_t VIBRATO_INCREMENT;
const float VIBRATO_PITCH_COEFFICIENT_INITIAL;
const float VIBRATO_PITCH_COEFFICIENT_SECOND;

// MODULATION VALUES
const uint32_t MODULATION_DELAY;
const uint32_t MODULATION_INCREMENT;
const float MODULATION_PITCH_COEFFICIENT_INITIAL;
const float MODULATION_PITCH_COEFFICIENT_SECOND;
const int32_t MODULATION_AMPLITUDE_INITIAL_GAIN;
const int32_t MODULATION_AMPLITUDE_SECOND_GAIN;
};

struct instrument_data {
const uint8_t sample_count;
const uint8_t* sample_note_ranges;
const sample_data* samples;
};
public:
/**
* Class constructor.
@@ -100,7 +100,7 @@ public:
*
* A wavetable uses a set of samples to generate sound.
* This function is used to set the instrument samples.
* @param instrument a struct of type instrument_data, commonly prodced from a
* @param instrument a struct of type instrument_data, commonly prodced from a
* decoded SoundFont file using the SoundFont Decoder Script which accompanies this library.
*/
void setInstrument(const instrument_data& instrument) {
@@ -164,12 +164,13 @@ public:

// Defined in AudioSynthWavetable.cpp
void stop(void);
// TODO: amplitude should be 0 to 1.0 scale
void playFrequency(float freq, int amp = DEFAULT_AMPLITUDE);
void playNote(int note, int amp = DEFAULT_AMPLITUDE);
bool isPlaying(void) { return env_state != STATE_IDLE; }
void setFrequency(float freq);
virtual void update(void);
envelopeStateEnum getEnvState(void) { return env_state; }

private:

Loading…
취소
저장