[ stack overflow ] [ arrays ] [ alloc ]
förstod äntligen varför min optimisering i granulator-libbet och andra strukter som använder långa buffrar för inspelade samples, har krashat när jag försökt bygga de senaste 2 månaderna.
use crate::{ | |
Arc, Mutex, MidiOutputConnection, | |
util::logging::err_send_log, | |
}; | |
use std::marker::PhantomData; | |
const NRPN_MSB: u8 = 0x63; | |
const NRPN_LSB: u8 = 0x62; | |
const NRPN_DATA1: u8 = 0x06; |
#include <cstdio> | |
#include <cstring> | |
#include <iostream> | |
#include "../portaudio/include/portaudio.h" | |
#include "../dsp/dsp.h" | |
#include "../dsp/interpolation.hpp" | |
#include "../dsp/wavetable.hpp" | |
#include "../dsp/waveshape.h" | |
~vals = ( | |
dur: 2.55*(([[3.55*0.5, 3.55].dup(9).flat, [3.55].dup(9).flat, | |
[1.76].dup(20).flat].permute(4).flat) ++ [17.5]), | |
freq: [50].dup(4).flat ++ [100] ++ [75].dup(2).flat, // freq: [120].dup(16).flat ++ [100].dup(16).flat, | |
bs: 4, | |
fb: 1.8, | |
ev: [0, 0.75, 0.2, 0], | |
// et: #[0.01, 0.01, 0.01], | |
et: [2.51, 4.01, 5.01], | |
ec: [4, 0.4, -5], |
#include <utility> | |
#ifndef DEBUG | |
#define D(x) | |
#else | |
#include <assert.h> | |
#define D(x) x | |
#endif | |
namespace dspheaders { | |
class Wavetable { |
/* | |
5-Limit Just Intonation | |
*/ | |
f = 261.0; // Stora C | |
// Förhållanden nedan representerar alla halvtoner på en oktav. Vi multiplicerar |