MusikSack

layout-blueprint_v2.svg

Abstract

A Single-board computer with a micro-controller for processing Analog and Digital inputs, designed for music production, computer graphics, and other open-source projects.

Design

  • Single-board computer (Raspberry Pi, Orange Pi, …)

  • Audio Card

    • Display
    • Micro-controller (Arduino, Teensy, ESP32, …)
      • Analog Inputs
      • Digital Inputs
  • USB (female ports)

  • Power Source ~5V (Battery, direct connection with transformer)

musicsackconcept.png

Circuit Desing for Micro-controller Analog & Digital Inputs

musiksackschematic.png

Single-board Computer Software

For processing every Input and Output (I/O) several drivers and software have to be prepared and loaded into the computer. I will start with the process of recieveing data from the micro-controller (Arduino) via the Serial port at a fast baud rate.

Reading and Writing to Serial Port

Or maybe using Boost library?

Boost

OpenCL

Open Computing Language, cross-platform, parallel programming.

Juce

Multi-platform audio application framework.

Code

//reading analog inputs from motors as rotary encoder

//2 tiny motor helicopter & 2 yellow plates motor & motor no plate
Serial.println(map(analogRead(A0), 510, 520, 0, 4));

//solar motor also yellow plate
Serial.println(map(analogRead(A0), 510, 520, -1, 4));
use std::time::Duration;

fn main() {
    println!("Serial Reader");
    let baud_rate = 9600;
    //let ports = serialport::available_ports().expect("No ports found!");
    let mut port = serialport::new("/dev/ttyUSB0", baud_rate)
        .timeout(Duration::from_millis(10))
        .open().expect("Failed to open port");
    loop {
        let mut serial_buf: Vec<u8> = vec![0; 32];
        if let Ok(_ret) = port.read(serial_buf.as_mut_slice()) {
            for i in serial_buf {
                println!("{}", i);
            }
        }
    }
}