Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Plugin to create sounds using mathematical

DSP related issues, mathematics, processing and techniques

Plugin to create sounds using mathematical

Postby Maryirita » Sun Apr 12, 2015 7:10 pm

Hello users flowstone, I am writing because I need your help!
I'm programming a plugin to emulate sounds of splashing and rain sounds based on a mathematical model that exists on the bubbles.
I have the mathematical model written in ruby but I have problems handling real time because this multiply several equations including the amplitude of the oscillator. For now I got my output waveform decay exponentially but does not sound like a sound drop :( Les attached the program and would appreciate very much any advice, post or page related to this topic. Also if someone know how put a button for start the sound output (DS out) from the GUI. This project is very imporat for me! I'll be waiting any questions. Thanks
Attachments
Drop_ruby.fsm
I hope your help !
(11.25 KiB) Downloaded 1346 times
Maryirita
 
Posts: 16
Joined: Sun Dec 07, 2014 7:08 pm
Location: Colombia

Re: Plugin to create sounds using mathematical

Postby KG_is_back » Sun Apr 12, 2015 7:38 pm

the problem you have is obvious. the counter "n" is reset every frame. it should continue counting in next frame.

put following code on top of your ruby code:
Code: Select all
def init
@n=0
end


and replace any "n" with "@n". And delete the "n=0" line, which resets the n at every new frame.

You will hear the bobble quite clearly.

Even better solution would be to move some parts of the code from ruby to DSP code and use streams. Namely the part that fills the buffer.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Plugin to create sounds using mathematical

Postby martinvicanek » Sun Apr 12, 2015 11:22 pm

Hi Maryirita, and welcome to the forum! Your droplet sound model seems to be based on physics. Do you have a reference?
As KG pointed out, much of the calculation would actually be better performed in DSP code. You could even enable keyboard control as a trigger and use pitch and velocity parameters to manipulate the sound.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Plugin to create sounds using mathematical

Postby Maryirita » Tue Apr 14, 2015 12:42 am

Thank you guys, I did what KG said and it works well the problem now is that I must think of a way to restart the time and sound several drops and at different times, any ideas? .
martinvicanek I am relying on a study of Kees van den doel called PHYSICALLY-BASED MODELS FOR LIQUID SOUNDS, you can find it on the internet and in addition he programmed in Java, I send the link of the application to see it, I hope you do not have problems with java updates. I wanted to say that I tried to pass DSP but as I am new to the software not know how to handle real time and as I said before I have to multiply the time variable in the equations. I appreciate any help!

the link of the previous study : https://www.cs.ubc.ca/~kvdoel/icad2004/simulator/
Maryirita
 
Posts: 16
Joined: Sun Dec 07, 2014 7:08 pm
Location: Colombia

Re: Plugin to create sounds using mathematical

Postby KG_is_back » Tue Apr 14, 2015 1:30 am

Hi, I ported some parts of the ruby code to streams. Ruby now only calculates the "constants", and the sound is actually created in streams. I hooked it up to poly streams, which can be played using midi. Basically every time you hit a key, the bubble pops (Flowstone has build in "midi keyboard" which when is on, you can use your computer keyboard as if it was midi input).

To make many bubbles drop, you may use ruby to create randomly timed midi events.

Also in your algorithm I was a little puzzled how "n" is scaled. You your original schematic "n" increments in 1/buffersize and I saw no code, that would scale other parameters according to a time. Sample Rate should dominate somewhere in the code!

I hooked up the schematic that "n" is incremented by 100/SampleRate, because that sounded about right, but I was basically guessing.
Attachments
Drop_ruby and streams.fsm
(9.21 KiB) Downloaded 1367 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Plugin to create sounds using mathematical

Postby Maryirita » Wed Apr 15, 2015 6:59 am

KG_ Thank you very much !,
I just switched to "n" steps were 1 / samplerate and within "x" multiplied by 2 * pi * f. Now to generate several bubbles I added a slider that allows me to select the number of bubbles that want to create and according to that generate that amount of midi events with "for", within that "for" are generated radius and heights randomly for each bubble is being created, but do not know how to send the data to the dSP for bubbles at different times are triggered. this is what I tried. KG really appreciate your help. :oops:
Attachments
Drop_ruby and streams.fsm
(9.8 KiB) Downloaded 1324 times
Maryirita
 
Posts: 16
Joined: Sun Dec 07, 2014 7:08 pm
Location: Colombia

Re: Plugin to create sounds using mathematical

Postby Maryirita » Mon Jun 01, 2015 4:12 am

Hello guys ! Here me again :oops:
I really need help to complete this plugin. There is a mathematical model based on the physics of bubbles in the water and what I need is to apply for:
1. Create sound of small objects falling water (like a stone and a coin )
2. Create sound of rain
3. Select an audio, spectrally analyze and process through physical model for achieving change those specific characteristics of the selected file.
The main problem is that the sound does not sound real. I really need your help, Any ideas, collaboration, suggestion is welcome, I'll be careful. Attach the current file. Thanks a lot !

Margarita.
Attachments
Plugin_water_sounds.fsm
i hope you can help me !
(448.13 KiB) Downloaded 1379 times
Maryirita
 
Posts: 16
Joined: Sun Dec 07, 2014 7:08 pm
Location: Colombia


Return to DSP

Who is online

Users browsing this forum: No registered users and 57 guests