Skip to content

Instantly share code, notes, and snippets.

@sugarflower
Last active January 20, 2024 17:05
Show Gist options
  • Save sugarflower/942c7173b57d052d261aeb20878f9577 to your computer and use it in GitHub Desktop.
Save sugarflower/942c7173b57d052d261aeb20878f9577 to your computer and use it in GitHub Desktop.

思い出のコード

今更使うかというと怪しい。もうそういう時代じゃない。
でもなんだかもったいない気がするのでコードを残しておく。

サンプリングを再生

よく覚えていないのだけど、pinModeでOUTPUTにしてるのは、3は解る。
10、11はOC1BとOC2Aなのでそのあとのコードといまいち整合性が取れていないような。
なにしろよく覚えていない。多分pin11に圧電スピーカーなんか繋ぐと音が出ると思われる。 ※pin8にタクトスイッチも忘れず。押すと鳴るようだ。

#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <avr/io.h>
#define CPU_FREQ 16000000L
#define SAMPLE_RATE 5512

PROGMEM const uint8_t table[] = {
  0x7f,0x7f,0x7e,0x7d,0x7e,0x7f,0x7f,0x7f,0x7f,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x7f,
  0x7e,0x7f,0x7e,0x7e,0x7e,0x7f,0x80,0x7f,0x7f,0x7e,0x7d,0x7e,0x7e,0x7f,0x7f,0x7e,
  0x7f,0x7d,0x7f,0x80,0x7f,0x7f,0x7d,0x7e,0x7f,0x7f,0x7e,0x7d,0x7d,0x7f,0x7f,0x7f,
  0x7d,0x7e,0x7e,0x80,0x7f,0x80,0x7f,0x7e,0x7f,0x7e,0x7f,0x7f,0x7f,0x7e,0x7e,0x7f,
  0x7f,0x7e,0x7e,0x80,0x7f,0x7d,0x7f,0x7e,0x81,0x80,0x7f,0x7d,0x7d,0x7f,0x80,0x81,
  0x7e,0x7d,0x7c,0x7e,0x7d,0x80,0x7f,0x7f,0x7f,0x7e,0x7f,0x7c,0x7e,0x80,0x81,0x80,
  0x7d,0x7c,0x7c,0x7f,0x81,0x80,0x7f,0x7d,0x7f,0x7d,0x7d,0x7e,0x7e,0x7f,0x80,0x7e,
  0x7e,0x7c,0x7f,0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x7a,0x84,0x82,0x84,0x7c,0x7e,
  0x80,0x7a,0x86,0x7e,0x7d,0x7b,0x80,0x80,0x7e,0x7e,0x7a,0x81,0x7d,0x82,0x7f,0x79,
  0x7d,0x7d,0x7b,0x83,0x7c,0x83,0x81,0x7b,0x81,0x7a,0x86,0x80,0x81,0x78,0x81,0x81,
  0x7c,0x80,0x7d,0x7f,0x7d,0x7f,0x7b,0x7c,0x7b,0x81,0x7f,0x7e,0x7e,0x7e,0x85,0x82,
  0x83,0x7e,0x79,0x7d,0x83,0x7f,0x7b,0x77,0x78,0x7f,0x83,0x7d,0x7d,0x74,0x80,0x85,
  0x7f,0x82,0x7d,0x81,0x8d,0x89,0x85,0x82,0x82,0x83,0x80,0x7a,0x78,0x7b,0x7c,0x7d,
  0x71,0x70,0x73,0x76,0x7b,0x79,0x79,0x76,0x76,0x79,0x80,0x83,0x89,0x93,0x94,0x90,
  0x92,0x92,0x91,0x93,0x8e,0x7e,0x72,0x64,0x61,0x6f,0x76,0x73,0x73,0x67,0x69,0x75,
  0x79,0x7c,0x7a,0x79,0x7d,0x84,0x8c,0x99,0x97,0x91,0x97,0x9b,0x97,0x9e,0x92,0x6d,
  0x51,0x57,0x70,0x85,0x8c,0x73,0x5d,0x64,0x71,0x85,0x87,0x7b,0x6d,0x6c,0x78,0x80,
  0x82,0x7f,0x84,0x91,0x9e,0x9f,0x97,0x92,0x93,0x9d,0x9a,0x69,0x4c,0x53,0x73,0x8c,
  0x92,0x74,0x59,0x60,0x70,0x86,0x8e,0x7c,0x6e,0x64,0x6d,0x81,0x8a,0x86,0x86,0x8f,
  0x9c,0x9e,0x9d,0x99,0x9a,0x9c,0x91,0x4d,0x42,0x68,0x80,0x94,0x8c,0x65,0x4e,0x69,
  0x7c,0x88,0x8e,0x76,0x65,0x6a,0x70,0x80,0x89,0x83,0x82,0x93,0xa1,0x9e,0x9c,0x97,
  0x97,0xa2,0x95,0x4b,0x3e,0x65,0x83,0x96,0x93,0x69,0x4b,0x61,0x7a,0x87,0x8f,0x7d,
  0x64,0x62,0x6d,0x7f,0x88,0x88,0x84,0x8c,0xa0,0xa1,0x9f,0x9a,0x9d,0x9f,0x96,0x54,
  0x3a,0x62,0x81,0x90,0x91,0x70,0x4f,0x5c,0x77,0x82,0x8b,0x83,0x6b,0x60,0x6a,0x7a,
  0x88,0x8d,0x87,0x8b,0x9e,0xa2,0xa1,0xa1,0x9e,0x99,0x8c,0x54,0x3f,0x64,0x82,0x8e,
  0x8b,0x75,0x55,0x5a,0x75,0x82,0x88,0x84,0x70,0x61,0x68,0x79,0x86,0x8f,0x8b,0x8e,
  0x9d,0xa1,0x9d,0x9c,0x9e,0x98,0x81,0x56,0x46,0x68,0x7f,0x8b,0x8a,0x75,0x5f,0x5e,
  0x71,0x7e,0x85,0x85,0x76,0x66,0x6a,0x79,0x82,0x8d,0x92,0x94,0x99,0x9d,0x9c,0x98,
  0x96,0x94,0x77,0x56,0x52,0x6e,0x7e,0x84,0x87,0x77,0x67,0x65,0x71,0x7a,0x81,0x84,
  0x77,0x6c,0x70,0x79,0x83,0x8c,0x94,0x99,0x9a,0x9b,0x98,0x97,0x95,0x85,0x64,0x53,
  0x61,0x73,0x7f,0x86,0x83,0x74,0x69,0x6b,0x73,0x79,0x7f,0x7f,0x76,0x72,0x76,0x7d,
  0x85,0x91,0x9c,0x9d,0x9b,0x9b,0x99,0x95,0x87,0x68,0x54,0x5d,0x6e,0x7c,0x84,0x86,
  0x7c,0x6d,0x6a,0x6f,0x75,0x7b,0x7d,0x79,0x76,0x78,0x7d,0x84,0x8f,0x9b,0x9e,0x9d,
  0x9d,0x9b,0x97,0x81,0x62,0x53,0x5e,0x6d,0x79,0x86,0x89,0x7e,0x71,0x6d,0x6f,0x72,
  0x77,0x7b,0x7a,0x79,0x79,0x7f,0x88,0x92,0x98,0x9c,0x9e,0x9d,0x9b,0x94,0x78,0x5b,
  0x54,0x60,0x6f,0x7a,0x87,0x89,0x7f,0x74,0x70,0x70,0x71,0x74,0x79,0x7b,0x7c,0x7e,
  0x84,0x8e,0x94,0x98,0x9b,0x9c,0x9b,0x98,0x84,0x67,0x58,0x5d,0x67,0x71,0x7f,0x88,
  0x86,0x7e,0x78,0x74,0x70,0x6f,0x72,0x77,0x7b,0x7e,0x84,0x8c,0x93,0x96,0x98,0x9b,
  0x99,0x98,0x8a,0x71,0x5f,0x5e,0x64,0x6c,0x78,0x83,0x85,0x81,0x7e,0x79,0x74,0x6f,
  0x70,0x75,0x79,0x7d,0x83,0x8d,0x94,0x97,0x98,0x99,0x96,0x95,0x88,0x72,0x62,0x61,
  0x66,0x6b,0x76,0x80,0x85,0x83,0x7f,0x7d,0x78,0x73,0x70,0x72,0x76,0x7a,0x81,0x8c,
  0x95,0x98,0x99,0x99,0x97,0x92,0x81,0x6d,0x62,0x62,0x67,0x6d,0x78,0x81,0x84,0x83,
  0x80,0x7d,0x77,0x71,0x72,0x75,0x78,0x7c,0x83,0x8f,0x96,0x9a,0x9a,0x98,0x95,0x8b,
  0x78,0x67,0x61,0x64,0x69,0x71,0x7b,0x83,0x84,0x83,0x81,0x7d,0x76,0x70,0x71,0x75,
  0x79,0x7f,0x8a,0x94,0x98,0x9a,0x9b,0x98,0x91,0x7d,0x69,0x60,0x61,0x67,0x6d,0x78,
  0x82,0x85,0x85,0x83,0x7f,0x78,0x72,0x72,0x75,0x78,0x7d,0x88,0x92,0x98,0x9a,0x9a,
  0x98,0x91,0x7e,0x6a,0x60,0x61,0x65,0x6c,0x77,0x82,0x85,0x85,0x84,0x81,0x7a,0x73,
  0x71,0x74,0x78,0x7d,0x89,0x95,0x9c,0x9c,0x9b,0x98,0x8f,0x7a,0x65,0x5e,0x5f,0x64,
  0x6d,0x79,0x83,0x84,0x85,0x85,0x80,0x78,0x73,0x74,0x77,0x7b,0x82,0x8f,0x98,0x9c,
  0x9c,0x9b,0x97,0x86,0x6d,0x5c,0x5b,0x61,0x67,0x73,0x80,0x85,0x84,0x83,0x83,0x7c,
  0x75,0x74,0x77,0x7b,0x80,0x8a,0x96,0x9d,0x9e,0x9d,0x9b,0x8d,0x72,0x5b,0x58,0x5d,
  0x65,0x70,0x7d,0x85,0x82,0x80,0x81,0x7c,0x76,0x75,0x79,0x7d,0x81,0x89,0x95,0x9d,
  0x9f,0x9e,0x9c,0x92,0x77,0x5a,0x55,0x5d,0x65,0x70,0x7e,0x86,0x7f,0x7b,0x7c,0x7a,
  0x76,0x76,0x7c,0x81,0x83,0x8b,0x97,0x9f,0x9f,0x9d,0x9c,0x8e,0x6f,0x55,0x55,0x60,
  0x6a,0x78,0x83,0x82,0x78,0x74,0x78,0x75,0x76,0x7d,0x82,0x82,0x85,0x93,0x9d,0xa1,
  0xa1,0x9d,0x9b,0x7d,0x59,0x4b,0x5a,0x6e,0x7b,0x8a,0x86,0x71,0x67,0x6e,0x78,0x7a,
  0x81,0x85,0x7e,0x7e,0x88,0x97,0xa0,0xa3,0xa0,0x98,0x8c,0x66,0x49,0x58,0x6f,0x80,
  0x8d,0x86,0x70,0x5d,0x68,0x7c,0x7f,0x84,0x83,0x79,0x77,0x82,0x98,0xa1,0xa7,0xa4,
  0x99,0x92,0x66,0x47,0x57,0x72,0x84,0x8b,0x86,0x6e,0x59,0x69,0x7d,0x83,0x84,0x7f,
  0x79,0x74,0x80,0x92,0x9f,0xa8,0xa4,0x9c,0x95,0x6f,0x4e,0x4f,0x6d,0x84,0x8b,0x8b,
  0x6f,0x59,0x62,0x79,0x89,0x87,0x81,0x77,0x71,0x7c,0x8d,0xa0,0xa8,0xa8,0x9e,0x97,
  0x7c,0x4f,0x49,0x6d,0x82,0x89,0x8a,0x6f,0x59,0x60,0x77,0x87,0x87,0x80,0x78,0x74,
  0x7b,0x8b,0x9e,0xa6,0xaa,0xa1,0x98,0x80,0x52,0x47,0x6d,0x83,0x89,0x8a,0x6e,0x58,
  0x5d,0x75,0x87,0x88,0x81,0x7a,0x75,0x77,0x87,0x9a,0xa5,0xac,0xa3,0x95,0x85,0x56,
  0x48,0x6d,0x82,0x89,0x88,0x6f,0x5a,0x5f,0x73,0x84,0x86,0x80,0x7c,0x78,0x79,0x88,
  0x99,0xa2,0xa6,0xa5,0x9c,0x83,0x52,0x48,0x6e,0x83,0x8c,0x8a,0x6b,0x58,0x62,0x75,
  0x85,0x88,0x80,0x77,0x76,0x7e,0x8a,0x9c,0xa8,0xa7,0x9c,0x96,0x75,0x4c,0x55,0x7b,
  0x84,0x88,0x81,0x64,0x5e,0x6b,0x76,0x80,0x84,0x81,0x7f,0x7a,0x7e,0x8d,0x9c,0xa0,
  0xa8,0x9f,0x96,0x6d,0x4a,0x54,0x7b,0x8c,0x89,0x7d,0x62,0x5d,0x6d,0x7a,0x82,0x84,
  0x7e,0x7b,0x79,0x81,0x90,0x9f,0xa6,0xa5,0x98,0x91,0x61,0x44,0x62,0x82,0x88,0x8b,
  0x79,0x5c,0x63,0x72,0x74,0x81,0x85,0x81,0x84,0x7d,0x7e,0x91,0x9f,0xa1,0xa6,0xa1,
  0x88,0x55,0x46,0x67,0x80,0x8c,0x8c,0x70,0x5f,0x6b,0x73,0x74,0x7f,0x7f,0x82,0x89,
  0x82,0x81,0x92,0xa1,0xa4,0xa3,0x9f,0x7d,0x4f,0x4a,0x6a,0x7e,0x89,0x88,0x69,0x62,
  0x6e,0x71,0x77,0x81,0x83,0x84,0x87,0x84,0x88,0x9b,0xa3,0xa6,0x9f,0x96,0x69,0x48,
  0x58,0x73,0x83,0x8a,0x78,0x63,0x67,0x73,0x6f,0x79,0x82,0x7f,0x8a,0x8f,0x85,0x8b,
  0x9f,0xa3,0xa2,0xa2,0x89,0x59,0x4b,0x65,0x73,0x83,0x87,0x6e,0x63,0x6d,0x6e,0x72,
  0x7e,0x7f,0x84,0x8e,0x8c,0x8e,0x9f,0xa4,0x9f,0x9c,0x95,0x60,0x4b,0x65,0x72,0x7e,
  0x88,0x74,0x5f,0x6b,0x73,0x6d,0x7a,0x80,0x7d,0x8c,0x92,0x88,0x93,0xa5,0xa5,0x9f,
  0x9f,0x72,0x4c,0x55,0x6f,0x79,0x87,0x80,0x66,0x67,0x71,0x6d,0x75,0x7e,0x7d,0x87,
  0x91,0x8b,0x90,0xa6,0xa7,0x9b,0x9e,0x7b,0x50,0x53,0x73,0x77,0x82,0x83,0x67,0x65,
  0x72,0x71,0x74,0x7d,0x7c,0x80,0x91,0x8f,0x88,0xa0,0xaa,0x9e,0x99,0x8c,0x5c,0x4c,
  0x6f,0x76,0x7c,0x83,0x71,0x63,0x6f,0x79,0x71,0x73,0x7a,0x7f,0x8b,0x95,0x8f,0x96,
  0xa8,0xa6,0x94,0x8d,0x63,0x4e,0x6d,0x7d,0x7c,0x81,0x76,0x62,0x69,0x74,0x72,0x77,
  0x7c,0x7c,0x88,0x93,0x8f,0x98,0xa9,0xa2,0x92,0x8b,0x62,0x52,0x70,0x7e,0x7e,0x80,
  0x74,0x60,0x66,0x75,0x76,0x76,0x7b,0x80,0x89,0x93,0x93,0x9a,0xa7,0xa5,0x92,0x7d,
  0x5c,0x54,0x74,0x81,0x83,0x7f,0x70,0x62,0x6b,0x74,0x73,0x78,0x7c,0x7d,0x89,0x92,
  0x90,0x99,0xac,0xa6,0x8e,0x7d,0x59,0x51,0x75,0x86,0x82,0x7e,0x70,0x61,0x68,0x79,
  0x7c,0x76,0x76,0x81,0x8a,0x90,0x93,0x9e,0xa6,0xa1,0x90,0x7b,0x57,0x53,0x76,0x83,
  0x83,0x82,0x70,0x65,0x6d,0x76,0x78,0x74,0x76,0x80,0x8b,0x91,0x98,0xa2,0xa3,0x9c,
  0x8e,0x72,0x53,0x5b,0x78,0x80,0x83,0x81,0x70,0x66,0x6d,0x76,0x7a,0x78,0x78,0x7f,
  0x8b,0x93,0x98,0xa5,0xa8,0x96,0x83,0x68,0x52,0x60,0x7d,0x85,0x84,0x7d,0x6d,0x67,
  0x6e,0x7a,0x7c,0x76,0x77,0x81,0x8b,0x92,0x9a,0xa9,0xa6,0x92,0x81,0x63,0x52,0x63,
  0x7f,0x85,0x83,0x7c,0x6d,0x69,0x70,0x78,0x78,0x76,0x79,0x84,0x91,0x96,0x9e,0xa8,
  0xa0,0x8b,0x7a,0x5f,0x56,0x6b,0x7f,0x84,0x80,0x76,0x6a,0x6b,0x77,0x7c,0x77,0x75,
  0x7f,0x89,0x90,0x9b,0xa8,0xa6,0x95,0x87,0x6d,0x54,0x5c,0x75,0x81,0x83,0x81,0x73,
  0x6c,0x70,0x77,0x77,0x74,0x78,0x84,0x90,0x95,0x9f,0xab,0xa4,0x8c,0x7e,0x61,0x50,
  0x63,0x7c,0x83,0x83,0x7e,0x71,0x6b,0x6f,0x77,0x77,0x73,0x7e,0x90,0x96,0x9c,0xa9,
  0xa6,0x90,0x7f,0x69,0x53,0x5c,0x79,0x85,0x83,0x7d,0x73,0x69,0x6d,0x78,0x79,0x73,
  0x7c,0x8d,0x93,0x98,0xa8,0xaa,0x97,0x84,0x74,0x59,0x53,0x6f,0x83,0x82,0x7f,0x7a,
  0x6f,0x6c,0x72,0x76,0x74,0x78,0x85,0x91,0x97,0xa1,0xab,0xa1,0x8b,0x7d,0x60,0x50,
  0x63,0x7e,0x85,0x80,0x7b,0x71,0x6a,0x71,0x76,0x74,0x77,0x85,0x91,0x94,0x9f,0xac,
  0xa5,0x90,0x80,0x64,0x50,0x5d,0x78,0x84,0x83,0x7f,0x74,0x6c,0x6c,0x70,0x74,0x77,
  0x81,0x8f,0x97,0x9e,0xaa,0xa7,0x92,0x80,0x6a,0x54,0x58,0x75,0x84,0x83,0x7e,0x74,
  0x6b,0x6b,0x71,0x75,0x77,0x80,0x8f,0x96,0x9b,0xa7,0xaa,0x97,0x86,0x70,0x56,0x53,
  0x70,0x83,0x82,0x7f,0x77,0x6c,0x66,0x6b,0x71,0x7a,0x86,0x90,0x96,0x9e,0xa8,0xa6,
  0x96,0x88,0x72,0x57,0x56,0x70,0x7f,0x7f,0x7f,0x79,0x6e,0x69,0x68,0x6e,0x78,0x84,
  0x8f,0x97,0x9e,0xa8,0xa8,0x99,0x8a,0x72,0x56,0x53,0x6d,0x7e,0x81,0x81,0x78,0x6c,
  0x63,0x66,0x70,0x7d,0x89,0x90,0x97,0x9e,0xa6,0xa6,0x98,0x8e,0x72,0x55,0x54,0x6b,
  0x7b,0x7f,0x80,0x78,0x6c,0x63,0x65,0x71,0x7f,0x8b,0x91,0x96,0xa0,0xa8,0xa4,0x97,
  0x90,0x73,0x53,0x52,0x69,0x79,0x7c,0x80,0x79,0x6d,0x66,0x68,0x72,0x80,0x8c,0x91,
  0x94,0x9f,0xaa,0xa6,0x9b,0x92,0x72,0x50,0x4d,0x65,0x78,0x7f,0x81,0x79,0x6d,0x69,
  0x6d,0x77,0x84,0x8d,0x8a,0x8c,0x9e,0xad,0xa3,0x89,0x77,0x6b,0x61,0x59,0x64,0x7c,
  0x89,0x82,0x75,0x74,0x74,0x72,0x74,0x82,0x8c,0x8c,0x8f,0xa0,0xab,0xa0,0x86,0x72,
  0x67,0x5f,0x5d,0x67,0x7b,0x88,0x84,0x77,0x72,0x72,0x74,0x79,0x81,0x88,0x8d,0x95,
  0xa2,0xa8,0x9c,0x87,0x71,0x63,0x5b,0x5d,0x6a,0x7c,0x87,0x83,0x79,0x74,0x72,0x72,
  0x77,0x83,0x8a,0x8f,0x97,0xa4,0xa7,0x99,0x82,0x6d,0x61,0x5c,0x5f,0x6c,0x7d,0x88,
  0x83,0x79,0x71,0x70,0x76,0x7d,0x83,0x88,0x91,0x9e,0xa9,0xa3,0x91,0x7c,0x6b,0x5e,
  0x59,0x5f,0x70,0x82,0x87,0x81,0x79,0x76,0x71,0x73,0x7b,0x85,0x8d,0x95,0xa1,0xa8,
  0xa3,0x90,0x77,0x62,0x59,0x5a,0x64,0x73,0x82,0x87,0x84,0x7b,0x71,0x70,0x77,0x80,
  0x85,0x88,0x94,0xa4,0xac,0xa3,0x8d,0x74,0x63,0x59,0x58,0x61,0x72,0x84,0x8a,0x85,
  0x7b,0x73,0x73,0x78,0x7e,0x83,0x8a,0x99,0xa7,0xaa,0x9d,0x87,0x70,0x61,0x58,0x57,
  0x62,0x74,0x85,0x8b,0x85,0x7a,0x73,0x75,0x7d,0x81,0x83,0x89,0x99,0xa9,0xad,0x9e,
  0x84,0x6c,0x5c,0x56,0x58,0x61,0x72,0x84,0x8c,0x8a,0x7f,0x75,0x74,0x7b,0x80,0x83,
  0x88,0x97,0xa7,0xad,0xa1,0x86,0x6b,0x5a,0x55,0x58,0x61,0x70,0x80,0x8c,0x8b,0x81,
  0x77,0x77,0x7c,0x81,0x84,0x8a,0x9a,0xa8,0xac,0x9d,0x81,0x67,0x58,0x55,0x5a,0x63,
  0x71,0x80,0x8a,0x8c,0x84,0x7b,0x78,0x7b,0x80,0x84,0x8a,0x96,0xa4,0xaa,0xa1,0x88,
  0x6b,0x57,0x52,0x57,0x62,0x6f,0x7c,0x86,0x8b,0x89,0x83,0x7d,0x7c,0x7d,0x81,0x89,
  0x95,0xa1,0xa6,0x9f,0x8b,0x72,0x5d,0x53,0x54,0x5d,0x6b,0x79,0x85,0x8c,0x8a,0x85,
  0x80,0x7d,0x7e,0x81,0x89,0x94,0x9f,0xa5,0x9e,0x8c,0x73,0x5e,0x54,0x54,0x5d,0x6a,
  0x77,0x82,0x89,0x8a,0x89,0x85,0x80,0x7e,0x7f,0x86,0x90,0x9a,0x9d,0x98,0x89,0x77,
  0x68,0x60,0x5f,0x64,0x6c,0x76,0x7f,0x86,0x89,0x87,0x84,0x81,0x7f,0x7f,0x83,0x8a,
  0x90,0x94,0x92,0x8a,0x7d,0x71,0x69,0x66,0x68,0x6e,0x75,0x7c,0x82,0x85,0x86,0x85,
  0x83,0x81,0x80,0x81,0x85,0x8a,0x8e,0x8e,0x89,0x80,0x77,0x70,0x6d,0x6d,0x71,0x75,
  0x7a,0x7f,0x83,0x84,0x85,0x83,0x81,0x80,0x80,0x82,0x86,0x89,0x8a,0x88,0x82,0x7b,
  0x75,0x71,0x71,0x73,0x76,0x7a,0x7d,0x80,0x82,0x83,0x83,0x82,0x80,0x7f,0x80,0x83,
  0x85,0x87,0x87,0x83,0x7e,0x78,0x75,0x74,0x75,0x77,0x7a,0x7d,0x7f,0x81,0x82,0x82,
  0x82,0x81,0x80,0x7f,0x80,0x82,0x84,0x85,0x84,0x81,0x7d,0x79,0x77,0x77,0x79,0x7b,
  0x7d,0x7e,0x7f,0x80,0x80,0x80,0x80,0x7f,0x7f,0x7f,0x7f,0x80,0x81,0x80,0x7f,0x7e,
  0x7d,0x7a,0x77,0x76,0x76,0x79,0x7f,0x83,0x85,0x85,0x84,0x82,0x80,0x7f,0x7e,0x7f,
  0x80,0x81,0x81,0x81,0x7f,0x7d,0x7b,0x78,0x75,0x74,0x76,0x7b,0x81,0x85,0x86,0x86,
  0x84,0x82,0x80,0x7e,0x7e,0x7e,0x80,0x81,0x81,0x81,0x7f,0x7d,0x7a,0x77,0x75,0x74,
  0x76,0x7b,0x81,0x85,0x87,0x87,0x85,0x83,0x81,0x7f,0x7e,0x7e,0x7f,0x80,0x81,0x81,
  0x7f,0x7c,0x79,0x77,0x75,0x74,0x76,0x7b,0x80,0x85,0x88,0x88,0x86,0x84,0x81,0x7f,
  0x7e,0x7e,0x7e,0x7f,0x80,0x80,0x7e,0x7c,0x79,0x76,0x74,0x74,0x77,0x7c,0x81,0x85,
  0x88,0x88,0x87,0x85,0x82,0x80,0x7e,0x7d,0x7e,0x7e,0x7f,0x80,0x7e,0x7c,0x79,0x76,
  0x74,0x75,0x77,0x7b,0x80,0x84,0x87,0x88,0x88,0x86,0x83,0x81,0x7f,0x7d,0x7d,0x7e,
  0x7f,0x7f,0x7e,0x7c,0x7a,0x77,0x75,0x74,0x76,0x79,0x7d,0x82,0x86,0x88,0x89,0x88,
  0x85,0x82,0x7f,0x7d,0x7d,0x7d,0x7e,0x7f,0x7f,0x7d,0x7a,0x78,0x76,0x75,0x75,0x78,
  0x7c,0x80,0x85,0x88,0x8a,0x89,0x87,0x83,0x80,0x7d,0x7c,0x7d,0x7e,0x7f,0x7f,0x7d,
  0x7b,0x78,0x75,0x74,0x74,0x76,0x7a,0x7f,0x84,0x88,0x8b,0x8b,0x89,0x85,0x81,0x7e,
  0x7c,0x7d,0x7e,0x7f,0x7f,0x7e,0x7b,0x78,0x76,0x74,0x74,0x75,0x78,0x7c,0x81,0x86,
  0x8a,0x8b,0x8a,0x87,0x83,0x7f,0x7d,0x7d,0x7e,0x7f,0x7f,0x7e,0x7c,0x7a,0x77,0x75,
  0x74,0x74,0x75,0x79,0x7d,0x83,0x88,0x8b,0x8c,0x8a,0x86,0x82,0x7e,0x7d,0x7d,0x7e,
  0x7f,0x7f,0x7e,0x7c,0x79,0x76,0x74,0x73,0x73,0x76,0x7a,0x7f,0x85,0x8a,0x8d,0x8c,
  0x89,0x85,0x80,0x7e,0x7d,0x7d,0x7f,0x80,0x80,0x7e,0x7b,0x78,0x74,0x72,0x71,0x73,
  0x76,0x7b,0x82,0x87,0x8b,0x8d,0x8c,0x88,0x84,0x80,0x7e,0x7d,0x7e,0x80,0x81,0x80,
  0x7e,0x7a,0x76,0x72,0x70,0x70,0x72,0x76,0x7c,0x82,0x88,0x8c,0x8e,0x8d,0x89,0x85,
  0x81,0x7e,0x7d,0x7e,0x7f,0x81,0x80,0x7e,0x7a,0x76,0x72,0x70,0x6f,0x71,0x76,0x7b,
  0x81,0x87,0x8c,0x8e,0x8d,0x8a,0x86,0x81,0x7e,0x7d,0x7d,0x7f,0x81,0x80,0x7e,0x7a,
  0x75,0x71,0x6f,0x6f,0x71,0x76,0x7b,0x81,0x87,0x8c,0x8e,0x8e,0x8b,0x87,0x82,0x7e,
  0x7d,0x7d,0x7f,0x81,0x81,0x7f,0x7b,0x76,0x71,0x6e,0x6e,0x6f,0x73,0x79,0x7f,0x86,
  0x8c,0x8f,0x90,0x8d,0x89,0x84,0x7f,0x7d,0x7d,0x7f,0x82,0x83,0x81,0x7d,0x77,0x72,
  0x6d,0x6b,0x6b,0x6f,0x75,0x7c,0x84,0x8b,0x90,0x92,0x90,0x8c,0x86,0x80,0x7c,0x7c,
  0x7e,0x81,0x84,0x83,0x80,0x7a,0x74,0x6f,0x6b,0x6a,0x6c,0x71,0x78,0x80,0x88,0x8e,
  0x92,0x93,0x8f,0x8a,0x83,0x7e,0x7b,0x7c,0x7f,0x83,0x85,0x84,0x7f,0x79,0x72,0x6c,
  0x69,0x68,0x6a,0x70,0x78,0x82,0x8b,0x92,0x95,0x94,0x8f,0x87,0x81,0x7c,0x7b,0x7d,
  0x80,0x84,0x86,0x84,0x80,0x79,0x71,0x69,0x64,0x63,0x68,0x70,0x7c,0x87,0x91,0x96,
  0x97,0x93,0x8d,0x85,0x7f,0x7b,0x7b,0x7d,0x81,0x85,0x87,0x86,0x81,0x79,0x6f,0x67,
  0x61,0x60,0x64,0x6f,0x7c,0x8a,0x94,0x99,0x98,0x93,0x8c,0x85,0x7f,0x7b,0x79,0x7b,
  0x80,0x85,0x88,0x88,0x83,0x7a,0x6f,0x65,0x5e,0x5d,0x63,0x6e,0x7d,0x8c,0x97,0x9c,
  0x9b,0x96,0x8e,0x85,0x7e,0x79,0x78,0x7b,0x81,0x87,0x8a,0x89,0x84,0x7a,0x6f,0x64,
  0x5c,0x5a,0x5e,0x69,0x79,0x8a,0x98,0x9f,0x9f,0x99,0x8f,0x85,0x7d,0x77,0x75,0x77,
  0x7e,0x86,0x8c,0x8d,0x8a,0x82,0x75,0x68,0x5e,0x5a,0x5d,0x66,0x73,0x83,0x94,0xa1,
  0xa6,0xa2,0x96,0x86,0x79,0x72,0x71,0x74,0x79,0x80,0x88,0x8e,0x8f,0x88,0x7b,0x6b,
  0x5e,0x59,0x5b,0x63,0x6d,0x7b,0x8d,0x9f,0xab,0xab,0x9e,0x8b,0x7a,0x71,0x70,0x72,
  0x76,0x7b,0x83,0x8d,0x92,0x90,0x84,0x71,0x5f,0x55,0x55,0x5b,0x63,0x71,0x86,0xa0,
  0xb3,0xb6,0xa8,0x90,0x7c,0x72,0x71,0x71,0x71,0x73,0x7c,0x8b,0x98,0x9a,0x8d,0x78,
  0x63,0x57,0x53,0x54,0x58,0x61,0x75,0x93,0xb2,0xc0,0xb7,0x9e,0x85,0x77,0x72,0x70,
  0x6c,0x6b,0x74,0x86,0x99,0x9e,0x93,0x7e,0x6a,0x5d,0x56,0x51,0x4f,0x53,0x68,0x8c,
  0xb1,0xc3,0xbd,0xa5,0x8d,0x80,0x79,0x72,0x69,0x65,0x6e,0x82,0x96,0x9d,0x95,0x86,
  0x76,0x68,0x5b,0x50,0x49,0x4c,0x5b,0x79,0x9f,0xbc,0xc3,0xb4,0x9d,0x88,0x7c,0x73,
  0x69,0x64,0x6b,0x7d,0x92,0x9d,0x9a,0x8d,0x7f,0x6f,0x5f,0x50,0x49,0x4b,0x55,0x69,
  0x87,0xa9,0xbf,0xbe,0xa9,0x90,0x80,0x78,0x72,0x6b,0x69,0x74,0x88,0x98,0x9b,0x91,
  0x85,0x7a,0x6c,0x5b,0x4d,0x4b,0x52,0x5e,0x6f,0x8c,0xad,0xbf,0xb8,0x9f,0x89,0x7f,
  0x7b,0x72,0x69,0x6b,0x7d,0x91,0x9a,0x94,0x8b,0x82,0x78,0x66,0x53,0x4b,0x51,0x5b,
  0x63,0x74,0x93,0xb4,0xbe,0xae,0x94,0x85,0x80,0x7b,0x6e,0x68,0x73,0x88,0x95,0x94,
  0x8d,0x89,0x84,0x77,0x60,0x4f,0x4e,0x57,0x5d,0x60,0x74,0x9a,0xba,0xbc,0xa5,0x8f,
  0x89,0x84,0x76,0x67,0x68,0x7a,0x8d,0x92,0x91,0x90,0x8f,0x84,0x6f,0x5b,0x55,0x57,
  0x58,0x58,0x5f,0x7b,0x9f,0xb3,0xb0,0xa1,0x96,0x8e,0x81,0x71,0x6a,0x71,0x7f,0x88,
  0x8b,0x8f,0x93,0x8e,0x81,0x70,0x62,0x5a,0x55,0x54,0x57,0x60,0x77,0x97,0xb0,0xb4,
  0xa8,0x98,0x8c,0x81,0x73,0x6b,0x6e,0x79,0x85,0x8e,0x93,0x94,0x8e,0x82,0x73,0x65,
  0x5a,0x54,0x54,0x59,0x61,0x71,0x90,0xab,0xb5,0xa9,0x98,0x8c,0x83,0x77,0x6d,0x6e,
  0x79,0x85,0x8d,0x90,0x92,0x90,0x86,0x77,0x68,0x5d,0x58,0x57,0x5a,0x5e,0x67,0x82,
  0xa1,0xb4,0xae,0x9e,0x91,0x88,0x7c,0x70,0x6d,0x74,0x7f,0x88,0x8f,0x93,0x94,0x8c,
  0x7e,0x70,0x65,0x5b,0x55,0x57,0x5d,0x64,0x70,0x8c,0xa8,0xb3,0xa7,0x97,0x8c,0x84,
  0x77,0x6d,0x6f,0x7a,0x85,0x8b,0x90,0x93,0x92,0x87,0x79,0x6c,0x61,0x5b,0x57,0x5a,
  0x60,0x65,0x74,0x93,0xac,0xb0,0xa2,0x94,0x8b,0x82,0x75,0x6d,0x72,0x7c,0x85,0x8b,
  0x91,0x95,0x90,0x84,0x78,0x6d,0x61,0x58,0x54,0x5b,0x64,0x67,0x75,0x96,0xb0,0xb1,
  0x9f,0x91,0x8a,0x81,0x72,0x6c,0x74,0x80,0x89,0x8c,0x90,0x94,0x90,0x82,0x74,0x6c,
  0x62,0x5a,0x57,0x5e,0x64,0x65,0x73,0x95,0xaf,0xaf,0x9e,0x92,0x8c,0x81,0x72,0x6c,
  0x75,0x80,0x85,0x8a,0x94,0x99,0x90,0x80,0x76,0x6f,0x62,0x58,0x58,0x62,0x67,0x64,
  0x6d,0x8f,0xab,0xab,0x9c,0x93,0x8f,0x82,0x72,0x6e,0x78,0x81,0x83,0x8a,0x94,0x97,
  0x8d,0x81,0x79,0x72,0x64,0x5a,0x5b,0x63,0x67,0x62,0x68,0x88,0xa5,0xaa,0x9f,0x96,
  0x91,0x84,0x74,0x6f,0x77,0x7f,0x81,0x89,0x95,0x99,0x8d,0x81,0x7c,0x76,0x68,0x5b,
  0x5d,0x65,0x69,0x64,0x65,0x79,0x97,0xa4,0xa0,0x99,0x93,0x8a,0x7b,0x73,0x75,0x7c,
  0x80,0x85,0x8e,0x96,0x93,0x89,0x80,0x7b,0x73,0x66,0x5e,0x61,0x66,0x65,0x63,0x68,
  0x7d,0x99,0xa4,0xa2,0x98,0x90,0x83,0x77,0x73,0x77,0x7f,0x84,0x8a,0x93,0x97,0x8f,
  0x83,0x7d,0x77,0x6e,0x62,0x60,0x65,0x68,0x65,0x61,0x6b,0x87,0x9f,0xa5,0x9e,0x96,
  0x8c,0x7e,0x74,0x74,0x7a,0x80,0x85,0x8c,0x94,0x96,0x8d,0x83,0x7c,0x75,0x6c,0x63,
  0x63,0x67,0x67,0x63,0x64,0x6b,0x86,0x9f,0xa6,0x9f,0x92,0x8a,0x7e,0x75,0x74,0x7b,
  0x83,0x87,0x8e,0x94,0x95,0x8c,0x81,0x7b,0x76,0x6e,0x65,0x65,0x66,0x66,0x65,0x62,
  0x67,0x82,0x9f,0xa7,0x9f,0x93,0x8a,0x7f,0x74,0x73,0x7a,0x83,0x89,0x8d,0x93,0x95,
  0x8e,0x83,0x7b,0x77,0x73,0x6c,0x67,0x67,0x65,0x65,0x62,0x60,0x6f,0x93,0xa9,0xa6,
  0x99,0x8f,0x85,0x77,0x6f,0x76,0x81,0x88,0x8b,0x91,0x95,0x92,0x88,0x7e,0x79,0x75,
  0x71,0x6b,0x69,0x68,0x63,0x61,0x61,0x64,0x7b,0x9b,0xaa,0xa4,0x93,0x89,0x7f,0x73,
  0x71,0x7a,0x87,0x8c,0x8e,0x92,0x94,0x8f,0x83,0x7c,0x78,0x75,0x71,0x6b,0x68,0x64,
  0x60,0x61,0x61,0x68,0x85,0xa3,0xab,0x9e,0x8e,0x85,0x7a,0x70,0x74,0x81,0x8c,0x8e,
  0x8f,0x91,0x92,0x8b,0x80,0x7b,0x78,0x76,0x72,0x6b,0x67,0x63,0x60,0x5d,0x60,0x6b,
  0x8b,0xa7,0xa9,0x9c,0x8c,0x83,0x77,0x70,0x76,0x84,0x8e,0x8f,0x90,0x91,0x8e,0x88,
  0x7f,0x7b,0x79,0x77,0x76,0x70,0x67,0x62,0x5d,0x5e,0x61,0x68,0x83,0xa4,0xad,0x9f,
  0x8c,0x83,0x79,0x71,0x75,0x83,0x8f,0x90,0x8f,0x8f,0x8f,0x89,0x80,0x7b,0x7a,0x79,
  0x76,0x71,0x68,0x63,0x60,0x5f,0x61,0x64,0x74,0x96,0xac,0xa6,0x94,0x86,0x7d,0x74,
  0x72,0x7e,0x8d,0x92,0x90,0x8f,0x8e,0x8a,0x84,0x7f,0x7b,0x79,0x77,0x76,0x6f,0x64,
  0x5f,0x5f,0x62,0x63,0x69,0x7f,0xa0,0xaa,0x9e,0x8c,0x83,0x7b,0x74,0x78,0x85,0x91,
  0x91,0x8e,0x8d,0x8b,0x87,0x81,0x7e,0x7b,0x79,0x77,0x77,0x6e,0x63,0x5e,0x61,0x64,
  0x65,0x6b,0x80,0x9f,0xa9,0x9e,0x8b,0x83,0x7c,0x77,0x7b,0x86,0x91,0x91,0x8c,0x8b,
  0x8a,0x85,0x80,0x7d,0x7b,0x7a,0x79,0x78,0x70,0x64,0x60,0x60,0x63,0x65,0x6c,0x7a,
  0x98,0xa7,0xa2,0x90,0x83,0x7d,0x79,0x7b,0x83,0x8e,0x91,0x8d,0x89,0x88,0x85,0x81,
  0x7e,0x7c,0x7b,0x7a,0x79,0x74,0x69,0x62,0x60,0x64,0x67,0x6a,0x71,0x88,0xa3,0xa7,
  0x98,0x86,0x80,0x7c,0x7a,0x7d,0x89,0x90,0x8f,0x87,0x87,0x87,0x83,0x7e,0x7d,0x7c,
  0x7a,0x79,0x77,0x71,0x67,0x62,0x63,0x68,0x6a,0x6c,0x76,0x94,0xa8,0xa4,0x8e,0x83,
  0x7e,0x7d,0x7b,0x81,0x8b,0x90,0x8a,0x87,0x86,0x85,0x80,0x7e,0x7d,0x7c,0x79,0x79,
  0x77,0x71,0x67,0x62,0x64,0x6a,0x6c,0x6e,0x7c,0x98,0xa7,0xa0,0x8b,0x80,0x7d,0x7c,
  0x7b,0x82,0x8b,0x8f,0x8b,0x86,0x84,0x83,0x7e,0x7c,0x7d,0x7e,0x7b,0x7a,0x79,0x74,
  0x67,0x60,0x62,0x6b,0x6e,0x70,0x7b,0x96,0xa7,0xa1,0x8b,0x7e,0x7c,0x7e,0x7d,0x81,
  0x89,0x8f,0x8c,0x86,0x82,0x81,0x7e,0x7d,0x7e,0x7e,0x7c,0x7a,0x79,0x74,0x6a,0x62,
  0x62,0x69,0x6d,0x70,0x78,0x92,0xa5,0xa3,0x8f,0x7f,0x7b,0x7e,0x7e,0x80,0x87,0x8e,
  0x8d,0x87,0x82,0x81,0x7f,0x7c,0x7d,0x7f,0x7f,0x7d,0x7a,0x76,0x6d,0x63,0x61,0x67,
  0x6c,0x6f,0x72,0x87,0xa0,0xa9,0x97,0x83,0x79,0x7d,0x7e,0x7f,0x83,0x8c,0x8f,0x8b,
  0x83,0x80,0x7f,0x7e,0x7d,0x7e,0x7f,0x7e,0x7c,0x78,0x72,0x68,0x62,0x63,0x68,0x6d,
  0x72,0x7c,0x93,0xa5,0xa3,0x8f,0x7c,0x79,0x7d,0x81,0x81,0x86,0x8c,0x8e,0x87,0x81,
  0x7f,0x7f,0x7d,0x7d,0x80,0x81,0x7f,0x7a,0x76,0x70,0x67,0x61,0x65,0x6b,0x70,0x71,
  0x7c,0x93,0xa7,0xa1,0x8c,0x7a,0x7a,0x80,0x82,0x81,0x86,0x8c,0x8d,0x86,0x7f,0x7d,
  0x7e,0x7e,0x7e,0x81,0x81,0x7f,0x7b,0x77,0x71,0x67,0x61,0x63,0x6b,0x71,0x73,0x7a,
  0x90,0xa5,0xa5,0x90,0x7a,0x76,0x7e,0x85,0x84,0x84,0x89,0x8d,0x88,0x7f,0x7a,0x7c,
  0x7f,0x80,0x81,0x82,0x80,0x7d,0x78,0x73,0x6a,0x64,0x62,0x68,0x6f,0x73,0x77,0x8a,
  0xa0,0xa7,0x96,0x7f,0x77,0x7d,0x84,0x83,0x82,0x85,0x8b,0x89,0x81,0x7a,0x7a,0x7e,
  0x80,0x81,0x82,0x83,0x7f,0x7a,0x74,0x6f,0x68,0x64,0x67,0x6c,0x73,0x74,0x7f,0x92,
  0xa5,0xa1,0x8d,0x79,0x77,0x7f,0x84,0x83,0x81,0x86,0x8a,0x87,0x7e,0x79,0x7b,0x7f,
  0x81,0x81,0x83,0x83,0x80,0x7a,0x73,0x6e,0x69,0x66,0x68,0x6d,0x73,0x75,0x82,0x95,
  0xa3,0x9e,0x8a,0x79,0x77,0x80,0x84,0x82,0x80,0x84,0x88,0x86,0x7f,0x79,0x7c,0x80,
  0x81,0x80,0x81,0x83,0x81,0x7c,0x75,0x71,0x6b,0x67,0x67,0x6c,0x72,0x75,0x7e,0x8e,
  0xa1,0xa2,0x91,0x7b,0x74,0x7b,0x82,0x83,0x7f,0x81,0x87,0x89,0x83,0x7c,0x7a,0x7d,
  0x81,0x80,0x80,0x82,0x84,0x81,0x7a,0x73,0x6d,0x69,0x68,0x6b,0x70,0x75,0x79,0x85,
  0x96,0x9f,0x9a,0x88,0x79,0x76,0x7d,0x82,0x81,0x80,0x82,0x86,0x86,0x82,0x7d,0x7b,
  0x7e,0x80,0x81,0x82,0x83,0x81,0x7d,0x78,0x73,0x6c,0x69,0x68,0x6e,0x73,0x76,0x7c,
  0x89,0x9b,0xa0,0x95,0x81,0x75,0x76,0x7d,0x82,0x81,0x80,0x83,0x87,0x87,0x82,0x7c,
  0x7a,0x7d,0x80,0x81,0x81,0x82,0x83,0x7f,0x7a,0x73,0x6e,0x6c,0x6d,0x6f,0x72,0x74,
  0x77,0x81,0x93,0x9d,0x9a,0x8b,0x7b,0x75,0x79,0x7f,0x80,0x7f,0x81,0x84,0x87,0x86,
  0x82,0x7d,0x7b,0x7d,0x7e,0x80,0x81,0x83,0x83,0x7f,0x79,0x73,0x70,0x6e,0x6e,0x6f,
  0x71,0x74,0x7b,0x85,0x93,0x9a,0x95,0x88,0x7b,0x77,0x79,0x7e,0x80,0x80,0x83,0x85,
  0x87,0x85,0x81,0x7d,0x7b,0x7d,0x7e,0x7f,0x82,0x83,0x82,0x7e,0x78,0x73,0x6f,0x6e,
  0x6e,0x70,0x71,0x73,0x7c,0x89,0x97,0x9d,0x94,0x85,0x78,0x75,0x79,0x7e,0x81,0x81,
  0x83,0x86,0x87,0x87,0x82,0x7d,0x7a,0x7b,0x7d,0x7f,0x83,0x84,0x82,0x7d,0x77,0x73,
  0x6f,0x6d,0x6c,0x6d,0x6f,0x74,0x7f,0x90,0x9b,0x9c,0x91,0x81,0x77,0x75,0x7b,0x7f,
  0x80,0x81,0x82,0x86,0x88,0x86,0x81,0x7c,0x7a,0x7a,0x7c,0x7e,0x81,0x84,0x84,0x81,
  0x7c,0x76,0x72,0x71,0x6e,0x6d,0x6d,0x6f,0x76,0x82,0x92,0x9c,0x99,0x8e,0x80,0x78,
  0x78,0x7b,0x7d,0x7d,0x7f,0x82,0x87,0x89,0x86,0x80,0x7b,0x78,0x7a,0x7c,0x7f,0x82,
  0x83,0x82,0x7e,0x7a,0x76,0x70,0x6b,0x69,0x6a,0x6f,0x79,0x86,0x95,0x9d,0x9a,0x8e,
  0x80,0x78,0x76,0x78,0x7b,0x7c,0x7f,0x84,0x88,0x8a,0x87,0x80,0x7b,0x77,0x78,0x7a,
  0x7d,0x82,0x85,0x85,0x82,0x7c,0x76,0x71,0x6c,0x69,0x69,0x6d,0x76,0x83,0x93,0x9d,
  0x9b,0x91,0x84,0x7b,0x78,0x77,0x77,0x78,0x7c,0x83,0x89,0x8b,0x88,0x82,0x7d,0x79,
  0x78,0x79,0x7b,0x7f,0x83,0x83,0x82,0x7f,0x7a,0x74,0x6d,0x69,0x69,0x6d,0x75,0x81,
  0x8f,0x99,0x9a,0x93,0x89,0x81,0x7b,0x77,0x75,0x75,0x79,0x80,0x87,0x8a,0x89,0x86,
  0x81,0x7d,0x79,0x77,0x78,0x7b,0x7e,0x80,0x80,0x7f,0x7a,0x73,0x6d,0x6b,0x6c,0x73,
  0x7d,0x89,0x93,0x96,0x94,0x8f,0x88,0x81,0x7a,0x74,0x73,0x75,0x7c,0x82,0x86,0x88,
  0x87,0x86,0x82,0x7d,0x79,0x78,0x78,0x7a,0x7d,0x7e,0x7f,0x7c,0x77,0x73,0x71,0x70,
  0x72,0x78,0x81,0x8a,0x90,0x91,0x90,0x8e,0x89,0x83,0x7c,0x77,0x75,0x77,0x7a,0x7e,
  0x81,0x84,0x86,0x86,0x83,0x80,0x7d,0x7a,0x78,0x76,0x74,0x72,0x71,0x72,0x74,0x77,
  0x7b,0x82,0x88,0x8b,0x8d,0x8d,0x8c,0x8a,0x86,0x80,0x7c,0x7a,0x7a,0x7a,0x7b,0x7c,
  0x7e,0x7f,0x80,0x80,0x80,0x80,0x7f,0x7e,0x7d,0x7c,0x7c,0x7a,0x7a,0x79,0x7a,0x7a,
  0x7a,0x7a,0x7c,0x7e,0x80,0x82,0x84,0x85,0x86,0x86,0x85,0x83,0x82,0x81,0x7f,0x7e,
  0x7d,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e,0x7e,0x7d,0x7b,0x7a,0x79,0x77,0x77,0x77,0x79,
  0x7b,0x7d,0x7f,0x82,0x84,0x86,0x86,0x86,0x86,0x85,0x84,0x83,0x81,0x80,0x7f,0x7e,
  0x7d,0x7c,0x7c,0x7c,0x7c,0x7d,0x7d,0x7d,0x7d,0x7d,0x7c,0x7b,0x7a,0x79,0x79,0x79,
  0x7a,0x7c,0x7e,0x80,0x82,0x84,0x85,0x85,0x85,0x84,0x83,0x82,0x81,0x81,0x80,0x7f,
  0x7e,0x7e,0x7d,0x7d,0x7d,0x7c,0x7c,0x7c,0x7c,0x7b,0x7b,0x7b,0x7a,0x7a,0x7b,0x7b,
  0x7c,0x7d,0x7f,0x80,0x82,0x83,0x84,0x85,0x85,0x85,0x84,0x83,0x82,0x81,0x80,0x7e,
  0x7d,0x7c,0x7b,0x7b,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7b,0x7c,0x7c,0x7d,0x7e,0x7f,
  0x80,0x81,0x81,0x82,0x83,0x83,0x83,0x83,0x83,0x83,0x82,0x81,0x80,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7e,0x7f,0x7e,
  0x7e,0x7e,0x7f,0x7f,0x7e,0x7e,0x7e,0x7f,0x7e,0x7f,0x7f,0x7f,0x7f,0x7e,0x7f,0x7f,
  0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7e,0x7f,0x7f,0x7e,0x7f,0x7f,0x7e,0x7e,0x7e,
  0x7e,0x7f,0x7e,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7e,0x7e,0x7f,0x7f,0x7f,0x7e,0x7f,
  0x7f,0x7e,0x7f,0x7e,0x7e,0x7e,0x7e,0x7f,0x7e,0x7f,0x7f,0x7f,0x7f,0x7e,0x7e,0x7e,
  0x7e,0x7e,0x7e,0x7e,0x7e,0x7f,0x7e,0x7f,0x7e,0x7f,0x7e,0x7f,0x7f,0x7f,0x7f,0x7e,
  0x7f,0x7e,0x7e,0x7f,0x7f,0x7f,0x7f,0xd2,0xe4,0xae,0xec,0xac,0xe2,0xc2,0xab,0x87,
  0xd6,0xd1,0x7f,0x7f
};

