SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
Dynamic Audio
     Synthesis
on the Flash/Flex Platform

         Joe Berkovitz
Overview

• Bit o’ background
• Flash 9 sound capabilities
• The Flash 10 Sound API
• StandingWave audio synthesis library
• New avenues for Flash audio and music
About me
Samples ‘n’ frames
   ‘n’ acoustics
Player 9 Sound API

• Sound objects can be loaded from URLs...
• ...or embedded as assets
• Load ‘em, play ‘em, change volume or stereo
  pan – that’s about it!
• Unpredictable latency, synchronization
Player 9 Audio
// loading a sound over the network
var s:Sound = new Sound();
s.addEventListener(Event.COMPLETE, handleComplete);
s.load(new URLRequest(“TheBomb.mp3”);

function handleComplete(e:Event) {
   Sound(event.target).play();
}
Player 9 Audio
// loading a sound from a library asset
[Embed(source=”TheBomb.mp3”)]
private static var MySoundAsset:Class;

function playSound():void
{
    var s:Sound = new MySoundAsset();
    var sc:SoundChannel = s.play();
    sc.soundTransform =
        new SoundTransform(0.5 /*volume*/);
    // set other transform properties...

    // examine playback position
    trace(sc.position);
}
What we want to do...

• Dynamically compute sounds from scratch
• Process samples on the fly to shift pitch,
  add effects, equalization...
• Play more than 32 sounds at the same time
• Compute continuous sound output
FP10 to the rescue

• Synchronization and continuity:
  SAMPLES_CALLBACK event
• Access to codecs: Sound.extract()
• The Vector data type
• Adobe Pixel Bender runtime
• Alchemy
Dynamic Audio Output
var s:Sound = new Sound();
s.addEventListener(SampleDataEvent.SAMPLE_DATA,
                   handleSampleData);
var sc:SoundChannel = s.play();

function handleSampleData(e:SampleDataEvent) {
  for (i = 0; i < /*number of frames*/ ; i++)
  {
      e.data.writeFloat(/* left channel */);
      e.data.writeFloat(/* right channel */);
  }
}
Codec Access
[Embed(source=”TheBomb.mp3”)]
private static var MySoundAsset:Class;

function getSoundSamples(numFrames:uint):void
{
    var s:Sound = new MySoundAsset();
    var bytes:ByteArray = new ByteArray();
    s.extract(bytes, numFrames, _position);

    bytes.position = 0;
    for (var i:Number = 0; i < numFrames; i++)
    {
       ... = bytes.readFloat(); // Left channel
       ... = bytes.readFloat(); // Right channel
    }
}
Some things to know

• Between 2048 and 8192 samples per event
• The fewer samples you provide, the lower
  the latency (time before a sample is heard)
• Initial latency > steady-state latency
• More samples/callback = more stability
• Don’t take too long to generate samples!
Basic Audio Demo
Going beyond the
        FP10 sound API

• Goal: to work at a higher level than samples
• High level concepts: Sources, Filters
• Play back timed, overlapping sequences of
  sonic or musical events: Performances
• Create a modular, extensible system
The StandingWave Project


• Open source AS3 library
• Outgrowth of Noteflight
• Requires Player 10
• Enables new class of audio applications
Audio Processing Concepts

     Sample

          Descriptor: 44.1 kHz Stereo

              left[0]               right[0]

              left[1]               right[1]

              left[2]               right[2]

              left[3]               right[3]
              ...                   ...
Audio Processing Concepts



                Samples
                  Sample
                   Sample
                            Audio
  Source
                            Player

raw samples,
algorithms...
Audio Processing Concepts


         Samples                  Samples
           Sample                   Sample
            Sample                   Sample



                                              Audio
Source               Filter
                                              Player

                transformations
Audio Processing Concepts
                                        timed sequence
starts at 0.0 sec                          of sounds


    Source               Filter

starts at 0.2 sec

                                                           Audio

                                             Performance
    Source              Filter
                                                           Player

starts at 0.7 sec


   Source               Filter


                    (...continues...)
Audio Processing Concepts
                                   Samples
                                     Sample
                                      Sample
starts at 0.0 sec


    Source                Filter
                                                                         Samples
                                                                           Sample
                                                                            Sample
starts at 0.2 sec

                                                               Audio                 Audio

                                               Performance
    Source                Filter
                                                             Performer               Player

starts at 0.7 sec


   Source                 Filter

                    ...
Audio Processing Concepts
starts at 0.0 sec

                                                                  Audio
    Source               Filter
                                                                  Player

starts at 0.2 sec

                                                        Audio

                                        Performance
    Source              Filter                                    Filter
                                                      Performer

starts at 0.7 sec


   Source               Filter


                    (...continues...)
IAudioSource
public interface IAudioSource
{
    function get descriptor():AudioDescriptor;
    function get frameCount():Number;

    function get position():Number;
    function resetPosition():void;

    function getSample(numFrames:Number):Sample;

    function clone():IAudioSource;
}

implementations:
   Sample, SineSource, SoundSource...
IAudioFilter
public interface IAudioFilter extends IAudioSource
{
    function get source():IAudioSource;
    function set source(s:IAudioSource):void;
}

implementations:
   EnvelopeFilter, EchoFilter, BandpassFilter...
IPerformance
public interface IPerformance
{
  function getElementsInRange
                   (start:Number, end:Number)
      :Vector.<PerformanceElement>;
}

implementations:
   ListPerformance...
Noteflight:
A Music Notation Editor
        in Flash
What’s missing?


• Direct microphone input
• More codec libraries
• Fully functional and supported audio
  processing in PixelBender/Alchemy
Where to get the
      StandingWave library


http://code.google.com/p/standingwave
Places and Projects

http://joeberkovitz.com
http://www.hobnox.com
http://labs.adobe.com/wiki/index.php/
Alchemy:Libraries
http://www.getmicrophone.com/
http://void.andre-michelle.com

Weitere ähnliche Inhalte

Was ist angesagt?

Conditional generative model for audio
Conditional generative model for audioConditional generative model for audio
Conditional generative model for audioKeunwoo Choi
 
Sound recording glossary improved
Sound recording glossary improvedSound recording glossary improved
Sound recording glossary improvedBen Atherton
 
Real Time Drum Augmentation with Physical Modeling
Real Time Drum Augmentation with Physical ModelingReal Time Drum Augmentation with Physical Modeling
Real Time Drum Augmentation with Physical ModelingBen Eyes
 
IG2 Task 1 Worksheet
IG2 Task 1 WorksheetIG2 Task 1 Worksheet
IG2 Task 1 WorksheetSamDuxburyGDS
 
Ig2 task 1 work sheet
Ig2 task 1 work sheetIg2 task 1 work sheet
Ig2 task 1 work sheethajohnson90
 
Ig2 task 1 work sheet (revisited)
Ig2 task 1 work sheet (revisited)Ig2 task 1 work sheet (revisited)
Ig2 task 1 work sheet (revisited)Mrrrjones
 
Sound recording glossary
Sound recording glossarySound recording glossary
Sound recording glossaryClintParisCom
 
Adam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetAdam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetcopelandadam
 
Adam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetAdam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetcopelandadam
 
Adam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetAdam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetcopelandadam
 
Adam Crittenden Sound Glossary
Adam Crittenden Sound GlossaryAdam Crittenden Sound Glossary
Adam Crittenden Sound GlossaryAdam Crittenden
 
Ig2 task 1_work_sheet
Ig2 task 1_work_sheetIg2 task 1_work_sheet
Ig2 task 1_work_sheetFryers
 
Ig2 task 1 work sheet
Ig2 task 1 work sheetIg2 task 1 work sheet
Ig2 task 1 work sheethajohnson90
 
Sound recording glossary
Sound recording glossarySound recording glossary
Sound recording glossaryBen Atherton
 
Ben ce sound recording glossary version 2
Ben ce sound recording glossary version 2Ben ce sound recording glossary version 2
Ben ce sound recording glossary version 2BenCom1
 

Was ist angesagt? (20)

Sampling-1 Intro
Sampling-1 IntroSampling-1 Intro
Sampling-1 Intro
 
Conditional generative model for audio
Conditional generative model for audioConditional generative model for audio
Conditional generative model for audio
 
Sound recording glossary improved
Sound recording glossary improvedSound recording glossary improved
Sound recording glossary improved
 
Samplers
SamplersSamplers
Samplers
 
Sound Recording Glossary
Sound Recording GlossarySound Recording Glossary
Sound Recording Glossary
 
Real Time Drum Augmentation with Physical Modeling
Real Time Drum Augmentation with Physical ModelingReal Time Drum Augmentation with Physical Modeling
Real Time Drum Augmentation with Physical Modeling
 
IG2 Task 1 Worksheet
IG2 Task 1 WorksheetIG2 Task 1 Worksheet
IG2 Task 1 Worksheet
 
Ig2 task 1 work sheet
Ig2 task 1 work sheetIg2 task 1 work sheet
Ig2 task 1 work sheet
 
IG2 Task 1
IG2 Task 1 IG2 Task 1
IG2 Task 1
 
Ig2 task 1 work sheet (revisited)
Ig2 task 1 work sheet (revisited)Ig2 task 1 work sheet (revisited)
Ig2 task 1 work sheet (revisited)
 
Sound recording glossary
Sound recording glossarySound recording glossary
Sound recording glossary
 
Adam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetAdam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheet
 
Adam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetAdam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheet
 
Adam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheetAdam copeland ig2 task 1 work sheet
Adam copeland ig2 task 1 work sheet
 
Adam Crittenden Sound Glossary
Adam Crittenden Sound GlossaryAdam Crittenden Sound Glossary
Adam Crittenden Sound Glossary
 
Ig2 task 1_work_sheet
Ig2 task 1_work_sheetIg2 task 1_work_sheet
Ig2 task 1_work_sheet
 
Ig2 task 1 work sheet
Ig2 task 1 work sheetIg2 task 1 work sheet
Ig2 task 1 work sheet
 
Sound recording glossary
Sound recording glossarySound recording glossary
Sound recording glossary
 
Ig2 task 1 work
Ig2 task 1 workIg2 task 1 work
Ig2 task 1 work
 
Ben ce sound recording glossary version 2
Ben ce sound recording glossary version 2Ben ce sound recording glossary version 2
Ben ce sound recording glossary version 2
 

Andere mochten auch

Finding the Business Value in Social Software and Social Media
Finding the Business Value in Social Software and Social MediaFinding the Business Value in Social Software and Social Media
Finding the Business Value in Social Software and Social MediaYvette Nanasi
 
[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...
[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...
[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...npinto
 
Ignite Denver - Swearing in French
Ignite Denver - Swearing in FrenchIgnite Denver - Swearing in French
Ignite Denver - Swearing in French360|Conferences
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
2013 11-19-hoya-status
2013 11-19-hoya-status2013 11-19-hoya-status
2013 11-19-hoya-statusSteve Loughran
 

Andere mochten auch (6)

Finding the Business Value in Social Software and Social Media
Finding the Business Value in Social Software and Social MediaFinding the Business Value in Social Software and Social Media
Finding the Business Value in Social Software and Social Media
 
[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...
[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...
[Harvard CS264] 15a - The Onset of Parallelism, Changes in Computer Architect...
 
Ignite Denver - Swearing in French
Ignite Denver - Swearing in FrenchIgnite Denver - Swearing in French
Ignite Denver - Swearing in French
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
2013 11-19-hoya-status
2013 11-19-hoya-status2013 11-19-hoya-status
2013 11-19-hoya-status
 

Ähnlich wie Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform

Web Audio API in 15 min
Web Audio API in 15 minWeb Audio API in 15 min
Web Audio API in 15 minRan Byron
 
Assignment 2
Assignment 2Assignment 2
Assignment 2ubv
 
Core audio
Core audioCore audio
Core audioscussen
 
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...Lviv Startup Club
 
1.playing audio in javaJava sound API(package javax.sound) support.pdf
1.playing audio in javaJava sound API(package javax.sound) support.pdf1.playing audio in javaJava sound API(package javax.sound) support.pdf
1.playing audio in javaJava sound API(package javax.sound) support.pdfinfo30292
 
Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemSirawat Pitaksarit
 
Mti presentation
Mti presentationMti presentation
Mti presentationDing Xu
 
KKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinKKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinLiyao Chen
 
인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)
인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)
인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)Keunwoo Choi
 
Web audio, Trackers and Making Music
Web audio, Trackers and Making MusicWeb audio, Trackers and Making Music
Web audio, Trackers and Making MusicGibDevs
 
Mti presentation
Mti presentationMti presentation
Mti presentationDing Xu
 
The Next-Gen Dynamic Sound System of Killzone Shadow Fall
The Next-Gen Dynamic Sound System of Killzone Shadow FallThe Next-Gen Dynamic Sound System of Killzone Shadow Fall
The Next-Gen Dynamic Sound System of Killzone Shadow FallGuerrilla
 
Audio production processes lo2
Audio production processes lo2Audio production processes lo2
Audio production processes lo2Rajiv Ariaraj
 
Sound recording glossary preivious
Sound recording glossary preiviousSound recording glossary preivious
Sound recording glossary preiviousPhillipWynne12281991
 
Audio Production
Audio ProductionAudio Production
Audio Productionptcentrum
 

Ähnlich wie Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform (18)

Web Audio API in 15 min
Web Audio API in 15 minWeb Audio API in 15 min
Web Audio API in 15 min
 
Assignment 2
Assignment 2Assignment 2
Assignment 2
 
Core audio
Core audioCore audio
Core audio
 
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...
 
1.playing audio in javaJava sound API(package javax.sound) support.pdf
1.playing audio in javaJava sound API(package javax.sound) support.pdf1.playing audio in javaJava sound API(package javax.sound) support.pdf
1.playing audio in javaJava sound API(package javax.sound) support.pdf
 
Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problem
 
3 workingwithsoundaudacity
3 workingwithsoundaudacity3 workingwithsoundaudacity
3 workingwithsoundaudacity
 
Mti presentation
Mti presentationMti presentation
Mti presentation
 
KKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinKKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - Dolphin
 
인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)
인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)
인공지능의 음악 인지 모델 - 65차 한국음악지각인지학회 기조강연 (최근우 박사)
 
Audio-1
Audio-1Audio-1
Audio-1
 
Audio
AudioAudio
Audio
 
Web audio, Trackers and Making Music
Web audio, Trackers and Making MusicWeb audio, Trackers and Making Music
Web audio, Trackers and Making Music
 
Mti presentation
Mti presentationMti presentation
Mti presentation
 
The Next-Gen Dynamic Sound System of Killzone Shadow Fall
The Next-Gen Dynamic Sound System of Killzone Shadow FallThe Next-Gen Dynamic Sound System of Killzone Shadow Fall
The Next-Gen Dynamic Sound System of Killzone Shadow Fall
 
Audio production processes lo2
Audio production processes lo2Audio production processes lo2
Audio production processes lo2
 
Sound recording glossary preivious
Sound recording glossary preiviousSound recording glossary preivious
Sound recording glossary preivious
 
Audio Production
Audio ProductionAudio Production
Audio Production
 

Mehr von 360|Conferences

Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality360|Conferences
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager360|Conferences
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps360|Conferences
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck360|Conferences
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...360|Conferences
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight360|Conferences
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus360|Conferences
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!360|Conferences
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo360|Conferences
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing360|Conferences
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework360|Conferences
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up360|Conferences
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1360|Conferences
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications360|Conferences
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers360|Conferences
 

Mehr von 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers
 

Kürzlich hochgeladen

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform

  • 1. Dynamic Audio Synthesis on the Flash/Flex Platform Joe Berkovitz
  • 2. Overview • Bit o’ background • Flash 9 sound capabilities • The Flash 10 Sound API • StandingWave audio synthesis library • New avenues for Flash audio and music
  • 4. Samples ‘n’ frames ‘n’ acoustics
  • 5. Player 9 Sound API • Sound objects can be loaded from URLs... • ...or embedded as assets • Load ‘em, play ‘em, change volume or stereo pan – that’s about it! • Unpredictable latency, synchronization
  • 6. Player 9 Audio // loading a sound over the network var s:Sound = new Sound(); s.addEventListener(Event.COMPLETE, handleComplete); s.load(new URLRequest(“TheBomb.mp3”); function handleComplete(e:Event) { Sound(event.target).play(); }
  • 7. Player 9 Audio // loading a sound from a library asset [Embed(source=”TheBomb.mp3”)] private static var MySoundAsset:Class; function playSound():void { var s:Sound = new MySoundAsset(); var sc:SoundChannel = s.play(); sc.soundTransform = new SoundTransform(0.5 /*volume*/); // set other transform properties... // examine playback position trace(sc.position); }
  • 8. What we want to do... • Dynamically compute sounds from scratch • Process samples on the fly to shift pitch, add effects, equalization... • Play more than 32 sounds at the same time • Compute continuous sound output
  • 9. FP10 to the rescue • Synchronization and continuity: SAMPLES_CALLBACK event • Access to codecs: Sound.extract() • The Vector data type • Adobe Pixel Bender runtime • Alchemy
  • 10. Dynamic Audio Output var s:Sound = new Sound(); s.addEventListener(SampleDataEvent.SAMPLE_DATA, handleSampleData); var sc:SoundChannel = s.play(); function handleSampleData(e:SampleDataEvent) { for (i = 0; i < /*number of frames*/ ; i++) { e.data.writeFloat(/* left channel */); e.data.writeFloat(/* right channel */); } }
  • 11. Codec Access [Embed(source=”TheBomb.mp3”)] private static var MySoundAsset:Class; function getSoundSamples(numFrames:uint):void { var s:Sound = new MySoundAsset(); var bytes:ByteArray = new ByteArray(); s.extract(bytes, numFrames, _position); bytes.position = 0; for (var i:Number = 0; i < numFrames; i++) { ... = bytes.readFloat(); // Left channel ... = bytes.readFloat(); // Right channel } }
  • 12. Some things to know • Between 2048 and 8192 samples per event • The fewer samples you provide, the lower the latency (time before a sample is heard) • Initial latency > steady-state latency • More samples/callback = more stability • Don’t take too long to generate samples!
  • 14. Going beyond the FP10 sound API • Goal: to work at a higher level than samples • High level concepts: Sources, Filters • Play back timed, overlapping sequences of sonic or musical events: Performances • Create a modular, extensible system
  • 15. The StandingWave Project • Open source AS3 library • Outgrowth of Noteflight • Requires Player 10 • Enables new class of audio applications
  • 16. Audio Processing Concepts Sample Descriptor: 44.1 kHz Stereo left[0] right[0] left[1] right[1] left[2] right[2] left[3] right[3] ... ...
  • 17. Audio Processing Concepts Samples Sample Sample Audio Source Player raw samples, algorithms...
  • 18. Audio Processing Concepts Samples Samples Sample Sample Sample Sample Audio Source Filter Player transformations
  • 19. Audio Processing Concepts timed sequence starts at 0.0 sec of sounds Source Filter starts at 0.2 sec Audio Performance Source Filter Player starts at 0.7 sec Source Filter (...continues...)
  • 20. Audio Processing Concepts Samples Sample Sample starts at 0.0 sec Source Filter Samples Sample Sample starts at 0.2 sec Audio Audio Performance Source Filter Performer Player starts at 0.7 sec Source Filter ...
  • 21. Audio Processing Concepts starts at 0.0 sec Audio Source Filter Player starts at 0.2 sec Audio Performance Source Filter Filter Performer starts at 0.7 sec Source Filter (...continues...)
  • 22. IAudioSource public interface IAudioSource { function get descriptor():AudioDescriptor; function get frameCount():Number; function get position():Number; function resetPosition():void; function getSample(numFrames:Number):Sample; function clone():IAudioSource; } implementations: Sample, SineSource, SoundSource...
  • 23. IAudioFilter public interface IAudioFilter extends IAudioSource { function get source():IAudioSource; function set source(s:IAudioSource):void; } implementations: EnvelopeFilter, EchoFilter, BandpassFilter...
  • 24. IPerformance public interface IPerformance { function getElementsInRange (start:Number, end:Number) :Vector.<PerformanceElement>; } implementations: ListPerformance...
  • 25. Noteflight: A Music Notation Editor in Flash
  • 26. What’s missing? • Direct microphone input • More codec libraries • Fully functional and supported audio processing in PixelBender/Alchemy
  • 27. Where to get the StandingWave library http://code.google.com/p/standingwave