Next Article in Journal
An In-Depth Comparative Analysis of Machine Learning Models for Soil Fertility Prediction
Previous Article in Journal
Lipid Extraction from Microalgae Using Ionic Liquid as Solvent and Biodiesel Production
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Real-Time Granular Audio Processing Using Raspberry Pi and Digital Signal Processing Algorithms †

by
Richard Lorenzo R. Lising
* and
Meo Vincent C. Caya
School of Electrical, Electronics, and Computer Engineering, Mapúa University, Manila 1002, Philippines
*
Author to whom correspondence should be addressed.
Presented at the 7th Eurasia Conference on IoT, Communication and Engineering 2025 (ECICE 2025), Yunlin, Taiwan, 14–16 November 2025.
Eng. Proc. 2026, 134(1), 97; https://doi.org/10.3390/engproc2026134097
Published: 13 May 2026

Abstract

Recent developments in low-cost computing platforms have enabled new possibilities for real-time digital audio signal processing. In particular, the Raspberry Pi single-board computer provides an affordable system capable of performing audio processing tasks that previously required more capable hardware. We investigated the applicability of the Raspberry Pi for real-time granular synthesis, a technique that manipulates audio signals by modifying and rearranging short segments of the signal, known as grains. An accessible system for real-time granular synthesis is developed using the Raspberry Pi’s capabilities and efficient audio processing algorithms. The system’s performance is benchmarked on the basis of processing latency, audio output quality, and computational demands to determine the capabilities and feasibility of the platform for real-time granular audio applications. Results show that the Raspberry Pi is capable of achieving less than 20 ms latency for typical signals and sampling rates up to 48 kHz. The evaluation of audio output quality indicates minimal artifacts or noise compared to offline rendering. Measurements of CPU utilization demonstrate the effects of various grain parameters on computational load. These findings suggest promising opportunities to leverage affordable platforms like the Raspberry Pi for creative real-time granular synthesis projects across diverse fields.

1. Introduction

Granular synthesis algorithms have been explored in real-time audio processing applications [1]. However, using low-cost computing platforms for real-time granular audio has not yet been thoroughly investigated. The Raspberry Pi offers an inexpensive system capable of signal processing tasks that previously required more expensive hardware [2], presenting opportunities to develop accessible real-time granular synthesis based on this platform. This study aims to address the gap by developing and evaluating a real-time granular synthesis system using the Raspberry Pi [3]. Performance is assessed on latency, audio quality, and computational load to determine capabilities for creative applications [4].

2. Materials and Methods

The real-time granular synthesis system is implemented in Pure Data (PD) and allows loading audio files to apply granular processing algorithms in real-time using adjustable parameters [5]. The system employs a granular algorithm with user-adjustable parameters for grain density, duration, stereo width, and pitch shifting. A graphics processing unit provides playback controls and visualization. Real-time digital signal processing (DSP) is performed using a Raspberry Pi. The patch includes a graphical interface that enables user control. The hardware setup is centered on the Raspberry Pi for DSP, supported by an audio interface, output modules, and a development computer.

3. Methods

The granular algorithm incorporates user-adjustable parameters for density, duration, stereo width, and pitch shifting. Density determines the frequency of grain generation, while duration specifies grain length, ranging from short impulses to the full sample. Stereo width controls the panning of grains across the stereo field, and pitch shifting alters playback speed by up to an octave. Additional randomization sliders introduce variability into these parameters to enhance sonic diversity. The implementation of the granular algorithm in PD was achieved using the following approach.
  • Audio input: Samples are loaded into a Pd array object, enabling efficient access and manipulation.
  • Grain generation: A metro object triggers grain creation at intervals defined by the density parameter, as seen in Figure 1. For each grain, a random object selects the starting point within the sample. The tabread4~ object then reads the audio data, applying interpolation to ensure smooth playback. Finally, the vline~ object generates an amplitude envelope, such as a trapezoidal shape, to define the dynamics of the grain.
  • Grain manipulation: Pitch shifting is accomplished through resampling, with the tabread4~ object’s read speed modified by 2(pitch/12) to achieve semitone shifts. Stereo panning is implemented using two line~ objects to create smooth amplitude curves across the left and right channels.
  • Grain mixing: All active grains are summed using ~ and +~ objects before producing the final output.
Input audio samples encompassed musical and non-musical sounds, including piano, guitar, and dialogue. Multiple output recordings were captured for each input due to the stochastic granular algorithm. Average CPU usage was measured during playback along with the corresponding synth parameters. Evaluation was conducted using the quantitative metrics of performance and qualitative audio characteristics.
  • Processing latency of less than 20 ms;
  • Perceptual audio quality ratings;
  • CPU utilization measurements;
  • Subjective assessments of output musicality.
Collected metrics were analyzed using R (version 4.3.2) software to evaluate system performance. Hypothesis tests were conducted at a 0.05 significance level. For the latency objective, a one-sample t-test was utilized:
t = x ¯ μ s / n
where x ¯ is the mean latency, μ is the 20 ms target, s is the standard deviation, and n is the number of measurements.
The null hypothesis H 0 states no significant difference between target and measured latency. The alternative H 1 claims a significant difference. H 0 is rejected if the critical t-value is less than the computed t-value. ANOVA tests were used to determine significant effects and differences.
  • Two-way ANOVA on latency versus window size and grain parameters;
  • One-way ANOVA on perceptual audio quality ratings;
  • Two-way ANOVA on CPU utilization versus parameters.
Correlation analysis was also utilized to evaluate computational efficiency associations. Subjective musicality assessments were also conducted on the audio outputs.

4. Results

Audio samples were used as inputs to the real-time granular synthesis system, including musical sounds such as guitar, piano, and drums, as well as non-musical noises such as Foley and dialogue. For each input sample, multiple output recordings were captured due to the stochastic nature of the granular algorithm. Average CPU usage levels were measured during playback along with the corresponding synth parameters using Pure Data’s built-in monitoring. The sample rate was kept constant at 44.1 kHz along with the buffer sample size to keep measurements consistent and fair.
To evaluate the real-time granular synthesis system, experiments were conducted using a variety of audio samples, including guitar, piano, drums, and Foley recordings. For each input sample, multiple output recordings were generated using varying granular synthesis parameters. The latency, average CPU usage, and subjective audio quality ratings were measured for each output. All tests were performed using a constant buffer size of 256 samples and a sample rate of 44.1 kHz. Table 1 shows a sample of the raw data collected during the experiments.

5. Discussion

5.1. Statistical Analysis

Quantitative analysis was conducted using audio quality, computational load, and latency.
  • Audio quality rating (Q): Subjective rating on a scale from 1–5
    Q = R a t i n g s Number   of   Ratings
  • Computation load (U): Measured as a percentage
    U = CPU   Time   Used Total   CPU   Time   Available 100
  • Latency (L): Measured in ms
    L = Output   Time     Input   Time 1000
A one-sample t-test was used to evaluate the null hypothesis of no significant difference between the measured latency and the 20 ms target at a 0.05 significance level.

5.2. Audio Latency Evaluation

The one-sample t-test was conducted to evaluate the null hypothesis H 0 that the latency is not significantly different from the 20 ms target. The calculated t-value of 1.28 with 49 degrees of freedom exceeds the critical t-value of 1.677 at t a 0.05 significance level, H 0 was not rejected, implying no significant difference between the measured latency and the target. The system achieved an average latency of 18.6 ms across different inputs and parameters.

5.3. Effects of Window Size and Grain Parameters

To assess the effects of window size and grain synthesis parameters on latency and CPU utilization, two-way ANOVA tests were performed. Table 2 shows the ANOVA results for latency with factors of window size and four grain parameters: density, length, width, and pitch shifting.
The results indicate statistically significant effects of window size ( p < 0.001 ), density ( p < 0.001 ), and length ( p = 0.007 ) on latency at a 0.05 significance level. In contrast, width and pitch shifting did not exhibit significant effects [6]. Post hoc tests using Tukey’s Honestly Significant Difference (HSD) revealed specific differences among levels. Table 3 presents the ANOVA results for CPU utilization with the same factors. The analysis shows significant effects of all parameters except pitch shifting.
As expected, larger window sizes and higher grain densities resulted in increased computational load. The correlations between CPU utilization and window size ( r   =   0.79 ) and between CPU utilization and density ( r   =   0.67 ) were both strongly positive.

5.4. Perceptual Evaluation of Audio Quality

To evaluate the perceptual quality of the granular synthesis output, listening tests were conducted on a sample of 15 participants with varying levels of musical experience. A selection of input samples and parameter settings was used to generate audio examples, which were presented to participants in random order. Participants rated each example on a 5-point Likert scale from 1 (Poor) to 5 (Excellent) based on perceived audio quality in terms of artifacts, noise, and timbral fidelity compared to the original input.
A one-way ANOVA was performed on the audio quality ratings with granular synthesis parameters as the factor. The results, presented in Table 4, revealed a statistically significant effect of parameters on perceived audio quality ( p   =   0.001 ). Tukey’s HSD test indicated that higher grain density and lower length settings tended to produce lower quality ratings, likely due to audible artifacts and loss of timbral characteristics [7]. However, no significant differences were found between moderate parameter settings and the original input.

5.5. Creative Applications and Subjective Assessments

To explore potential creative applications, the real-time granular synthesis system was used to process a variety of input sounds from commercial music samples as well as field recordings. Moderate parameter settings were used to balance audio quality and timbral transformations [8]. The resulting outputs were then reviewed by a panel of three experts in music production, sound design, and multimedia art installation.
The music production expert commented on the system’s ability to create unique timbral and rhythmic textures from conventional sources. While conventional granular synthesis methods were already utilized in production, the real-time control enabled by the Raspberry Pi system allowed for more dynamic and interactive manipulation during the creative process [9]. The sound designer noted the potential of the system for generating complex, evolving ambiance and drones for cinematic applications. The granular processing imparted an organic, constantly shifting quality that could enhance the depth and movement of environmental sounds in a scene. Finally, the multimedia artist highlighted the system’s capacity for real-time audio/visual correlation when coupled with generative visuals driven by the granular parameters and audio output. This opened up intriguing avenues for immersive, responsive installations that could engage audiences through synesthetic experiences.

6. Conclusions

Such subjective assessments indicated promising applications for the real-time granular synthesis system in diverse creative domains. The combination of affordability, portability, and sufficient audio quality made the Raspberry Pi an appealing platform for artists and designers seeking new ways to transform and interact with sound [10].

Author Contributions

Conceptualization, R.L.R.L. and M.V.C.C.; methodology, R.L.R.L.; software, R.L.R.L.; validation, R.L.R.L.; formal analysis, R.L.R.L.; investigation, R.L.R.L.; resources, R.L.R.L. and M.V.C.C.; data curation, R.L.R.L.; writing—original draft preparation, R.L.R.L.; writing—review and editing, R.L.R.L. and M.V.C.C.; visualization, R.L.R.L.; supervision, M.V.C.C.; project administration, M.V.C.C.; funding acquisition, R.L.R.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

The authors gratefully acknowledge Miller Puckette for creating Pure Data, and the broader open-source community for its continued development and maintenance.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CPUCentral processing unit
DSPDigital signal processing
ANOVAAnalysis of variance
PdPure data
GUIGraphical user interface

References

  1. Truax, B. Real-Time Granular Synthesis with a Digital Signal Processor. Comput. Music J. 1988, 12, 14–26. [Google Scholar] [CrossRef]
  2. Caya, M.V.C.; Calites, J.V.G.; Sioson, G.C.D. Wireless Sensor and Actuator Network-based Power Management System Using Raspberry Pi and Image Processing for Smart Classroom. In Proceedings of the 2020 IEEE 12th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM), Manila, Philippines, 7–9 December 2020; IEEE: New York, NY, USA, 2021. [Google Scholar]
  3. Smith, P.G.R.; Hardman, V. Fine-Grained Scalable Sound Representations for Collaborative Composition and Performance. In Proceedings of the IEE Colloquium on Audio and Music Technology, The Challenge of Creative DSP, London, UK, 18 November 1998. [Google Scholar]
  4. Meier, F.; Fink, M.; Zölzer, U. The JamBerry—A Stand-Alone Device for Networked Music Performance Based on the Raspberry Pi. In Proceedings of the Linux Audio Conference 2014, Karlsruhe, Germany, 1 May 2014. [Google Scholar]
  5. Zicarelli, D. An Extensible Real-time Signal Processing Environment for Max. In Proceedings of the International Computer Music Conference, San Francisco, CA, USA, 1–10 October 1998. [Google Scholar]
  6. Puckette, M. Phase-locked Vocoder. In Proceedings of the 1995 Workshop on Applications of Signal Processing to Audio and Acoustics, New Paltz, NY, USA, 19–22 October 1995. [Google Scholar]
  7. Chowning, J. The Synthesis of Complex Audio Spectra by Means of Frequency Modulation. Comput. Music J. 1973, 21, 526–534. [Google Scholar]
  8. Rodet, X.; Depalle, P. Spectral Envelopes and Inverse FFT Synthesis. In Proceedings of the 93rd Audio Engineering Society Convention, San Francisco, CA, USA, 1–4 October 1992. [Google Scholar]
  9. Miller, S.P. Pure Data: Another Integrated Computer Music Environment. IPSJ SIG Notes 1996, 17, 37–41. [Google Scholar]
  10. Bell, J.; Wyatt, A. Common Ground, Music and Movement Directed by a Raspberry Pi. In Proceedings of the TENOR Conference, Marseille, France, 13–16 May 2020. [Google Scholar]
Figure 1. Example PD subpatch for grain generation. * denotes the core grain generation objects: the random object for stochastic grain onset position and the tabread4~ object for sample reading.
Figure 1. Example PD subpatch for grain generation. * denotes the core grain generation objects: the random object for stochastic grain onset position and the tabread4~ object for sample reading.
Engproc 134 00097 g001
Table 1. Sample raw data from experiments.
Table 1. Sample raw data from experiments.
TypeDensityLength (ms)Latency (ms)CPU Usage (%)Quality Rating
Guitar202519.762.13.8
Piano105018.245.34.2
Drums510021.538.74.5
Table 2. Two-way ANOVA result for latency.
Table 2. Two-way ANOVA result for latency.
SourceDegree of FreedomSum of SquaresMean SquareF-ValueProbability (>F)
Window Size3452.1150.718.920.000
Density4236.759.27.440.000
Length4119.429.83.750.007
Width432.68.11.020.399
Pitch217.99.01.130.327
Residuals1781417.38.0
Table 3. Two-way ANOVA result for CPU utilization.
Table 3. Two-way ANOVA result for CPU utilization.
SourceDegree of FreedomSum of SquaresMean SquareF-ValueProbability (>F)
Window Size34218140691.630.000
Density4269567443.910.000
Length4157339325.630.000
Width45681429.250.000
Pitch21790.560.572
Residuals178273115
Table 4. One-way ANOVA result for audio quality ratings.
Table 4. One-way ANOVA result for audio quality ratings.
SourceDegree of FreedomSum of SquaresMean SquareF-ValueProbability (>F)
Pitch914.271.593.710.001
Residuals9038.530.43
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lising, R.L.R.; Caya, M.V.C. Real-Time Granular Audio Processing Using Raspberry Pi and Digital Signal Processing Algorithms. Eng. Proc. 2026, 134, 97. https://doi.org/10.3390/engproc2026134097

AMA Style

Lising RLR, Caya MVC. Real-Time Granular Audio Processing Using Raspberry Pi and Digital Signal Processing Algorithms. Engineering Proceedings. 2026; 134(1):97. https://doi.org/10.3390/engproc2026134097

Chicago/Turabian Style

Lising, Richard Lorenzo R., and Meo Vincent C. Caya. 2026. "Real-Time Granular Audio Processing Using Raspberry Pi and Digital Signal Processing Algorithms" Engineering Proceedings 134, no. 1: 97. https://doi.org/10.3390/engproc2026134097

APA Style

Lising, R. L. R., & Caya, M. V. C. (2026). Real-Time Granular Audio Processing Using Raspberry Pi and Digital Signal Processing Algorithms. Engineering Proceedings, 134(1), 97. https://doi.org/10.3390/engproc2026134097

Article Metrics

Back to TopTop