DEV Community

Josh Alphonse
Josh Alphonse

Posted on

WFH DAW STYLE

It's been about a mont since we've been sent to work from home because of the global pandemic caused by Covid-19. Businesses have shut down, developers have been laid off and it's hard to get certain supplies. Although these are not the best circumstances, there are always things we can do to have fun while we're at home! Music is one of the best tools you can use to improve your mood while we're in these gloomy times. This week I decided to take things a bit further with my passion for music and decided to start to working on my own DAW.

A Digital Audio Workstation or DAW for short, is commonly used by musicians, mix engineers and producers to create their projects. There are a number of great softwares like protool, logic, ableton. I use theses all but they all cost hundreds of dollars. Some of us are inside forced out of work and can't afford to buy a DAW. Kids also can't go to school, so why not help them exercise a new hobby? This lead me to build my own web app called Algorhythm, a DAW for the web browser.

Alt Text
For this project I'm using React.js, Redux, Rails and some NPM Packages(midi-sounds-react is where the instruments are from). Most DAWs come with stock instruments, MIDI Capabilities, a BPM Counter as those are some basic tools to get started.
Alt Text
So we have a drum machine that works off a grid and a keyboard. Algorhythm comes packed with over 1,500 sounds thanks to Midi-react-sounds.

import React, { Component } from "react";
import Pads from "../Components/Pads";
import Controls from "../Components/controls";
// import Bpm from "../Components/Bpm";

import "../App.css";
import MIDISounds from "midi-sounds-react";

class Sequncer extends Component {
  state = {
    drumSnare: 15,
    drumBass: 5,
    drumHiHat: 35,
    drumClap: 24,
    pads: [
      [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0],
      [0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]
    ],
    bpm: 108,
    start: 1 / 16,
    numPads: 4,
    playing: false,
    position: 0,
    selectedDrum: [5, 46, 145, 35],
    volume: [0.5, 0.5, 0.5, 0.5],
    mute: false,
    open1: false,
    open2: false,
    userPads: [],
    loaded: true
  };
}
Enter fullscreen mode Exit fullscreen mode

The sequencer has a few rows on the grid and we can initialize what 'pads' we need active within state. I also initialized some other parameters like volume and BPM to start the user with some default settings.

The next features I want to add is the ability for users to join different rooms or sessions with one another. It would be great for collaborations especially during the quarantine. A record and export feature will be in the works as well. I'm having a lot of fun with this project and excited to see where it goes.

Top comments (0)