Archive

Archive for March, 2017

How To Deliver Large-Scale Projects Using A Content Hub Strategy

March 7th, 2017 No comments

What exactly are the benefits of a content hub strategy? Well, first of all, when done correctly, a content hub will capture a significant volume of traffic. And that’s what most online businesses want, right?

We have recently introduced several clients to the concept of a content hub and would like to share our experience in this article. The clients are high-quality portals filled with targeted, valuable and often evergreen articles that users can return to time and again.

The post How To Deliver Large-Scale Projects Using A Content Hub Strategy appeared first on Smashing Magazine.

Categories: Others Tags:

The Document Outline Dilemma

March 7th, 2017 No comments

For the past few weeks there has been lots of talk about HTML headings in web standards circles. Perhaps you’ve seen some of the blog posts, tweets, and GitHub issue threads. Headings have been part of HTML since the very first websites at CERN, so it might be surprising to find them controversial 25 years later. I’m going to quickly summarize why they are still worth discussing, with plenty of links to other sources, before adding my own opinions to the mix. If you’re up-to-date on the debate, you can jump straight to the “Bigger Dilemma” section.

The Story So Far…

HTML uses headings (

,

,

, and so on until

) to mark up titles for a subsequent section of text. The numbers (or levels) of the heading elements are supposed to logically correspond to a tree-like structure of nested sections, like books that have chapters with sections and sub-sections.

However, HTML markup did not originally have a way to reflect this nested logical structure in a nested DOM structure. Unlike nested lists, nested headings weren’t actually nested in elements that defined the parent sections. Heading elements of different levels were all sibling elements, and also siblings to the paragraphs they provide a title for. The “sections” were a purely logical structure, not a DOM structure, containing all markup that starts with a heading and continued until you reached another heading of the same or higher level.

As Brian Kardell points out, this made perfect sense in the “flat earth markup” of early HTML, where tags were just typographic instructions inserted into a flow of text. The concept of an HTML page as a tree structure came later, when so-called Dynamic HTML needed a document object model (DOM) to describe that flow of text and tags as a data structure that scripts could access.

Not to spoil the ending, but HTML now has a

element which can (optionally) be used to create a nested DOM structure to match your logical heading structure. The ,

,

,

,

Internet via Satellite: What We Have and What’s to Come

March 7th, 2017 No comments

Internet via satellite was already rising in popularity once a few years ago, but couldn’t establish itself due to high prices, poor data rates, and quickly accelerating cable connections. Where is the technology now?

Satellite Internet – Solution for Structurally Weak Locations

I remember calculating the cost for satellite internet and seriously thinking about getting a satellite access.

But that was more than ten years ago, during times where there was no broadband cable connection in rural areas. Fortunately, this is mostly different here in Germany, although, even here, there are some dead slow data links in some places.

By the way, back then, the satellite connection was a one-way connection. While there was a downstream, the upstream had to be created using a different technology – a very tedious set-up. Today, providers offer two-way communication, making it an actual, independent solution.

So, if you live out in the country, and your phone company’s consultant answers your question for fast internet with a sympathetic smile, you don’t have a lot of alternatives left. No matter whether it’s because of conviction or not, satellite internet belongs onto your radar.

Pros and Cons of Internet Access Via Satellite

One significant advantage of satellite connections is evident. You don’t need a phone line. All you need is electricity and a pretty clear view of the sky, as well as a place to install your dish aerial. Aside from the necessity of electricity, you are mostly independent regarding infrastructure and location. When living on a boat, for example, satellite internet should be a topic for you as well.

In the latter case, not even a 4G connection would be an option, but otherwise, you should definitely keep that in mind, too. But from my experience, the 4G structure is nowhere to be found in rural areas, just like a fast data line.

Today’s satellite internet plans are more flexible than they were in the past, providing custom packages with features that you consider to be important. The only model that you won’t find is an unlimited flat-rate. However, there are providers that offer an unlimited night option, for the data-intense surfing while others sleep.

An actual disadvantage is the poor latencies. Due to the large distance of about 35,000 kilometers between the satellites and our earth, there will be calculated latencies ranging from 500 to 700 milliseconds for a two-way connection. According to different practicians, the actual latency is around 1,000 milliseconds. For fans of ego shooters, this is completely unacceptable. Calmer minds are more likely to be okay with that.

Satellite Internet Generation X

Long distances to earth and the resulting poor response times are the main issues with today’s satellite internet. Thus Elon Musk’s company SpaceX attempts to remove this problem effectively. Starting in a couple of days, SpaceX wants to send a rocket into space every two to three weeks.

Website of SpaceX. (Screenshot: Noupe)

This way, a total of 4,425 satellites will be set up. This new generation of communication satellites comes with two advantages. For one, the orbit is supposed to be between 1,150 to 1,275 kilometers away from earth, which is expected to reduce the latency to values similar to cable connections of 25 to 35 milliseconds. The speed is supposed to be able to get to one gigabit per second. For another, the devices will become much smaller, and thus, cheaper. They will weigh less than 400 kilograms a piece, while current communication satellites weigh up to several tons.

Especially the planned number of satellites raises eyebrows, considering that there are only about 1,400 active satellites currently orbiting the earth. Not all scientists like this project as much as Musk.

SpaceX’ plans are soon to be realized, making them the next generation’s most ambitioned project regarding satellite internet. The conditions under which we can potentially profit from this are still unclear.

The plans of Mark Zuckerberg, founder of Facebook, are more conventional. He also intends to bring a satellite into space with his initiative Internet.org. With this conventional satellite, mainly the white-spot areas of Africa are supposed to be covered. The operator will be Eutelsat from France.

Internet.org Website.(Screenshot: Noupe)

The Californian business OneWeb, which just secured an investment of one billion from the Japanese conglomerate Softbank, is closer to SpaceX, and their plans to stuff the orbit with technology. OneWeb also plans to go into orbit, wanting to cover the earth with a total of 900 satellites. OneWeb creates the satellites themselves and names a production capacity of 15 a week. Thus, the 900 may be completed rather quickly.

Website of OneWeb. (Screenshot: Noupe)

According to the founder, Greg Wyler, all satellites are supposed to be installed in their positions until 2020. To start the service, a minimum equipment of 300 satellites is required.

Conclusion: Don’t Wait Now, But Expect the Future to be Exciting

If you want to get yourself a satellite internet access, feel free to do that right now. All other solutions are pie in the sky with a rather unclear perspective. The approach of SpaceX may be exciting and interesting from a technological standpoint. However, nobody can give you a reliable answer to the question when the project will be advanced to the point where they can actually supply you with an internet connection.

Categories: Others Tags:

30 Absolutely Stunning Movie Posters

March 6th, 2017 No comments

Movie posters give graphic designers a very large canvas to work on, which has resulted in some truly stunning and memorable work. The design work that goes into creating these posters can have a big impact on whether or not a movie is ultimately successful, so there’s a lot of pressure put on each designer’s shoulders.

Fortunately, when the right blend of eye-catching and relevant is put together, it’s hard for audiences not to get excited after seeing the poster. Let’s take a closer look at 30 movie posters that represent the very best in this particular graphic design niche.

1.Batman v Superman: Dawn of Justice

The movie was met with mixed reviews and proved to be very divisive among fans, but this poster definitely delivers the goods. The evocative “false god” statement written on Superman’s chest would have been enough to capture attention, but the dark, comic book styled art truly set the tone for the film.

2.Escape from New York

The Statue of Liberty’s head draws viewers in, and the purposeful slant added to the wording on this poster adds visual intrigue. Combine that with the implied motion of the characters on the street, and it’s practically impossible not to pause for a moment and take everything in.

3.Star Wars Episode IV: A New Hope

The art that was used for the original “Star Wars” movie is absolutely gorgeous and has become instantly recognizable. The artist’s choice of colors, placement and elements from the film is exciting and promises a thrill ride. Fortunately, the movie was able to fulfill the high expectations that were generated by such a wonderful piece of art.

4.Cloverfield

The “Cloverfield” poster seems almost like a clever nod to the “Escape from New York” image. After all, here’s the rest of the Statue of Liberty. The decision to depict a decapitated symbol of America proved to be a great choice. Adding the smoke in the distance made the poster even stronger. This poster succeeded in making movie lovers instantly curious, and it didn’t give away any of the film’s secrets.

5.A Clockwork Orange

Whether you love or hate this controversial classic from Stanley Kubrick, it’s hard not to appreciate the artistry that went into the poster. The usage of white space ensures your eyes are drawn to the main character, and it’s easy to see that this is not going to be your average movie.

6.Walk the Line

Bold lines and colors are always a good way to capture attention, and this poster provides an excellent example of this approach. The designer behind this “Walk the Line” poster also used elements of Johnny Cash’s career and personality to make it instantly attractive to fans of Cash’s music.

7.Raiders of the Lost Ark

The muted background tones worked very well for this poster because they enabled the main character to stand out and demand attention. Flanking Indiana Jones on both sides with other characters helped offer a few clues regarding the film’s subject matter and plot, but the main driving point is the excitement of a whip wielding hero.

8.The Spirit

When you make a movie about an old and relatively obscure comic book character, you need to have a hook to bring audiences in. This poster delivered quite nicely. The juxtaposition of the vivid red with the black and white tones is eye-catching, and the large wording begs to be read.

9.The Dark Knight

You know that you selected the perfect tagline when it’s still being used in memes almost a decade later. This poster unveiled the Joker’s phrase “why so serious?” It also let audiences know that this wasn’t going to be the less threatening version of the Joker they’d seen on screen in the past. Instead, this Joker is clearly demented and violent.

10.Amadeus

This piece is instantly compelling due to the use of negative space and the ominous looking character at the top. Is he opening his arms to welcome or threaten you? Viewers aren’t certain, and it adds a huge level of drama and intrigue.

11.Pulp Fiction

Several of the posters that advertised Quinton Tarantino films could have made it onto this list, but “Pulp Fiction” was one of the first to captivate audiences. It feels like the cover to an old pulp novel, and there are many clues in the image of Uma Thurman that provide some insight into the level of action that viewers can expect. At the same time, the calmer, more sensual approach of this particular image is very alluring.

12.The Invasion

Most of the selections on this list have been stunning due to their beauty or usage of colors and space. “The Invasion” is stunning because the designer chose to forego all of those typical elements in favor of a hastily written message that would instantly strike fear in anyone’s heart. It’s an unconventional and bold choice that works very well for the movie’s genre and subject matter.

13.American Beauty

When audiences first saw this poster, they were most likely shocked by the implied nudity and sexuality that was combined with a beautiful rose. The poster captures attention without offering any concrete clues about the film’s content, and yet it has rightfully become one of the most easily recognizable movie posters of all time.

14.The Dark Crystal

Jim Henson’s dark fantasy was ahead of its time. The poster’s designer made the interesting choice of highlighting a villain instead of the heroes. It’s unclear for viewers from a quick glance exactly what this film is about, but the artwork is so beautiful that it’s hard to look away. Billed as a family movie, this poster is a reminder that it really works better as the cult classic that it has become.

15.Zodiac

The serial killer that “Zodiac” is based on is still at large, which makes the usage of thick fog on this poster even more compelling. After all, you could easily get lost in the fog in the same way that the killer eluded authorities. That unknown feelings robs viewers of their sense of security and helps pull them into the madness that California dealt with in the late ‘60s and early ‘70s.

16.Rocketeer

The poster for “Rocketeer” deserves a spot on this list due to the brilliant usage of implied movement. It’s impossible not to feel the excitement of flying while looking at this artwork, and the retro look fits in well with the movie being set in the 1930s.

17.Hitman: Agent 47

The lines on this poster are bold and almost dizzying. Toss in the splash of red in the middle for visual contrast and you have a movie poster that would make anyone do a double take.

18.Moonlight

“Moonlight” uses the tagline “This is the story of a lifetime” to pull audiences in, and this was expertly depicted in the imagery chosen for the poster. Splicing three images together from different stages of a person’s life was visually interesting enough, but choosing a different color for each of them really brought the point home.

19.Ant-Man

Even fans of minimalism were probably stunned when they saw the poster for Marvel’s “Ant-Man.” In fact, if you don’t pay close enough attention, you’ll lose sight of the title character amidst all of the white space. This was a risky approach that paid off big and deserves to be recognized. The designer was probably a bit nervous when pitching a movie poster that was almost completely blank white space, but fortunately, Marvel understood their vision and provided us with this unusual poster.

20.Star Wars: The Force Awakens

This was arguably the most exciting poster of 2015, and it was a great way to advertise one of the most anticipated films of all time. Splitting the poster between the light and dark sides of the force offers a lot of visual contrast, and placing the main character in the middle of everything makes her true identity an even more intriguing secret.

21.W

“W” provides another example of a movie poster that is so unusual that it’s stunning. With the stark white background and long list of quotes from the real-life counterpart to the title character, the creator pushed movie posters into an entirely new direction. Undeniably eye-catching, even if that’s primarily because it’s so unusual to see so much text on a movie poster.

22.Vertigo

A classic example of the perks of using implied motion to draw the viewer in. The usage of the bold red background also attracts attention, especially when contrasted with the presence of white and black.

23.28 Weeks Later

This poster works on many levels, but it’s most notable for having the appearance of an actual quarantine notice. Giving the poster a folded appearance helps sell the illusion, as does the aged and faded effect that was added to the lettering.

24.Sweeney Todd: The Demon Barber of Fleet Street

The bleak subject matter of the film is highlighted in all of the darkness within the poster. The inclusion of a bit of red and one splash of blood combines well with the perspective and evil look on Johnny Depp’s face. This image is captivating to look at it, but it makes it clear that this musical is going to be very dark.

25.Moulin Rouge

Speaking of musicals, “Moulin Rouge’s” poster is romantic, exciting and sensual. The bright splash of red in Nicole Kidman’s dress instantly draws the viewer in, as does the magnificently chosen lighting.

26.The Thing

The poster for the 1982 remake of “The Thing” has become a classic, but did you know that it was created in just one day without any movie stills or concept art to use as a reference point? That alone would make this a stunning poster, but it also stands out for being an intriguing piece that gives practically nothing away about the movie.

27.The Exorcist

It may seem odd to have a poster for a movie about an exorcism that doesn’t feature the exorcism, the person who is possessed or any of the religious items that are used during an exorcism. Fortunately, the image of a lone man standing with a bag staring at light coming out of a window is far more unnerving than any of those other elements would have been. It’s clear something bad is going to happen, which allows audiences to scare themselves with their imagination.

28.Silence of the Lambs

This piece has been acclaimed by many experts as one of the best movie posters of all time, and it features a lot of symbolism and some hidden artwork on the back of the moth. The colored eyes draw you in, and the moth leaves you wondering what nasty surprises lurk within the movie.

29.Metropolis

When a movie poster earns the title of most valuable poster of all time, you know it’s got something going for it. Revered for its aesthetics, this work of art is easily recognized by people who have never even seen the film. There’s a reason it has become a beloved classic; it’s absolutely stunning.

30.Alien

The beauty of the “Alien” poster is that it makes viewers uneasy without actually showing anything that’s truly scary or intimidating. The negative space and eerie glow coming from the egg are enough to scare people, and that makes the execution of this poster a big winner.

