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

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. 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.

Wednesday, 20 December 2017

Raspberry Pi User Group Meeting - November 19, 2017

We have a few core people who show to our meetings at the New Glasgow Library. This meeting was no different that way.

What was new was the free Stepped Tone Generator / APC kit we have to offer. The Stepped Tone Generator is actually a circuit taken from "Engineer's Mini Notebook, Vol.1 - Timer, Op Amp & Optoelectronic Circuits & Projects," by Forrest Mims III. APC or Atari Punk Console is the name that was given to the circuit by some electronics designer who made it their own. The circuit's sound is pretty lo-fi so imagine something that might come from an old 80's video game, thus the APC name. The circuit's central component is the 555 timer. I am writing another post with this circuit so you can also reference that post as well.

We built one of the kits that I had to make sure all the components worked and they did. I also had another circuit of the same that I had made before and had taken to the meeting. We tried to get it to work but found it did not. Well, ... time to troubleshoot.

Stepped Tone Generator / APC Schematic:


TROUBLESHOOTING:

Anytime something does not work in your electronics projects is an opportunity to learn and to practice. Now, it had been sometime since I had to troubleshoot anything past something like a misplaced power supply lead to one of my circuits. It took a little time to figure out what was wrong. Even then, it was only after we had fixed the circuit had I realized what must have been wrong.

We started out checking all the wires to see if any were missing or misplaced. Then we started using the DMM (digital multi-meter). We swapped speakers and even IC's. While using the DMM it was seen that the voltage level on the middle lead one of the pots was not as it should be.

We are using the square blue trimpots for the kits because they are 1) more convenient to use in solderless breadboards and 2) they cost a lot less per item. To use a metal potentiometer would require at least leads soldered on to the lugs and then, if it were not mounted on something, it would hang free, useable but subject to disconnecting easily. Below are some examples of trimpots. Note that one is on its side and how that relates to the problem I found as described below.



The point is that little blue trimpots can look like they are correctly inserted into a solderless breadboard when they are not. Without really realizing what was wrong with the pot, it was removed, reinserted into an unused portion of the solderless breadboard and leads inserted into appropriate holes to allow DMM leads to take measurements. The pot was fine. It was reinserted into the circuit and presto, the circuit worked.

After the meeting, I realized that yes, the problem was with the potentiometer. It must have been inserted sideways so that two of the leads were connected and the third lead connected to the rest of the circuit to follow. However, the lead that was supposed to be connected to the power rail was not. So no power was supplied to the variable voltage divider found on the left side of the schematic.

Wednesday, 13 December 2017

A Beginner's Journey into DIY Synthesis

Hi. If you have found this blog, surprise! You have stumbled upon a pretty new blog on DIY synthesis, for music, not for another field of electronics such as Ham Radio.

My name is Bruce and I have been building occasional projects in electronics for a number of years. Lately, I would like to have a general focus on music. Music is another hobby of mine. I play guitars and have a Casio XW-G1 synthesizer. Patchblocks are another type of synthesizer that I have recently started exploring. The room to move with this platform is so great and not a bad way to learn about how synthesis modules are put together. Patchblocks software is free to try out. Just stick with learning the tutorials found in the IDE and you will make some interesting sounds. There are also a number of ready-to-go patches before you even learn how to program. Really cool stuff.

One thing I have found over the years is that after playing a musical instrument, I began appreciating other genres of music. Originally, I like rock, classic rock and alternative. Learning how to play harmonica (my first choice in musical instruments) and then guitar, really opened up my horizons. I started to listen to more country and folk music. I appreciate some electronic music, some bluegrass, a little more metal, more classical and some that I find hard to pin down.

To bring this rambling back to DIY synthesis, I will purport that one type or area of electronic synthesis is superior over another, at least not yet. I know that some synthesizers sound better than others and there are many that are classics. What is comes down to some of the time is that you buy, use, and make what you can afford. Budget it whatever way you like so if you really want to stick with only exploring analog circuits, save for a bit and buy what you need. I like to explore a lot of different areas of electronics so I have Arduino's, PIC IC's, Basic Stamp II's, LM324's, 555 and 556 Timer IC's, as well as a number of other components.

Books tend to be a great resource for me. I have some electronic engineering technician textbooks, some hobby electronics books that cover a wide range of topics and lots of other books. Programming languages are also great. I have experimented with C, Arduino C, C++, BASIC, and Python. Processing is another environment that I have dabbled in and think has great potential for me. Just look at the Processing Exhibition page and you see lots of different project ranging from physical interaction to data collection and representation.

In the blog entries to come, do not be surprised to see one area covered such as oscillators made from analog circuits and then others made from digital IC's. I hope to have some interested readers so drop a line if you like. Let me know what you think.

Sunday, 22 October 2017

Raspberry Pi User Group Meeting (RPUG) - October 15, 2017

Our last meeting at the New Glasgow Library was pretty low key. We are looking at putting together some workshops on basic and some not-so-basic topics.

I really want to make a simple project - a Four Op Amp Function Generator. Forrest Mims provides a schematic in his first Engineer's notebook. You can find all kinds of examples of schematics online. One of the nice things is that it can fit on a single solderless breadboard. There are even IC's that come in packages containing 4 op amps although any op amp should work. I plan on using an LM324. They are on order.

I have some other IC's of op amps, actually some NTE947's for which I used the pinout to redraw the schematic. One of the nice things of drawing schematics using IC's is that you can often just use the old schematic and change the pin numbers specified by the new IC. If you have ever tried to draw a schematic using the pinout of an IC, you will quickly realize that there is an art to the whole thing.

Look for a workshop coming soon.

... by the way, I am also taking a ham radio course with the local amateur radio club, Pictou County Amateur Radio Club.

Here is their link:
Pictou County Amateur Radio Club, http://pcarc.ca/