Tuesday 24 November 2015

SSL and Github

Problem solved, install to Github and make sure you add https to the address if you need to access MIDI Sysex.

Example Midi Applications


Monday 23 November 2015

Web MIDI Sysex and Browser Permissions




Tried to upload some Web MIDI examples to my pwdm.dk, only to have a problem sending Sysex messages. And as all the functionality in the A3000 Remote is Sysex, this was very important to fix.



So after a half a day searching I found the solution. Sysex access is only allowed if the hosting website has a SSL certificate.
So rather than pay the fee to upgrade my account, I decided to try uploading the site to Github.
Will post as soon as I get it working.

Thursday 12 November 2015

Web Audio API Nodes

Nodes = Modules

In our description of a synthesizer we talked about the different modules we can use to create and sculpt sound. All these modules can be created using Web Audio Nodes. There are four basic nodes:

  • Source
  • Transformation
  • Analyser
  • Destination

The source is a buffer that holds the audio data we wish to work with. In the following diagram you can see that we have three types of sources:

  • Microphone
  • Sample
  • Oscillator


The transform node could, for example be a gain node so we can boost the amplitude of the input signal. Using an analyzer node we could display the input signal on screen. And of course the output node that connects to your computer/soundcard output.

For more details on how this is implemented I highly recommend the Web Audio School, contains many good code examples.



Wednesday 11 November 2015

Web Synthesizer: Basics

Plan for Web Synth

As part of a school project International module, I was required to work with Open Source Software.
To this end I decided to build a Web Synthesizer based on the new Web Audio Api. At a basic level the API allows you to patch audio and signal nodes to each other, to create sounds. Much like traditional Modular Synthesizers.

Modular Synthesizer

 As you can see this contains modules or nodes that can be connected to produce sound. This type of synthesizer is very versatile in its ability to sculpt different tones. Although it can be a bit overwhelming once you start patching (connecting the nodes together) a beast like this.

Patched Modular System

To ease the complexity of these systems, we can assemble a few nodes and make permanent connections between the nodes. Giving the user a simpler interface to contend with.

Basic Synthesizer Signal Flow

Here we see three sound sources, two Omni Oscillators and a Noise Oscillator. These produce the basic tones we need to create sound. 

The sources signals are mixed together and sent on to the Envelope Generator. This controls the amplitude of the input signal, so we can achieve sounds that vary in amplitude over time.


The next stage is a filter that works by cutting or boosting certain frequency in the input. The filters intensity can also be controlled over time by the Envelope connected to the filter.

And finally the Effects/Output node, that can apply changes to the signal in various ways. For example to create and echo effect, where the input sound is repeated with distinct gaps between each repetition before fading in amplitude.

So thats a basic synthesizer layout. In the coming post I will show how I created a synthesizer similar to this using the Web Audio API.

Coming Soon





Thursday 1 October 2015

Julian Treasure: Sound design for a better life

Julian Treasure: The 4 ways sound affects us


An interesting talk about how sound can affect us more than we might think. Also some useful information about how sound design can affect the user experience.

Wednesday 30 September 2015

The Secret Rules of Modern Living: Algorithms

Another fantastic documentary from the BBC about algorithms.  As ever fulfilling there charter to educate and entertain. Marcus du Sautoy explains and demonstrates some of the most common algorithms in an interesting and easy to understand format. With many a good example of the importance of algorithms in our every day life.

JavaScript Labyrinth

Not having much of experience in JavaScript, I was pleasantly surprised how easy it was to pick up after coming from C#. But I soon fell down the rabbit hole of different framework recommendation. JQuery and angular.js seem to be the most popular, with both being used by the big companys like Google.

So the last few days have been spend researching the different benefits of these frameworks and which I should use them at all. It does not seem a good idea to have the base Midi library of code I plan to develop, reliant on outside sources.

There are at least some very good resources for both frameworks online:

For angular this seems to be a good starting point. With a large list of resources including some good video tutorials from the author.

Angular.Js

JQuery

Wednesday 23 September 2015

Updated Web API Causes problems

The last few days I have been trying a few examples of web audio  api and have had a few problems implementing some of the features.
For example, when we create a new oscillator we can set the waveform type to:

  • Sine
  • Square
  • Sawtooth
  • Triangle 
So the old way to set the waveform type was using a number to represent the type or the name of the waveform:

oscillator1.type = 0; // for a sine wave
oscillator2.type = square;


A search on the error message I received led me to the updated syntax for the api:

oscillator2.type = "square";

So from this I have learnt to always check the dates of tutorials and have the web standards site open for reference.

Tuesday 22 September 2015

Some Research

Introducing the Web Audio API

Lecture given by Chris Lowis, co-chair of the W3C Audio Working Group at BBC New Broadcasting House on 8th October 2013.


Steve Kinney: Building a musical instrument with the Web Audio API

A look at the basics of audio synthesis using Web Audio API. 2015


Making the Web Rock: The Web Audio API

Join Google's Chris Wilson as he asks, and answers, Why do we need another audio API? 2013



Hello World


It has long been my dream to be able to build my own midi software, customized just for me. With the implementation of web audio in html5 i am one step closer to my dream. In this blog I will log the trials and tribulations of reaching this goal.