The development of real-time audio applications for general purpose OS like Linux or MS Windows is a well-known and not trivial problem. Several real-time audio software with libraries for multi-purposes programming languages like C, C++ or Java have been developed. Although these solutions provide portability through multiple OS, they often introduce problems related to dependencies and versions alignment over the time. In the present article, the process to build a framework for real-time audio relying on the programming language Python is described. We selected Python because it offers a fast learning rate coupled with several modules that can be used inside real-time audio projects. The advantages of this programming language but also the limitations in terms of execution time imposed by the interpreted code are both discussed. In particular, a procedure of code refactoring to obtain the real-time execution is presented. This procedure involves the inclusion of compiled code generated by Cython and C language, only where strictly needed. In the last part, some case studies related to the implementation of Virtual Analog models are presented introducing different amounts of compiled code and measuring the execution time.

DEVELOPMENT OF REAL-TIME AUDIO APPLICATIONS USING PYTHON

DE PRA, Yuri
;
Fontana F.;SIMONATO, Michele
2018-01-01

Abstract

The development of real-time audio applications for general purpose OS like Linux or MS Windows is a well-known and not trivial problem. Several real-time audio software with libraries for multi-purposes programming languages like C, C++ or Java have been developed. Although these solutions provide portability through multiple OS, they often introduce problems related to dependencies and versions alignment over the time. In the present article, the process to build a framework for real-time audio relying on the programming language Python is described. We selected Python because it offers a fast learning rate coupled with several modules that can be used inside real-time audio projects. The advantages of this programming language but also the limitations in terms of execution time imposed by the interpreted code are both discussed. In particular, a procedure of code refactoring to obtain the real-time execution is presented. This procedure involves the inclusion of compiled code generated by Cython and C language, only where strictly needed. In the last part, some case studies related to the implementation of Virtual Analog models are presented introducing different amounts of compiled code and measuring the execution time.
2018
9788890341359
File in questo prodotto:
File Dimensione Formato  
depra_final.pdf

non disponibili

Descrizione: Articolo principale
Tipologia: Documento in Post-print
Licenza: Non pubblico
Dimensione 316.18 kB
Formato Adobe PDF
316.18 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11390/1147041
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact