Sounds in Algodoo!
6 posts • Page 1 of 1
Sounds in Algodoo!
I wrote a Python (3.3.3) script that converts plots to waves (Sound files!) All it does is take a .csv file, extract the Y values, and put them in a sound file as samples (basically).
Since Algodoo doesn't record "samples" in its plots very frequently, the sounds end up being low quality, or incredibly fast and high pitch, so a little editing may be in order. Or making the script better.
Here's the Python script for anyone who wants to use it and maybe improve upon it:
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/ModiWaves.py
It reads from a file (in the same folder it's in) named THEPLOT.csv, and writes to a file (or creates) named TheNewstSound.wav
I used Audacity to slow down the sounds a bit. Otherwise a Newton's cradle ends up sounding like a lawnmower or something.
Here are a few examples,
Newton's Cradle, (I think I was plotting kinetic energy of a single ball)
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/NewtonsCradle.wav
A gear system, plotting the angular kinetic energy of everything in the system:
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/ReductionGears.mp3
You can see the gears here:
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/ReduxGears.phz
Since Algodoo doesn't record "samples" in its plots very frequently, the sounds end up being low quality, or incredibly fast and high pitch, so a little editing may be in order. Or making the script better.
Here's the Python script for anyone who wants to use it and maybe improve upon it:
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/ModiWaves.py
It reads from a file (in the same folder it's in) named THEPLOT.csv, and writes to a file (or creates) named TheNewstSound.wav
I used Audacity to slow down the sounds a bit. Otherwise a Newton's cradle ends up sounding like a lawnmower or something.
Here are a few examples,
Newton's Cradle, (I think I was plotting kinetic energy of a single ball)
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/NewtonsCradle.wav
A gear system, plotting the angular kinetic energy of everything in the system:
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/ReductionGears.mp3
You can see the gears here:
https://dl.dropboxusercontent.com/u/3236504/MoreThings/ALGOSOUNDS/ReduxGears.phz
- Captain_Kiwi
- Posts: 1
- Joined: Sun Nov 22, 2015 5:45 am
Re: Sounds in Algodoo!
This is pretty nice!
But the only problem is that I don't know how to run the code. I tried to copy the whole code and paste it to python and I realized that I made a mistake, I can't paste codes in python...
I'm not going to lie, this problem made me kinda depressed
But the only problem is that I don't know how to run the code. I tried to copy the whole code and paste it to python and I realized that I made a mistake, I can't paste codes in python...
I'm not going to lie, this problem made me kinda depressed
waiting for semester break to come...
-
faytree - Posts: 947
- Joined: Mon Nov 05, 2012 1:37 pm
- Location: Selangor, Malaysia
Re: Sounds in Algodoo!
CoolPlot scene (Algodoo/scenes/official/CoolPlot.phz) + This script = AWESOME.
When your computer has multiple cores but uses programs that only supports single core....
That's Algodoo!
That's Algodoo!
-
Anbang11 - Posts: 72
- Joined: Sat May 09, 2015 7:46 am
- Location: Earth.
Re: Sounds in Algodoo!
Anbang11 wrote:CoolPlot scene (Algodoo/scenes/official/CoolPlot.phz) + This script = AWESOME.
Anbang! Tell me, how did you run the script?
I would appreciate it if you tell me how to run the script
waiting for semester break to come...
-
faytree - Posts: 947
- Joined: Mon Nov 05, 2012 1:37 pm
- Location: Selangor, Malaysia
Re: Sounds in Algodoo!
DISCLAIMER: I did not run the script, I just predicted the CoolPlot scene with sounds will be awesome.
But, I'm trying to run the script too!
But, I'm trying to run the script too!
When your computer has multiple cores but uses programs that only supports single core....
That's Algodoo!
That's Algodoo!
-
Anbang11 - Posts: 72
- Joined: Sat May 09, 2015 7:46 am
- Location: Earth.
Re: Sounds in Algodoo!
Okay, I've installed python, then tried to run the script, and made the CoolPlot to life!
When your computer has multiple cores but uses programs that only supports single core....
That's Algodoo!
That's Algodoo!
-
Anbang11 - Posts: 72
- Joined: Sat May 09, 2015 7:46 am
- Location: Earth.
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests