What I want to do:
I would like to program a very simple music sequencer for Android. But I've never worked with audio on Android or in Java, respectively.
What the application should do:
This is what the application should be able to do in general.
What components do I need? A normal media player (AudioManager?) won't work, right?
There are already some applications which do what I am thinking about:
Thanks in advance for your help!
A music sequencer (or audio sequencer or simply sequencer) is a device or application software that can record, edit, or play back music, by handling note and performance information in several forms, typically CV/Gate, MIDI, or Open Sound Control (OSC), and possibly audio and automation data for DAWs and plug-ins.
The MIDI sequencer allows the user to record and edit a musical performance without using an audio-based input source. The performance is recorded as a series of events that would ordinarily be played in from a keyboard instrument.
Sequencers allow you to program a combination of notes, rhythms, articulations and effects that can be sent to anything from your DAW of choice to hardware synths. By programming your patterns, melodies and loops, you free yourself up to experiment with mixing, dynamics and performing with other instruments.
There is very simple open source beat sequencer for Android called SoundFuse. They have description and screenshots on the page.
Here is the github repository.
You have not one simple requirement, but three very different requirements.
Playing WAV should be supported out of the box by the JRE with the help of the classes in javax.sound.sampled, it jsut requires some code to wire it up (not too sure about android).
Playing OGG is not supported out of the box. There is an open source implementation for OGG called jOrbis, see their web site. Again this can require some wiring code to hook into your application.
For a Sequencer, you could just use MIDI. Again it should be supported by the JRE, and if it is not on your platform, you can use Gervill - a pure Java MIDI sequencer (Project web site).
There is also a ModPlayer that can play good old Soundtracker and some others. This can also be abused as a Sequencer of some sort if you know the Soundtracker or Screamtracker module format (ancient format, but descriptions are still available on the net). Player with source can be found here. The Tracker formats are not all that ancient by the way, some of todays game engines still make use of them.
If you really want, you can cook up your own Sequencer, all the basic stuff if there in javax.sound.sampled. It just requires some basic knowledge about digital sound and a big lot of wiring code.
There is no single solution for all your needs, you will have to stitch you own together from the building blocks freely available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With