Skip to content

Instantly share code, notes, and snippets.

View bolero-MURAKAMI's full-sized avatar

Bolero MURAKAMI bolero-MURAKAMI

View GitHub Profile
#define SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION
#include <iostream>
#include <sprout/string.hpp>
#include <sprout/weed.hpp>
int main() {
using sprout::weed::hex8f; // matching a 8-bit hex
using sprout::weed::repeat; // repeat directive
Debug.console.visible = true;
Debug.controller.visible = true;
// スクリプトのロード
Scripts.execStorage("ktl/Network.tjs");
// サーバクラス
// 指定ポートを常に監視し、受信したメッセージをコンソールに出力する
#ifndef APP_WAVE_IO_HPP
#define APP_WAVE_IO_HPP
#include <cstddef>
#include <cstdint>
#include <climits>
#include <string>
#include <algorithm>
#include <iostream>
#include <fstream>
// サンプル数 : デフォルト = 44100
#ifndef CMP_SAMPLE
# define CMP_SAMPLE 44100
#endif
// 長さ[sec] : デフォルト = 1
#ifndef CMP_LENGTH
# define CMP_LENGTH 1
#endif
// サンプル数 : デフォルト = 44100
#ifndef CMP_SAMPLE
# define CMP_SAMPLE 44100
#endif
// 1音の長さ[sec] : デフォルト = 1
#ifndef CMP_LENGTH
# define CMP_LENGTH 1
#endif
// サンプル数 : デフォルト = 44100
#ifndef CMP_SAMPLE
# define CMP_SAMPLE 44100
#endif
// 長さ[sec] : デフォルト = 1
#ifndef CMP_LENGTH
# define CMP_LENGTH 1
#endif
// サンプル数 : デフォルト = 44100
#ifndef CMP_SAMPLE
# define CMP_SAMPLE 44100
#endif
// 長さの基準[sec] : デフォルト = 1
#ifndef CMP_LENGTH
# define CMP_LENGTH 1
#endif
// 入力ファイル名 : デフォルト = input.wav.hpp
#ifndef CMP_FILENAME
# define CMP_FILENAME input.wav.hpp
#endif
#include <sprout/compost.hpp>
#include <sprout/array.hpp>
#include <sprout/preprocessor.hpp>
#include "wave_io.hpp"
#if defined(COMPOST_LOADING_SOURCE_VERSION)
COMPOST_SRC_VERSION(0)
#elif defined(COMPOST_LOADING_SOURCE_INFO)
1,
1,
44100,
88200,
#include <climits>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <string>
#include <iterator>
#include <type_traits>
#include <iostream>
#include <fstream>