开发者

How to synthesize sounds of instruments on Android (Piano, Drums, Guitar, etc...)

开发者 https://www.devze.com 2023-03-25 19:43 出处:网络
Can somebody give me some direction on how to synthesize sounds of instruments (Piano, Drums, Gui开发者_如何学Ctar, etc...)

Can somebody give me some direction on how to synthesize sounds of instruments (Piano, Drums, Gui开发者_如何学Ctar, etc...)

I am not even sure what to look for.

Thanks


Not sure if this is still the case but Android seems to have latency issues that inhibit it from being able to do true sound synthesis. NanoStudio, in my opinion, is the best audio app on the iOS and the author so far refuses to make an Android version because the framework isn't there yet.

See these links:

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=nanostudio+android#hl=en&q=+site:forums.blipinteractive.co.uk+nanostudio+android&bav=on.2,or.r_gc.r_pw.&fp=ee1cd411508a9e34&biw=1194&bih=939

It all depends on what kind of application you're making, if it's going to be a Akai APC firing off sounds you could be alright. If you're after true synthesis (crafting wave forms so they replicate pianos, guitars, and drums), which is what JASS mentioned above does, then Android might not be able to handle it.

If you're looking for a guide on emulating organic instruments via synthesis check out the books by Fred Welsh http://www.synthesizer-cookbook.com/


Synthesizing a guitar, piano, or natural drums would be difficult. Triggering samples that you pass through a synthesis engine less so. If you want to synthesize analog synth sounds that's easier.

Here is a project out there you might be able to grab code from:

https://sites.google.com/site/androidsynthesizer/

In the end if you want to create a full synthesizer or multi-track application you'll have to render your oscillators + filters, etc into an audio stream that can be piped into the MediaPlayer. You don't necessarily need MIDI to do that.

Here is one persons experience:

http://jazarimusic.com/2011/06/audio-on-android-a-developers-perspective/

Interesting read.


Two projects that might be worth looking at JASS (Java Audio Synthesis System) and PureData . PureData is quite interesting though probably the harder path.


MIDI support on Android sucks. (So does audio support in general, but that's another story.) There's an interesting blog post here that discusses the (lack of) MIDI capabilities on Android. Here's what he did to work around some of the limitations:

Personally I solved the dynamic midi generation issue as follows: programmatically generate a midi file, write it to the device storage, initiate a mediaplayer with the file and let it play. This is fast enough if you just need to play a dynamic midi sound. I doubt it’s useful for creating user controlled midi stuff like sequencers, but for other cases it’s great.


Android unfortunately took out MIDI support in the official Java SDK.

That is, you cannot play audio streams directly. You must use the provided MediaStream classes.

You will have to use some DSP (digital signal processing) knowledge and the NDK in order to do this.

I would not be surprised if there was a general package (not necessarily for Android) to allow you to do this.

I hope this pointed you in the right direction!

0

精彩评论

暂无评论...
验证码 换一张
取 消