
<!doctype html>
<html lang="en" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
      
      
      
        <link rel="prev" href="script.html">
      
      
        <link rel="next" href="../manual/control_hotkeys.html">
      
      
      <link rel="icon" href="../src/images/logo_square.png">
      <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.19">
    
    
      
        <title>Best Practices - Synesthesia Docs</title>
      
    
    
      <link rel="stylesheet" href="../assets/stylesheets/main.7e37652d.min.css">
      
      


    
    
      
    
    
      
        
        
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
        <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
      
    
    
      <link rel="stylesheet" href="../stylesheets/sass_output.css">
    
    <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
    
      

    
    
    
  </head>
  
  
    <body dir="ltr">
  
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#ssf-best-practices" class="md-skip">
          Skip to content
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
    
      

  

<header class="md-header md-header--shadow" data-md-component="header">
  <nav class="md-header__inner md-grid" aria-label="Header">
    <a href="../index.html" title="Synesthesia Docs" class="md-header__button md-logo" aria-label="Synesthesia Docs" data-md-component="logo">
      
  <img src="../src/images/logo_square.png" alt="logo">

    </a>
    <label class="md-header__button md-icon" for="__drawer">
      
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
    </label>
    <div class="md-header__title" data-md-component="header-title">
      <div class="md-header__ellipsis">
        <div class="md-header__topic">
          <span class="md-ellipsis">
            Synesthesia Docs
          </span>
        </div>
        <div class="md-header__topic" data-md-component="header-topic">
          <span class="md-ellipsis">
            
              Best Practices
            
          </span>
        </div>
      </div>
    </div>
    
    
      <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
    
    
    
      
      
        <label class="md-header__button md-icon" for="__search">
          
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
        </label>
        <div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
      <label class="md-search__icon md-icon" for="__search">
        
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
        
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
      </label>
      <nav class="md-search__options" aria-label="Search">
        
        <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
          
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
        </button>
      </nav>
      
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
        <div class="md-search-result" data-md-component="search-result">
          <div class="md-search-result__meta">
            Initializing search
          </div>
          <ol class="md-search-result__list" role="presentation"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
      
    
    
  </nav>
  
</header>
    
    <div class="md-container" data-md-component="container">
      
      
        
          
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              
              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    



<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href="../index.html" title="Synesthesia Docs" class="md-nav__button md-logo" aria-label="Synesthesia Docs" data-md-component="logo">
      
  <img src="../src/images/logo_square.png" alt="logo">

    </a>
    Synesthesia Docs
  </label>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
  
  
  
  
    <li class="md-nav__item">
      <a href="../index.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Introduction
    
  </span>
  

      </a>
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
        
          
          <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
            
  
  
  <span class="md-ellipsis">
    Quick Links
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_2">
            <span class="md-nav__icon md-icon"></span>
            Quick Links
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="audio_uniforms.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    SSF Audio Uniforms
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="standard_uniforms.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    SSF Standard Uniforms
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="functions.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    SSF Functions
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="json.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    JSON Configuration
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
        
          
          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
            
  
  
  <span class="md-ellipsis">
    FAQ
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_3">
            <span class="md-nav__icon md-icon"></span>
            FAQ
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/index.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    General
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/troubleshooting.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Troubleshooting
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/license.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    License
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/audio.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Audio
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/video.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Video
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/settings.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Settings
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../faq/midi_osc.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    MIDI & OSC
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
    
  
  
  
    
    
    
    
    
    <li class="md-nav__item md-nav__item--active md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" checked>
        
          
          <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
            
  
  
  <span class="md-ellipsis">
    SSF Documentation
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="true">
          <label class="md-nav__title" for="__nav_4">
            <span class="md-nav__icon md-icon"></span>
            SSF Documentation
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="ssf.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Synesthesia Shader Format (SSF)
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="audio_uniforms.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    SSF Audio Uniforms
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="standard_uniforms.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    SSF Standard Uniforms
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="functions.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    SSF Functions
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="libraries.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    External Libraries
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="json.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    JSON Configuration
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="script.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    JavaScript Scripting
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
    
  
  
  
    <li class="md-nav__item md-nav__item--active">
      
      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
      
      
        
      
      
        <label class="md-nav__link md-nav__link--active" for="__toc">
          
  
  
  <span class="md-ellipsis">
    Best Practices
    
  </span>
  

          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <a href="best_practices.html" class="md-nav__link md-nav__link--active">
        
  
  
  <span class="md-ellipsis">
    Best Practices
    
  </span>
  

      </a>
      
        

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#audio-reactivity" class="md-nav__link">
    <span class="md-ellipsis">
      Audio Reactivity
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#controls" class="md-nav__link">
    <span class="md-ellipsis">
      Controls
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#miscellaneous-tips" class="md-nav__link">
    <span class="md-ellipsis">
      Miscellaneous Tips
    </span>
  </a>
  
</li>
      
    </ul>
  
</nav>
      
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
        
          
          <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
            
  
  
  <span class="md-ellipsis">
    Synesthesia Manual
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_5">
            <span class="md-nav__icon md-icon"></span>
            Synesthesia Manual
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../manual/control_hotkeys.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Control Hotkeys
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../manual/osc.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    OSC
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
        
          
          <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
            
  
  
  <span class="md-ellipsis">
    Tutorials
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_6">
            <span class="md-nav__icon md-icon"></span>
            Tutorials
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/links.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    External Links
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/quickstart_guide.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Quickstart Guide
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/first_scene.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Creating Your First Scene
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/presets_favslots_playlists.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    How to Use Presets, Favslots, and Playlists
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/control_hotkeys.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    How to Use Control Hotkeys
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/livestream.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    How to Add Audio Reactive Visuals to a Livestream with OBS
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/shadertoy_conversion.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    How to Manually Convert from Shadertoy.com to SSF
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/1.19_javascript.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    How to Update Controls and Use Event Handlers with JavaScript
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tutorials/1.16_walkthrough.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    v1.16 Feature Walkthrough
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
        
          
          <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
            
  
  
  <span class="md-ellipsis">
    Resources
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_7">
            <span class="md-nav__icon md-icon"></span>
            Resources
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../resources/syn_installers.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Synesthesia Installers
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../resources/changelogs.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Synesthesia Changelogs
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../resources/syn_resources.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    Synesthesia Resources
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../resources/glsl_resources.html" class="md-nav__link">
        
  
  
  <span class="md-ellipsis">
    GLSL Resources
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#audio-reactivity" class="md-nav__link">
    <span class="md-ellipsis">
      Audio Reactivity
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#controls" class="md-nav__link">
    <span class="md-ellipsis">
      Controls
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#miscellaneous-tips" class="md-nav__link">
    <span class="md-ellipsis">
      Miscellaneous Tips
    </span>
  </a>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          
            <div class="md-content" data-md-component="content">
              <article class="md-content__inner md-typeset">
                
                  



<div><h1 id="ssf-best-practices">SSF Best Practices</h1>
<p>Here are some of the best practices our team has come to over the years of working with Synesthesia and performing with Scenes at live events.</p>
<h3 id="audio-reactivity">Audio Reactivity</h3>
<p>Audio Reactivity is a core piece of Synesthesia's identity. More than anything else, this is what makes an SSF Scene different from an ISF or Shadertoy work. So aside from the basic utility scenes (where audio reactivity may just be annoying), every scene should have some Audio Reactivity. How you add it to the scene is up to you. Here are some ideas to get you started:</p>
<div class="codehilite"><pre><span></span><code><span class="c1">//Basic Color Flashing</span>
<span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mix</span><span class="p">(</span><span class="n">col</span><span class="p">,</span><span class="w"> </span><span class="n">col</span><span class="o">*</span><span class="n">vec3</span><span class="p">(</span><span class="mf">2.0</span><span class="p">,</span><span class="mf">1.5</span><span class="p">,</span><span class="mf">0.5</span><span class="p">),</span><span class="w"> </span><span class="n">syn_HighHits</span><span class="p">);</span>

<span class="c1">//Camera Time for Raymarched Scene</span>
<span class="n">rayOrigin</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">vec3</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="n">syn_BassTime</span><span class="p">);</span>

<span class="c1">//Slow color shifts with the overall song structure</span>
<span class="n">col</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">mix</span><span class="p">(</span><span class="n">vec3</span><span class="p">(</span><span class="mf">0.6</span><span class="p">,</span><span class="mf">1.0</span><span class="p">,</span><span class="mf">2.0</span><span class="p">),</span><span class="w"> </span><span class="n">vec3</span><span class="p">(</span><span class="mf">1.5</span><span class="p">,</span><span class="mf">1.0</span><span class="p">,</span><span class="mf">0.6</span><span class="p">),</span><span class="w"> </span><span class="n">syn_BassPresence</span><span class="p">);</span>

<span class="c1">//Random Location each Beat for a Circle</span>
<span class="n">vec2</span><span class="w"> </span><span class="n">circlePos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">0.5</span><span class="o">+</span><span class="mf">0.5</span><span class="o">*</span><span class="n">vec2</span><span class="p">(</span><span class="n">sin</span><span class="p">(</span><span class="n">syn_RandomOnBeat</span><span class="o">*</span><span class="mi">2</span><span class="o">*</span><span class="n">PI</span><span class="p">),</span><span class="w"> </span><span class="n">cos</span><span class="p">(</span><span class="n">syn_ToggleOnBeat</span><span class="o">*</span><span class="mi">2</span><span class="o">*</span><span class="n">PI</span><span class="p">));</span>

<span class="c1">//Canvas Shake on Bass Hits</span>
<span class="n">uv</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">vec2</span><span class="p">(</span><span class="n">sin</span><span class="p">(</span><span class="mf">777.77</span><span class="o">*</span><span class="n">syn_BassTime</span><span class="p">),</span><span class="w"> </span><span class="n">sin</span><span class="p">(</span><span class="mf">555.55</span><span class="o">*</span><span class="n">syn_HighTime</span><span class="p">))</span><span class="o">*</span><span class="mf">0.001</span><span class="o">*</span><span class="n">syn_BassHits</span><span class="p">;</span>

<span class="c1">//Up/Down displaced scanline</span>
<span class="n">col</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">col</span><span class="o">*</span><span class="n">_pulse</span><span class="p">(</span><span class="n">_uv</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">myPattern</span><span class="p">,</span><span class="w"> </span><span class="n">syn_ToggleOnBeat</span><span class="p">,</span><span class="w"> </span><span class="mf">0.2</span><span class="p">);</span>

<span class="c1">//Color shifting with BPM</span>
<span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mix</span><span class="p">(</span><span class="n">col</span><span class="p">,</span><span class="w"> </span><span class="n">col</span><span class="o">*</span><span class="n">vec3</span><span class="p">(</span><span class="mf">0.5</span><span class="p">,</span><span class="mf">0.5</span><span class="p">,</span><span class="mf">2.0</span><span class="p">),</span><span class="w"> </span><span class="n">syn_BPMSin4</span><span class="p">);</span>

<span class="c1">//Add some audio-reactive displacement</span>
<span class="n">uv</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">_rotate</span><span class="p">(</span><span class="n">vec2</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">),</span><span class="w"> </span><span class="mi">2</span><span class="o">*</span><span class="n">PI</span><span class="o">*</span><span class="n">texture</span><span class="p">(</span><span class="n">syn_Spectrum</span><span class="p">,</span><span class="w"> </span><span class="n">_uv</span><span class="p">.</span><span class="n">y</span><span class="p">).</span><span class="n">g</span><span class="p">)</span><span class="o">*</span><span class="mf">0.01</span><span class="p">;</span>
</code></pre></div>

<p>You can use the <a href="ssf/audio_uniforms.md">Audio Reactive Uniforms</a> page for reference to see all our audio uniforms.</p>
<p>Basic color flashing is always an easy place to start, but it's usually good to try to look for deeper or novel ways to add audio reactivity to a Scene. Some questions that can help you:</p>
<ul>
<li>What is unique about this scene, that I can highlight with audio reactivity?</li>
<li>What parts of the scene seem boring right now, that I can use the audio to add some life to?</li>
</ul>
<p>Unfortunately, there is some natural tradeoff between hardcoded audio reactivity and allowing a user to perform with the music in the way <em>they want to</em>. So in certain cases too much audio reactivity can be a nuisance. It needs to be carefully balanced. However, usually in these cases you can simply add a toggle to the control panel that turns the audio reactivity on and off. Then you've got the best of both worlds and users can decide whether the audio animation fit the mood of the music or not.</p>
<h3 id="controls">Controls</h3>
<p>Perhaps even more important than Audio Reactivity are the controls. Synesthesia is meant to be a Visual Instrument, something you can play and improvise with alongside live music. It can be surprisingly difficult to create a good control panel. Suddenly you've got to consider all kinds of User Experience issues that you wouldn't if you're just creating something on Shadertoy. Here are some of the classic problems and some solutions:</p>
<p><strong>Think about Organization</strong></p>
<ul>
<li>Use the UI_GROUP tag to put controls into groups based on what they effect, like "color", "audio reactivity", or "media mix".</li>
<li>Try to keep it "clean" looking. Short, descriptive names for controls and their groups are good.</li>
<li>If there are too many controls, maybe you can combine multiple controls into one control, for instance, a slider that starts at 0 but has a different effect if you move it upwards versus downwards.</li>
</ul>
<p><strong>Control Interactions</strong></p>
<ul>
<li>Try to avoid controls that don't do anything if another control is in a certain state. This leads to a bad experience when a user moves a slider and doesn't see any visual change at all.</li>
<li>If two controls have a really complex interaction with each other, consider putting them into their own group and mention the interaction in each control's description.</li>
<li>Sometimes the scene will look great over most parameter spaces, but when two controls both get pushed towards the tops of their ranges the scene starts to break. You can fix this by limiting the range of one control based on the value the other, for instance <code>float controlModded = mix(control, control*0.8, control2);</code> Complex interactions like this may seem confusing for users at first, but it's always nice to keep the scene from "breaking" in the context of a high-stakes live performance.</li>
</ul>
<p><strong>Control Ranges + Curves</strong></p>
<ul>
<li>Setting the MIN/MAX for a control is one of the most important things in each scene.</li>
<li>Sometimes a slider is great between 0.0 and 1.0, but when set to exactly 0.0 the scene breaks, so in that case set MIN to 0.001.</li>
<li>Maybe a certain slider goes from 1 to 100, and looks great at both 100 and in the lower part of the slider, between 1 and 10. However, the middle area between 10 and 90 is all pretty boring. This calls for a curve! Just change the Max from 100 to 10 and then in the GLSL do <code>myControlMod = pow(myControl, 2);</code>. Now you've got the same range but a user controlling the slider on a MIDI device will have more room to move around in the "interesting zones" of a certain control.</li>
</ul>
<p><strong>Control Variants</strong></p>
<ul>
<li>Almost all controls have a "smooth" variant that can be incredibly useful. When in doubt, try to make your control types "slider smooth" or "xy smooth", which allows for buttery smooth animation. When working with smooth-type controls, it's very important to set the "PARAMS" value to get the right speed of animation for whatever element you've got. A good approach is to start with <code>"PARAMS": 0.05</code> and go up to 0.2 if you want it faster, or down to 0.005 if you want it slower.</li>
<li>"bang smooth" is an excellent control type! It's always good to add a few "bang" type actions to a scene because this gives a user an easy place to start when VJing a scene live, and the smooth allows an animation to occupy more than a single frame -- pretty important in all but the glitchiest music.</li>
</ul>
<p><strong>Starting Defaults</strong></p>
<ul>
<li>At the very end, think about how the scene starts when a user clicks on it for the first time. The "DEFAULT" values should all be carefully set. Ideally you want the scene to pull someone in right off the bat, but still leave plenty of room to build and grow over the course of a song.</li>
</ul>
<h3 id="miscellaneous-tips">Miscellaneous Tips</h3>
<ul>
<li>Use <code>&gt; 0.5</code> rather than <code>== 1.0</code> because sometimes a Uniform (or any float value) will be slightly off of it's true "1.0" because it gets lost in conversion from CPU to GPU, so it'll be something like "0.9999937". &gt; is a safer test.</li>
</ul>
<p>Best way to learn is experimenting with existing scenes:</p>
<ul>
<li>Change the values of numbers in the code.</li>
<li>Change multiplication to addition or subtraction to division.</li>
<li>Delete random pieces of the code and see if that breaks anything.</li>
<li>If deleting something didnt break anything, what did it change?</li>
</ul></div>












                
              </article>
            </div>
          
          
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
        </div>
        
      </main>
      
        <footer class="md-footer">
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-copyright">
  
  
    Made with
    <a href="link:squidfunk.github.io/mkdocs-material" target="_blank" rel="noopener">
      Material for MkDocs
    </a>
  
</div>
      
    </div>
  </div>
</footer>
      
    </div>
    <div class="md-dialog" data-md-component="dialog">
      <div class="md-dialog__inner md-typeset"></div>
    </div>
    
    
    
      
      <script id="__config" type="application/json">{"base": "..", "features": [], "search": "../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
    
    
      <script src="../assets/javascripts/bundle.92b07e13.min.js"></script>
      
    
  </body>
</html>