unsigned int tablesize = 5956;
unsigned int sp; // sound pointer
unsigned int pp;

void setup() {
  pinMode(3,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);

  pinMode(8,INPUT_PULLUP);

  TCCR2A = 0xF3;
  TCCR2B = 0x01;
  OCR2A = 127;
  OCR2B = 127;

  TCCR1A = 0x00;
  TCCR1B = 0x09;
  TCCR1C = 0x00;
  TCNT1  = 0;
  OCR1A  = CPU_FREQ / SAMPLE_RATE;
  TIMSK1 = 0x02;
  sei();

  pp = 0;
}

void loop() {
  if( digitalRead(8) == LOW ){
    sp = 0;
    pp = 1;
  }
}

ISR(TIMER1_COMPA_vect){
  OCR2A = pgm_read_byte_near(table+sp);
  OCR2B = 127;

  sp = sp + pp;
  if(sp == tablesize){
    pp = 0;
    sp = 0;
  }
}

多分サイン波がなるやつ

サンプルレート22kで、440Hzのサイン波が鳴るというもの。
処理が遅いのでこれくらいがいいとこなのね。
一応頑張ればLFO * 3、OSC * 3、くらいは出来るんだけど、無理しないのが一番。
これもピンアウトが怪しい。でも動くはず。

#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <math.h>
#include <avr/io.h>

#define CPU_FREQ 16000000L
#define SAMPLE_RATE 22050
#define FREQ 440
#define SAMPLE_SIZE 50

int sp;
uint8_t table[SAMPLE_SIZE];

void setup() {
  pinMode(3,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);

  float phase = PI*2 / SAMPLE_RATE * FREQ;
  float np;
  for(int i=0; i<SAMPLE_SIZE; i++){
    table[i] = int(sin( np + PI/180)*127 ) + 127;
    np += phase;
  }

  TCCR2A = 0xF3;
  TCCR2B = 0x01;
  OCR2A = 127;
  OCR2B = 127;

  TCCR1A = 0x00;
  TCCR1B = 0x09;
  TCCR1C = 0x00;
  TCNT1  = 0;
  OCR1A  = CPU_FREQ / SAMPLE_RATE;
  TIMSK1 = 0x02;
  sei();

  sp = 0;
}

void loop() {
}

ISR(TIMER1_COMPA_vect){
  OCR2A = table[sp];

  sp += 1;
  if(sp==SAMPLE_SIZE){
    sp = 0;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment