Code Monkey home page Code Monkey logo

spark-ar-tutorial-audio-visualizer's Introduction

Spark AR - Audio Visualizer

using the software Meta Spark Studio

This tutorial is an entry for the 2020 Developer Circles Community Challenge hosted by Facebook.

Regional Winner πŸ…

Overview πŸ”

Welcome in this Meta Spark AR Studio tutorial . In this project, we will learn how to make an audio visualizer using the audio features in Meta Spark AR. This is a tutorial for beginner.

At the end of the tutorial you will learn how to make an Audio Visualizer like this:

This tutorial will cover :

  • importing the 3d object
  • Make it react to audio using the Patch Editor

In this tutorial I’m using the version 99 of Meta Spark AR Studio.

Why You Should Use Meta Spark AR ? πŸ’‘

With more than 400,000 creators from 190 countries, Meta Spark AR is the largest platform for mobile AR . Over 1.2 million AR effects where published on Facebook and Instagram .

This is just the beginning

We are still in the early days! Every update is a surprise with new features.

With or without code, Meta Spark AR Studio enhances your creativity and expand your digital creative skills. A powerful software to create astonishing Augmented Reality effects.

The best tool to reach a large audience!

Download Meta Spark AR Studio

Videos 🎬

A quick Walkthrough Video of the tutorial.

The following video is a step-by-step video tutorial. It contains and show all the process described in this tutorial.

Getting Started 🚢

For this project we need :

To start this tutorial, you need to download the software Meta Spark AR Studio and open it. You also need the 3D model 'audioBar.fbx' in the folder '3D-model'. We will see the audio nodes in the patch editor and use it.

Setting up the scene

Let's start our project by :

  1. Opening the software
  2. New Project
  3. Choose Plane Tracking

Once our project is opened. Let's drag and drop the 3D model in the project then drag the object in the placer.

Select the audioBar in your scene and change the scale value to 0.1 on your right like this :

When done, duplicate the audioBar and change the position of the second audioBar value to 0.2 on the X axis. like this :

Repeat this step until you have 8 audioBar. The scene on your left top of the screen should look like this :

Material

Now let's create the materials we gonna apply on the 3d object (audioBar). For this project I will create 8 materials with different colors.

To apply a material :

  • select the cube inside the audioBar
  • on the right, create a material
  • select your material on the left side of your screen

Like this :

Now that you have your material, we can improve it by :

  • changing the 'Shader Type' and choose 'Physically-Based'
  • changing the colour

Import an environment texture :

The material should look like this :

Make the 3D object react to audio πŸƒ

Edit Properties

The features we are using are only available for Instagram. We have to disable Facebook as a platform. For this we go under : Project > Edit Properties > Uncheck Facebook

Like this :

Audio Analyzer 🎹

Now that your scene is placed, we open the Patch Editor : | View > Show/Hide Patch Editor

It will open the Patch Editor.

In your scene :

  1. drag and drop the Microphone in your Patch Editor.
  2. Right Click in the patch editor and select under Audio the Audio Analyzer
  3. link the microphone to the Audio Analyzer ( Microphone to Audio)

The Audio Analyzer is an element that provide us the ability to separate the audio into 8 different channels. The frequencies goes from 0Hz to 12'000Hz.

Info about the Audio Analyzer :

Scale the 3D object

Select your audioBar, on the right of your screen you have to active the scale by clicking the arrow. Here :

Right click in the Patch Editor and add a 'Transition' element. Change the values of the transition element to make it look like this :

Link the Audio Analyzer > Transition > audioBar '3D Scale'

Add a Speaker πŸ”ˆ

Now we have add a speaker to use it as the output of the audio. In you scene :

  • click on 'Add Object' and add a speaker
  • select your Speaker
  • click on the arrow under Audio

like this :

Link the first output of your Audio Analyzer to the Speaker output (yellow element) :

Repeat the step with the audioBar2

Repeat these steps for all your audioBar objects.

Your patch should look like this :

Preview and Upload πŸš€

Now that we are finished ; we can preview our effect to your Meta Spark AR Player app or send to your Instagram account :

We're ready to upload !

On bottom of your screen :

  • click Upload and Export
  • Follow the process of uploading a filter to your account

What’s next? 😏

Join a Developer Circles 😌

Learn more about Meta Spark AR Studio here :

Download Meta Spark AR

Link to the project on GitHub : https://github.com/RobbieConceptuel/spark-ar-tutorial-audio-visualizer

Link to additional resources to learn : https://sparkar.facebook.com/ar-studio/learn/

Join the Meta Spark AR Community

Made with πŸ’– by Robbie Conceptuel - Updated in 2024

spark-ar-tutorial-audio-visualizer's People

Contributors

robbieconceptuel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

otaodofino

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.