2 Easy Julia Beginner Programs

I posted yesterday inquiring about sharing Julia projects here - my takeaway was that this forum isn’t really the place to post code - especially programs considered too elementary / basic. I get that - for any beginners here looking for easy programs in Julia - here are a waveform plotter and .wav generator.

9 Likes

You can also play the waveform directly from PortAudio. The readme has some examples: GitHub - JuliaAudio/PortAudio.jl: PortAudio wrapper for the Julia programming language, compatible with the JuliaAudio family of packages

2 Likes

Thanks - I originally included PortAudio - but I’m often using WSL2 on Windows 10 and it can’t easily access the Windows system utilities - ie - sound, display, etc. It’s the same with trying to plot from within WSL - it can’t access the host OS display. So my solution is to just have Julia create the .wav or .png as a standalone file - then I can play or view the file whether I’m on Windows or my Linux PC.

1 Like

[Neither of your original links work now.]

FYI: You have access to audio/Port Audio (and display) with WSL2, at least with WSLg (I suppose Julia works with it, but I think it implies a full Linux distro running in WSL2?): wslg/README.md at main · microsoft/wslg · GitHub

I also see some workaround:

That said, why are you making life difficult for you, not rather using regular Windows (with audio, or Linux only with audio)?

If you get audio to work with just WSL2, please let us know and how, and maybe make a PR to relevant Julia projects.

I didn’t know about Yarp (for robotics), nor that it had anything to do with audio, but I noticed it linked from some audio issue:

https://www.yarp.it/latest/group__yarpdev.html