Csound Working in a Docker Container, But Producing Silent Outputs

Hi all,

I installed Csound in a Docker container. It seems to be working in that I’m able to generate output files in .wav format but i cant hear anything.

I tried changing the sample rate of output file to 48kHz (as suggested here: https://youtu.be/5cL5sQDyRD8?t=207). To do that, I used the command csound -r 48000 -o output.wav simple.orc simple.sco and it does change the sample rate of my file from 44.1kHZ to 48kHz but I still don’t hear anything.

Do i need to change the setting of my csound installation inside Docker? If so, how do I do that? If not, why am i gettig silent outputs?

I’d appreciate any help. Thanks in advance! Sharing code below for additional reference:

Docker file —>

# Start from a base image
FROM ubuntu:latest

# Update package lists
RUN apt-get update

# Install necessary dependencies
RUN apt-get install -y build-essential libsndfile1-dev libfftw3-dev libasound2-dev libjack-jackd2-dev

# Download and install Csound
RUN apt-get install -y csound

# Set the working directory
WORKDIR /app

# Set the command or entry point
CMD ["csound"]

simple.orc —>

instr 1
  aOut oscil 1, 1000, 1
  out aOut
endin

simple.sco —>

f1 0 8192 10 1
i1 0 30

I don’t know much about Docker, but you would probably need to setup the Docker container to use the host machine’s sound output in order to hear anything.

This example might help: