Sounds in Algodoo!

For topics that don't fit under the other topics or forums.

Sounds in Algodoo!

Postby Captain_Kiwi » Sun Nov 22, 2015 6:23 am

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
Captain_Kiwi
 
Posts: 1
Joined: Sun Nov 22, 2015 5:45 am

Re: Sounds in Algodoo!

Postby faytree » Thu Nov 26, 2015 9:29 am

This is pretty nice! :thumbup:
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...

Image
I'm not going to lie, this problem made me kinda depressed
waiting for semester break to come...
User avatar
faytree
 
Posts: 947
Joined: Mon Nov 05, 2012 1:37 pm
Location: Selangor, Malaysia

Re: Sounds in Algodoo!

Postby Anbang11 » Thu Dec 17, 2015 1:29 pm

CoolPlot scene (Algodoo/scenes/official/CoolPlot.phz) + This script = AWESOME.
When your computer has multiple cores but uses programs that only supports single core....
Image
That's Algodoo!
User avatar
Anbang11
 
Posts: 72
Joined: Sat May 09, 2015 7:46 am
Location: Earth.

Re: Sounds in Algodoo!

Postby faytree » Sat Dec 19, 2015 4:54 pm

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...
User avatar
faytree
 
Posts: 947
Joined: Mon Nov 05, 2012 1:37 pm
Location: Selangor, Malaysia

Re: Sounds in Algodoo!

Postby Anbang11 » Wed Dec 23, 2015 10:28 am

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!
When your computer has multiple cores but uses programs that only supports single core....
Image
That's Algodoo!
User avatar
Anbang11
 
Posts: 72
Joined: Sat May 09, 2015 7:46 am
Location: Earth.

Re: Sounds in Algodoo!

Postby Anbang11 » Wed Dec 23, 2015 10:43 am

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....
Image
That's Algodoo!
User avatar
Anbang11
 
Posts: 72
Joined: Sat May 09, 2015 7:46 am
Location: Earth.


Return to Algodoo in general

Who is online

Users browsing this forum: No registered users and 4 guests

cron