Hundreds of movie posters are designed each year, but only a handful will be so stunning that people still display and analyze them many years later. The examples on this list are all in that category, though, and they definitely offer inspiration for graphic designers who want their work to attract a lot of attention.
Bonus: Want more awesome movie posters? Check out these 10 amazing modern posters.

Read More at 30 Absolutely Stunning Movie Posters

Categories: Designing, Others Tags:

Introduction to Web Audio API

March 6th, 2017 No comments
Create audio context - srcset=

Web Audio API let’s us make sound right in the browser. It makes your sites, apps, and games more fun and engaging. You can even build music-specific applications like drum machines and synthesizers. In this article, we’ll learn about working with the Web Audio API by building some fun and simple projects.

Getting Started

Let’s do some terminology. All audio operations in Web Audio API are handled inside an audio context. Each basic audio operation is performed with audio nodes that are chained together, forming an audio routing graph. Before playing any sound, you’ll need to create this audio context. It is very similar to how we would create a context to draw inside with the element. Here’s how we create an audio context:

var context = new (window.AudioContext || window.webkitAudioContext)();

Safari requires a webkit prefix to support AudioContext, so you should use that line instead of new AudioContext();

Normally the Web Audio API workflow looks like this:

Create audio context - srcset= create source -> connect filter nodes -> connect to destination” />

There are three types of sources:

  1. Oscillator – mathematically computed sounds
  2. Audio Samples – from audio/video files
  3. Audio Stream – audio from webcam or microphone

Let’s start with the oscillator

An oscillator is a repeating waveform. It has a frequency and peak amplitude. One of the most important features of the oscillator, aside from its frequency and amplitude, is the shape of its waveform. The four most commonly used oscillator waveforms are sine, triangle, square, and sawtooth.

It is also possible to create custom shapes. Different shapes are suitable for different synthesis techniques and they produce different sounds, from smooth to harsh.

The Web Audio API uses OscillatorNode to represent the repeating waveform. We can use all of the above shown waveform shapes. To do so, we have to assign the value property like so:

OscillatorNode.type = 'sine'|'square'|'triangle'|'sawtooth';

You can create a custom waveform as well. You use the setPeriodicWave() method to create the shape for the wave, that will automatically set the type to custom. Let’s listen how different waveforms produce different sounds:

See the Pen.

Custom waveforms are created using Fourier Transforms. If you want to learn more about custom waveform shapes (like how to make a police siren, for example) you can learn it from this good resource.

Running the oscillator

Let’s try to make some noise. Here’s what we need for that:

  1. We have to create a Web Audio API context
  2. Create the oscillator node inside that context
  3. Choose waveform type
  4. Set frequency
  5. Connect oscillator to the destination
  6. Start the oscillator

Let’s convert those steps into code.

var context = new (window.AudioContext || window.webkitAudioContext)();

var oscillator = context.createOscillator();

oscillator.type = 'sine';
oscillator.frequency.value = 440;
oscillator.connect(context.destination);
oscillator.start();

Note how we define the audio context. Safari requires the webkit prefix, so we make it cross-browser compatible.

Then we create the oscillator and set the type of the waveform. The default value for type is sine, so you can skip this line, I just like to add it to make it more clear and easy to update. We set the frequency value to 440, which is the A4 note (which is also the default value). The frequencies of musical notes C0 to B8 are in the range of 16.35 to 7902.13Hz. We will check out an example where we play a lot of different notes later in this article.

Now when we know all of that, let’s make the volume adjustable as well. For that we need to create the gain node inside of the context, connect it to the chain, and connect gain to the destination.

var gain = context.createGain();
oscillator.connect(gain);
gain.connect(context.destination);

var now = context.currentTime;
gain.gain.setValueAtTime(1, now);
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.5);
oscillator.start(now);
oscillator.stop(now + 0.5);

Now you have some knowledge of working with the oscillator, here’s a good exercise. This Pen has the oscillator code setup. Try to make a simple app that changes the volume when you move the cursor up and down your screen, and changes the frequency when you move the cursor left and right.

Timing of Web Audio API

One of the most important things in building audio software is managing time. For the precision needed here, using the JavaScript clock is not the best practice, because it’s simply not precise enough. However the Web Audio API comes with the currentTime property, which is an increasing double hardware timestamp, which can be used for scheduling audio playback. It starts at 0 when the audio context is declared. Try running console.log(context.currentTime) to see the timestamp.

For example, if you want the Oscillator to play immediately you should run oscillator.start(0) (you can omit the 0, because it’s the default value). However you may want it to start in one second from now, play for two seconds, then stop. Here’s how to do that:

var now = context.currentTime;
oscillator.play(now + 1);
oscillator.stop(now + 3);

There are two methods to touch on here.

The AudioParam.setValueAtTime(value, startTime) method schedules change of the value at the precise time. For example, you want to change frequency value of the oscillator in one second:

oscillator.frequency.setValueAtTime(261.6, context.currentTime + 1);

However, you also use it when you want to instantly update the value, like .setValueAtTime(value, context.currentTime). You can set the value by modifying the value property of the AudioParam, but any updates to the value are ignored without throwing an exception if they happen at the same moment as the automation events (events scheduled using AudioParam methods).

The AudioParam.exponentialRampToValueAtTime(value, endTime) method schedules gradual change of the value. This code will exponentially decrease the volume of the oscillator in one second, which is a good way to stop sound smoothly:

gain.gain.exponentialRampToValueAtTime(0.001, context.currentTime + 1);

We can’t use 0 as the value because the value needs to be positive, so we use a very small value instead.

Creating the Sound class

Once you stop an oscillator, you cannot start it again. You didn’t do anything wrong, it’s the feature of the Web Audio API that optimizes the performance. What we can do is to create a sound class that will be responsible from creating oscillator nodes, and play and stop sounds. That way we’ll be able to call the sound multiple times. I’m going to use ES6 syntax for this one:

class Sound {

  constructor(context) {
    this.context = context;
  }

  init() {
    this.oscillator = this.context.createOscillator();
    this.gainNode = this.context.createGain();

    this.oscillator.connect(this.gainNode);
    this.gainNode.connect(this.context.destination);
    this.oscillator.type = 'sine';
  }

  play(value, time) {
    this.init();

    this.oscillator.frequency.value = value;
    this.gainNode.gain.setValueAtTime(1, this.context.currentTime);
            
    this.oscillator.start(time);
    this.stop(time);

  }

  stop(time) {
    this.gainNode.gain.exponentialRampToValueAtTime(0.001, time + 1);
    this.oscillator.stop(time + 1);
  }

}

We pass the context to the constructor, so we can create all of the instances of the Sound class within same context. Then we have the init method, that creates the oscillator and all of the necessary filter nodes, connects them, etc. The Play method accepts the value (the frequency in hertz of the note it’s going to play) and the time when it shall be played. But first, it creates the oscillator, and that happens every time we call the play method. The stop method exponentially decreases the volume in one second until it stops the oscillator completely. So whenever we need to play the sound again, we create a new instance of the sound class and call the play method. Now we can play some notes:

let context = new (window.AudioContext || window.webkitAudioContext)();
let note = new Sound(context);
let now = context.currentTime;
note.play(261.63, now);
note.play(293.66, now + 0.5);
note.play(329.63, now + 1);
note.play(349.23, now + 1.5);
note.play(392.00, now + 2);
note.play(440.00, now + 2.5);
note.play(493.88, now + 3);
note.play(523.25, now + 3.5);

That will play C D E F G A B C, all within the same context. If you want to know the frequencies of notes in hertz, you can find them here.

Knowing all of this makes us able to build something like a xylophone! It creates a new instance of Sound and plays it on mouseenter. You can check the example and try make one by yourself as an exercise.

See the Pen Play the Xylophone (Web Audio API) by Greg Hovanesyan (@gregh) on CodePen.

I’ve created a playground, containing all the required HTML and CSS, and the Sound class we’ve created. Use the data-frequency attribute to obtain the note values. Try here.

Working with a recorded sound

Now that you’ve built something with an oscillator, let’s now see how to work with a recorded sound. Some sounds are very hard to reproduce using the oscillator. In order to use realistic sounds in many cases, you’ll have to use recorded sounds. This can be `.mp3`, `.ogg`, `.wav`, etc. See the full list for more info. I like to use `.mp3` as it’s lightweight, widely supported, and has pretty good sound quality.

You can’t simply get sound by a URL like you do with images. We have to run an XMLHttpRequest to get the files, decode the data, and put into the buffer.

class Buffer {

  constructor(context, urls) {  
    this.context = context;
    this.urls = urls;
    this.buffer = [];
  }

  loadSound(url, index) {
    let request = new XMLHttpRequest();
    request.open('get', url, true);
    request.responseType = 'arraybuffer';
    let thisBuffer = this;
    request.onload = function() {
      thisBuffer.context.decodeAudioData(request.response, function(buffer) {
        thisBuffer.buffer[index] = buffer;
        updateProgress(thisBuffer.urls.length);
        if(index == thisBuffer.urls.length-1) {
          thisBuffer.loaded();
        }       
      });
    };
    request.send();
  };

  loadAll() {
    this.urls.forEach((url, index) => {
      this.loadSound(url, index);
    })
  }

  loaded() {
    // what happens when all the files are loaded
  }

  getSoundByIndex(index) {
    return this.buffer[index];
  }

}

Let’s take a look at the constructor. We receive our context there as we did in the Sound class, receive the list of URLa that will be loaded, and an empty array for the buffer.

The we have two methods: loadSound and loadAll. loadAll loops through the list of URLs and calls the loadSound method. It’s important to pass the index, so that we put the buffered sound into the correct element of the array, regardless of which request loads first. This also let’s us see which request is the last, which means that on its completion the buffer is loaded.

Then you can call the loaded() method, which can do something like hiding the loading indicator. And finally the getSoundByIndex(index) method gets the sound from the buffer by index for playback.

The decodeAudioData method has a newer Promise-based syntax, but it doesn’t work in Safari yet:

context.decodeAudioData(audioData).then(function(decodedData) {
  // use the decoded data here
});

Then we have to create the class for the sound. Now we have our complete class to work with the recorded sound:

class Sound() {

  constructor(context, buffer) {
    this.context = context;
    this.buffer = buffer;
  }

  init() {
    this.gainNode = this.context.createGain();
    this.source = this.context.createBufferSource();
    this.source.buffer = this.buffer;
    this.source.connect(this.gainNode);
    this.gainNode.connect(this.context.destination);
  }

  play() {
    this.setup();
    this.source.start(this.context.currentTime);
  }  

  stop() {
    this.gainNode.gain.exponentialRampToValueAtTime(0.001, this.context.currentTime + 0.5);
    this.source.stop(this.context.currentTime + 0.5);
  }

}

The constructor accepts the context and the buffer. We create by calling createBufferSource() method, instead of createOscillator as we did before. The buffer is the note (element from the buffer array) that we get using the getSoundByIndex() method. Now instead of the oscillator we create a buffer source, set the buffer, and then connect it to the destination (or gain and other filters).

let buffer = new Buffer(context, sounds);
buffer.loadAll();

sound = new Sound(context, buffer.getSoundByIndex(id));
sound.play();

Now we have to create an instance of buffer and call the loadAll method, to load all of the sounds into the buffer. We also have the getSoundById method to grab the exact sound we need, so we pass the sound to the Sound and call play(). The id can be stored as a data attribute on the button that you click to play the sound.

Here’s a project that uses all of that: the buffer, the recorded notes, etc:

See the Pen The Bluesman – You Can Play The Blues (Web Audio API) by Greg Hovanesyan (@gregh) on CodePen.

You can use that example for for reference, but for your own exercise, here’s a playground I’ve created. It has all the necessary HTML and CSS and the URLs to the notes that I have recorded on a real electric guitar. Try writing your own code!

Intro to Filters

The Web Audio API lets you add different filter nodes between your sound source and destination. BiquadFilterNode is a simple low-order filter which gives you control over what parts of the frequency parts shall be emphasized and which parts shall be attenuated. This lets you build equalizer apps and other effects. There are 8 types of biquad filters: highpass, lowpass, bandpass, lowshelf, highshelf, peaking, notch, and allpass.

Highpass is a filter that passes higher frequencies well, but attenuates lower frequency components of signals. Lowpass passes lower frequencies, but attenuates higher frequencies. They are also called “low cut” and “high cut” filters, because that explains what what happens to the signal.

Highshelf and Lowshelf are filters are used to control the bass and treble of the sound. They are used to emphasize or reduce signals above or below the given frequency.

You will find a Q property BiquadFilterNode interface, which is a double representing the Q Factor. Quality Factor or Q Factor control the bandwidth, the number of frequencies that are affected. The lower the Q factor, the wider the bandwidth, meaning the more frequencies will be affected. The higher the Q factor, that narrower the bandwidth.

You can find more info about filters here, but we can already build a parametric equalizer. It’s an equalizer that gives full control for adjusting the frequency, bandwidth and gain.

Let’s build a parametric equalizer.

See the Pen.

Let’s take a look on how we can apply distortion to the sound. If you wonder what makes an electric guitar sound like one, it is the distortion effect. We use the WaveShaperNode interface to represent a non-linear distorter. What we need to do is to create a curve that will shape the signal, distorting and producing the characteristic sound. We don’t have to spend a lot of time to create the curve, as it’s already done for us. We can adjust the amount of distortion as well:

See the Pen.

Afterword

Now that you’ve seen how to work with the Web Audio API, I recommend playing with it on your own and making your own projects!

Here are some libraries for working with web audio:

  • Pizzicato.js – Pizzicato aims to simplify the way you create and manipulate sounds via the Web Audio API
  • webaudiox.js – webaudiox.js is a bunch of helpers that will make working with the WebAudio API easier
  • howler.js – Javascript audio library for the modern web
  • WAD – Use the HTML5 Web Audio API for dynamic sound synthesis. It’s like jQuery for your ears
  • Tone.js – A Web Audio framework for making interactive music in the browser

Introduction to Web Audio API is a post from CSS-Tricks

Categories: Designing, Others Tags:

The best new portfolio sites, March 2017

March 6th, 2017 No comments

Hey everybody, it’s March. I’ve only got one pun for this month, and I already used it a year ago, so I’m just going to spare you all, okay?

Let’s get to looking at portfolios. This month, the trend continues to be asymmetry mixed with minimalism and generous white space. It’s all very elegant and post-brutalism—that didn’t take long now, did it? From a UX perspective, it’s not bad if you don’t go overboard on the JS. From an aesthetic perspective, it’s beautiful.

From the perspective of a guy who writes these articles every month, I’m ready for the next trend, now.

Samantha Zhang

It’s rare to see a designer trust their content (which in this case is their work) as much as Samantha Zhang does. Many of the minimalist sites I find still depend on some gimmick or trend to set themselves apart.

That approach is so common, it makes sites like this one stand out by their sheer simplicity. It’s just good type, a simple layout, and it’s done. As a UX guy, I would not be sad if most of the web looked like this.

I know, I know. It’ll never happen, and that’s probably for the best.

Rakesh

Like any true rock star, Rakesh only gives us his first name. He also gives us a beautiful dark interface to stare at.

Like the Samantha’s site, its defining feature is great type, but it could hardly be called minimalist. It’s more like a collage of text and images that nonetheless manages to look professional, rather than purely artistic. It’s a pleasure to read through.

Clearleft

Here’s a big one! In the minds of many Clearleft will always be “those web standards guys”. That’s still a big part of their identity, but it’s only one part of their identity these days. To reflect that, they’ve updated their site bigtime.

