Git Product home page Git Product logo

esp8266-synth's Introduction

Connecting the DAC via I2S

I2S needs 3 lines:

  • bit clock BCK or BCLK (officially "serial clock SCK")
  • word select WS or LRCLK for it selects if data is for left or right
  • serial data SD (multiplexed left right data)
    • data can be in different formats I2S, Philips, left/right justified

The ESP8266 and Wemos D1 mini board pins are

I2S ESP8266 Wemos D1 Mini
BCK 15 D8
WS 2 D4
SD 3 RX

This has two major impacts.

  1. Don't do anything (setMode, digitalWrite) with the LED as it is connect to pin 2.
  2. RX0 is used as SD line and cannot be used to receive UART. Together with the fact that the second UART can only transmit, you cannot receive UART data. At least not via the hardware UARTs. TODO Maybe software uart works

PCM510x (purple shield)

See this excellent stackoverflow answer

I2S lines are labeled as:

I2S PCM510x
BCK BCK
WS LCK
SD DIN

Furthermore you need to connect GND to ground and VIN to 3.3 V (maybe 5V work to). And, important, connect the master clock (labeled SCK but not the serial clock mentioned earlier) to ground before powering the DAC. This signals the PCM510x that it needs to generate its own master clock.

Connection overview

PCM510x ESP8266
SCK GND
BCK D8
DIN RX
LCK D4
GND GND
VIN 3.3V

esp8266-synth's People

Contributors

krenzlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

esp8266-synth's Issues

abstract DAC object

hide away I2S implementation in DAC object

goal is to have common way to output the audio (send to i2s, write to file, play, ...) and have (most) of the platform specific implementation hidden

randomize pattern / vol

  • randomize vol
  • if note is played -> leave out or add
    • randomize density
  • make it adjustable no -> 100% (?) random

euclidean single poti

  • fixed length
  • poti controls no. beats
  • bd, sn, hh have different mutipliers for no. beats
  • sn has fixed rotation

Add microtiming

deviate from strict midi clock to allow dragging and pushing drums

Split tests for clock cycle

Instead of testing callbacks by ticking clock
test that ticking advances pulses and in another test
only pulse and check the callbacks

noise burst on one pattern and higher bpm

pattern {26}
bpm {130}

on two-and of second bar is a cracking noise
not for lower bpm, e.g. 120, so it seems to be a performance issue.

  • replicate using a simpler pattern
  • profile calls
  • ???
  • profit

UI object

allows to add callbacks to ui events (poti change, button press)

signed 16 vs uint16

why not use int16 and just cast to uint16 when sending to i2s

could get rid of 0x7FFF being zero and dsp::volume calculation

make generic PCB

  • 2x MIDI (in/out)
  • 2x stereo audio (in/out)
    • esp32 adc as audio input or extra i2s adc?
  • as many potis and switches as possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.