We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello!
I'm trying convert a long CSV data into a sound track and I wrote this code, but I'm not able to generate a sound. It's just a beep.
It's CSV on meteor spotting and I got the values for longitude and latitude and I tried to map it down for tri values.
Please help me as I'm pretty new to Processing :)
Answers
Please don't post code as an image, nobody's going to retype it in order to try it.
Where is tri defined? csv? Mydata?
Don't use delay.
For loops in draw probably don't do what you want.
You are missing a }
Hi
Sorry for posting the image. I understand. Here's the code. Please let me know if you can figure this out I'm getting the graphLong and graphLat values properly. (I don't know how to attach the CSV here in this comment)
Similarly I also want to create a soundtrack using brightness values in an image. I know how to get the brightness of the pixel but I'm not sure where to put tri or sine function to get the sound.
[mod edit: formatted]
Put '~~~~' before and after your code for a code block
May I have your csv data? Just open it with any text editor,copy and paste it here
https://we.tl/qYtpryhMMf Please use this link for csv. It's huge to be pasted here, that's why :) Thanks
This is what I got. But kinda messed up. Is it okay though?
Hi Thanks for these, it's much better. But won't be able to slow down and if we try to slow down with delay() the images doesn't show up.
by putting that loop in draw you are drawing 34000 lines every frame.
you are also changing the amplitude and the frequency 34000 times every frame.
https://forum.processing.org/two/discussion/8087/what-are-setup-and-draw
You can try using counter to slow down the speed like..
out of bounds error on line 29
it's comma separated, why split on ';' ?
yeah will try that, thanks a lot for the support!
and why
when the data looks like this
so [2] is 7000000
you want [3] and [4]
and this doesn't make sense
it'll only draw to the screen when it's done all 34000 samples
Hi koog, Even [2] is fine. But I was just randomly trying.
I replace all the commas with semicolon cause I want to edit using excel
Yeah, but that graph is just an optional feature
Ohhh, my bad.
If you like insanity then you can try this:-
Be careful though. LEL
Haha Thanks. Small error, cannot find class type 'Chord'
Ohhh, my bad. Just delete that Chord thingy. I was just experimenting with that class.
This could be more exciting:-
This is crazy :D Thank you! Now let me figure out this code.
You can get better beats if you randomize counter in draw() and you sort your .csv file by its longitude or latitude. By randomizing the beats, it will be endless. :)>-