Check out my music: https://soundcloud.com/playinmyblues

Sunday 29 July 2018

Learning Synthesis - Where to Start?

What is the best way to learn all about synthesis?

Somebody asked this question on a musical synthesizer group on Facebook recently. What I have written below is more or less my reply to that question. As it seems like this could be a relevant answer that I might not want to type out again and again and have also provided in different ways before, here is my blog post on the topic.

Learning synthesis is such a broad topic with so many ways to start. The best way to start is to pick a particular method and start. For instance, let's say there are three ways to get started: 1) Buy a synth and start playing, 2) Download software, free or paid and start using it, and 3) Start building your own synths - the DIY route.

Within those three categories, you can see that there are lots of ways to go in each of them. Sometimes people are guided strictly by budget because they just do not have the money while others are drawn to a particular part of playing and making music.

I would recommend watching some YouTube videos on some current synths as well as looking up some DIY stuff. You might be intimidated by the DIY route but the great thing about it is there is actually nothing to buy. You can look at it educationally and learn about things like:

1) What is a waveform,
2) What is voltage,
3) What is current,
4) What are the different waveforms used in synthesizers,
5) What is frequency,
6) What is a filter and what are different types of filters,
7) What is an LFO

Actually, before you go about buying anything, those topics above are a great place to start learning about synthesis no matter what route you choose in the end. If you only see one video on each before you buy what you buy, do not feel guilty; you can easily learn more as you go along if that is what you want.

There are some likely options you will be recommended: 1) Buy a 1 knob per function synth or 2) Get a MIDI controller and start using a free DAW or a soft synth. Given those two options, I think the 1 knob per function synth is the better especially if the physical synth has MIDI DIN ports. This will allow you to use the synth as a MIDI controller.

I think that if you watch a number of YouTube videos on different synths as well as MIDI controllers and some basic use of DAWs, you will figure out what way you want as a starting point. Remember that there are often free pieces of software as well as paid and each of those will have videos on their use on YouTube.

Keep in mind what your budget is because it is very easy to jump right in and buy something that is beyond that budget. Buying used is an option.

Wednesday 27 June 2018

Installing GSnap or Pitch Correction, aka Auto-Tune, in Audacity on Windows

The Korg Volcas are great introductions to the world of musical synthesis. One of the Volca line is a sample player. The Volca Sample plays samples of audio clips but cannot do live sampling which is recording an audio source live and then using it directly afterwards. While the Volca Sample does not have the live sampling capability, it has a lot of the features that a person will need.

The Sample has more features than I care to list but here are some of them:
1) 10 different samples per sequence.
2) 10 sequences.
3) 6 different songs which can consist of up to 16 sequences.
4) Start and end point for each sample, both which can be altered.
5) Change the pitch of each sample using either cents or by semi-tones.
6) Analogue isolators for bass and treble.
7) Swing control for changing the length of a pair of notes from 50-50 % to up to 75-25 %.
8) Reverb
9) Mute Solo.
10) A number of other great features.

If you are looking to understand how a Volca Sample can be used, YouTube videos are great. If you want to delve a little deeper, download the user manual from Korg.

Using the Volca Sample to play some instruments with accurate pitch is a few steps away. I want to record samples of a couple of thumb pianos which are very difficult to tune with close accuracy. I can get quite close on some tines, but others are about 30 cent off. Audacity should come into use here but it took a little figuring on how to get an auto-tune type VST to work.

The style of thumb piano to the left is actually one of the easier styles to tune as the tines will slide to make it longer or shorter. However, once it is within range of the note, it becomes very hard to get it spot on as the distance required to change the tuning at that point is very small. I do have another style of thumb piano where you can loosen the screws on the bar holding the tines in place. On that style the tines are arranged in a fan pattern so shortening the part of the tine that vibrates can get tricky when more tines are shortened. There is the possibility of removing material from the tines but I do not want to do that.

If you have not installed Audacity you can get it here:
https://www.audacityteam.org/download/

This particular tutorial works for Windows but Audacity is also available for Mac and Linux.

One such VST is GSnap from GVST:
https://www.gvst.co.uk/gsnap.htm

Take note of their other VSTs. They have a good number although I have not tried any others.

There is a Plug-ins page on the Audacity website but I had to do some reading and figuring on my own to get GSnap to work. Because I had seen a number of questions on how to get this installed correctly I posted my own reply on the Audacity Forums. Here are the steps I posted. While it not might work exactly this way for you, hopefully with this documentation and some other web searching, you can get it to work on your computer.

Here is the Plug-ins page for Audacity but I suggest reading my steps before you read theirs as this is an older plug-in and it seems to me that their information did not work for me:
https://www.audacityteam.org/download/plug-ins/

The post:

Re: Audacity not enabeling gsnap

Posted by playinmyblues » Mon Jun 25, 2018 10:05 am
It took awhile to get GSnap to work after reading some of the other posts found on this forum. Here are the steps that I took to get it to work (not in that order as I had to try several different things to get it to work):

