[MIDI] First Arduino MIDI tests and MaxMSP MIDI synth

In the past week I took some time to better understand MIDI, and possible next steps with my project. I started by hooking up some of Tom Igoe’s Arduino MIDI examples, but apparently Windows has some trouble reading Arduinos as HID or MIDI devices, so it didn’t work right away. I had to reinstall the drivers doing something similar to what’s described in this tutorial, but the driver that pops up is for an audio device.

With everything fixed, I created a [midiin] object in Max to read the incoming messages, but I was having some trouble with Microsoft GS Wavetable Synth — the internal MIDI port that my computer was giving me. Therefore, I opened up a new port using LoopMIDI, which worked like a charm. I could, then, read the incoming messages, so I started to build my own synth to read the messages.

Since I wanted to use standard MIDI messages, but all my design is focused on a set of wheels which are supposed to go smoothly up and down octaves, my first attempt was to use pitch bend between the notes. I created modules for the MIDI messages to be sent, mimicking the hardware.

Here is a video demo:

The green sliders correspond to one rotation of the wheel, going through one full octave. Their resolution is the same as the ones of the encoders that compose the hardware, being so that it has 24 clicks with 4 values each, totalizing 96 values, which divided by the 12 notes in an octave, give us 8 subdivisions to work with. Therefore, the MIDI messages sent by those modules are composed of a note message: pitch + a static velocity (on/off) + midi channel, and a pitch bend message: 0-7 value + midi channel. There is one pitch bend value for each note, identified by the channel.

The messages are received by the modules on the right, which find fraction values for the pitch bend, and add them to the pitch received in the note message, then transform them into a playable wave frequency using the [mtof] (midi to frequency) object.

There is also an ADSR envelope that alters all notes. That is not yet working through MIDI. The sliding sound is definitely not smooth, but the patch gives a good idea of how the instrument is going to sound, and if I can get this patch to work with the hardware, I believe that is already pretty good.

 

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google

Você está comentando utilizando sua conta Google. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s