RawPCM
RawPCM
is a Modulation
constructed from raw pcm file.
use autd3::prelude::*;
use autd3_modulation_audio_file::RawPCM;
#[allow(unused_variables)]
fn main() -> Result<(), Box<dyn std::error::Error>> {
let path = "path/to/foo.dat";
let m = RawPCM::new(&path, 4000 * Hz);
Ok(())
}
#include<autd3.hpp>
#include "autd3/modulation/audio_file.hpp"
int main() {
const auto path = "path/to/foo.fat";
const auto m = autd3::modulation::audio_file::RawPCM(path, 4000u * autd3::Hz);
return 0; }
using AUTD3Sharp.Modulation.AudioFile;
using static AUTD3Sharp.Units;
var path = "path/to/foo.dat";
var m = new RawPCM(path, 4000 * Hz);
import pathlib
from pyautd3 import Hz
from pyautd3.modulation.audio_file import RawPCM
path = pathlib.Path("path/to/foo.dat")
m = RawPCM(path, 4000 * Hz)
You need to specify the sampling frequency of this data as the second argument of the constructor.
NOTE:
RawPCM
resamples raw pcm file data to the sampling frequency of Modulation. Please refer to Modulation for the setting and constraints of the sampling frequency ofModulation
.