1) Download the 32-bit version of GSnap and unzip it in its own folder somewhere on your computer, not in its destination for Audacity.
2) Copy the dll file.
3) Open up the folder called C > Users > <your_user_name> > AppData > Roaming > Audacity >Plug-ins
4) Paste dll in that folder.
5) Open Audacity and open Edit > Preferences.
6) Under Effects, make sure the VST is selected. Under Maximum effects per group (0 to disable) > , enter in a number greater than 0. See the field provided where is says "(0 to disable)" - this should mean that if it is not a number greater than 0, it will not work.
7) Open the following: Effect > Add/Remove Plug-ins.
8) Scroll down to GSnap. Select the correct GSnap by checking the file path to see that it matches the file location provided above. Click Enable. Click OK.
9) Make a recording then select the portion you want corrected. The GSnap VST effect was found under Effects > Plug-ins 1 to 10 > GSnap. Follow a tutorial or the manual for changing the settings and applying the VST effect.

Even though my Audacity is a 64-bit program, GSnap 64-bit will not work here. You can check to see if your Audacity is 32-bit or 64-bit by checking the folder where it is installed.
32-bit Audacity: C > Program Files > Audacity
64-bit Audacity: c > Program Files (x86) > Audacity
This information might be important for other circumstances when using Audacity.

Here is the link to the post:
https://forum.audacityteam.org/viewtopic.php?p=349589#p349589

The use of GSnap to produce samples I like will have to wait for another time. It is worth noting that GSnap and other pitch correction type programs or VSTs can be used to produce an altered vocal track to the point where the track sounds more like a robot.

The link below is for the first YouTube video I watched on using GSnap. Take note that it is from 2010 so the information on installing it is probably out of date for your computer.
https://youtu.be/mpEPFc_1ibA

Saturday 12 May 2018

Arduino Multiple USB MIDI IN MIDI DIN Out

(Originally, this project was intended to have a few more features added such as applying velocity values to messages sent to a Volca FM, which requires a special message to get velocity values applied to notes. Unfortunately, the replacement USB Host Shield does not easily allow extra code and I never did get any support from the manufacturer. The manufacturer of the USB Host Shield I used is not Circuits@Home, in case you were wondering. Given all that, technically, the project currently provides MIDI Thru functionality instead of MIDI Out.)

This project began when in spirit when I started watching YouTube Videos on synthesizers. I have a Casio XW-G1 and was looking into that when I started to see some interesting music being made with the Korg Volca synths. Watching more videos, I was seeing some cool music being made by using their sync ports and then I noticed some people using the MIDI In.

The price point of these synths is great for getting further into the synth world and the various models is great for expanding functionality. Having seen different hardware such as MIDI Thru boxes and already having a audio/MIDI interface, I knew I could connect my USB MIDI keyboards to the PC and play all the Volcas at once. Granted, I had none at the time, but I started out by getting the Volca Keys. I was definitely intrigued.

 There were two problems that I had right away. The first, in my book was that a PC takes time to boot up, connect the audio/MIDI interface and any other accessories that I might want to use with my laptop. I suppose this is made worse by the fact that I have no permanent setup for making my music. The second problem is that I had no MIDI Thru box.

Once I started to investigate the process of making a MIDI device that would accept a USB MIDI keyboard and found ending up finding a very simple solution with the USB Host Shield, which I already had, I was a little disappointed that I did not build this sooner. It was one of the simpler projects to build on a breadboard and the code was already provided in the library for the USB Host Shield. Here is the schematic to the left. Save it and open it to get a better view.

Please do your own footwork to ensure any project you make will not burn out anything in your project. They way the MIDI protocol works with this particular setup is that current only flows when the Arduino pin used, D1 (TX) goes low. Wondering how that works with the MIDI protocol to produce a logic HIGH to the MIDI device? Sparkfun provides a good MIDI tutorial on the subject which I highly recommend you read, at least the first two pages, before you start the project. Another important point when building any stage of this project - prototyping on a breadboard or permanent, is to disconnect the Arduino TX pin from the 74HC14 IC before you upload the sketch. The Arduino still uses the TX pin for the uploading process.

In short (no pun intended), once I breadboarded it, I did some groundwork (no pun intended, again!) to make sure it would not burn anything out. Then I decided to build it. It took longer than I expected, mostly the cutting of holes in the dollar store jewellry box, and then recutting them to fit the new Arduino Uno instead of the Arduino Mega. The Uno's power jack was just a little higher than the Mega's. In the process, I mishandled the USB Host Shield with what was likely ESD and that had to be replaced. See below for the inside of the final version of this stage:

Materials needed:
Arduino Uno or Mega,
USB Host Shield,
powered USB hub,
MIDI DIN jacks,
74HC14 IC,
some resistors,
protoboard, jumper wires
and a box of some sort.


It has 5 MIDI DIN outs, at the moment is coded to accept 4 USB MIDI devices but can handle 7 with the current USB hub.

So, I have tested a number of MIDI controllers with the project. It appears to work with all MIDI devices that I have which are: Oxygen 49 blue version, Akai LPD8, iRig Keys, iRig Keys Mini, Akai MPK Mini MKII, Alesis SR-18 drum machine, Ableton Live Intro, Traktion 7, Behringer UMC404HD, Scarlett 6i6, and an M-Audio Uno Sport USB-to-MIDI cable.

The M-Audio Uno Sport is needed to input the MIDI data into the project as its only input is via USB. I would like to have a MIDI In but the shield does not work well with other code added. I intend to impliment a different shield in a similar later.

((I have not tested the capabilites using a MIDI keyboard such as the M-Audio Oxygen 49 which has some sliders and knobs to turn. I would like to have that working.)) One of the reasons I like this, aside from being able to play my Volcas with keyboards, is looks to be only a step away from making my own synth that I can play with a keyboard.
The basic code is found in the USB Host Shield Library 2.0 > USBH_MIDI > USB_MIDI_converter_multi sketch.

Simply copy the section that outputs the MIDI data, paste it, rename the new section so it differs from the old, add the prototyping up top and you have the code.

This project holds a lot of potential for the future. If you have already worked with microcontrollers, then you probably realize that once you can produce code to accept USB MIDI data and output it, you should be able to make that data do what you want. Making my own synth should be just one step away! Maybe two... three... wait a sec...

Feel free to comment below.

Let me know if you build it yourself and expand upon it. It is not like I made the code myself. Once you see the original code from the library you will see. I posted this project on Facebook and had a comment on HoodLoader so that is another possibility worth exploring.

Saturday 17 March 2018

One More Step

Here is a post one of the Raspberry Pi User Group members put together on fixing their stairs. It goes to show what a little industriousness can do!

If you need to increase the size of the webpage you are reading:
Ctrl - + (as if talking out loud, that reads control, dash, plus and you press the control key and the plus key at the same time)
Reduce:
Ctrl + -
Revert to the default size:
Ctrl - 0
******************************************
I decided it was time to redo my 100-year-old (literally) stairs. Replacing them was financially out of the picture. They had many coats of paint on them and removing the carpeting left lots of nail/staple holes, so stripping and refinishing was out. That left painting as the only viable option.

The balusters were finished with a very dark stain, including lots of runs and blobs. There were a lot of squeaks to be silenced, trim to be replaced, and a landing that had to be rebuilt. With the amount of work required, I decided it would be much easier to remove the balusters rather than work around them.


I didn't think to take a "before" picture, so this is a "during" picture, with the balusters and trim removed, handrail cleaned up, squeaks fixed, and some holes patched.


















Further on, some painting done, more holes and dings patched.




















Painting the balusters was still going to be a hassle, but I thought, "what if I could make something to turn them slowly while I just held the brush?" I decided to aim for 20 RPM, or one revolution in 3 seconds. The whole project had to consist of parts on hand and not be more work than it was worth for a one-off.

I didn't have any motors that I could easily make turn slowly enough. I did have a 24V cordless drill that still "drilled" fine, but its batteries wouldn't take a charge. Of course it would run *way* too fast at 24V. I wondered how it would run at a lower voltage and, if my experiment let the smoke out, it wouldn't really matter.

I only had one adjustable power supply with enough juice to drive the drill but it wouldn't adjust lower than 8 VDC. That was still too fast. Again, not wanting overkill for a one-off job, I played with available power resistors in the DC line until I found a combination that would drop enough voltage without burning up. That got me down to 30 RPM, or one revolution in 2 seconds. Close enough!


This is the end product, power supply not shown:



Of course balusters are all different lengths so the "head" of the unit slides on a piece of T-track to accommodate each baluster. Most of the baluster is painted in the jig, removed, situated to dry, and the top section painted.

Is it a slow lathe or a fast rotisserie? Who knows?

Balusters painted:


And finally:










































Saturday 17 February 2018

Pre-Meeting, February 17, 2018 - Arduino Shift Register Control of R-2R 8-bit DAC to Astable Multi-vibrator (1/2 556 Timer)

Hi Y'all!
We hope to see y'all tomorrow at the RPUG Meeting at the library. I have been working on getting a shift register to control the frequency played by an astable 555 timer. Two shift registers are connected to LEDs at this point so it is pretty close. I am building the astable multi-vibrator right now.
The idea is to test the breadboarded device with one shift register. That will give it 8 bits to work with: 5V / 255 = 19.6 mV per bit.
Once I get that running, I will expand the DAC to more than 8 bits, giving more resolution to the frequency. Blah, blah, blah, until you realize that with more bits, you get greater control over the tones you can play. One of the interesting possibilities of using shift registers to control R-2R DACs is that you control the bit resolution. You can pick and choose how many bits are used to control each device. A web search on R-2R DACs will give you the idea that I am talking about. I can take 4 bits from one shift register to add to the first shift register and then use the remaining 4 bits to control something else.
An Arduino Nano is the brains at the moment but it should work with any other Arduino, even a 3V one, such as an Arduino Due. A 3V signal still registers with 5V logic ICs as a high signal so all that stuff will work. Watch out trying to go the other way, sending 5V signals to a 3V device. Many 3V devices will be damaged by 5V signals.
See you tomorrow!

Look for the next post with schematics and equations for all that technical stuff.