It looks a bit more semi-corporate now, with a clear focus on selling to larger clients (which makes sense, considering…). The actual portfolio section of the site is consequently made up of full-blown case studies. The whole site… well do I really need to tell you it looks good? It’s Clearleft. Just go look.

Tobias van Schneider

Tobias van Schneider kept things dead simple when he designed his site. It’s big, fat text, and lots of photos. Okay, that does nothing to describe the skill behind his use of big fat text and photos, which is considerable. There’s lots of contrast, it’s all easy to read, and the whole site is well organized.

It has to be. It needs to show off his his aried skillsets and projects, after all. Tobias is no one-trick-pony, and I think this site does a great job of conveying this.

P22

P22 is one of those sites that looks dead simple until you start actually navigating through it. The classic type-and-borders look hides some well-executed animation, and other JS-based touches that enhance the experience.

Alexis Facca

Alexis Facca’s site showcases its sense of style in its organization, type, and animation. Most notably, it uses page transitions designed to look like distortion. I happen to think it’s cool. If there was ever an example or brutalism that actually looked good, this might be it.

Or maybe it’s just minimalism with a “digital” flavor.

Volkhaus

Volkhaus is another site that is very minimalist, but distinguishes itself (at least on its home page) with animation.

Paack

Paack give us some more of that asymmetrical minimalism with a nice twist: it scrolls horizontally. Horizontal scrolling is hardly a good idea for most sites, but for sites with relatively little content, it works.

Pro tip: Paack remaps the scroll wheel to work properly with horizontal scrolling. Be like Paack. Don’t just rely on a gimmick. Pay attention to the details.

Grant Burke

Grant Burke’s portfolio is text heavy, and mixes a dead-simple premise with a striking shade of gold-ish yellow. That’s right, yellow is back, baby, and cheating its way onto this list. His site also works perfectly with JS turned off.

My only complaint is the needlessly small text. I can see why it was done in this case, but it’s still not great. Otherwise, this site ticks pretty much all of my personal boxes.

Maison Carnot

This site is a living, breathing current trend! Asymmetry! Text overlapping on stuff! Serif headings and sans content!

No, but really, it looks great, and you should steal ideas from it. It just also happens to be the epitome of current design trends, and I can’t help but be a bit sarcastic.

sguardiostinati

sguardiostinati. I don’t know if that’s a person’s name or what, but it seems to be the name of a small film studio in Italy. Their site looks a bit like a spreadsheet or database at first glance, with the rows expanding to show you what each project is about.

Okay, that sounds boring, but it’s a surprisingly elegant approach, and it’s elegantly styled as well.

Moreau Kusunoki

Moreau Kusunoki’s portfolio defies current trends by, well, using a grid. That’s the great circle of life, really. For this architectural portfolio, the grid is thematically appropriate, and well executed.

If you want a bit more detail, however, you can switch to “list view” which looks a bit like (can you guess where I’m going?) a spreadsheet. It turns out that one of the most efficient ways of displaying information at a glance is becoming more popular on the web. Who knew?

The hilarious thing is that I don’t think anyone will ever use tables for it.

Anagram

I don’t normally advocate preloaders or heavy JS, but Anagram is getting a free pass. I mean, the site looks great. That’s part of it, but it’s not why they get a free pass.

Go to the page. Click and drag it, or swipe through it on your phone. See that effect? That’s why they get a free pass. Whomever does this next won’t, but they do. It’s just that much fun.

Juliette Neveu

Juliette Neveu’s portfolio brings us yet more of the now-popular minimalist-but-asymetrical style. It’s modern. It defies conventional grid layouts. It’s pretty. Most importantly, it fits rather well with the style of her client work.

Veintidos Grados

Veintidos Grados presents a clean, dark design with plenty of animation. There’s a lot to this one, so it’s hard to describe properly, but it’s worth going in and checking out all of the little details.

Heydays

Heydays takes a bold risk by making their portfolio a slideshow. That’s it, by the way. Just a full-screen slideshow, with some navigation scattered along the edges. It makes a bold impression, to be sure.

Alessandro Carpellini

Alessandro’s portfolio has a similar slideshow setup, but it’s restricted to the header of the site. There’s text below for anyone who wants to know more. It’s still bold, but doesn’t lack for relevant information.

Hum Creative

Okay, I’ve talked about how bored I’m getting with the trends featured on this site, but Hum Creative is still great. It’s peak trend, with its minimalist, asymmetry, and navigation scattered to the four corners of the screen, but it’s just so beautifully executed, that I had to include it here.

What really pushed this site over the top for me were the little details. There is a wave in the middle of the “H” when you scroll. There are custom-branded mouse cursors that don’t seem over the top or irritating. There is a minimum of stylish animation.

And then there are the screen savers. Yes, screen savers. They show up if you haven’t interacted with the site for a while. This would be really irritating on a text-heavy site, but here it’s kind of amusing.

302 Found

Found

The document has moved here.


Apache Server at www.mightydeals.com Port 80

Source

Categories: Designing, Others Tags:

Icons8 Lunacy: How to Open Sketch Files Under Windows

March 6th, 2017 No comments

Lunacy is a Sketch file viewer made by pictogram factory Icons8. Lunacy runs smoothly while being completely free. There’s even a portable version.

Sketch: Great Tool, If it Wasn’t For This One Problem

Sketch by Bohemian Coding is a vector editor that has become an everyday tool for many web developers, replacing Adobe Illustrator. The newcomer’s strong focus on web developer needs is likely to be the main reason for its popularity. The subscription constraint as placed by Adobe as a factor probably is not to be underestimated either.

It could all be so easy if Sketch wasn’t available exclusively for macOS. This excludes a large share of the design community. The operators of the pictogram manufactory Icons8 did not want to accept that lack and created a viewer.

Lunacy Opens Sketch Files Under Windows

Using this tool, called Lunacy, you can at least open Sketch files. Advanced features are already being developed. You can copy the CSS for individual objects, though. The same goes for text.

As we can see from different comparison screenshots, the Icons8 team proves that display under Windows is very close to the macOS original. Differences are mostly based on the different display configuration of the two operating systems.

Example 1: Sketch File under Mac
Example 1: Sketch File under Windows
Example 2: Sketch File under Mac
Example 2: Sketch File under Windows

Lunacy is a software that is available for free download and use. Keep in mind that this is an alpha version. In my tests, it crashed occasionally, but it worked correctly for the most part.

When installing Lunacy on your Windows computer, you can directly associate the file extension .sketch with Lunacy. The installation is not necessarily required, however. Icons8 also provide a portable version that functions autonomously from within an Exe file.

Lunacy in Action

Icons8: Symbol Forge With Giant Supply

Icons8 have been a part of almost all of our symbol overviews here at Noupe, most recently, they were part of our Best of 2016 With 100 Free Icon Sets.

Generally, the entire pictogram range of Icons8 is completely free to use as long as you can settle for a size limit of 100 x 100 pixels in the PNG file format, and if you are willing to properly link Icons8 every time.

Other formats in all possible resolutions are exclusive to paying customers.

Categories: Others Tags:

World Wide Web, Not Wealthy Western Web (Part 1)

March 6th, 2017 No comments

“There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy,” said Shakespeare’s Hamlet, in the famous scene in which Hamlet teaches Horatio to be a web designer.

Horatio, as every schoolchild knows, is a designer from Berlin (or sometimes London or Silicon Valley) who has a top-of-the-line MacBook, the latest iPhone and an unlimited data plan over the fastest, most reliable network. But, as Hamlet points out to him, this is not the experience of most of the world’s web visitors.

The post World Wide Web, Not Wealthy Western Web (Part 1) appeared first on Smashing Magazine.

Categories: Others Tags:

Popular design news of the week: February 27, 2017 – March 5, 2017

March 5th, 2017 No comments

Every week users submit a lot of interesting stuff on our sister site Webdesigner News, highlighting great content from around the web that can be of interest to web designers.

The best way to keep track of all the great stories and news being posted is simply to check out the Webdesigner News site, however, in case you missed some here’s a quick and useful compilation of the most popular designer news that we curated from the past week.

Note that this is only a very small selection of the links that were posted, so don’t miss out and subscribe to our newsletter and follow the site daily for all the news.

Macro – A Super Focused Image Editor for the Mac

Bad Design Caused the Oscars Best Picture Mix-up

The Real Difference Between Google and Apple

Good Vs. Bad Designers

Tiny Trends: Flogos!

Freeter 1.0 – The Smartest Way to Work on your Computer

18 CSS Tabs

App for Unlimited Color Palettes

Annual Report of Web Design Trends

Brutalist Design Now has its own Framework

Material Mixer – Mix Match Material Colors to See What Works Best

How to Start: From UX to UI Designer

Visual Discussion Tool for Web Developers

The Best Sublime Text Plugins for Front End Developers

The 30 Marketing Terms You Need to Know as a Web Designer

10 of the Best New Graphic Design Tools

10 Things You Should NEVER Ask a Designer

Pantone Releases its List of Top Trending Colors for Autumn 2017

Early Apple Memos Discovered in Seattle Thrift Store

Dyslexie Font: A Dyslexia-friendly Typeface

Finding your Graphic Design Niche

What You Need to Know About Typography and Color

UX Thoughts on Using Video as a Background

The Designer’s Guide to Grid Theory

Picnic: A Sketch Plugin for Working Together in a Single File

Want more? No problem! Keep track of top design news from around the web with Webdesigner News.

302 Found

Found

The document has moved here.


Apache Server at www.mightydeals.com Port 80

Source

Categories: Designing, Others Tags:

Comics of the week #381

March 4th, 2017 No comments

Every week we feature a set of comics created exclusively for WDD.

The content revolves around web design, blogging and funny situations that we encounter in our daily lives as designers.

These great cartoons are created by Jerry King, an award-winning cartoonist who’s one of the most published, prolific and versatile cartoonists in the world today.

So for a few moments, take a break from your daily routine, have a laugh and enjoy these funny cartoons.

Feel free to leave your comments and suggestions below as well as any related stories of your own…

Font offense

Partners

The Romantic Designer

Can you relate to these situations? Please share your funny stories and comments below…

302 Found

Found

The document has moved here.


Apache Server at www.mightydeals.com Port 80

Source

Categories: Designing, Others Tags: