O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Let the music play!  

To try all this out, let's add three sample audio files from a jazz track composed by the exquisite Jesper Buhl Trio called What Is This Thing Called Love. The tracks are already separated by drums, bass, and piano. We can add these .mp3 files to an app/audio folder.

Let's modify our demo composition's tracks in MixerService to provide references to these new real audio files. Open app/modules/mixer/services/mixer.service.ts and make the following modifications:

private _demoComposition(): Array<IComposition> {  // starter composition for user to demo on first 

launch  return [    {      id: 1,      name: 'Demo',      created: Date.now(),      

order: 0,      tracks: [        {          id: 1,          name: 'Drums',          order: 0,          filepath: 

'~/audio/drums.mp3'        },        {          

id: 2, name: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required