Tuesday, September 4, 2018

Destructing Elements in Maya With PullDownIt: Part 5

Capturing Lifelike Guitar Sounds Without Microphones: Part 1

Capturing Lifelike Guitar Sounds Without Microphones: Part 1

If you're recording anything acoustically, or playing live through a PA, microphones remain the usual and accepted route for capturing guitar sounds. From studio exotica costing thousands of pounds down to handheld and USB devices, the microphone reigns supreme.

As popular as this is, however, there are some drawbacks.

The relationship between the mic and its source needs to remain the same. The slightest movement in any plane of direction can change both the tone and volume of what’s captured. Anyone who's tried overdubbing an acoustic guitar part will know the challenge of creating a consistent recording.

Then there's the question of noise. Whether it comes from the recording space or stage, the player, the instrument, or even the recording equipment, all this can diminish the resultant quality.

You may believe that there's no alternative.

DI

This stands for Direct Injection, and refers to connecting an instrument electronically to an amplifier or recording device. For guitarists, whether recording or playing live, DI means capturing sound via the instrument’s onboard pickups.

For acoustic guitars, the most common pickup is the piezo. A crystal located under the guitar’s saddle, it translates vibrations from the strings into a small electrical signal.

Coupled to an onboard or external preamp, this is the sound audiences hear.

It certainly gets around the issues of using mics, and is ideal for a noisy live environment. However, because the piezo’s at the bridge, it captures the sound of the strings, but very little of the guitar’s body. It's okay for live work, especially in the context of a larger band sound. For recording, however, definitely not.

As for electric guitars, electromagnetic pickups are the norm. You can DI them very easily, but as with an acoustic guitar, you won’t get the sound you expect to hear, as you’re missing crucial elements of the overall sound, such as an amp and its speakers.

What is required, therefore, is something that sounds as good as a microphone recording, but with all the benefits of DI.

Thankfully, there’s a way to achieve this.

Impulse Responses (IRs)

I first came across these nearly 20 years ago. I’d just finished recording with a band, and the engineer was creating rough mixes. He knew I was interested in recording and production, so he clicked on a plugin, and said, “Listen to this”.

The sound of my band was suddenly given a really live, cohesive feel, despite having tracked each part separately in an sound-deadened room. The plugin was imprinting the recording with the acoustics of a rural church somewhere in the middle of the American Mid-West. 

I was fascinated both by how lifelike it sounded, and the possibilities it represented.

How Impulse Responses Work

An impulse response is a measurement taken of anything that deals with acoustics, be it a space, a speaker, or an instrument. Particular audio signals are either played through it or into it, and the resultant response is captured. Whatever this response is applied to then exhibits the characteristics of the original.

To start with, IRs were usually limited to reverb plugins, with Altiverb being one of the most well-known.

Reverbs still remain the most ubiquitous use of IRs, to the point where some DAWs have IR-capable plugins as standard. Logic’s Space Designer is one such example.

But as technology and processing power advanced, IRs have moved beyond just reverbs and this is where guitarists get involved. 

In the next tutorial I’ll examine acoustic guitars, but for now, I'll show you how IRs assist the recording of electric guitar amplifiers.

Electrickery

To this day, recording the sound of an amp and its associated speakers usually involves one or more mics being placed strategically around it. Even live, most sound engineers expect to mic up a guitarist’s combo or cabinet.

Some amplifiers have an emulated speaker output. This allows a DI connection between the amp and either a DAW interface or PA system. They’re very useful, but they’re slightly misleading. 

The emulated speaker is in fact the application of EQ to create a reasonable facsimile of a guitar speaker. It does the job, but doesn’t fully capture how a speaker works, or indeed, the influence of the speaker cabinet on the resultant sound.

An increasingly common occurrence in studios is to DI the amp and then use IRs to apply the sound of speaker cabinets. 

There are several reasons why this is a good idea.

Record Silently

Valve amps in particular really come alive as volume increases, but this isn’t always appropriate to every recording situation. Using DI means you can crank the amp without the resultant high levels of volume.

A word of caution, however.

Amps are designed to supply certain levels of current in order to drive speakers. If the speakers aren’t there, the current has nowhere to go, which can cause permanent damage to the output transformer. 

If you wish to record silently, and thus cannot attach speakers, you’ll need to use a reactive load box.

You Don’t Need Expensive Mics

Nor do you need mic preamps, an acoustically-treated space, or even knowledge of mic placement.

You Don’t Need a Selection of Speakers

Instead of spending thousands on different speakers and cabs, you can select from a huge range of IRs.

You Can Change the Tone

If you're not happy with the sound, just change the IR. This also means you can audition different speakers until you’re happy.

Conclusion

IRs are becoming more and more popular, and with good reason. They represent sounds of spaces and equipment at your fingertips that you wouldn’t otherwise have access to. 

Going direct means:

  • You get a consistent tone
  • Noise becomes less of an issue
  • The recording environment is less critical
  • You can change the sound during or after the recording
  • It’s a lot cheaper than owning lots of physical equipment

In the next tutorial I’ll show how IRs benefit acoustic guitars and their usage in the live environment.


Envato Tuts+ Community Challenge: Created by You, September 2018 Edition

