Dear all, I am new in using B4A❤. I want to build a guitar app that has a sequence of bars and each bar contains a chord and a rhythm pattern that user can set. User can adjust tempo (BPM) and play the song out based on sampled guitar sound. This app is mainly for rhythm guitar and can be an accompany tool. I would like to ask for advice of
Is it fine to use CustomViewList for the sequence of bars? It is better to have 'drag and drop' to change order, should I use Gridview? Scrollview?
For the audio playback there will be a background thread always running to mix sound samples, I searched forums and still not sure how to realize this thread, using threading library (seems not recommended)? will any B4A official methods like resumable subs fulfill this?
Thank you very much. Just want to get some advice to make a correct start.
1. HorizontalScrollView or CLV or B4XCanvas. Implementing draw and drop is possible but not trivial.
2. It depends on how CPU intensive the task. If you can do it with a timer in a short time then no reason to make things more complicated. If not then you will need to use the Threading library.
There is no need for more than one thread to combine a lot of audio-events to a single stereo signal. You create a SHORT()-Array like a ringbuffer and fill in the sounds. Adding sounds to a stream is really only "adding". Combine audios only by addition all their samples one by one. When this work is done, convert all to a BYTE()-Array and send it to the B4A-build in-AudioStreamer.
Have a look on my current project here to see, what is possible:20tracks-mpx-player
Thanks Midimaster. I will check that and see how Erel makes audio streaming. I do need dynamically update tempo hence to mix sounds during plackback and also want to put chorus and delay effects in. Glad to know music/audio related app maker.?