Pickup 6 individual guitar strings and play prerecorded audio on computer

Dominic Co's icon

Hi all,

I'm planning to connect my electronic guitar to my computer and to use MaxMsp such that when one plucks each individual string, a particular audio (the ocean, the jungle, etc.) would be outputed with the same pitch and loudness as playing the guitar string.

I'm a total newbie when it comes to Max and electronics, and based on what I have read in the forum below:

https://cycling74.com/forums/howto-pick-up-6-individual-string-sigs-from-guitar

it would be difficult to separate each string individually in Max MSP unless you use a hex pickup. As for being able to use the signals to manipulate a precorded audio based on pitch and loudness, is this possible?

Any suggestions on how to digitally separate the strings and/or to use the signals to manipulate prerecorded audio would be much welcome!

Thanks

Robin Parmar's icon

Hexaphonic pickup is definitely best. No algorithmic method will be anywhere near as accurate.

Peter Ostry's icon

There is no way to tell which string got picked. For that you need a hexaphonic pickup. To find out which note and strength was used, you transform the signal to MIDI. This is what the usual systems do. They use "individual-string-pickups" and afterwards a hardware- or software converter to MIDI. With such a system you get pitch and velocity information for each string.

There are a couple of systems available which are quite different. For example Roland GK or Fishman TriplePlay. Pickups are offered by RMC (piezo saddles for electric or acoustic guitars) or Ubertar (magnetic single coil and humbucker pickups) which are plain hexaphonic pickups used for audio or, after conversion, with MIDI.

Dominic Co's icon

Thanks for your replies!

@Robin Parmar - i heard you can use sigmund~ external patch to identify the pitch used from audio (if the pickup used is a monophonic pickup)? Is this not reliable?

@Peter Ostry - looking at whats available in Hong Kong (am based here), seems like the Roland GK 3 is the only readily available. Based on what i read, you need a Roland GI to convert the audio to midi and to connect it to the computer. However, its expensive and the GI was discontinued. Is there no cable that I could just connect the 13-pin head of the GK3 to the lap top, and simply convert the audio to midi through software (like can max msp do it?)

Thanks a lot in advance!

antialias's icon

These multichannel pickups look interesting:
https://www.cycfi-research.com/product/nu-multi-basic-set/

New version coming soon apparently:
http://www.cycfi.com/2018/06/nu-v2-multi/

"The Nu Series Modular Active Pickups are hacker friendly, general purpose pickups that can be used in a variety of applications. These are active multichannel pickups with low impedance coils and an integrated single-ended, low-power, low-noise preamplifier for each coil. These low-profile, Neodymium-core pickups are modular and can be used individually or in groups."

Peter Ostry's icon

Dominic Co wrote:
Is there no cable that I could just connect the 13-pin head of the GK3 to the lap top, and simply convert the audio to midi through software (like can max msp do it?)

A simple cable to the laptop will not do it. From a hexaphonic pickup you get 6 audio channels with common ground. To process the individual signals in your computer you need at least an audio interface with 6 microphone inputs (line inputs are not sensitive enough) or a multichannel DI-box/Preamp etc. before line inputs . And you may need a breakout box/cable between the 13-pin connector and the interface device.

Roland GK is a hexaphonic magnetic pickup, the attached "controller" is basically an amplifier/buffer for the audio signals. Via the 13-pin cable you usually attach it to a hardware converter. The converter is not necessarily from Roland but preferably 13-pin compatible and most converters have also synthesizers built in. Other hexaphonic pickups like RMC or Ubertar do the same but have 8-pin or 7-pin cables. You have to amplify/buffer them yourself.

There are different pickups, breakout boxes/cables available but taking audio from a hexaphonic pickup and programming the conversion yourself in Max is one of the most complicated and difficult aproaches you can take. I think it can be done but I don't know about quality and speed and never tried it.

A modern instant solution for hexaphonic Guitar-to-MIDI is the Fishman TriplePlay, a divided magnetic pickup with a guitar-mounted box that directly delivers MIDI data wireless to an USB stick. Latency (= conversion speed) is acceptable but not as good as with good hardware converters I used before. (Worth to mention: My TriplePlay does not work on a 2012 MacBook Pro with El Capitan. Here it works only via the TriplePlay FC-1 foot controller which I have, but this box is (in my opinion) too expensive for what it does. )

The more traditional approach is to buy a Roland GK pickup and one of the available converters. It can be any converter but should be 13-pin GK compatible. The converters differ in age, speed and price, well known brands are Yamaha, Korg, Terratec (Axon) and Roland. Guitar-to-MIDI converters have a 30-year history and very few are still built.

Before you start buying gear I suggest to try converting a single signal in Max, according to your original plan. If you are satisfied, you can simulate 6 signals with pre-recorded audio. If you are still satisfied, you can decide if you want to go the hexaphonic way (hardware or software) or stay with just one audio channel, without getting information about individual strings (and chords).

Dominic Co's icon

Thanks! sorry for the late reply.

Just to let yall know, I decided to stick with one audio channel, cause of my limited budget to buy a hex pickup.

Using sigmund for pitch tracking and matrix to play various audio file sources one at a time.

The problem, however, is that there are so many false triggers with sigmund cause its outputting random numbers at a non-constant rate.

Guess thats the inherent problem with this route or maybe my interface is buggy. :/

Source Audio's icon

You need to do few things to make guitar input work with pitch detection.
1 - filter out unneeded frequencies on input
2- play clean
3- try several audio to frequency detectors till You find one that fits best,
sigmund is not the only one, especially that one needs to know what parameters to set
for best result, depending on source material.
4- post process the result, quantise pitch etc etc

my first go would be vb.pitch~ or gbr.psy~ ( part of ircam ftm)

Peter Ostry's icon

Audio to MIDI in realtime is not trivial at all, especially for stringed instruments. I think one of the most important parts is attack handling. The attack of a string can be used as velocity information, but the frequency immediately after the first transient(s) can set an effective filter range and determine the time for frequency analyzing, for example. Guessing the note pitch (yes, it's a guess and quantization) must start shortly after the attack, but measuring too early, too late, too short or too long will result in wrong conversion, false triggers or slow response.

I don't know how much time you want to spent with this complicated matter and you may keep in mind that only the very best manufacturers/programmers could build converters which are really playable in most music styles.

Currently the best software solution ist MIDI Guitar 2 from JamOrigin. Works mono- and polyphonic and has a couple of useful settings. Their statement is true, if you play clean it just works. You could use the standalone version in front of Max. You can also try it with [vst~] in Max, although I doubt that this is a good idea. At the moment, MIDI Guitar 2 costs USD 100 and you get both, the guitar and the bass version. Standalone and plugin versions are included, there is a trial version available. Not a cheap, but a very quick start for your project.

Dominic Co's icon

@Peter Ostry When you say standalone version in front of Max, do u mean to replace Max with JamOrigin, or send MIDI data from Jam Origin to Max for whatever synthesizing thereon?

And I'm not too familiar as to what vst~ is, according to wikipedia vst in general is a " Virtual Studio Technology (VST) is an audio plug-in software interface that integrates software synthesizer and effects in digital audio workstations. " thus, vst~ in max msp is the medium by which you can send data from Jam Origin to Max?

Peter Ostry's icon

The [vst~] object in Max allows to use VST Plugins (Win and Mac) or Audio Unit Plugins (Mac) in Max. But I wouldn't use it here.

Suggestion:
The audio signal from the guitar comes through your audio interface into the computer on one audio channel. This channel is the input for the JamOrigin Software. The software makes the conversion and sends MIDI to a MIDI port. Max can read the MIDI data from this port and you can process it as you like.

Dominic Co's icon

@Peter Ostry thats super clear! Let me try it out and figure out how to do it in Max and JamOrigin. Thanks!!