csound domain
add csound-expression to Let as a Domain
the plan is to give the student either a spectrogram and/or an audio that they can hear to reproduce. The student then has to enter an equation consisting of overlaid, frequency and amplitude modified base oscillator functions (see hackage)
The semantic comparison will have to render the audio (into the cache? to RAM?) and compare it with the requested one. This could be possible in three ways:
- compare the raw PCM values: this depends on the csound backend, do two audios always produce the same samples?
- via generated spectrograms: generate both spectrograms (via ffmpeg showspectrumpic filter / STFT function using an fft implementation, maybe FFTW ) an compare them pixel wise
- via generated spectrogram, but with a tolerance: this may be needed if the spectrogram computation on two "equal" audios turn out to not be exactly the same