Download presentation
Presentation is loading. Please wait.
Published byCornelius Harvey Modified over 9 years ago
1
FYP Final Presentation: Distributed Audio Mixing Daire O'Neill, Final Year Electronic Engineering Project Supervisor: Dr Peter Corcoran Co-Supervisor: Frank Callaly
2
Structure of presentation Project Overview How I approached this project Issues encountered Implementation of final system Objectives achieved Conclusions
3
Project Overview The ultimate goal of this project was to design and implement a client-server system on Linux that allowed mixing of audio files from different sources, over a network A server was needed that could receive audio data from multiple clients and mix the audio, as in a traditional recording studio This system would allow musicians in different locations to record together, as if they were in the same room
4
Goals The goals for this project were as follows: –To install Linux on a desktop PC and become familiar with the basics of using Linux –To install and use ALSA to capture and playback audio on a Linux machine –To implement a server capable of receiving audio data from clients and mixing the audio –To implement a method of synchronising separate audio files
5
How I approached the project My first task was to install Linux on a PC. I experimented with both Fedora and Ubuntu distributions, and found Ubuntu easier to use After becoming familiar with using Linux, I began to search for a suitable application on which to base my project, as it was clear that I could not hope to write an entire multitrack recording program by myself I needed a multitrack recording application that I could configure to use files that were received over a network
6
How I approached the project I initially downloaded and installed multitrack programs such as Ardour and Audacity, hoping to modify the source code such that these programs could connect to a server to receive audio data However these programs are sophisticated (and therefore complex), so the source code was difficult for me to understand
7
How I approached the project To go back to basics, I then concentrated on writing Python scripts to capture and playback audio I successfully completed this by using Pyaudio, a Python module that provides Python bindings for the Linux PortAudio application I then gained understanding of the actual code used in the recording and playback of audio However I still needed an application that could provide multitrack playback of audio files...
8
Ecasound Ecasound proved to be the solution to these problems As it is a command line based recording application, I could control it the way I wanted by using shell scripts, eliminating the need to modify the actual source code Ecasound can easily be automated by writing shell scripts to execute audio playback and recording functions Many complex functions can be implemented in Ecasound by passing the required arguments from the command line
9
FTP Server My next task was to implement a server that could receive audio files from multiple clients and mix them The server I used was VSFTPD. I chose this because of it's stability and ease of use I then wrote a series of shell scripts that could upload and download audio data from the server, and provide recording and mixing functions, thus implementing the final system
10
The Finished System By executing the appropriate shell script, the user (client) can: –Download an audio track (in wave file format) from the server –Playback this audio track and mix their own audio input during playback –Record the desired mix of the downloaded track and their own track as a wave file –Upload the new mix to the server The system was set up for use by 2 client PCs, both running Linux
11
System Flowchart
12
The Finished System The server retrieves the wave files uploaded by the clients from their directories, mixes the audio using Ecasound and returns the resulting wave file to the clients directories Each client can then download the new audio file (a mix of both clients audio tracks), and add more tracks as desired In this way, audio tracks from multiple clients are layered to create a finished audio mix, as in a recording studio For example, Client 1 records a vocal track, then Client 2 mixes a drum track with this, Client 1 then adds a bass track, etc
13
Using Ecasound All audio files used in this project are recorded using PCM (uncompressed) wave file format, sampled at 44.1kHz with a resolution of 16 bits Although this is the default for Ecasound, this can easily be changed for different sampling rates
14
Using Ecasound A fundamental principle of Ecasound is the use of “chains” Chains can be considered as virtual “audio cables”, with a specified input and output. They are used to route audio in Ecasound. In the following example syntax, a chain is set up, the input set as a wave file (test.wav) and the output routed to the soundcard (/dev/dsp) : –ecasound -a:1 -i test.wav -o /dev/dsp This results in playback of the audio file “test.wav”.
15
Example scripts The next slide shows an example of one of the scripts written to control Ecasound for this project, called “monitor+record” When executed, this script starts Ecasound and plays back the latest version of the “current mix” as downloaded from the server, and also records any audio that is input from the soundcard Monitoring the output allows the user to record in time with the backing track. The mixed audio data is written to a wave file (“client2.wav”).
16
“monitor+record”
17
“servermix” script The next slide shows the “servermix” script used in this project This script copies the uploaded files from each client into a common directory, uses Ecasound to mix the audio files and returns the resulting mix to the directory of each client The new audio data can then be downloaded by the clients
18
“servermix”
19
Configuring the FTP server Audio files are uploaded and downloaded from the FTP server by using “put” and “get” commands Seperate directories were set up on the server for both clients, each containing “incoming” and “outgoing” folders Files are uploaded by each client to their “incoming” folder, and downloaded from their “outgoing” folder This allows the server to mix audio data from both clients
20
Objectives Achieved The required objective of implementing a networked recording system has been achieved Using this system, musicians can collaborate to produce a finished audio track containing contributions from many different users Although a solution to the issue of synchronisation between different audio files (due to clock timing differences on different PCs) has not been implemented, the finished system still allows for server-side mixing of independently captured audio sources.
21
Objectives Achieved I also learned a lot about using Linux, and particularly about audio applications in Linux As I have a keen interest in audio technology, I feel that this project has been of great benefit to me, and am glad to have been given the opportunity to undertake such a project.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.