Understand Arrays in PHP

Understand Arrays in PHP

In this post, you'll learn the basics of arrays in PHP. You'll learn how to create an array and how to use associative and multidimensional arrays, and you'll see lots of examples of arrays in action.

What Is an Array?

In PHP, an array is a data structure which allows you to store multiple elements in a single variable. These elements are stored as key-value pairs. In fact, you can use an array whenever there’s a need to store a list of elements. More often than not, all the items in an array have similar data types.

For an example, let’s say you want to store fruit names. Without an array, you would end up creating multiple variables to store the different fruit names. On the other hand, if you use an array to store fruit names, it might look like this:

As you can see, we’ve used the $array_fruits variable to store the different fruit names. One great thing about this approach is that you can add more elements to the $array_fruits array variable later on.

There are plenty of ways to manipulate values in the array variable—we’ll explore these in the later part of this article.

How to Initialize an Array

In this section, we’ll explore how to initialize an array variable and add values in that variable.

When it comes to array initialization, there are a few different ways. In most cases, it’s the array() language construct which is used to initialize an array.

In the above snippet, the $array variable is initialized with a blank array.

As of PHP 5.4, you can also use the following syntax to initialize an array.

Now, let’s see how to add elements to an array.

The above snippet should produce the following output:

The important thing to note here is that an array index starts with 0. Whenever you add a new element to an array without specifying an index, the array assigns an index automatically.

Of course, you can also create an array already initialized with values. This is the most concise way to declare an array if you already know what values it will have.

How to Access Array Elements

In the previous section, we discussed how to initialize an array variable. In this section, we’ll explore a few different ways to access array elements.

The first obvious way to access array elements is to fetch them by the array key or index.

The above snippet should produce the following output:

A cleaner way to write the code above is to use a foreach loop to iterate through the array elements.

The above snippet should produce the same output, and it takes much less code.

Similarly, you can also use the for loop to go through the array elements.

Here, we're using the for loop to go through each index in the array and then echoing the value stored in that index. In this snippet, we’ve introduced one of the most important functions you’ll end up using while working with arrays: count. It’s used to count how many elements are in an array.

Types of Arrays in PHP

In this section, we’ll discuss the different types of array you can use in PHP.

Numerically Indexed Arrays

An array with the numeric index falls in the category of an indexed array. In fact, the examples we’ve discussed so far in this article are indexed arrays.

The numeric index is assigned automatically when you don’t specify it explicitly.

In the above example, we don't specify an index for each item explicitly, so it'll be initialized with the numeric index automatically.

Of course, you can also create an indexed array by using the numeric index, as shown in the following snippet.

Associative Arrays

An associate array is similar to an indexed array, but you can use string values for array keys.

Let’s see how to define an associative array.

Alternatively, you can use the following syntax as well.

To access values of an associative array, you can use either the index or the foreach loop.

As you can see, here we got the name by querying it directly, and then we used the foreach loop to get all the key-value pairs in the array.

Multidimensional Arrays

In the examples we’ve discussed so far, we’ve used scalar values as array elements. In fact, you can even store arrays as elements within other arrays—this is a multidimensional array.

Let’s look at an example.

As you can see, the hobbies key in the $employee array holds an array of hobbies. In the same way, the profiles key holds an associative array of the different profiles.

Let’s see how to access values of a multidimensional array.

As you can see, the elements of a multidimensional array can be accessed with the index or key of that element in each array part.

Some Useful Array Functions

In this section, we'll go through a handful of useful array functions that are used frequently for array operations.

The count Function

The count function is used to count the number of elements in an array. This is often useful if you want to iterate an array with a for loop.

The is_array Function

This is one of the most useful functions for dealing with arrays. It's used to check if a variable is an array or some other data type.

You should always use this function before you perform any array operation if you're uncertain of the data type.

The in_array Function

If you want to check if an element exists in the array, it's the in_array function which comes to the rescue.

The first argument of the in_array function is an element which you want to check, and the second argument is the array itself.

The explode Function

The explode function splits a string into multiple parts and returns it as an array. For example, let's say you have a comma-separated string and you want to split it at the commas.

The first argument of the explode function is a delimiter string (the string you're splitting on), and the second argument is the string itself.

The implode Function

This is the opposite of the explode function—given an array and a glue string, the implode function can generate a string by joining all the elements of an array with a glue string between them.

The first argument of the implode function is a glue string, and the second argument is the array to implode.

The array_push Function

The array_push function is used to add new elements to the end of an array.

The first argument is an array, and the subsequent arguments are elements that will be added to the end of an array.

The array_pop Function

The array_pop function removes an element from the end of an array.

The array_pop function returns the element which is removed from an array, so you can pull it into the variable. Along with array_push, this function is useful for implementing data structures like stacks.

Conclusion

That's all you need to get started coding with arrays in PHP.  You saw how to create arrays and how to retrieve elements from them. You learned the different types of arrays in PHP, and you got a look at some of the most useful built-in PHP functions for working with arrays.


16+ Best Free Keynote Presentation Templates Designs (Download Now)

How to Get Started With Product Packaging Design

Quick Tip: Remove the White Background From Line Art in Adobe Photoshop