GiorgioRegni / Binaural-Beats

Brainwaves entrainment, auto hypnosis & lucid dreaming with an Android phone
http://binauralbeatstherapy.wordpress.com/
GNU General Public License v3.0
187 stars 58 forks source link

Preset builder #29

Open GiorgioRegni opened 5 years ago

GiorgioRegni commented 5 years ago

https://github.com/GiorgioRegni/Binaural-Beats/blob/master/app/src/main/java/com/ihunda/android/binauralbeat/DefaultProgramsBuilder.java

What I want to build is an activity that allows users to build their own program

right now the program are build through coding in that file

I would like you to develop a builder so that users can create their own custom presets

This ` public static Program MEDITATION_WAKEFULRELAX(Program p) { Visualization v = new None();

    p.setDescription("This presets stimulates a wakeful relaxation state with closed eyes. "
            + "Zen-trained meditation masters produce noticeably more alpha waves during meditation."
            + "To be used in short 10 to 15 minutes doses to calm down and concentrate when needed.");

    p.setAuthor("@GiorgioRegni");

    p.addPeriod(new Period(120, SoundLoop.WHITE_NOISE, 0.4f, null).
            addVoice(new BinauralBeatVoice(12f, 7.83f, 0.6f)).
            addVoice(new BinauralBeatVoice(12f, 7.83f, 0.4f)).
            addVoice(new BinauralBeatVoice(12f, 10f, 0.4f)).
            setV(v)
    ).
    addPeriod(new Period(900-120, SoundLoop.WHITE_NOISE, 0.4f, null).
            addVoice(new BinauralBeatVoice(7.83f, 7.83f, 0.6f)).
            addVoice(new BinauralBeatVoice(7.83f, 7.83f, 0.4f)).
            addVoice(new BinauralBeatVoice(10f, 10f, 0.4f)).
            setV(v)
            );

    return p;   
};

`

would become some kind of listview of Periods where the user can add/remove period, reorder them and for each period set the type of background sound, volume and voices and for each voice frequency start,end and volume and enter a title and description for the program

GiorgioRegni commented 5 years ago

Preset builder should be it's own activity and saved presets must appear in the list of presets on the main page after they are created Eventually, we want users to be able to share presets between each other and discuss them as to create a community of users.

kalpit-dev commented 5 years ago

Do we have some kind of UI sample for this?