├── .gitignore
├── LICENSE
├── README.md
├── StorePresence
├── description.txt
├── featureGraphic.png
├── ic_launcher.pdn
├── ic_launcher128.png
├── ic_launcher512.png
├── ic_launcher_huge.png
└── ic_launcher_kindle.png
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ ├── BuiltIn.sf2
│ ├── Instruments
│ │ ├── Arpeggio+.modsynth
│ │ ├── Basic.modsynth
│ │ ├── Chant+.modsynth
│ │ ├── Chimes+.modsynth
│ │ ├── Classic.modsynth
│ │ ├── Crush+.modsynth
│ │ ├── Echo.modsynth
│ │ ├── Formant.modsynth
│ │ ├── FreqMod.modsynth
│ │ ├── Funct+.modsynth
│ │ ├── Glider+.modsynth
│ │ ├── MelodyBox+.modsynth
│ │ ├── OP6+.modsynth
│ │ ├── PCMLooper+.modsynth
│ │ ├── PCMPlayer+.modsynth
│ │ ├── PadSynth.modsynth
│ │ ├── PulseMod.modsynth
│ │ ├── Ring.modsynth
│ │ ├── SampleHold+.modsynth
│ │ ├── Scratcher.modsynth
│ │ ├── Sequence.modsynth
│ │ ├── Spectral+.modsynth
│ │ ├── Strings+.modsynth
│ │ ├── Wind.modsynth
│ │ └── ~FullVersionPreview.modsynth
│ ├── Sax.wav
│ ├── ThemeFont.ttf
│ └── fontawesome-webfont.ttf
│ ├── java
│ └── com
│ │ └── gallantrealm
│ │ └── modsynth
│ │ ├── AssetLoader.java
│ │ ├── BiQuadraticFilter.java
│ │ ├── ClientModel.java
│ │ ├── ClientModelChangedEvent.java
│ │ ├── ClientModelChangedListener.java
│ │ ├── FastMath.java
│ │ ├── Instrument.java
│ │ ├── InstrumentSelectorDialog.java
│ │ ├── MainActivity.java
│ │ ├── MelodyEditor.java
│ │ ├── MidiControlDialog.java
│ │ ├── ModGraph.java
│ │ ├── ModSynthMidiService.java
│ │ ├── ModSynthTranslator.java
│ │ ├── Note.java
│ │ ├── PentaBandpassFilter.java
│ │ ├── Scope.java
│ │ ├── Settings.java
│ │ ├── SettingsDialog.java
│ │ ├── SoundContentProvider.java
│ │ ├── SpectralControl.java
│ │ ├── SplashActivity.java
│ │ ├── module
│ │ ├── Amp.java
│ │ ├── Arpeggiator.java
│ │ ├── CC.java
│ │ ├── Compressor.java
│ │ ├── Crusher.java
│ │ ├── Delay.java
│ │ ├── Divider.java
│ │ ├── Envelope.java
│ │ ├── Filter.java
│ │ ├── Function.java
│ │ ├── Glide.java
│ │ ├── Keyboard.java
│ │ ├── LFO.java
│ │ ├── Melody.java
│ │ ├── Mixer.java
│ │ ├── Module.java
│ │ ├── MultiOsc.java
│ │ ├── Operator.java
│ │ ├── Oscillator.java
│ │ ├── Output.java
│ │ ├── PCM.java
│ │ ├── Pad.java
│ │ ├── Pan.java
│ │ ├── Reverb.java
│ │ ├── SampleHold.java
│ │ ├── Sequencer.java
│ │ ├── SpectralFilter.java
│ │ └── Unison.java
│ │ ├── theme
│ │ ├── AuraTheme.java
│ │ ├── BlueTheme.java
│ │ ├── CircuitTheme.java
│ │ ├── CustomTheme.java
│ │ ├── GreenTheme.java
│ │ ├── IceTheme.java
│ │ ├── MetalTheme.java
│ │ ├── OnyxTheme.java
│ │ ├── SpaceTheme.java
│ │ ├── SunsetTheme.java
│ │ ├── TropicalTheme.java
│ │ └── WoodTheme.java
│ │ └── viewer
│ │ ├── AmpViewer.java
│ │ ├── ArpeggiatorViewer.java
│ │ ├── CompressorViewer.java
│ │ ├── CrusherViewer.java
│ │ ├── DelayViewer.java
│ │ ├── DividerViewer.java
│ │ ├── EnvelopeViewer.java
│ │ ├── FilterViewer.java
│ │ ├── FunctionViewer.java
│ │ ├── GlideViewer.java
│ │ ├── KeyboardViewer.java
│ │ ├── LFOViewer.java
│ │ ├── MelodyViewer.java
│ │ ├── MixerViewer.java
│ │ ├── ModuleViewer.java
│ │ ├── MultiOscViewer.java
│ │ ├── OperatorViewer.java
│ │ ├── OscillatorViewer.java
│ │ ├── OutputViewer.java
│ │ ├── PCMViewer.java
│ │ ├── PadViewer.java
│ │ ├── PanViewer.java
│ │ ├── ReverbViewer.java
│ │ ├── SampleHoldViewer.java
│ │ ├── SequencerViewer.java
│ │ ├── SpectralFilterViewer.java
│ │ └── UnisonViewer.java
│ └── res
│ ├── drawable-nodpi
│ ├── dialog_background.9.png
│ ├── left_end.png
│ ├── leftithumb.png
│ ├── leftthumb.png
│ ├── right_end.png
│ ├── rightithumb.png
│ ├── rightthumb.png
│ ├── skinny_button.9.png
│ ├── theme_button_default.9.png
│ └── theme_button_pressed.9.png
│ ├── drawable
│ ├── amp.png
│ ├── arpeggiator.png
│ ├── centre_bar.png
│ ├── compressor.png
│ ├── crusher.png
│ ├── delay.png
│ ├── divider.png
│ ├── envelope.png
│ ├── filter.png
│ ├── function.png
│ ├── gear.png
│ ├── glide.png
│ ├── keyboard.png
│ ├── leader.png
│ ├── lfo.png
│ ├── melody.png
│ ├── mixer.png
│ ├── module.png
│ ├── module1.png
│ ├── module2.png
│ ├── moduleselected.png
│ ├── multiosc.png
│ ├── operator.png
│ ├── oscillator.png
│ ├── pad.png
│ ├── pan.png
│ ├── pcm.png
│ ├── progress12_horizontal.xml
│ ├── progress24_horizontal.xml
│ ├── progress_active.9.png
│ ├── progress_background.9.png
│ ├── progress_background12.9.png
│ ├── progress_background24.9.png
│ ├── progress_background_orig.9.png
│ ├── progress_horizontal.xml
│ ├── reverb.png
│ ├── samplehold.png
│ ├── seek_thumb.xml
│ ├── seek_thumb_activated.png
│ ├── seek_thumb_normal.png
│ ├── seek_thumb_pressed.png
│ ├── seek_thumb_selected.png
│ ├── sequencer.png
│ ├── spectralfilter.png
│ ├── tab_button.xml
│ ├── tab_button_default.9.png
│ ├── tab_button_selected.9.png
│ └── unison.png
│ ├── layout
│ ├── amppane.xml
│ ├── arpeggiatorpane.xml
│ ├── compressorpane.xml
│ ├── crusherpane.xml
│ ├── delaypane.xml
│ ├── dividerpane.xml
│ ├── envelopepane.xml
│ ├── filterpane.xml
│ ├── freesound_dialog.xml
│ ├── functionpane.xml
│ ├── glidepane.xml
│ ├── harmonicspane.xml
│ ├── instrumentpane.xml
│ ├── keyboardpane.xml
│ ├── lfopane.xml
│ ├── library_dialog.xml
│ ├── melodypane.xml
│ ├── midicontrol_dialog.xml
│ ├── mixerpane.xml
│ ├── modulatorpane.xml
│ ├── operatorpane.xml
│ ├── oscillatorpane.xml
│ ├── padpane.xml
│ ├── panpane.xml
│ ├── pcmpane.xml
│ ├── recordpane.xml
│ ├── reverbpane.xml
│ ├── sampleholdpane.xml
│ ├── sequencerpane.xml
│ ├── settings_dialog.xml
│ ├── speakerpane.xml
│ ├── spectralfilterpane.xml
│ ├── spinner_dropdown_item.xml
│ ├── spinner_dropdown_item_selected.xml
│ ├── spinner_item.xml
│ ├── splash.xml
│ ├── synth_screen.xml
│ ├── unisonpane.xml
│ └── vibratopane.xml
│ ├── mipmap-hdpi
│ ├── ic_gear.png
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ ├── ic_gear.png
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ ├── ic_gear.png
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ ├── ic_gear.png
│ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher.png
│ ├── raw
│ ├── aura_background.png
│ ├── aura_swatch.png
│ ├── blue_background.png
│ ├── blue_swatch.png
│ ├── circuit_background.png
│ ├── circuit_swatch.png
│ ├── custom_swatch.png
│ ├── green_background.png
│ ├── green_swatch.png
│ ├── ice_background.png
│ ├── ice_swatch.png
│ ├── keys_background.png
│ ├── metal_background.png
│ ├── metal_swatch.png
│ ├── onyx_background.png
│ ├── onyx_swatch.png
│ ├── space_background.png
│ ├── space_swatch.png
│ ├── sunset_background.png
│ ├── sunset_swatch.png
│ ├── tropical_background.png
│ ├── tropical_swatch.png
│ ├── wood_background.png
│ └── wood_swatch.png
│ ├── values
│ ├── attrs.xml
│ ├── icons.xml
│ ├── ids.xml
│ ├── strings.xml
│ └── values.xml
│ └── xml
│ └── synth_device_info.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── lint.xml
├── modsynth_specs.html
├── project.properties
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | .DS_Store
5 | /build
6 | /captures
7 | .externalNativeBuild
8 | .cxx
9 | local.properties
10 | /.idea
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ModSynth
2 |
3 | A modular synthesizer for Android. See https://play.google.com/store/apps/details?id=com.gallantrealm.modsynth for the installable. If you'd like to view or create an issue for a problem or feature request see the list at https://github.com/owingsbj/ModSynth/issues.
4 |
5 | This synthesizer is dependent on the [MySynth](https://github.com/owingsbj/MySynth) synthesizer engine. It also uses widgets that I've created or obtained and placed into the [MyAndroid](https://github.com/owingsbj/MyAndroid) repository. You'll need to download both of these repositories and have them residing under the same parent folder as ModSynth to resolve dependencies.
6 |
7 | The source for ModSynth is available here for your examination and suggestion for improvement. You could also create derived works of course, as it is allowed by the license. However, I wouldn't suggest making another duplicate or slightly modified ModSynth application and releasing it on Google Play, since
8 |
9 | 1. There already is one.
10 | 2. You won't make much money at it. I never did nor did I ever intend to.
11 | 3. You could more easily assist in the development of the existing ModSynth.
12 |
13 | Feel free to email me at bj@gallantrealm.com if you have questions about the source. I intend to improve its comments to make it easier to understand.
14 |
--------------------------------------------------------------------------------
/StorePresence/description.txt:
--------------------------------------------------------------------------------
1 | ModSynth is a powerful modular synthesizer allowing construction of complex polyphonic instruments. Connect any number of oscillators, filters, delays and other synthesizer modules in a graphical editor. Adjust the settings of each module while playing the instrument to get a desired sound. Save as many instruments or variants of an instrument as you'd like. Ten built-in instruments are provided to help you get started.
2 |
3 | The free version contains the following modules:
4 | - Keyboard
5 | - Pad (for theremin and "scratching" effects)
6 | - Oscillator
7 | - Filter
8 | - Envelope
9 | - Mixer
10 | - Amp
11 | - LFO
12 | - Sequencer
13 | - Delay (echo)
14 | - Output (with scope to see the sound)
15 |
16 | In-app purchase the full version ($5 US) to expand polyphony (from 3 voices to 10), unlock advanced capabilities, and access these additional modules:
17 | - Arpeggiator for sequential playing of the notes in a chord
18 | - Melody for more complex sequences of notes
19 | - MultiOsc for strings and other chorus sounds,
20 | - Unison for more complex chorusing,
21 | - Operator for building FM synthesis,
22 | - PCM for sampled sounds (WAV and SF2 SoundFont files),
23 | - Reverb for simulating room acoustics.
24 | - Crusher for adding digital distortion.
25 | - Compressor to combine all voices and even the sound levels
26 | - Pan to direct sound to either left or right stereo channels.
27 | - SpectralFilter to control the spectrum of a sound with a bank of 25 bandpass filters
28 | - Function module allowing entry of an arithmetic expression for the module's function
29 | The full version also provides the ability to record sounds to a WAV file.
30 |
31 | ModSynth has MIDI support for external MIDI controllers such as keyboards or DAWs, including mapping of controls to CCs. It has low latency on devices supporting Android low latency. All oscillators are anti-aliased, providing low distortion at higher frequencies.
32 |
33 | A guide to using ModSynth can be found at http://bjowings.weebly.com/modsynth.html .
34 |
35 | A VST plugin is available to run ModSynth created instruments on VST hosts on Windows. See http://bjowings.weebly.com/modsynthvst.html for the free download and instructions.
--------------------------------------------------------------------------------
/StorePresence/featureGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/StorePresence/featureGraphic.png
--------------------------------------------------------------------------------
/StorePresence/ic_launcher.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/StorePresence/ic_launcher.pdn
--------------------------------------------------------------------------------
/StorePresence/ic_launcher128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/StorePresence/ic_launcher128.png
--------------------------------------------------------------------------------
/StorePresence/ic_launcher512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/StorePresence/ic_launcher512.png
--------------------------------------------------------------------------------
/StorePresence/ic_launcher_huge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/StorePresence/ic_launcher_huge.png
--------------------------------------------------------------------------------
/StorePresence/ic_launcher_kindle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/StorePresence/ic_launcher_kindle.png
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /release/
3 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | compileSdk 34
7 |
8 | defaultConfig {
9 | applicationId "com.gallantrealm.modsynth"
10 | minSdk 21
11 | targetSdk 35
12 | versionCode 800
13 | versionName '8.00'
14 |
15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | compileOptions {
25 | sourceCompatibility JavaVersion.VERSION_1_8
26 | targetCompatibility JavaVersion.VERSION_1_8
27 | }
28 | namespace 'com.gallantrealm.modsynth'
29 | }
30 |
31 | dependencies {
32 | implementation "com.android.billingclient:billing:7.0.0"
33 | implementation 'androidx.appcompat:appcompat:1.7.0'
34 | implementation 'com.google.android.material:material:1.12.0'
35 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
36 | implementation files('../../MySynth/app/build/outputs/aar/app-release.aar')
37 | implementation files('../../MyAndroid/app/build/outputs/aar/app-release.aar')
38 | testImplementation 'junit:junit:4.13.2'
39 | androidTestImplementation 'androidx.test.ext:junit:1.2.1'
40 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
41 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
17 |
19 |
21 |
23 |
25 |
26 |
27 |
28 |
30 |
31 |
32 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
49 |
50 |
51 |
57 |
58 |
59 |
64 |
65 |
67 |
70 |
71 |
72 |
75 |
76 |
77 |
78 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/app/src/main/assets/BuiltIn.sf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/BuiltIn.sf2
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Arpeggio+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Arpeggio+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Basic.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Basic.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Chant+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Chant+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Chimes+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Chimes+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Classic.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Classic.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Crush+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Crush+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Echo.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Echo.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Formant.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Formant.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/FreqMod.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/FreqMod.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Funct+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Funct+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Glider+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Glider+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/MelodyBox+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/MelodyBox+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/OP6+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/OP6+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/PCMLooper+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/PCMLooper+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/PCMPlayer+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/PCMPlayer+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/PadSynth.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/PadSynth.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/PulseMod.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/PulseMod.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Ring.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Ring.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/SampleHold+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/SampleHold+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Scratcher.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Scratcher.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Sequence.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Sequence.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Spectral+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Spectral+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Strings+.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Strings+.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/Wind.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/Wind.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Instruments/~FullVersionPreview.modsynth:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Instruments/~FullVersionPreview.modsynth
--------------------------------------------------------------------------------
/app/src/main/assets/Sax.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/Sax.wav
--------------------------------------------------------------------------------
/app/src/main/assets/ThemeFont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/ThemeFont.ttf
--------------------------------------------------------------------------------
/app/src/main/assets/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/assets/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/AssetLoader.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 | import android.app.Activity;
6 | import android.content.Context;
7 |
8 | public final class AssetLoader {
9 |
10 | public static InputStream loadAsset(String assetName) throws IOException {
11 | Context context = ClientModel.getClientModel().getContext();
12 | return context.getAssets().open(assetName);
13 | }
14 |
15 | public static long getAssetLength(String assetName) throws IOException {
16 | Context context = ClientModel.getClientModel().getContext();
17 | return context.getAssets().openFd(assetName).getLength();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/ClientModelChangedEvent.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | /**
4 | * This event is fired on any change to the client model.
5 | */
6 | public class ClientModelChangedEvent {
7 |
8 | public static int EVENT_TYPE_WWMODEL_UPDATED = 1;
9 | public static int EVENT_TYPE_NAVIGATOR_FIELD_UPDATED = 2;
10 | public static int EVENT_TYPE_MESSAGE_FIELD_UPDATED = 3;
11 | public static int EVENT_TYPE_MESSAGE_RECEIVED = 4;
12 | public static int EVENT_TYPE_CONNECTED = 5;
13 | public static int EVENT_TYPE_DISCONNECTED = 6;
14 | public static int EVENT_TYPE_RENDERING_UPDATED = 7;
15 | public static int EVENT_TYPE_FIELD_OF_VIEW_CHANGED = 8;
16 | public static int EVENT_TYPE_STYLE_CHANGED = 9;
17 | public static int EVENT_TYPE_REFRESH_RATE_CHANGED = 10;
18 | public static int EVENT_TYPE_ANTIALIAS_CHANGED = 11;
19 | public static int EVENT_TYPE_RENDERING_THRESHOLD_CHANGED = 12;
20 | public static int EVENT_TYPE_SELECTED_GAME_CHANGED = 13;
21 | public static int EVENT_TYPE_SELECTED_AVATAR_CHANGED = 14;
22 | public static int EVENT_TYPE_MESSAGE_FLASHED = 15;
23 | public static int EVENT_TYPE_AVATAR_ACTIONS_CHANGED = 16;
24 | public static int EVENT_TYPE_AVATAR_ACTIONS_RESTORED = 17;
25 | public static int EVENT_TYPE_WORLD_ACTIONS_CHANGED = 18;
26 | public static int EVENT_TYPE_WORLD_ACTIONS_RESTORED = 19;
27 | public static int EVENT_TYPE_USE_CONTROLLER_CHANGED = 20;
28 | public static int EVENT_TYPE_SELECTED_CATEGORY_CHANGED = 21;
29 | public static int EVENT_TYPE_CALIBRATE_SENSORS = 22;
30 | public static int EVENT_TYPE_FULLVERSION_CHANGED = 23;
31 | public static int EVENT_TYPE_OBJECT_SELECTED = 24;
32 | public static int EVENT_TYPE_POINT_SELECTED = 25;
33 |
34 | private final int eventType;
35 |
36 | public ClientModelChangedEvent(int eventType) {
37 | this.eventType = eventType;
38 | }
39 |
40 | public int getEventType() {
41 | return eventType;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/ClientModelChangedListener.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | /**
4 | * This listener provides a single method, clientModelChanged, that is invoked on any change to the client model. The
5 | * ClientModelChangedEvent event can be used to get more information on the type of model change.
6 | */
7 | public interface ClientModelChangedListener {
8 | public void clientModelChanged(ClientModelChangedEvent event);
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/MidiControlDialog.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | import com.gallantrealm.android.GallantDialog;
4 | import com.gallantrealm.android.RangeSlider;
5 | import com.gallantrealm.android.Translator;
6 | import com.gallantrealm.modsynth.module.CC;
7 | import android.app.Activity;
8 | import android.content.Context;
9 | import android.graphics.Typeface;
10 | import android.os.Bundle;
11 | import android.view.MotionEvent;
12 | import android.view.View;
13 | import android.view.View.OnTouchListener;
14 | import android.view.Window;
15 | import android.widget.Button;
16 | import android.widget.CheckBox;
17 |
18 | import de.viktorreiser.toolbox.widget.NumberPicker;
19 |
20 | public class MidiControlDialog extends GallantDialog {
21 |
22 | public static MidiControlDialog lastMidiControlDialog;
23 |
24 | public static View.OnLongClickListener newLongClickListener(final CC cc) {
25 | return new View.OnLongClickListener() {
26 | public boolean onLongClick(View v) {
27 | final MidiControlDialog ccSelect = new MidiControlDialog(v.getContext());
28 | ccSelect.setCC(cc);
29 | ccSelect.show();
30 | lastMidiControlDialog = ccSelect;
31 | return false;
32 | }
33 | };
34 | }
35 |
36 | /**
37 | * This is called by MainActivity whenever a MIDI control changes. This automatically selects that control in the dialog.
38 | */
39 | public static void controlChanged(Activity activity, final int cc) {
40 | if (lastMidiControlDialog != null && lastMidiControlDialog.isShowing()) {
41 | activity.runOnUiThread(new Runnable() {
42 | public void run() {
43 | if (lastMidiControlDialog != null && lastMidiControlDialog.controlPick != null) {
44 | lastMidiControlDialog.controlPick.setCurrent(cc);
45 | lastMidiControlDialog.updateCC();
46 | }
47 | }
48 | });
49 | }
50 | }
51 |
52 | ClientModel clientModel = ClientModel.getClientModel();
53 |
54 | NumberPicker controlPick;
55 | RangeSlider valueRangeSlider;
56 | CheckBox invertCheckBox;
57 | Button okButton;
58 |
59 | CC cc;
60 |
61 | public MidiControlDialog(Context context) {
62 | super(context, R.style.Theme_Dialog);
63 | requestWindowFeature(Window.FEATURE_NO_TITLE);
64 | setContentView(R.layout.midicontrol_dialog);
65 | setCancelable(false);
66 | setCanceledOnTouchOutside(false);
67 | }
68 |
69 | @Override
70 | protected void onCreate(Bundle savedInstanceState) {
71 | super.onCreate(savedInstanceState);
72 |
73 | controlPick = (NumberPicker) findViewById(R.id.controlPick);
74 | valueRangeSlider = (RangeSlider) findViewById(R.id.valueRangeSlider);
75 | invertCheckBox = (CheckBox)findViewById(R.id.invertCheckBox);
76 | okButton = (Button) findViewById(R.id.okButton);
77 |
78 | Typeface typeface = clientModel.getTypeface(getContext());
79 | if (typeface != null) {
80 | okButton.setTypeface(typeface);
81 | }
82 |
83 | controlPick.setCurrent(cc.cc);
84 | if (cc.rangeLimited) {
85 | valueRangeSlider.setMinValue(cc.minLimit);
86 | valueRangeSlider.setMaxValue(cc.maxLimit);
87 | }
88 | valueRangeSlider.setThumb1Value(cc.minRange);
89 | valueRangeSlider.setThumb2Value(cc.maxRange);
90 |
91 | controlPick.setOnChangeListener(new NumberPicker.OnChangedListener() {
92 | public void onChanged(NumberPicker arg0, int arg1, int arg2) {
93 | updateCC();
94 | }
95 | });
96 | valueRangeSlider.setOnRangeChangeListener(new RangeSlider.RangeChangeListener() {
97 | public void rangeChanged(int arg0, int arg1) {
98 | updateCC();
99 | }
100 | });
101 |
102 | invertCheckBox.setChecked(cc.invert);
103 |
104 | okButton.setOnTouchListener(new OnTouchListener() {
105 |
106 | @Override
107 | public boolean onTouch(View v, MotionEvent event) {
108 | updateCC();
109 | MidiControlDialog.this.dismiss();
110 | MidiControlDialog.this.cancel();
111 | return true;
112 | }
113 |
114 | });
115 |
116 | Translator.getTranslator().translate(this.getWindow().getDecorView());
117 | }
118 |
119 | public void setCC(CC cc) {
120 | this.cc = cc;
121 | if (controlPick != null) {
122 | controlPick.setCurrent(cc.cc);
123 | if (cc.rangeLimited) {
124 | valueRangeSlider.setMinValue(cc.minLimit);
125 | valueRangeSlider.setMaxValue(cc.maxLimit);
126 | }
127 | valueRangeSlider.setThumb1Value(cc.minRange);
128 | valueRangeSlider.setThumb2Value(cc.maxRange);
129 | }
130 | }
131 |
132 | public CC getCC() {
133 | updateCC();
134 | return cc;
135 | }
136 |
137 | public void updateCC() {
138 | try {
139 | if (cc != null) {
140 | cc.cc = controlPick.getCurrent();
141 | cc.minRange = valueRangeSlider.getThumb1Value();
142 | cc.maxRange = valueRangeSlider.getThumb2Value();
143 | cc.invert = invertCheckBox.isChecked();
144 | }
145 | } catch (Exception e) {
146 | }
147 | }
148 |
149 | @Override
150 | public void show() {
151 | super.show();
152 | }
153 |
154 | @Override
155 | public void dismiss() {
156 | super.dismiss();
157 | lastMidiControlDialog = null;
158 | }
159 |
160 | }
161 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/Note.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Note implements Serializable {
6 | private static final long serialVersionUID = 1L;
7 | public int start; // in "beats"
8 | public int pitch;
9 | public float velocity;
10 | public int duration; // in "beats"
11 | public boolean continuous;
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/PentaBandpassFilter.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | /**
4 | * Five biquadratic bandpass filters, combined for performance
5 | */
6 | public final class PentaBandpassFilter {
7 |
8 | double f1, f2, f3, f4, f5;
9 | double a1, a2, a3, a4, a5;
10 | double aa1, aa2, aa3, aa4, aa5;
11 | double aaa1, aaa2, aaa3, aaa4, aaa5;
12 | double b1, b2, b3, b4, b5;
13 | // double bb1, bb2, bb3, bb4, bb5;
14 | double bbb1, bbb2, bbb3, bbb4, bbb5;
15 | double xx, xxx;
16 | double y1, y2, y3, y4, y5;
17 | double yy1, yy2, yy3, yy4, yy5;
18 | double yyy1, yyy2, yyy3, yyy4, yyy5;
19 | double sample_rate, Q;
20 |
21 | public PentaBandpassFilter(double center_freq, double sample_rate, double Q) {
22 | configure(sample_rate, Q);
23 | f1 = center_freq;
24 | f2 = center_freq;
25 | f3 = center_freq;
26 | f4 = center_freq;
27 | f5 = center_freq;
28 | }
29 |
30 | public final void reset() {
31 | xx = xxx = 0;
32 | yy1 = yyy1 = 0;
33 | yy2 = yyy2 = 0;
34 | yy3 = yyy3 = 0;
35 | yy4 = yyy4 = 0;
36 | yy5 = yyy5 = 0;
37 | }
38 |
39 | public final void configure(double sample_rate, double Q) {
40 | reset();
41 | Q = (Q == 0) ? 1e-9 : Q;
42 | this.sample_rate = sample_rate;
43 | this.Q = Q;
44 | setFrequencies(f1, f2, f3, f4, f5);
45 | }
46 |
47 | // allow parameter change while running
48 | public final void setFrequencies(double cf1, double cf2, double cf3, double cf4, double cf5) {
49 | f1 = cf1;
50 | f2 = cf2;
51 | f3 = cf3;
52 | f4 = cf4;
53 | f5 = cf5;
54 | double omega1 = 2 * Math.PI * cf1 / sample_rate;
55 | double omega2 = 2 * Math.PI * cf2 / sample_rate;
56 | double omega3 = 2 * Math.PI * cf3 / sample_rate;
57 | double omega4 = 2 * Math.PI * cf4 / sample_rate;
58 | double omega5 = 2 * Math.PI * cf5 / sample_rate;
59 | double sn1 = Math.sin(omega1);
60 | double sn2 = Math.sin(omega2);
61 | double sn3 = Math.sin(omega3);
62 | double sn4 = Math.sin(omega4);
63 | double sn5 = Math.sin(omega5);
64 | double cs1 = Math.cos(omega1);
65 | double cs2 = Math.cos(omega2);
66 | double cs3 = Math.cos(omega3);
67 | double cs4 = Math.cos(omega4);
68 | double cs5 = Math.cos(omega5);
69 | double alpha1 = sn1 / (2 * Q);
70 | double alpha2 = sn2 / (2 * Q);
71 | double alpha3 = sn3 / (2 * Q);
72 | double alpha4 = sn4 / (2 * Q);
73 | double alpha5 = sn5 / (2 * Q);
74 |
75 | // Bandpass
76 | b1 = alpha1;
77 | b2 = alpha2;
78 | b3 = alpha3;
79 | b4 = alpha4;
80 | b5 = alpha5;
81 | // bb1 = 0;
82 | // bb2 = 0;
83 | // bb3 = 0;
84 | // bb4 = 0;
85 | // bb5 = 0;
86 | bbb1 = -alpha1;
87 | bbb2 = -alpha2;
88 | bbb3 = -alpha3;
89 | bbb4 = -alpha4;
90 | bbb5 = -alpha5;
91 | a1 = 1 + alpha1;
92 | a2 = 1 + alpha2;
93 | a3 = 1 + alpha3;
94 | a4 = 1 + alpha4;
95 | a5 = 1 + alpha5;
96 | aa1 = -2 * cs1;
97 | aa2 = -2 * cs2;
98 | aa3 = -2 * cs3;
99 | aa4 = -2 * cs4;
100 | aa5 = -2 * cs5;
101 | aaa1 = 1 - alpha1;
102 | aaa2 = 1 - alpha2;
103 | aaa3 = 1 - alpha3;
104 | aaa4 = 1 - alpha4;
105 | aaa5 = 1 - alpha5;
106 |
107 | // prescale filter constants
108 | b1 /= a1;
109 | b2 /= a2;
110 | b3 /= a3;
111 | b4 /= a4;
112 | b5 /= a5;
113 | // bb1 /= a1;
114 | // bb2 /= a2;
115 | // bb3 /= a3;
116 | // bb4 /= a4;
117 | // bb5 /= a5;
118 | bbb1 /= a1;
119 | bbb2 /= a2;
120 | bbb3 /= a3;
121 | bbb4 /= a4;
122 | bbb5 /= a5;
123 | aa1 /= a1;
124 | aa2 /= a2;
125 | aa3 /= a3;
126 | aa4 /= a4;
127 | aa5 /= a5;
128 | aaa1 /= a1;
129 | aaa2 /= a2;
130 | aaa3 /= a3;
131 | aaa4 /= a4;
132 | aaa5 /= a5;
133 | }
134 |
135 | // perform one filtering step
136 | public final double filter(double x, double l1, double l2, double l3, double l4, double l5) {
137 | // y1 = b1 * x + bb1 * xx + bbb1 * xxx - aa1 * yy1 - aaa1 * yyy1;
138 | // y2 = b2 * x + bb2 * xx + bbb2 * xxx - aa2 * yy2 - aaa2 * yyy2;
139 | // y3 = b3 * x + bb3 * xx + bbb3 * xxx - aa3 * yy3 - aaa3 * yyy3;
140 | // y4 = b4 * x + bb4 * xx + bbb4 * xxx - aa4 * yy4 - aaa4 * yyy4;
141 | // y5 = b5 * x + bb5 * xx + bbb5 * xxx - aa5 * yy5 - aaa5 * yyy5;
142 | y1 = b1 * x + bbb1 * xxx - aa1 * yy1 - aaa1 * yyy1;
143 | y2 = b2 * x + bbb2 * xxx - aa2 * yy2 - aaa2 * yyy2;
144 | y3 = b3 * x + bbb3 * xxx - aa3 * yy3 - aaa3 * yyy3;
145 | y4 = b4 * x + bbb4 * xxx - aa4 * yy4 - aaa4 * yyy4;
146 | y5 = b5 * x + bbb5 * xxx - aa5 * yy5 - aaa5 * yyy5;
147 | xxx = xx;
148 | xx = x;
149 | yyy1 = yy1;
150 | yyy2 = yy2;
151 | yyy3 = yy3;
152 | yyy4 = yy4;
153 | yyy5 = yy5;
154 | yy1 = y1;
155 | yy2 = y2;
156 | yy3 = y3;
157 | yy4 = y4;
158 | yy5 = y5;
159 | return l1 * y1 + l2 * y2 + l3 * y3 + l4 * y4 + l5 * y5;
160 | }
161 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/Scope.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | import java.io.Serializable;
4 |
5 | // Note: This class is needed to resolve deserialization issues on Android KitKat.
6 | public class Scope implements Serializable {
7 | private static final long serialVersionUID = 1L;
8 |
9 | public enum Type {
10 | Oscilloscope, Flower // , Waterfall
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/Settings.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | public final class Settings {
4 | public static int tuningCents;
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/SpectralControl.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | import com.gallantrealm.modsynth.module.SpectralFilter;
4 | import android.content.Context;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 | import android.graphics.RectF;
8 | import android.util.AttributeSet;
9 | import android.view.MotionEvent;
10 | import android.view.View;
11 | import android.view.View.OnTouchListener;
12 |
13 | public class SpectralControl extends View implements OnTouchListener {
14 |
15 | boolean[][] spectralMap;
16 | int bands = SpectralFilter.BANDS;
17 | int steps = SpectralFilter.STEPS;
18 | public boolean painting = true;
19 | int currentStep = 0;
20 |
21 | public SpectralControl(Context context) {
22 | super(context);
23 | init();
24 | }
25 |
26 | public SpectralControl(Context context, AttributeSet attrs) {
27 | super(context, attrs);
28 | init();
29 | }
30 |
31 | public SpectralControl(Context context, AttributeSet attrs, int defStyle) {
32 | super(context, attrs, defStyle);
33 | init();
34 | }
35 |
36 | private void init() {
37 | setOnTouchListener(this);
38 | }
39 |
40 | public void setSpectralMap(boolean[][] spectralMap) {
41 | this.spectralMap = spectralMap;
42 | postInvalidate();
43 | }
44 |
45 | public void setCurrentStep(int currentStep) {
46 | this.currentStep = currentStep;
47 | postInvalidate();
48 | }
49 |
50 | public int getBands() {
51 | return bands;
52 | }
53 |
54 | public void setBands(int bands) {
55 | this.bands = bands;
56 | }
57 |
58 | public int getSteps() {
59 | return steps;
60 | }
61 |
62 | public void setYGradiated(int steps) {
63 | this.steps = steps;
64 | }
65 |
66 | @Override
67 | public void draw(Canvas canvas) {
68 | float l = 10;
69 | float r = getWidth() - 10;
70 | float t = 10;
71 | float b = getHeight() - 10;
72 | float w = getWidth() - 20;
73 | float h = getHeight() - 20;
74 | Paint paint = new Paint();
75 |
76 | paint.setColor(0xC0808080);
77 | canvas.drawRect(new RectF(l, t, r, b), paint);
78 |
79 | // draw spectral map
80 | if (spectralMap != null) {
81 | paint.setColor(0x8080FF80);
82 | RectF rect = new RectF();
83 | for (int x = 0; x < steps; x += 1) {
84 | for (int y = 0; y < bands; y += 1) {
85 | if (spectralMap[x][bands - y - 1]) {
86 | rect.left = l + w / steps * x;
87 | rect.right = l + w / steps * (x + 1);
88 | rect.top = t + h / bands * y;
89 | rect.bottom = t + h / bands * (y + 1);
90 | canvas.drawRect(rect, paint);
91 | }
92 | }
93 | }
94 | }
95 |
96 | // draw x gradient
97 | paint.setColor(0xFFC0C0C0);
98 | for (int x = 0; x <= steps; x += 1) {
99 | float linex = l + w / steps * x;
100 | canvas.drawLine(linex, t, linex, b, paint);
101 | }
102 |
103 | // draw y gradient
104 | paint.setColor(0xFFC0C0C0);
105 | for (int y = 0; y <= bands; y += 1) {
106 | float liney = t + h / bands * y;
107 | canvas.drawLine(l, liney, r, liney, paint);
108 | }
109 |
110 | // draw a rectangle around the current step
111 | paint.setColor(0x40FF0000);
112 | float x1 = l + w / steps * currentStep;
113 | float x2 = l + w / steps * (currentStep + 1);
114 | canvas.drawRect(new RectF(x1, t, x2, b), paint);
115 | }
116 |
117 | @Override
118 | public boolean onTouch(View v, MotionEvent event) {
119 | if (ClientModel.getClientModel().isFullVersion() || ClientModel.getClientModel().isGoggleDogPass()) {
120 |
121 | float l = 10;
122 | float r = getWidth() - 10;
123 | float t = 10;
124 | float b = getHeight() - 10;
125 | float w = getWidth() - 20;
126 | float h = getHeight() - 20;
127 | if (spectralMap != null && event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_MOVE) {
128 | int step = (int) ((event.getX() - l) / w * steps);
129 | step = Math.max(0, Math.min(steps - 1, step));
130 | int band = bands - (int) ((event.getY() - t) / h * bands) - 1;
131 | band = Math.max(0, Math.min(bands - 1, band));
132 | if (painting) {
133 | spectralMap[step][band] = true;
134 | } else {
135 | spectralMap[step][band] = false;
136 | }
137 | invalidate();
138 | }
139 | return true;
140 | }
141 | return false;
142 | }
143 |
144 | }
145 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/SplashActivity.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth;
2 |
3 | import java.util.Timer;
4 | import java.util.TimerTask;
5 | import com.gallantrealm.android.GallantActivity;
6 | import com.gallantrealm.android.Translator;
7 | import com.gallantrealm.android.themes.Theme;
8 | import android.content.Intent;
9 | import android.graphics.Typeface;
10 | import android.os.Bundle;
11 | import android.view.View;
12 | import android.widget.TextView;
13 |
14 | public class SplashActivity extends GallantActivity {
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 |
20 | ClientModel clientModel = ClientModel.getClientModel();
21 | clientModel.setContext(this); // use until main activity sets it again
22 | ClientModel.getClientModel().loadPreferences(); // to prepare model for use later
23 |
24 | setContentView(R.layout.splash);
25 | Typeface typeface = Theme.getTheme().getTypeface(this);
26 | ((TextView) findViewById(R.id.goggleDog)).setTypeface(typeface);
27 | ((TextView) findViewById(R.id.appTagline)).setTypeface(typeface);
28 | ((TextView) findViewById(R.id.splash_version)).setTypeface(typeface);
29 | ((TextView) findViewById(R.id.splash_version)).setText(BuildConfig.VERSION_NAME);
30 |
31 |
32 | View goggleDog = findViewById(R.id.goggleDog);
33 | if (goggleDog != null) {
34 | goggleDog.setClickable(true);
35 | goggleDog.setOnLongClickListener(new View.OnLongClickListener() {
36 | public boolean onLongClick(View v) {
37 | ClientModel.getClientModel().setGoggleDogPass(true);
38 | return false;
39 | }
40 | });
41 | }
42 |
43 | // HeyzapLib.setFlags(1 << 23); // turn off Heyzap notification
44 |
45 | Translator.getTranslator().translate(this.getWindow().getDecorView());
46 | }
47 |
48 | public void showMainMenu() {
49 | try {
50 | Intent intent = new Intent(SplashActivity.this, SplashActivity.this.getClassLoader().loadClass(getString(R.string.mainMenuClassName)));
51 | intent.setData(getIntent().getData()); // pass along invokation params
52 | startActivity(intent);
53 | SplashActivity.this.finish();
54 | } catch (ClassNotFoundException e) {
55 | e.printStackTrace();
56 | }
57 | }
58 |
59 | @Override
60 | protected void onDestroy() {
61 | super.onDestroy();
62 | }
63 |
64 | Timer t;
65 |
66 | @Override
67 | protected void onStart() {
68 | super.onStart();
69 | t = new Timer();
70 | t.schedule(new TimerTask() {
71 | @Override
72 | public void run() {
73 | ClientModel.getClientModel().updatePlayCount();
74 | showMainMenu();
75 | }
76 | }, 2000l);
77 | }
78 |
79 | @Override
80 | protected void onStop() {
81 | super.onStop();
82 | if (t != null) {
83 | t.cancel();
84 | t = null;
85 | }
86 | }
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Amp.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Amp extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public double overdrive = 0.0;
7 | public double volume = 1.0;
8 | public double tone = Math.sqrt(0.5);
9 | public double modulation = 1.0; // unused
10 | public CC volumeCC;
11 | public CC toneCC;
12 | public CC overdriveCC;
13 | public boolean distortion;
14 | public CC distortionCC;
15 |
16 | private transient float tone2;
17 | private transient float[] smoothAmp;
18 | private transient float[] lastFilteredValue;
19 |
20 | @Override
21 | public int getInputCount() {
22 | return 1;
23 | }
24 |
25 | @Override
26 | public int getModCount() {
27 | return 1;
28 | }
29 |
30 | @Override
31 | public int getOutputCount() {
32 | return 1;
33 | }
34 |
35 | @Override
36 | public String getInputName(int n) {
37 | return "In";
38 | }
39 |
40 | @Override
41 | public String getModName(int n) {
42 | return "Gain";
43 | }
44 |
45 | @Override
46 | public String getOutputName(int n) {
47 | return "Out";
48 | }
49 |
50 | @Override
51 | public void initialize(int voices, int sampleRate) {
52 | super.initialize(voices, sampleRate);
53 | lastFilteredValue = new float[voices];
54 | smoothAmp = new float[voices];
55 | if (volumeCC == null) {
56 | volumeCC = new CC();
57 | }
58 | if (toneCC == null) {
59 | toneCC = new CC();
60 | }
61 | if (overdriveCC == null) {
62 | overdriveCC = new CC();
63 | }
64 | if (distortionCC == null) {
65 | distortionCC = new CC();
66 | }
67 | distortionCC.setRangeLimits(0, 1);
68 | }
69 |
70 | private transient float fvolume;
71 |
72 | @Override
73 | public void doEnvelope(int voice) {
74 | tone2 = Math.min((float) Math.sqrt(tone), 0.99f);
75 | fvolume = (float) (volume * (overdrive + 1.0));
76 | }
77 |
78 | @Override
79 | public void doSynthesis(int startVoice, int endVoice) {
80 | if (input1 == null) {
81 | for (int voice = startVoice; voice <= endVoice; voice++) {
82 | output1.value[voice] = 0.0f;
83 | }
84 | } else if (mod1 == null) {
85 | if (tone2 > 0 && !distortion) {
86 | for (int voice = startVoice; voice <= endVoice; voice++) {
87 | float value = fvolume * input1.value[voice];
88 | value = lastFilteredValue[voice] * tone2 + value * (1.0f - tone2);
89 | lastFilteredValue[voice] = value;
90 | output1.value[voice] = value;
91 | }
92 | } else {
93 | for (int voice = startVoice; voice <= endVoice; voice++) {
94 | float value = fvolume * input1.value[voice];
95 | output1.value[voice] = value;
96 | }
97 | }
98 | } else {
99 | if (tone2 > 0 && !distortion) {
100 | for (int voice = startVoice; voice <= endVoice; voice++) {
101 | float amp = 0.9f * smoothAmp[voice] + 0.1f * mod1.value[voice];
102 | smoothAmp[voice] = amp;
103 | float value = fvolume * input1.value[voice] * amp;
104 | value = lastFilteredValue[voice] * tone2 + value * (1.0f - tone2);
105 | lastFilteredValue[voice] = value;
106 | output1.value[voice] = value;
107 | }
108 | } else {
109 | for (int voice = startVoice; voice <= endVoice; voice++) {
110 | float amp = 0.9f * smoothAmp[voice] + 0.1f * mod1.value[voice];
111 | smoothAmp[voice] = amp;
112 | float value = fvolume * input1.value[voice] * amp;
113 | output1.value[voice] = value;
114 | }
115 | }
116 | }
117 | if (distortion) {
118 | float v = 0;
119 | for (int voice = startVoice; voice <= endVoice; voice++) {
120 | v += output1.value[voice];
121 | output1.value[voice] = 0;
122 | }
123 | if (tone2 > 0) {
124 | v = lastFilteredValue[0] * tone2 + v * (1.0f - tone2);
125 | lastFilteredValue[0] = v;
126 | }
127 | if (v > 0.5) {
128 | output1.value[0] = v / (v + 0.5f);
129 | } else if (v < -0.5) {
130 | v = -v;
131 | v = v / (v + 0.5f);
132 | output1.value[0] = -v;
133 | } else {
134 | output1.value[0] = v;
135 | }
136 | }
137 | }
138 |
139 | @Override
140 | public void updateCC(int cc, double value) {
141 | if (volumeCC.cc == cc) {
142 | volume = volumeCC.range(value);
143 | }
144 | if (toneCC.cc == cc) {
145 | tone = 1.0 - Math.sqrt(toneCC.range(value));
146 | }
147 | if (overdriveCC.cc == cc) {
148 | overdrive = 10.0 * overdriveCC.range(value);
149 | }
150 | if (distortionCC.cc == cc) {
151 | distortion = distortionCC.range(value) < 0.5 ? false : true;
152 | }
153 | }
154 |
155 | }
156 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/CC.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Used to maintain a MIDI control's id and range.
7 | */
8 | public class CC implements Serializable {
9 | private static final long serialVersionUID = 1L;
10 |
11 | public int cc = 0;
12 | public int minRange = 0; // 0-100
13 | public int maxRange = 100; // 0-100
14 | public boolean invert;
15 |
16 | // new range limit function fields
17 | public boolean rangeLimited;
18 | public int minLimit;
19 | public int maxLimit;
20 |
21 | public void setRangeLimits(int minLimit, int maxLimit) {
22 | this.minLimit = minLimit;
23 | this.maxLimit = maxLimit;
24 | if (!rangeLimited) {
25 | // migrate old range over
26 | minRange = minRange * (maxLimit - minLimit) / 100 + minLimit;
27 | maxRange = maxRange * (maxLimit - minLimit) / 100 + minLimit;
28 | rangeLimited = true;
29 | } else {
30 | // adjust range to fit new limits
31 | if (minRange < minLimit) {
32 | minRange = minLimit;
33 | }
34 | if (maxRange > maxLimit) {
35 | maxRange = maxLimit;
36 | }
37 | }
38 | }
39 |
40 | /**
41 | * Takes a value and scales it for the range defined on this CC. min and max range are 0-100
42 | *
43 | * @param value
44 | * a value from 0.0 to 1.0.
45 | * @return
46 | */
47 | public double range(double value) {
48 | if (rangeLimited) {
49 | int scale = maxRange - minRange;
50 | if (invert) {
51 | return maxRange - value * scale;
52 | } else {
53 | return value * scale + minRange;
54 | }
55 | } else {
56 | double scale = (maxRange - minRange) / 100.0;
57 | if (invert) {
58 | return maxRange / 100.0 - value * scale;
59 | } else {
60 | return value * scale + minRange / 100.0;
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Compressor.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Compressor extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public double amount = 0.0;
7 | public double delay = 0.0;
8 | public double gain = 1.0;
9 | public CC amountCC;
10 | public CC delayCC;
11 | public CC gainCC;
12 |
13 | private transient int voices;
14 |
15 | @Override
16 | public int getInputCount() {
17 | return 1;
18 | }
19 |
20 | @Override
21 | public int getModCount() {
22 | return 0;
23 | }
24 |
25 | @Override
26 | public int getOutputCount() {
27 | return 1;
28 | }
29 |
30 | @Override
31 | public String getInputName(int n) {
32 | return "In";
33 | }
34 |
35 | @Override
36 | public String getOutputName(int n) {
37 | return "Out";
38 | }
39 |
40 | @Override
41 | public void initialize(int voices, int sampleRate) {
42 | super.initialize(voices, sampleRate);
43 | this.voices = voices;
44 | if (amountCC == null) {
45 | amountCC = new CC();
46 | delayCC = new CC();
47 | gainCC = new CC();
48 | }
49 | }
50 |
51 | transient float fdelay, famount, fmax, fgain;
52 |
53 | @Override
54 | public void doEnvelope(int voice) {
55 | fdelay = (float)Math.pow(delay, 0.001);
56 | famount = (float)amount;
57 | fgain = (float)gain;
58 | }
59 |
60 | @Override
61 | public void doSynthesis(int startVoice, int endVoice) {
62 | float value = 0.0f;
63 | for (int voice = startVoice; voice <= endVoice; voice++) {
64 | float input;
65 | if (input1 != null) {
66 | input = input1.value[voice];
67 | } else {
68 | input = 0;
69 | }
70 | value += input;
71 | }
72 | float m = Math.abs(value);
73 | fmax = Math.max(m, fmax * fdelay);
74 | value = value / (1.0f + famount * fmax);
75 | value = value * fgain;
76 | output1.value[0] = value;
77 | }
78 |
79 | @Override
80 | public void updateCC(int cc, double value) {
81 | if (amountCC.cc == cc) {
82 | amount = amountCC.range(value) * 10;
83 | }
84 | if (delayCC.cc== cc) {
85 | delay = delayCC.range(value);
86 | }
87 | if (gainCC.cc== cc) {
88 | gain = 10.0 * gainCC.range(value);
89 | }
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Crusher.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Crusher extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public double level = 0.0;
7 | public double modulation = 0.5;
8 | public double rate = 0.0;
9 | public boolean modulateRate;
10 | public CC levelCC;
11 | public CC rateCC;
12 | public CC modulationCC;
13 |
14 | @Override
15 | public int getInputCount() {
16 | return 1;
17 | }
18 |
19 | @Override
20 | public int getModCount() {
21 | return 1;
22 | }
23 |
24 | @Override
25 | public int getOutputCount() {
26 | return 1;
27 | }
28 |
29 | @Override
30 | public String getInputName(int n) {
31 | return "In";
32 | }
33 |
34 | @Override
35 | public String getModName(int n) {
36 | return "Modulation";
37 | }
38 |
39 | @Override
40 | public String getOutputName(int n) {
41 | return "Out";
42 | }
43 |
44 | private transient float[] rateCount;
45 |
46 | @Override
47 | public void initialize(int voices, int sampleRate) {
48 | super.initialize(voices, sampleRate);
49 | rateCount = new float[voices];
50 | if (levelCC == null) {
51 | levelCC = new CC();
52 | }
53 | if (rateCC == null) {
54 | rateCC = new CC();
55 | }
56 | if (modulationCC == null) {
57 | modulationCC = new CC();
58 | }
59 | }
60 |
61 | @Override
62 | public boolean doesEnvelope() {
63 | return false;
64 | }
65 |
66 | private transient float frate, flevel, fmodulation;
67 |
68 | @Override
69 | public void doEnvelope(int voice) {
70 | frate = (float)rate;
71 | flevel = (float)level;
72 | fmodulation = (float)modulation;
73 | }
74 |
75 | @Override
76 | public void doSynthesis(int startVoice, int endVoice) {
77 | for (int voice = startVoice; voice <= endVoice; voice++) {
78 | if (mod1 != null && modulateRate) {
79 | rateCount[voice] += (1.0 - rate - mod1.value[voice] * modulation);
80 | } else {
81 | rateCount[voice] += (1.0 - rate);
82 | }
83 | if (rateCount[voice] < 1.0) {
84 | return;
85 | }
86 | rateCount[voice] -= 1.0;
87 | float input;
88 | if (input1 != null) {
89 | input = input1.value[voice];
90 | } else {
91 | input = 0;
92 | }
93 | float modulationAmount = 0.0f;
94 | if (mod1 != null && !modulateRate) {
95 | modulationAmount = mod1.value[voice] * fmodulation;
96 | }
97 | float crush = 10.0f * (1.0f - flevel - modulationAmount);
98 | float value = 0.0f;
99 | if (crush != 0.0) {
100 | value = ((int) (input * crush + 0.999)) / crush;
101 | }
102 | output1.value[voice] = value;
103 | }
104 | }
105 |
106 | @Override
107 | public void updateCC(int cc, double value) {
108 | if (levelCC.cc == cc) {
109 | level = levelCC.range(value);
110 | }
111 | if (rateCC.cc == cc) {
112 | rate = rateCC.range(value);
113 | }
114 | if (modulationCC.cc == cc) {
115 | modulation = modulationCC.range(value);
116 | }
117 | }
118 |
119 | }
120 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Delay.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Delay extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public double delayTime = 0.1;
7 | public double flangeAmount = 1.0;
8 | public boolean respectdelayLevel = true;
9 | public double delayLevel = 0.5;
10 | public double feedback = 0.0;
11 | public CC delayTimeCC;
12 | public CC flangeAmountCC;
13 | public CC delayLevelCC;
14 | public CC feedbackCC;
15 |
16 | @Override
17 | public int getInputCount() {
18 | return 1;
19 | }
20 |
21 | @Override
22 | public int getModCount() {
23 | return 1;
24 | }
25 |
26 | @Override
27 | public int getOutputCount() {
28 | return 1;
29 | }
30 |
31 | @Override
32 | public String getInputName(int n) {
33 | return "In";
34 | }
35 |
36 | @Override
37 | public String getModName(int n) {
38 | return "Modulation";
39 | }
40 |
41 | @Override
42 | public String getOutputName(int n) {
43 | return "Out";
44 | }
45 |
46 | private transient int[] fp_delayTime;
47 | private transient int[] echoIndex;
48 | private transient float[][] echoTable;
49 |
50 | @Override
51 | public void initialize(int voices, int sampleRate) {
52 | super.initialize(voices, sampleRate);
53 | fp_delayTime = new int[voices];
54 | if (!respectdelayLevel) {
55 | delayLevel = 1.0;
56 | respectdelayLevel = true;
57 | }
58 | echoTable = new float[voices][sampleRate];
59 | echoIndex = new int[voices];
60 | if (delayTimeCC == null) {
61 | delayTimeCC = new CC();
62 | }
63 | if (flangeAmountCC == null) {
64 | flangeAmountCC = new CC();
65 | }
66 | if (delayLevelCC == null) {
67 | delayLevelCC = new CC();
68 | }
69 | if (feedbackCC == null) {
70 | feedbackCC = new CC();
71 | }
72 | }
73 |
74 | private float fdelayLevel;
75 |
76 | @Override
77 | public void doEnvelope(int voice) {
78 | fdelayLevel = (float)delayLevel;
79 | if (mod1 != null) {
80 | fp_delayTime[voice] = (int) ((delayTime + flangeAmount * (mod1.value[voice]) / 100.0) * sampleRate);
81 | } else {
82 | fp_delayTime[voice] = (int) (delayTime * sampleRate);
83 | }
84 | fp_delayTime[voice] = Math.max(0, Math.min(sampleRate, fp_delayTime[voice]));
85 | }
86 |
87 | @Override
88 | public void doSynthesis(int startVoice, int endVoice) {
89 | if (input1 == null) {
90 | for (int voice = startVoice; voice <= endVoice; voice++) {
91 | output1.value[voice] = 0;
92 | }
93 | } else {
94 | for (int voice = startVoice; voice <= endVoice; voice++) {
95 | if (mod1 != null) {
96 | int delay = (int) ((delayTime + flangeAmount * (mod1.value[voice]) / 100.0) * sampleRate);
97 | fp_delayTime[voice] = (delay < 0) ? 0 : ((delay > sampleRate) ? sampleRate : delay);
98 | }
99 | float sample = input1.value[voice];
100 | int ei = (echoIndex[voice] + 1);
101 | if (ei == sampleRate) {
102 | ei = 0;
103 | }
104 | echoTable[voice][ei] = sample;
105 | int delayIndex = ei - fp_delayTime[voice];
106 | if (delayIndex < 0) {
107 | delayIndex += sampleRate;
108 | }
109 | float delayedSampleL = echoTable[voice][delayIndex];
110 | output1.value[voice] = fdelayLevel * delayedSampleL + (1.0f - fdelayLevel) * sample;
111 | echoTable[voice][ei] += feedback * delayedSampleL;
112 | echoIndex[voice] = ei;
113 | }
114 | }
115 | }
116 |
117 | @Override
118 | public void updateCC(int cc, double value) {
119 | if (delayLevelCC.cc == cc) {
120 | delayLevel = delayLevelCC.range(value);
121 | }
122 | if (delayTimeCC.cc == cc) {
123 | double v = delayTimeCC.range(value);
124 | delayTime = v * v;
125 | }
126 | if (feedbackCC.cc == cc) {
127 | feedback = feedbackCC.range(value);
128 | }
129 | if (flangeAmountCC.cc == cc) {
130 | flangeAmount = flangeAmountCC.range(value);
131 | }
132 | }
133 |
134 | }
135 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Divider.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Divider extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public int divisor = 2;
7 | public int phase = 0;
8 | public int duty = 1;
9 | public boolean positive;
10 |
11 | private transient double lastGate[];
12 | private transient int counts[];
13 |
14 | @Override
15 | public int getInputCount() {
16 | return 1;
17 | }
18 |
19 | @Override
20 | public int getModCount() {
21 | return 1;
22 | }
23 |
24 | @Override
25 | public int getOutputCount() {
26 | return 1;
27 | }
28 |
29 | @Override
30 | public String getInputName(int n) {
31 | return "Gate";
32 | }
33 |
34 | @Override
35 | public String getModName(int n) {
36 | return "Reset";
37 | }
38 |
39 | @Override
40 | public String getOutputName(int n) {
41 | return "Gate";
42 | }
43 |
44 | @Override
45 | public void initialize(int voices, int sampleRate) {
46 | super.initialize(voices, sampleRate);
47 | lastGate = new double[voices];
48 | counts = new int[voices];
49 | }
50 |
51 | @Override
52 | public boolean doesSynthesis() {
53 | return false;
54 | }
55 |
56 | @Override
57 | public void doEnvelope(int voice) {
58 | if (input1 == null) {
59 | return;
60 | }
61 | if (lastGate[voice] <= 0 && input1.value[voice] > 0) { // triggered
62 | counts[voice] = counts[voice] + 1;
63 | }
64 | lastGate[voice] = input1.value[voice];
65 | if (positive) {
66 | output1.value[voice] = (counts[voice] + phase) % divisor < (divisor - duty) ? 0.0f : 1.0f;
67 | } else {
68 | output1.value[voice] = (counts[voice] + phase) % divisor < (divisor - duty) ? -1.0f : 1.0f;
69 | }
70 | }
71 |
72 | @Override
73 | public void doSynthesis(int startVoice, int endVoice) {
74 | }
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Filter.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | import com.gallantrealm.modsynth.BiQuadraticFilter;
4 |
5 | public class Filter extends Module {
6 | private static final long serialVersionUID = 1L;
7 |
8 | public BiQuadraticFilter.Type filterType = BiQuadraticFilter.Type.LOWPASS;
9 | public double resonance = 0.5f;
10 | public double cutoff = 1.0f;
11 | public double sweep = 1.0f;
12 | // private double smoothCutoff[]; // unused, should have been transient
13 | public CC filterTypeCC;
14 | public CC resonanceCC;
15 | public CC cutoffCC;
16 | public CC sweepCC;
17 |
18 | private transient BiQuadraticFilter[] filter;
19 |
20 | @Override
21 | public int getInputCount() {
22 | return 1;
23 | }
24 |
25 | @Override
26 | public int getModCount() {
27 | return 1;
28 | }
29 |
30 | @Override
31 | public int getOutputCount() {
32 | return 1;
33 | }
34 |
35 | @Override
36 | public String getInputName(int n) {
37 | return "In";
38 | }
39 |
40 | @Override
41 | public String getModName(int n) {
42 | return "Cutoff";
43 | }
44 |
45 | @Override
46 | public String getOutputName(int n) {
47 | return "Out";
48 | }
49 |
50 | public void setupFilters() {
51 | if (filter != null) {
52 | for (int v = 0; v < filter.length; v++) {
53 | filter[v] = new BiQuadraticFilter(filterType, 100, sampleRate, resonance);
54 | }
55 | }
56 | }
57 |
58 | transient double[] lastCutoff;
59 |
60 | @Override
61 | public void initialize(int voices, int sampleRate) {
62 | super.initialize(voices, sampleRate);
63 | lastCutoff = new double[voices];
64 | filter = new BiQuadraticFilter[voices];
65 | setupFilters();
66 | if (resonanceCC == null) {
67 | resonanceCC = new CC();
68 | }
69 | if (cutoffCC == null) {
70 | cutoffCC = new CC();
71 | }
72 | if (sweepCC == null) {
73 | sweepCC = new CC();
74 | }
75 | if (filterTypeCC == null) {
76 | filterTypeCC = new CC();
77 | filterTypeCC.setRangeLimits(0, BiQuadraticFilter.Type.values().length - 1);
78 | }
79 | }
80 |
81 | transient double smoothResonance, smoothCutofff;
82 |
83 | @Override
84 | public void doEnvelope(int voice) {
85 | if (resonance > 0) {
86 | if (voice == 0) {
87 | if (smoothResonance - resonance > 0.25 || smoothResonance - resonance < -0.25) {
88 | smoothResonance = resonance;
89 | } else {
90 | smoothResonance = 0.9 * smoothResonance + 0.1 * resonance;
91 | }
92 | if (smoothCutofff - cutoff > 0.25 || smoothCutofff - cutoff < -0.25) {
93 | smoothCutofff = cutoff;
94 | } else {
95 | smoothCutofff = 0.9 * smoothCutofff + 0.1 * cutoff;
96 | }
97 | }
98 | if (smoothResonance != resonance) {
99 | filter[voice].setQ(smoothResonance);
100 | }
101 | float fcutoff = (float) (smoothCutofff + ((mod1 != null) ? sweep * mod1.value[voice] : 0));
102 | if (smoothResonance != resonance || lastCutoff[voice] != fcutoff) {
103 | lastCutoff[voice] = fcutoff;
104 | float frequency = Math.max(1, Math.min(10000, cutoffToFrequency(fcutoff)));
105 | frequency = Math.max(0.0f, Math.min(frequency, sampleRate / 2.0f));
106 | filter[voice].setFrequency(frequency);
107 | if (output1.value[voice] > 100 || output1.value[voice] < -100) {
108 | filter[voice].reset();
109 | }
110 | }
111 | } else {
112 | filter[voice].setQ(0);
113 | }
114 | }
115 |
116 | @Override
117 | public void doSynthesis(int startVoice, int endVoice) {
118 | if (input1 == null) {
119 | for (int voice = startVoice; voice <= endVoice; voice++) {
120 | output1.value[voice] = 0;
121 | }
122 | } else if (resonance <= 0) {
123 | for (int voice = startVoice; voice <= endVoice; voice++) {
124 | output1.value[voice] = input1.value[voice];
125 | }
126 | } else {
127 | if (filter == null) {
128 | setupFilters();
129 | }
130 | for (int voice = startVoice; voice <= endVoice; voice++) {
131 | output1.value[voice] = (float) filter[voice].filter(input1.value[voice]);
132 | }
133 | }
134 | }
135 |
136 | @Override
137 | public void updateCC(int cc, double value) {
138 | if (resonanceCC != null && resonanceCC.cc == cc) {
139 | double v = resonanceCC.range(value) * 100.0 / 10.0;
140 | resonance = v * v;
141 | }
142 | if (cutoffCC != null && cutoffCC.cc == cc) {
143 | cutoff = cutoffCC.range(value);
144 | }
145 | if (sweepCC != null && sweepCC.cc == cc) {
146 | double v = sweepCC.range(value);
147 | sweep = v * v;
148 | }
149 | if (filterTypeCC != null && filterTypeCC.cc == cc) {
150 | BiQuadraticFilter.Type newFilterType = BiQuadraticFilter.Type.values()[(int) Math.round(filterTypeCC.range(value))];
151 | if (!newFilterType.equals(filterType)) {
152 | filterType = newFilterType;
153 | setupFilters();
154 | }
155 | }
156 | }
157 |
158 | }
159 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Glide.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Glide extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public double glideUp = 0.0;
7 | public double glideDown = 0.0;
8 | public boolean audioSpeed = false;
9 | public CC glideUpCC;
10 | public CC glideDownCC;
11 |
12 | private transient float lastLevel[];
13 | private transient float lastGate[];
14 |
15 | @Override
16 | public int getInputCount() {
17 | return 1;
18 | }
19 |
20 | @Override
21 | public int getModCount() {
22 | return 1;
23 | }
24 |
25 | @Override
26 | public int getOutputCount() {
27 | return 1;
28 | }
29 |
30 | @Override
31 | public String getInputName(int n) {
32 | return "In";
33 | }
34 |
35 | @Override
36 | public String getModName(int n) {
37 | return "Gate";
38 | }
39 |
40 | @Override
41 | public String getOutputName(int n) {
42 | return "Out";
43 | }
44 |
45 | @Override
46 | public void initialize(int voices, int sampleRate) {
47 | super.initialize(voices, sampleRate);
48 | lastLevel = new float[voices];
49 | lastGate = new float[voices];
50 | if (glideUpCC == null) {
51 | glideUpCC = new CC();
52 | }
53 | if (glideDownCC == null) {
54 | glideDownCC = new CC();
55 | }
56 | }
57 |
58 | private transient float fglideUpGraded;
59 | private transient float fglideDownGraded;
60 |
61 | @Override
62 | public void doEnvelope(int voice) {
63 | if (voice == 0) {
64 | if (audioSpeed) {
65 | fglideUpGraded = (float)((1.0 - glideUp) / glideUp / sampleRate * 1000.0);
66 | fglideDownGraded = (float)((1.0 - glideDown) / glideDown / sampleRate * 1000.0);
67 | } else {
68 | fglideUpGraded = (float)((1.0 - glideUp) / glideUp / sampleRate / 1.0);
69 | fglideDownGraded = (float)((1.0 - glideDown) / glideDown / sampleRate / 1.0);
70 | }
71 | }
72 | }
73 |
74 | @Override
75 | public void doSynthesis(int startVoice, int endVoice) {
76 | for (int voice = startVoice; voice <= endVoice; voice++) {
77 | float level = 0;
78 | if (input1 != null) {
79 | level = input1.value[voice];
80 | }
81 | float nextLevel;
82 | if (lastLevel[voice] < level) {
83 | nextLevel = lastLevel[voice] + fglideUpGraded;
84 | if (nextLevel > level) {
85 | nextLevel = level;
86 | }
87 | } else if (lastLevel[voice] > level) {
88 | nextLevel = lastLevel[voice] - fglideDownGraded;
89 | if (nextLevel < level) {
90 | nextLevel = level;
91 | }
92 | } else {
93 | nextLevel = level;
94 | }
95 | if (mod1 != null) {
96 | double gate = mod1.value[voice];
97 | if (gate > 0 && lastGate[voice] <= 0) {
98 | nextLevel = level;
99 | }
100 | lastGate[voice] = (float)gate;
101 | }
102 | output1.value[voice] = nextLevel;
103 | lastLevel[voice] = nextLevel;
104 | }
105 | }
106 |
107 | @Override
108 | public void updateCC(int cc, double value) {
109 | if (glideUpCC.cc == cc) {
110 | double v = glideUpCC.range(value);
111 | glideUp = v * v;
112 | }
113 | if (glideDownCC.cc == cc) {
114 | double v = glideDownCC.range(value);
115 | glideDown = v * v;
116 | }
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Output.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Output extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | // public Scope.Type scopeType;
7 | public int scopeStyle;
8 |
9 | @Override
10 | public int getInputCount() {
11 | return 2;
12 | }
13 |
14 | @Override
15 | public int getModCount() {
16 | return 1;
17 | }
18 |
19 | @Override
20 | public int getOutputCount() {
21 | return 0;
22 | }
23 |
24 | @Override
25 | public String getInputName(int n) {
26 | if (n == 0) {
27 | return "In L";
28 | } else {
29 | return "In R";
30 | }
31 | }
32 |
33 | @Override
34 | public String getModName(int n) {
35 | return "Scope";
36 | }
37 |
38 | @Override
39 | public void initialize(int voices, int sampleRate) {
40 | super.initialize(voices, sampleRate);
41 | quietCycles = 0;
42 | limiter = 1.0f;
43 | }
44 |
45 | @Override
46 | public void doEnvelope(int voice) {
47 | if (voice == 0 && limiter < 1.0f) {
48 | limiter += 0.001f;
49 | }
50 | }
51 |
52 | public transient float fleft;
53 | public transient float fright;
54 |
55 | public static transient float limiter;
56 |
57 | @Override
58 | public final void doSynthesis(int startVoice, int endVoice) {
59 | if (input1 != null) {
60 | for (int voice = startVoice; voice <= endVoice; voice++) {
61 | fleft += input1.value[voice];
62 | }
63 | }
64 | if (input2 != null) {
65 | for (int voice = startVoice; voice <= endVoice; voice++) {
66 | fright += input2.value[voice];
67 | }
68 | }
69 | float newleft = fleft * limiter;
70 | float newright = fright * limiter;
71 | while (newleft > 1.0f || newright > 1.0f || newleft < -1.0f || newright < -1.0f) {
72 | limiter = (float) Math.max(0.0, limiter - 0.01f);
73 | newleft = fleft * limiter;
74 | newright = fright * limiter;
75 | }
76 | fleft = newleft;
77 | fright = newright;
78 | }
79 |
80 | transient int quietCycles;
81 |
82 | public boolean isSounding() {
83 | double output = Math.abs(fleft + fright);
84 | if (output < 0.0001) {
85 | quietCycles += 1;
86 | } else {
87 | quietCycles = 0;
88 | }
89 | if (quietCycles > 100) {
90 | return false;
91 | }
92 | return true;
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Pan.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Pan extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public double balance = 0.5;
7 | public double modulation = 0.5;
8 | public CC balanceCC;
9 | public CC modulationCC;
10 |
11 | @Override
12 | public int getInputCount() {
13 | return 1;
14 | }
15 |
16 | @Override
17 | public int getModCount() {
18 | return 1;
19 | }
20 |
21 | @Override
22 | public int getOutputCount() {
23 | return 2;
24 | }
25 |
26 | @Override
27 | public String getInputName(int n) {
28 | return "In";
29 | }
30 |
31 | @Override
32 | public String getModName(int n) {
33 | return "Balance";
34 | }
35 |
36 | @Override
37 | public String getOutputName(int n) {
38 | if (n == 0) {
39 | return "Out L";
40 | } else {
41 | return "Out R";
42 | }
43 | }
44 |
45 | private transient float[] modulatedBalance;
46 |
47 | @Override
48 | public void initialize(int voices, int sampleRate) {
49 | super.initialize(voices, sampleRate);
50 | modulatedBalance = new float[voices];
51 | if (balanceCC == null) {
52 | balanceCC = new CC();
53 | }
54 | if (modulationCC == null) {
55 | modulationCC = new CC();
56 | }
57 | }
58 |
59 | private transient float fbalance, fmodulation;
60 |
61 | @Override
62 | public void doEnvelope(int voice) {
63 | fbalance = (float)balance;
64 | fmodulation = (float)modulation;
65 | modulatedBalance[voice] = 2.0f * (fbalance - 0.5f) + 0.5f;
66 | if (mod1 != null) {
67 | modulatedBalance[voice] += (2.0f * fmodulation) * mod1.value[voice];
68 | }
69 | modulatedBalance[voice] = Math.max(0.0f, Math.min(1.0f, modulatedBalance[voice]));
70 | }
71 |
72 | @Override
73 | public void doSynthesis(int startVoice, int endVoice) {
74 | for (int voice = startVoice; voice <= endVoice; voice++) {
75 | float value1 = 0.0f;
76 | float value2 = 0.0f;
77 | if (input1 != null) {
78 | float value = input1.value[voice];
79 | value1 = value * (1.0f - modulatedBalance[voice]);
80 | value2 = value * modulatedBalance[voice];
81 | }
82 | output1.value[voice] = value1;
83 | output2.value[voice] = value2;
84 | }
85 | }
86 |
87 | public void updateCC(int cc, double value) {
88 | if (balanceCC.cc == cc) {
89 | balance = balanceCC.range(value);
90 | }
91 | if (modulationCC.cc == cc) {
92 | modulation = modulationCC.range(value);
93 | }
94 | }
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Reverb.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Reverb extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | private static int NDELAYS = 128;
7 |
8 | public double amount = 0.5;
9 | public double depth = 0.5;
10 | public double tone = 0.9;
11 | // public double echo = 0.5;
12 | public CC amountCC;
13 | public CC depthCC;
14 | public CC toneCC;
15 | // public CC echoCC;
16 |
17 | @Override
18 | public int getInputCount() {
19 | return 2;
20 | }
21 |
22 | @Override
23 | public int getModCount() {
24 | return 0;
25 | }
26 |
27 | @Override
28 | public int getOutputCount() {
29 | return 2;
30 | }
31 |
32 | @Override
33 | public String getInputName(int n) {
34 | if (n == 0) {
35 | return "In L";
36 | } else {
37 | return "In R";
38 | }
39 | }
40 |
41 | @Override
42 | public String getOutputName(int n) {
43 | if (n == 0) {
44 | return "Out L";
45 | } else {
46 | return "Out R";
47 | }
48 | }
49 |
50 | private transient int delayLength;
51 | private transient float[] delayTimeCoefficients;
52 | private transient float[] delayVolumeCoefficients;
53 | private transient int[] fp_delayTimes;
54 | private transient int currentIndex;
55 | private transient float[] delayTableL;
56 | private transient float[] delayTableR;
57 | private transient float lastLeftValue;
58 | private transient float lastRightValue;
59 | private transient float tone2;
60 | private transient float famount;
61 | private transient double lastDepth;
62 |
63 | @Override
64 | public void initialize(int voices, int sampleRate) {
65 | super.initialize(voices, sampleRate);
66 | delayLength = (int) (2.5f * sampleRate);
67 | delayTimeCoefficients = new float[NDELAYS];
68 | delayVolumeCoefficients = new float[NDELAYS];
69 | for (int i = 0; i < NDELAYS; i++) {
70 | delayTimeCoefficients[i] = (float)(0.05 + 0.95 * Math.pow(Math.random(), 2));
71 | delayVolumeCoefficients[i] = (1.0f - (float) (Math.pow(delayTimeCoefficients[i], 0.05f)));
72 | }
73 | fp_delayTimes = new int[NDELAYS];
74 | delayTableL = new float[delayLength];
75 | delayTableR = new float[delayLength];
76 | currentIndex = 0;
77 | lastLeftValue = 0.0f;
78 | lastRightValue = 0.0f;
79 | if (amountCC == null) {
80 | amountCC = new CC();
81 | depthCC = new CC();
82 | toneCC = new CC();
83 | }
84 | }
85 |
86 | @Override
87 | public void doEnvelope(int voice) {
88 | if (depth != lastDepth) {
89 | for (int i = 0; i < NDELAYS; i++) {
90 | fp_delayTimes[i] = (int) (delayTimeCoefficients[i] * depth * delayLength);
91 | fp_delayTimes[i] = Math.min(delayLength, fp_delayTimes[i]);
92 | }
93 | lastDepth = depth;
94 | }
95 | tone2 = Math.min((float) Math.sqrt(tone), 0.99f);
96 | famount = (float) amount;
97 | }
98 |
99 | @Override
100 | public void doSynthesis(int startVoice, int endVoice) {
101 | float sample1 = 0.0f;
102 | float sample2 = 0.0f;
103 | for (int voice = startVoice; voice <= endVoice; voice++) {
104 | if (input1 != null) {
105 | sample1 += input1.value[voice];
106 | }
107 | if (input2 != null) {
108 | sample2 += input2.value[voice];
109 | } else {
110 | sample2 = sample1;
111 | }
112 | }
113 | int ci = (currentIndex - 1);
114 | if (ci < 0) {
115 | ci = delayLength -1;
116 | }
117 | float reverbLeft = 0.0f;
118 | float reverbRight = 0.0f;
119 | for (int i = 0; i < NDELAYS; i++) {
120 | int dil1 = (ci + fp_delayTimes[i]) % delayLength;
121 | float rl1 = delayVolumeCoefficients[i] * delayTableL[dil1];
122 | reverbLeft += rl1;
123 | i += 1;
124 | int dir1 = (ci + fp_delayTimes[i]) % delayLength;
125 | ;
126 | float rr1 = delayVolumeCoefficients[i] * delayTableR[dir1];
127 | reverbRight += rr1;
128 | i += 1;
129 | int dil2 = (ci + fp_delayTimes[i]) % delayLength;
130 | ;
131 | float rl2 = delayVolumeCoefficients[i] * delayTableL[dil2];
132 | reverbLeft -= rl2;
133 | i += 1;
134 | int dir2 = (ci + fp_delayTimes[i]) % delayLength;
135 | ;
136 | float rr2 = delayVolumeCoefficients[i] * delayTableR[dir2];
137 | reverbRight -= rr2;
138 | }
139 | reverbLeft = lastLeftValue * tone2 + reverbLeft * (1.0f - tone2);
140 | reverbRight = lastRightValue * tone2 + reverbRight * (1.0f - tone2);
141 | lastLeftValue = reverbLeft;
142 | lastRightValue = reverbRight;
143 | float dry1 = (1.0f - famount) * sample1;
144 | float dry2 = (1.0f - famount) * sample2;
145 | float wet1 = famount * reverbLeft;
146 | float wet2 = famount * reverbRight;
147 | output1.value[0] = dry1 + wet1;
148 | output2.value[0] = dry2 + wet2;
149 | delayTableL[ci] = sample1 + wet2 * 0.5f;
150 | delayTableR[ci] = sample2 + wet1 * 0.5f;
151 | currentIndex = ci;
152 | }
153 |
154 | @Override
155 | public void updateCC(int cc, double value) {
156 | if (amountCC.cc == cc) {
157 | amount = amountCC.range(value);
158 | }
159 | if (depthCC.cc == cc) {
160 | double v = depthCC.range(value);
161 | depth = v * v;
162 | }
163 | if (toneCC.cc == cc) {
164 | tone = 1.0 - toneCC.range(value);
165 | }
166 | }
167 |
168 | }
169 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/SampleHold.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class SampleHold extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | private transient double lastGate[];
7 |
8 | @Override
9 | public int getInputCount() {
10 | return 1;
11 | }
12 |
13 | @Override
14 | public int getModCount() {
15 | return 1;
16 | }
17 |
18 | @Override
19 | public int getOutputCount() {
20 | return 1;
21 | }
22 |
23 | @Override
24 | public String getInputName(int n) {
25 | return "In";
26 | }
27 |
28 | @Override
29 | public String getModName(int n) {
30 | return "Latch";
31 | }
32 |
33 | @Override
34 | public String getOutputName(int n) {
35 | return "Out";
36 | }
37 |
38 | @Override
39 | public void initialize(int voices, int sampleRate) {
40 | super.initialize(voices, sampleRate);
41 | lastGate = new double[voices];
42 | }
43 |
44 | @Override
45 | public boolean doesEnvelope() {
46 | return false;
47 | }
48 |
49 | @Override
50 | public void doEnvelope(int voice) {
51 | }
52 |
53 | @Override
54 | public void doSynthesis(int startVoice, int endVoice) {
55 | for (int voice = startVoice; voice <= endVoice; voice++) {
56 | float value = 0;
57 | if (input1 != null) {
58 | value = input1.value[voice];
59 | }
60 | float gate = 0;
61 | if (mod1 != null) {
62 | gate = mod1.value[voice];
63 | }
64 | if (lastGate[voice] <= 0 && gate > 0) {
65 | output1.value[voice] = value;
66 | }
67 | lastGate[voice] = gate;
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/module/Unison.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.module;
2 |
3 | public class Unison extends Module {
4 | private static final long serialVersionUID = 1L;
5 |
6 | public int voices = 3;
7 | public int polyphony = 3;
8 | public double chorusWidth = 0.1;
9 | public double chorusSpread = 0.0;
10 | public CC chorusWidthCC;
11 | public CC chorusSpreadCC;
12 |
13 | @Override
14 | public int getRequiredVoices() {
15 | return voices * polyphony;
16 | }
17 |
18 | @Override
19 | public int getInputCount() {
20 | return 2;
21 | }
22 |
23 | @Override
24 | public int getModCount() {
25 | return 0;
26 | }
27 |
28 | @Override
29 | public int getOutputCount() {
30 | return 3;
31 | }
32 |
33 | @Override
34 | public String getInputName(int n) {
35 | if (n == 0) {
36 | return "Pitch";
37 | } else {
38 | return "Gate";
39 | }
40 | }
41 |
42 | @Override
43 | public String getOutputName(int n) {
44 | if (n == 0) {
45 | return "Pitch";
46 | } else if (n == 1) {
47 | return "Gate";
48 | } else {
49 | return "Balance";
50 | }
51 | }
52 |
53 | private transient int maxVoices;
54 |
55 | @Override
56 | public void initialize(int voices, int sampleRate) {
57 | super.initialize(voices, sampleRate);
58 | maxVoices = voices;
59 | if (chorusWidthCC == null) {
60 | chorusWidthCC = new CC();
61 | }
62 | if (chorusSpreadCC == null) {
63 | chorusSpreadCC = new CC();
64 | }
65 | }
66 |
67 | private transient float fchorusWidth, fchorusSpread;
68 |
69 | @Override
70 | public void doEnvelope(int voice) {
71 | fchorusWidth = (float) chorusWidth;
72 | fchorusSpread = (float) chorusSpread;
73 | if (voice >= polyphony) {
74 | return;
75 | }
76 | int baseVoice = voice * voices;
77 | if (input1 != null) {
78 | float v = voices / 2.0f;
79 | for (int i = 0; i < voices; i++) {
80 | if (baseVoice + i < output1.value.length) {
81 | output1.value[baseVoice + i] = input1.value[voice] - fchorusWidth * (i - v) / 100.0f;
82 | output3.value[baseVoice + i] = fchorusSpread * (i - voices / 2.0f) / voices;
83 | }
84 | }
85 | }
86 | if (input2 != null) {
87 | for (int i = 0; i < voices; i++) {
88 | if (baseVoice + i < output2.value.length) {
89 | output2.value[baseVoice + i] = input2.value[voice];
90 | }
91 | }
92 | }
93 | }
94 |
95 | @Override
96 | public void doSynthesis(int startVoice, int endVoice) {
97 | }
98 |
99 | public boolean doesSynthesis() {
100 | return false;
101 | }
102 |
103 | public void updateCC(int cc, double value) {
104 | if (chorusWidthCC.cc == cc) {
105 | chorusWidth = chorusWidthCC.range(value);
106 | }
107 | if (chorusSpreadCC.cc == cc) {
108 | chorusSpread = chorusSpreadCC.range(value);
109 | }
110 | }
111 |
112 | }
113 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/AuraTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class AuraTheme {
6 |
7 | public static String getStaticName() {
8 | return "Aura";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.aura_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/BlueTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class BlueTheme {
6 |
7 | public static String getStaticName() {
8 | return "Blue";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.blue_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/CircuitTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class CircuitTheme {
6 |
7 | public static String getStaticName() {
8 | return "Circuit";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.circuit_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/CustomTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class CustomTheme {
6 |
7 | public static String getStaticName() {
8 | return "Custom";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.custom_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/GreenTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class GreenTheme {
6 |
7 | public static String getStaticName() {
8 | return "Green";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.green_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/IceTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class IceTheme {
6 |
7 | public static String getStaticName() {
8 | return "Ice";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.ice_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/MetalTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class MetalTheme {
6 |
7 | public static String getStaticName() {
8 | return "Metal";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.metal_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/OnyxTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class OnyxTheme {
6 |
7 | public static String getStaticName() {
8 | return "Onyx";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.onyx_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/SpaceTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class SpaceTheme {
6 |
7 | public static String getStaticName() {
8 | return "Space";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.space_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/SunsetTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class SunsetTheme {
6 |
7 | public static String getStaticName() {
8 | return "Sunset";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.sunset_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/TropicalTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class TropicalTheme {
6 |
7 | public static String getStaticName() {
8 | return "Tropical";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.tropical_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/theme/WoodTheme.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.theme;
2 |
3 | import com.gallantrealm.modsynth.R;
4 |
5 | public class WoodTheme {
6 |
7 | public static String getStaticName() {
8 | return "Wood";
9 | }
10 |
11 | public static int getStaticImageResource() {
12 | return R.raw.wood_swatch;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/AmpViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Amp;
8 | import com.gallantrealm.modsynth.module.Module;
9 | import android.graphics.Canvas;
10 | import android.view.View;
11 | import android.widget.CheckBox;
12 | import android.widget.CompoundButton;
13 | import android.widget.SeekBar;
14 |
15 | public class AmpViewer extends ModuleViewer {
16 |
17 | Amp module;
18 |
19 | public AmpViewer(Module module, Instrument instrument) {
20 | super(module, instrument);
21 | this.module = (Amp) module;
22 | }
23 |
24 | public void drawDiagram(Canvas canvas, float x, float y) {
25 | path.reset();
26 | path.moveTo(x - 25, y - 25);
27 | path.lineTo(x + 25, y);
28 | path.lineTo(x - 25, y + 25);
29 | path.lineTo(x - 25, y - 25);
30 | canvas.drawPath(path, diagramPaint);
31 | }
32 |
33 | @Override
34 | public int getViewResource() {
35 | return R.layout.amppane;
36 | }
37 |
38 | @Override
39 | public void onViewCreate(MainActivity mainActivity) {
40 |
41 | SeekBar ampVolume = (SeekBar) view.findViewById(R.id.ampVolume);
42 | ampVolume.setProgress((int) (100 * module.volume));
43 | ampVolume.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
44 | public void onStopTrackingTouch(SeekBar seekBar) {
45 | }
46 | public void onStartTrackingTouch(SeekBar seekBar) {
47 | }
48 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
49 | module.volume = progress / 100.0f;
50 | instrument.moduleUpdated(module);
51 | }
52 | });
53 | ((View) ampVolume.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.volumeCC));
54 |
55 | SeekBar ampTone = (SeekBar) view.findViewById(R.id.ampTone);
56 | ampTone.setProgress((int) (100 * (1.0 - module.tone * module.tone)));
57 | ampTone.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
58 | public void onStopTrackingTouch(SeekBar seekBar) {
59 | }
60 | public void onStartTrackingTouch(SeekBar seekBar) {
61 | }
62 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
63 | module.tone = Math.sqrt(1.0 - progress / 100.0);
64 | instrument.moduleUpdated(module);
65 | }
66 | });
67 | ((View) ampTone.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.toneCC));
68 |
69 | SeekBar ampOverdrive = (SeekBar) view.findViewById(R.id.ampOverdrive);
70 | ampOverdrive.setProgress((int) (10 * module.overdrive));
71 | ampOverdrive.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
72 | public void onStopTrackingTouch(SeekBar seekBar) {
73 | }
74 | public void onStartTrackingTouch(SeekBar seekBar) {
75 | }
76 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
77 | module.overdrive = progress / 10.0f;
78 | instrument.moduleUpdated(module);
79 | }
80 | });
81 | ((View) ampOverdrive.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.overdriveCC));
82 |
83 | CheckBox distortionCheckBox = (CheckBox) view.findViewById(R.id.ampDistortion);
84 | distortionCheckBox.setChecked(module.distortion);
85 | distortionCheckBox.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() {
86 | public void onCheckedChanged(CompoundButton arg0, boolean checked) {
87 | module.distortion = checked;
88 | instrument.moduleUpdated(module);
89 | }
90 | });
91 | distortionCheckBox.setOnLongClickListener(MidiControlDialog.newLongClickListener(module.distortionCC));
92 |
93 | }
94 |
95 | @Override
96 | public void updateCC(int cc, double value) {
97 | if (module.volumeCC.cc == cc) {
98 | if (view != null) {
99 | SeekBar ampVolume = (SeekBar) view.findViewById(R.id.ampVolume);
100 | ampVolume.setProgress((int) (module.volume * 100.0));
101 | }
102 | }
103 | if (module.toneCC.cc == cc) {
104 | if (view != null) {
105 | SeekBar ampTone = (SeekBar) view.findViewById(R.id.ampTone);
106 | ampTone.setProgress((int) (100 * (1.0 - module.tone)));
107 | }
108 | }
109 | if (module.overdriveCC.cc == cc) {
110 | if (view != null) {
111 | SeekBar ampOverdrive = (SeekBar) view.findViewById(R.id.ampOverdrive);
112 | ampOverdrive.setProgress((int) (10 * module.overdrive));
113 | }
114 | }
115 | if (module.distortionCC.cc == cc) {
116 | final CheckBox distortionBox = (CheckBox) view.findViewById(R.id.ampDistortion);
117 | distortionBox.setChecked(module.distortion);
118 | }
119 | }
120 |
121 | }
122 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/ArpeggiatorViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Arpeggiator;
8 | import com.gallantrealm.modsynth.module.Module;
9 | import android.graphics.Canvas;
10 | import android.view.View;
11 | import android.widget.AdapterView;
12 | import android.widget.ArrayAdapter;
13 | import android.widget.CheckBox;
14 | import android.widget.CompoundButton;
15 | import android.widget.Spinner;
16 |
17 | public class ArpeggiatorViewer extends ModuleViewer {
18 |
19 | private Arpeggiator module;
20 |
21 | public ArpeggiatorViewer(Module module, Instrument instrument) {
22 | super(module, instrument);
23 | this.module = (Arpeggiator)module;
24 | }
25 |
26 | public void drawDiagram(Canvas canvas, float x, float y) {
27 | path.reset();
28 | path.moveTo(x + 5, y -30);
29 | path.lineTo(x - 5, y - 20);
30 | path.lineTo(x + 5, y - 10);
31 | path.lineTo(x - 5, y + 0);
32 | path.lineTo(x + 5, y + 10);
33 | path.lineTo(x - 5, y + 20);
34 | path.lineTo(x + 5, y + 30);
35 | canvas.drawPath(path, diagramPaint);
36 | }
37 |
38 | @Override
39 | public int getViewResource() {
40 | return R.layout.arpeggiatorpane;
41 | }
42 |
43 | @Override
44 | public void onViewCreate(MainActivity mainActivity) {
45 |
46 | final Spinner typeSpinner = (Spinner) view.findViewById(R.id.arpeggiatorType);
47 | ArrayAdapter octaveAdapter = new ArrayAdapter(view.getContext(), R.layout.spinner_item, Arpeggiator.Type.values());
48 | octaveAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
49 | typeSpinner.setAdapter(octaveAdapter);
50 | typeSpinner.setSelection(module.type.ordinal());
51 | typeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
52 | public void onItemSelected(AdapterView av, View v, int arg2, long arg3) {
53 | if (module.type != (Arpeggiator.Type) typeSpinner.getSelectedItem()) {
54 | module.type = (Arpeggiator.Type) typeSpinner.getSelectedItem();
55 | instrument.moduleUpdated(module);
56 | }
57 | }
58 | public void onNothingSelected(AdapterView av) {
59 | }
60 | });
61 | ((View) typeSpinner.getParent().getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.typeCC));
62 |
63 | final CheckBox repeatBox = (CheckBox) view.findViewById(R.id.arpegiatorRepeat);
64 | repeatBox.setChecked(module.looping);
65 | repeatBox.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() {
66 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
67 | module.looping = isChecked;
68 | instrument.moduleUpdated(module);
69 | }
70 | });
71 | repeatBox.setOnLongClickListener(MidiControlDialog.newLongClickListener(module.loopingCC));
72 |
73 | final CheckBox bypassBox = (CheckBox) view.findViewById(R.id.arpegiatorBypass);
74 | bypassBox.setChecked(module.bypass);
75 | bypassBox.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() {
76 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
77 | module.bypass = isChecked;
78 | instrument.moduleUpdated(module);
79 | }
80 | });
81 | bypassBox.setOnLongClickListener(MidiControlDialog.newLongClickListener(module.bypassCC));
82 |
83 | }
84 |
85 | @Override
86 | public void updateCC(int cc, double value) {
87 | if (module.typeCC.cc == cc) {
88 | view.post(new Runnable() {
89 | @Override
90 | public void run() {
91 | final Spinner typeSpinner = (Spinner) view.findViewById(R.id.arpeggiatorType);
92 | typeSpinner.setSelection(module.type.ordinal());
93 | }
94 | });
95 | }
96 | if (module.loopingCC.cc == cc) {
97 | final CheckBox repeatBox = (CheckBox) view.findViewById(R.id.arpegiatorRepeat);
98 | repeatBox.setChecked(module.looping);
99 | }
100 | if (module.bypassCC.cc == cc) {
101 | final CheckBox bypassBox = (CheckBox) view.findViewById(R.id.arpegiatorBypass);
102 | bypassBox.setChecked(module.bypass);
103 | }
104 | }
105 |
106 | }
107 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/CompressorViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Compressor;
8 | import com.gallantrealm.modsynth.module.Module;
9 | import android.graphics.Canvas;
10 | import android.view.View;
11 | import android.widget.SeekBar;
12 |
13 | public class CompressorViewer extends ModuleViewer {
14 |
15 | private Compressor module;
16 |
17 | public CompressorViewer(Module module, Instrument instrument) {
18 | super(module, instrument);
19 | this.module = (Compressor)module;
20 | }
21 |
22 | public void drawDiagram(Canvas canvas, float x, float y) {
23 | path.reset();
24 | path.moveTo(x - 25, y - 25);
25 | path.lineTo(x + 25, y);
26 | path.moveTo(x - 25, y - 12);
27 | path.lineTo(x + 25, y);
28 | path.moveTo(x - 25, y);
29 | path.lineTo(x + 25, y);
30 | path.moveTo(x - 25, y + 12);
31 | path.lineTo(x + 25, y);
32 | path.moveTo(x - 25, y + 25);
33 | path.lineTo(x + 25, y);
34 | canvas.drawPath(path, diagramPaint);
35 | }
36 |
37 | @Override
38 | public int getViewResource() {
39 | return R.layout.compressorpane;
40 | }
41 |
42 | @Override
43 | public void onViewCreate(MainActivity mainActivity) {
44 |
45 | SeekBar compressorAmount = (SeekBar) view.findViewById(R.id.compressorAmount);
46 | compressorAmount.setProgress((int) (10 * module.amount));
47 | compressorAmount.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
48 | public void onStopTrackingTouch(SeekBar seekBar) {
49 | }
50 | public void onStartTrackingTouch(SeekBar seekBar) {
51 | }
52 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
53 | module.amount = progress / 10.0f;
54 | instrument.moduleUpdated(module);
55 | }
56 | });
57 | ((View)compressorAmount.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.amountCC));
58 |
59 | SeekBar compressorDelay = (SeekBar) view.findViewById(R.id.compressorDelay);
60 | compressorDelay.setProgress((int) (100 * module.delay));
61 | compressorDelay.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
62 | public void onStopTrackingTouch(SeekBar seekBar) {
63 | }
64 | public void onStartTrackingTouch(SeekBar seekBar) {
65 | }
66 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
67 | module.delay = progress / 100.0f;
68 | instrument.moduleUpdated(module);
69 | }
70 | });
71 | ((View)compressorDelay.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.delayCC));
72 |
73 | SeekBar compressorGain = (SeekBar) view.findViewById(R.id.compressorGain);
74 | compressorGain.setProgress((int) (10 * module.gain));
75 | compressorGain.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
76 | public void onStopTrackingTouch(SeekBar seekBar) {
77 | }
78 | public void onStartTrackingTouch(SeekBar seekBar) {
79 | }
80 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
81 | module.gain = progress / 10.0;
82 | instrument.moduleUpdated(module);
83 | }
84 | });
85 | ((View)compressorGain.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.gainCC));
86 |
87 | }
88 |
89 | transient double ddelay;
90 |
91 | transient double max;
92 |
93 | @Override
94 | public void updateCC(int cc, double value) {
95 | if (module.amountCC.cc == cc) {
96 | if (view != null) {
97 | SeekBar compressorAmount = (SeekBar) view.findViewById(R.id.compressorAmount);
98 | compressorAmount.setProgress((int) (10 * module.amount));
99 | }
100 | }
101 | if (module.delayCC.cc== cc) {
102 | if (view != null) {
103 | SeekBar compressorDelay = (SeekBar) view.findViewById(R.id.compressorDelay);
104 | compressorDelay.setProgress((int) (100 * module.delay));
105 | }
106 | }
107 | if (module.gainCC.cc== cc) {
108 | if (view != null) {
109 | SeekBar compressorGain = (SeekBar) view.findViewById(R.id.compressorGain);
110 | compressorGain.setProgress((int) (10 * module.gain));
111 | }
112 | }
113 | }
114 |
115 | }
116 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/DelayViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Delay;
8 | import com.gallantrealm.modsynth.module.Module;
9 | import android.view.View;
10 | import android.widget.SeekBar;
11 |
12 | public class DelayViewer extends ModuleViewer {
13 |
14 | Delay module;
15 |
16 | public DelayViewer(Module module, Instrument instrument) {
17 | super(module, instrument);
18 | this.module = (Delay)module;
19 | }
20 |
21 | @Override
22 | public int getViewResource() {
23 | return R.layout.delaypane;
24 | }
25 |
26 | @Override
27 | public void onViewCreate(MainActivity mainActivity) {
28 |
29 | SeekBar delayLevelBar = (SeekBar) view.findViewById(R.id.delayLevel);
30 | delayLevelBar.setProgress((int) (module.delayLevel * 100.0));
31 | delayLevelBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
32 | public void onStopTrackingTouch(SeekBar seekBar) {
33 | }
34 | public void onStartTrackingTouch(SeekBar seekBar) {
35 | }
36 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
37 | module.delayLevel = progress / 100.0;
38 | instrument.moduleUpdated(module);
39 | }
40 | });
41 | ((View)delayLevelBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.delayLevelCC));
42 |
43 | SeekBar delayTimeBar = (SeekBar) view.findViewById(R.id.delayTime);
44 | delayTimeBar.setProgress((int) (Math.sqrt(module.delayTime) * 100.0));
45 | delayTimeBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
46 | public void onStopTrackingTouch(SeekBar seekBar) {
47 | }
48 | public void onStartTrackingTouch(SeekBar seekBar) {
49 | }
50 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
51 | module.delayTime = progress / 100.0 * progress / 100.0;
52 | instrument.moduleUpdated(module);
53 | }
54 | });
55 | ((View)delayTimeBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.delayTimeCC));
56 |
57 | SeekBar feedbackBar = (SeekBar) view.findViewById(R.id.delayFeedback);
58 | feedbackBar.setProgress((int) (module.feedback * 100.0));
59 | feedbackBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
60 | public void onStopTrackingTouch(SeekBar seekBar) {
61 | }
62 | public void onStartTrackingTouch(SeekBar seekBar) {
63 | }
64 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
65 | module.feedback = progress / 100.0;
66 | instrument.moduleUpdated(module);
67 | }
68 | });
69 | ((View)feedbackBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.feedbackCC));
70 |
71 | View delayModulationRow = view.findViewById(R.id.delayModulationRow);
72 | if (module.mod1 == null) {
73 | delayModulationRow.setVisibility(View.GONE);
74 | } else {
75 | delayModulationRow.setVisibility(View.VISIBLE);
76 | SeekBar flangeAmountBar = (SeekBar) view.findViewById(R.id.delayModulation);
77 | flangeAmountBar.setProgress((int) (module.flangeAmount * 100.0));
78 | flangeAmountBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
79 | public void onStopTrackingTouch(SeekBar seekBar) {
80 | }
81 | public void onStartTrackingTouch(SeekBar seekBar) {
82 | }
83 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
84 | module.flangeAmount = progress / 100.0;
85 | instrument.moduleUpdated(module);
86 | }
87 | });
88 | ((View)flangeAmountBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.flangeAmountCC));
89 | }
90 | }
91 |
92 | @Override
93 | public void updateCC(int cc, double value) {
94 | if (module.delayLevelCC.cc == cc) {
95 | if (view != null) {
96 | SeekBar delayLevelBar = (SeekBar) view.findViewById(R.id.delayLevel);
97 | delayLevelBar.setProgress((int) (module.delayLevel * 100.0));
98 | }
99 | }
100 | if (module.delayTimeCC.cc == cc) {
101 | if (view != null) {
102 | SeekBar delayTimeBar = (SeekBar) view.findViewById(R.id.delayTime);
103 | delayTimeBar.setProgress((int) (Math.sqrt(module.delayTime) * 100.0));
104 | }
105 | }
106 | if (module.feedbackCC.cc == cc) {
107 | if (view != null) {
108 | SeekBar feedbackBar = (SeekBar) view.findViewById(R.id.delayFeedback);
109 | feedbackBar.setProgress((int) (module.feedback * 100.0));
110 | }
111 | }
112 | if (module.flangeAmountCC.cc == cc) {
113 | if (view != null) {
114 | SeekBar flangeAmountBar = (SeekBar) view.findViewById(R.id.delayModulation);
115 | flangeAmountBar.setProgress((int) (module.flangeAmount * 100.0));
116 | }
117 | }
118 | }
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/DividerViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.R;
6 | import com.gallantrealm.modsynth.module.Divider;
7 | import com.gallantrealm.modsynth.module.Module;
8 | import android.graphics.Canvas;
9 | import android.graphics.Paint.Style;
10 | import android.widget.CheckBox;
11 | import android.widget.CompoundButton;
12 | import android.widget.CompoundButton.OnCheckedChangeListener;
13 | import de.viktorreiser.toolbox.widget.NumberPicker;
14 |
15 | public class DividerViewer extends ModuleViewer {
16 |
17 | Divider module;
18 |
19 | public DividerViewer(Module module, Instrument instrument) {
20 | super(module, instrument);
21 | this.module = (Divider) module;
22 | }
23 |
24 | public void drawDiagram(Canvas canvas, float x, float y) {
25 | float originalStrokeWidth = diagramPaint.getStrokeWidth();
26 | diagramPaint.setStrokeWidth(10);
27 | diagramPaint.setStyle(Style.FILL_AND_STROKE);
28 | canvas.drawLine(x, y - 30, x, y - 25, diagramPaint);
29 | canvas.drawLine(x - 30, y, x + 30, y, diagramPaint);
30 | canvas.drawLine(x, y + 25, x, y + 30, diagramPaint);
31 | diagramPaint.setStrokeWidth(originalStrokeWidth);
32 | }
33 |
34 | @Override
35 | public int getViewResource() {
36 | return R.layout.dividerpane;
37 | }
38 |
39 | @Override
40 | public void onViewCreate(MainActivity mainActivity) {
41 | NumberPicker delayLevelBar = (NumberPicker) view.findViewById(R.id.dividerDivisor);
42 | delayLevelBar.setCurrent((int) (module.divisor));
43 | delayLevelBar.setOnChangeListener(new NumberPicker.OnChangedListener() {
44 | public void onChanged(NumberPicker picker, int oldVal, int newVal) {
45 | module.divisor = newVal;
46 | instrument.moduleUpdated(module);
47 | }
48 | });
49 | // ((View)delayLevelBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.divisorlCC));
50 |
51 | NumberPicker delayTimeBar = (NumberPicker) view.findViewById(R.id.dividerPhase);
52 | delayTimeBar.setCurrent((int) (module.phase));
53 | delayTimeBar.setOnChangeListener(new NumberPicker.OnChangedListener() {
54 | public void onChanged(NumberPicker picker, int oldVal, int newVal) {
55 | module.phase = newVal;
56 | instrument.moduleUpdated(module);
57 | }
58 | });
59 | // ((View)delayTimeBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.phaseCC));
60 |
61 | NumberPicker dutyTimeBar = (NumberPicker) view.findViewById(R.id.dividerDuty);
62 | dutyTimeBar.setCurrent((int) (module.duty));
63 | dutyTimeBar.setOnChangeListener(new NumberPicker.OnChangedListener() {
64 | public void onChanged(NumberPicker picker, int oldVal, int newVal) {
65 | module.duty = newVal;
66 | instrument.moduleUpdated(module);
67 | }
68 | });
69 | // ((View)delayTimeBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.phaseCC));
70 |
71 | CheckBox positiveCheckBox = (CheckBox)view.findViewById(R.id.dividerPositive);
72 | positiveCheckBox.setChecked(module.positive);
73 | positiveCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
74 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
75 | module.positive = isChecked;
76 | instrument.moduleUpdated(module);
77 | }
78 | });
79 |
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/GlideViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Glide;
8 | import com.gallantrealm.modsynth.module.Module;
9 | import android.graphics.Canvas;
10 | import android.view.View;
11 | import android.widget.CheckBox;
12 | import android.widget.CompoundButton;
13 | import android.widget.CompoundButton.OnCheckedChangeListener;
14 | import android.widget.SeekBar;
15 |
16 | public class GlideViewer extends ModuleViewer {
17 |
18 | Glide module;
19 |
20 | public GlideViewer(Module module, Instrument instrument) {
21 | super(module, instrument);
22 | this.module = (Glide)module;
23 | }
24 |
25 | public void drawDiagram(Canvas canvas, float x, float y) {
26 | path.reset();
27 | path.moveTo(x - 30, y + 25);
28 | path.lineTo(x - 20, y + 25);
29 | path.lineTo(x + 20, y - 25);
30 | path.lineTo(x + 30, y - 25);
31 | canvas.drawPath(path, paint);
32 | }
33 |
34 | @Override
35 | public int getViewResource() {
36 | return R.layout.glidepane;
37 | }
38 |
39 | @Override
40 | public void onViewCreate(MainActivity mainActivity) {
41 |
42 | SeekBar envAttack = (SeekBar) view.findViewById(R.id.glideUp);
43 | envAttack.setProgress((int) (100 * module.glideUp)); //Math.sqrt(module.glideUp)));
44 | envAttack.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
45 | public void onStopTrackingTouch(SeekBar seekBar) {
46 | }
47 | public void onStartTrackingTouch(SeekBar seekBar) {
48 | }
49 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
50 | module.glideUp = progress / 100.0f; //progress * progress / 10000.0f;
51 | instrument.moduleUpdated(module);
52 | }
53 | });
54 | ((View)envAttack.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.glideUpCC));
55 |
56 | SeekBar envDecay = (SeekBar) view.findViewById(R.id.glideDown);
57 | envDecay.setProgress((int) (100 * module.glideDown)); //Math.sqrt(module.glideDown)));
58 | envDecay.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
59 | public void onStopTrackingTouch(SeekBar seekBar) {
60 | }
61 | public void onStartTrackingTouch(SeekBar seekBar) {
62 | }
63 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
64 | module.glideDown = progress / 100.0f; //* progress / 10000.0f;
65 | instrument.moduleUpdated(module);
66 | }
67 | });
68 | ((View)envDecay.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.glideDownCC));
69 |
70 | CheckBox glideAudioCheckBox = (CheckBox)view.findViewById(R.id.glideAudio);
71 | glideAudioCheckBox.setChecked(module.audioSpeed);
72 | glideAudioCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
73 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
74 | module.audioSpeed = isChecked;
75 | instrument.moduleUpdated(module);
76 | }
77 | });
78 |
79 | }
80 |
81 | @Override
82 | public void updateCC(int cc, double value) {
83 | if (module.glideUpCC.cc == cc) {
84 | if (view != null) {
85 | SeekBar envAttack = (SeekBar) view.findViewById(R.id.glideUp);
86 | envAttack.setProgress((int) (Math.sqrt(module.glideUp) * 100.0));
87 | }
88 | }
89 | if (module.glideDownCC.cc == cc) {
90 | if (view != null) {
91 | SeekBar envDecay = (SeekBar) view.findViewById(R.id.glideDown);
92 | envDecay.setProgress((int) (Math.sqrt(module.glideDown) * 100.0));
93 | }
94 | }
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/MultiOscViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Module;
8 | import com.gallantrealm.modsynth.module.MultiOsc;
9 | import android.graphics.Canvas;
10 | import android.view.View;
11 | import android.widget.SeekBar;
12 |
13 | public class MultiOscViewer extends OscillatorViewer {
14 |
15 | MultiOsc module;
16 |
17 | public MultiOscViewer(Module module, Instrument instrument) {
18 | super(module, instrument);
19 | this.module = (MultiOsc)module;
20 | }
21 |
22 | public void drawDiagram(Canvas canvas, float x, float y) {
23 | for (int i = -1; i < 2; i++) {
24 | float ix = x + 5 * i;
25 | path.reset();
26 | path.moveTo(ix - 30, y - 15);
27 | path.lineTo(ix - 30, y - 25);
28 | path.lineTo(ix, y - 25);
29 | path.lineTo(ix, y - 5);
30 | path.lineTo(ix + 30, y - 5);
31 | path.lineTo(ix + 30, y - 15);
32 | path.moveTo(ix - 30, y + 15);
33 | path.lineTo(ix - 20, y + 5);
34 | path.lineTo(ix + 20, y + 25);
35 | path.lineTo(ix + 30, y + 15);
36 | canvas.drawPath(path, diagramPaint);
37 | }
38 | }
39 |
40 | @Override
41 | public int getViewResource() {
42 | return R.layout.oscillatorpane;
43 | }
44 |
45 | @Override
46 | public void onViewCreate(MainActivity mainActivity) {
47 |
48 | super.onViewCreate(mainActivity);
49 |
50 | View oscNoiseRow = view.findViewById(R.id.oscillatorNoiseRow);
51 | oscNoiseRow.setVisibility(View.GONE);
52 |
53 | final View oscWidthRow = view.findViewById(R.id.oscillatorWidthRow);
54 | oscWidthRow.setVisibility(View.VISIBLE);
55 | final SeekBar oscWidth = (SeekBar) view.findViewById(R.id.oscillatorWidth);
56 | oscWidth.setProgress(Math.max(1, (int) (Math.pow(module.chorusWidth / 12.0, 0.5) * 100)));
57 | oscWidth.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
58 | public void onStopTrackingTouch(SeekBar seekBar) {
59 | }
60 | public void onStartTrackingTouch(SeekBar seekBar) {
61 | }
62 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
63 | module.chorusWidth = 12.0 * Math.pow(Math.max(1, progress) / 100.0, 2.0);
64 | instrument.moduleUpdated(module);
65 | }
66 | });
67 | ((View)oscWidth.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.chorusWidthCC));
68 |
69 | }
70 |
71 | @Override
72 | public void updateCC(int cc, double value) {
73 | if (module.chorusWidthCC.cc == cc) {
74 | if (view != null) {
75 | SeekBar oscWidth = (SeekBar) view.findViewById(R.id.oscillatorWidth);
76 | oscWidth.setProgress(Math.max(1, (int) (Math.pow(module.chorusWidth / 12.0, 0.5) * 100)));
77 | }
78 | }
79 | }
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/OutputViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.android.Scope;
4 | import com.gallantrealm.modsynth.Instrument;
5 | import com.gallantrealm.modsynth.MainActivity;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Module;
8 | import com.gallantrealm.modsynth.module.Output;
9 | import android.graphics.Canvas;
10 | import android.graphics.Paint;
11 | import android.graphics.Paint.Style;
12 | import android.view.View;
13 |
14 | public class OutputViewer extends ModuleViewer {
15 | private static final long serialVersionUID = 1L;
16 |
17 | public double left;
18 | public double right;
19 |
20 | public Scope.Type scopeType;
21 |
22 | public Paint clippingPaint;
23 |
24 | public OutputViewer(Module module, Instrument instrument) {
25 | super(module, instrument);
26 | clippingPaint = new Paint();
27 | clippingPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
28 | clippingPaint.setColor(0xFFE00000);
29 | clippingPaint.setStrokeWidth(4);
30 | clippingPaint.setStyle(Style.FILL);
31 | }
32 |
33 | public void drawDiagram(Canvas canvas, float x, float y) {
34 | if (((Output)module).limiter < 0.75) {
35 | if (((Output)module).limiter < 0.1) {
36 | clippingPaint.setColor(0xFFFF0000);
37 | } else if (((Output)module).limiter < 0.25) {
38 | clippingPaint.setColor(0xFFC06000);
39 | } else {
40 | clippingPaint.setColor(0xFFA0A000);
41 | }
42 | canvas.drawRect(x - 25, y - 15, x, y + 15, clippingPaint);
43 | path.reset();
44 | path.moveTo(x, y - 15);
45 | path.lineTo(x + 25, y - 30);
46 | path.lineTo(x + 25, y + 30);
47 | path.lineTo(x, y + 15);
48 | canvas.drawPath(path, clippingPaint);
49 | }
50 | canvas.drawRect(x - 25, y - 15, x, y + 15, diagramPaint);
51 | path.reset();
52 | path.moveTo(x, y - 15);
53 | path.lineTo(x + 25, y - 30);
54 | path.lineTo(x + 25, y + 30);
55 | path.lineTo(x, y + 15);
56 | canvas.drawPath(path, diagramPaint);
57 | }
58 |
59 | @Override
60 | public int getViewResource() {
61 | return R.layout.speakerpane;
62 | }
63 |
64 | public transient Scope scope;
65 |
66 | @Override
67 | public void onViewCreate(MainActivity mainActivity) {
68 | scope = (Scope) view.findViewById(R.id.outputScope);
69 | scope.setType(scopeType);
70 | scope.setClickable(true);
71 | scope.setFocusable(true);
72 | scope.setOnClickListener(new View.OnClickListener() {
73 | public void onClick(View v) {
74 | System.out.println("Click!");
75 | if (scopeType == null) {
76 | scopeType = Scope.Type.Oscilloscope;
77 | }
78 | scopeType = Scope.Type.values()[(scopeType.ordinal() + 1) % Scope.Type.values().length];
79 | scope.setType(scopeType);
80 | // dirty = true; annoying
81 | }
82 | });
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/PanViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Module;
8 | import com.gallantrealm.modsynth.module.Pan;
9 | import android.graphics.Canvas;
10 | import android.view.View;
11 | import android.widget.SeekBar;
12 |
13 | public class PanViewer extends ModuleViewer {
14 |
15 | Pan module;
16 |
17 | public PanViewer(Module module, Instrument instrument) {
18 | super(module, instrument);
19 | this.module = (Pan)module;
20 | }
21 |
22 | public void drawDiagram(Canvas canvas, float x, float y) {
23 | canvas.drawLine(x - 25, y, x, y, diagramPaint);
24 | canvas.drawLine(x - 5, y - 5, x, y, diagramPaint);
25 | canvas.drawLine(x - 5, y + 5, x, y, diagramPaint);
26 | canvas.drawLine(x, y - 25, x, y + 25, diagramPaint);
27 | canvas.drawLine(x - 5, y - 25, x + 25, y - 25, diagramPaint);
28 | canvas.drawLine(x - 5, y + 25, x + 25, y + 25, diagramPaint);
29 | }
30 |
31 | @Override
32 | public int getViewResource() {
33 | return R.layout.panpane;
34 | }
35 |
36 | @Override
37 | public void onViewCreate(final MainActivity mainActivity) {
38 |
39 | SeekBar mixerBalance = (SeekBar) view.findViewById(R.id.mixerLevel2);
40 | mixerBalance.setProgress((int) (module.balance * 100.0));
41 | mixerBalance.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
42 | public void onStopTrackingTouch(SeekBar seekBar) {
43 | }
44 | public void onStartTrackingTouch(SeekBar seekBar) {
45 | }
46 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
47 | module.balance = progress / 100.0;
48 | instrument.moduleUpdated(module);
49 | }
50 | });
51 | ((View) mixerBalance.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.balanceCC));
52 |
53 | View mixerModulationRow = view.findViewById(R.id.mixerModulationRow);
54 | if (module.mod1 == null) {
55 | mixerModulationRow.setVisibility(View.GONE);
56 | } else {
57 | mixerModulationRow.setVisibility(View.VISIBLE);
58 | SeekBar mixerModulation = (SeekBar) view.findViewById(R.id.mixerModulation);
59 | mixerModulation.setProgress((int) (module.modulation * 100.0));
60 | mixerModulation.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
61 | public void onStopTrackingTouch(SeekBar seekBar) {
62 | }
63 | public void onStartTrackingTouch(SeekBar seekBar) {
64 | }
65 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
66 | module.modulation = progress / 100.0;
67 | instrument.moduleUpdated(module);
68 | }
69 | });
70 | ((View) mixerModulation.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.modulationCC));
71 | }
72 | }
73 |
74 | public void updateCC(int cc, double value) {
75 | if (module.balanceCC.cc == cc) {
76 | if (view != null) {
77 | SeekBar panBalance = (SeekBar) view.findViewById(R.id.mixerLevel2);
78 | panBalance.setProgress((int) (module.balance * 100.0));
79 | }
80 | }
81 | if (module.modulationCC.cc == cc) {
82 | if (view != null) {
83 | SeekBar panModulation = (SeekBar) view.findViewById(R.id.mixerModulation);
84 | panModulation.setProgress((int) (module.modulation * 100.0));
85 | }
86 | }
87 | }
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/ReverbViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.MidiControlDialog;
6 | import com.gallantrealm.modsynth.R;
7 | import com.gallantrealm.modsynth.module.Module;
8 | import com.gallantrealm.modsynth.module.Reverb;
9 | import android.view.View;
10 | import android.widget.SeekBar;
11 |
12 | public class ReverbViewer extends ModuleViewer {
13 |
14 | Reverb module;
15 |
16 | public ReverbViewer(Module module, Instrument instrument) {
17 | super(module, instrument);
18 | this.module = (Reverb)module;
19 | }
20 |
21 | @Override
22 | public int getViewResource() {
23 | return R.layout.reverbpane;
24 | }
25 |
26 | @Override
27 | public void onViewCreate(MainActivity mainActivity) {
28 | SeekBar reverbAmountBar = (SeekBar) view.findViewById(R.id.reverbAmount);
29 | reverbAmountBar.setProgress((int) (module.amount * 100.0));
30 | reverbAmountBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
31 | public void onStopTrackingTouch(SeekBar seekBar) {
32 | }
33 | public void onStartTrackingTouch(SeekBar seekBar) {
34 | }
35 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
36 | module.amount = progress / 100.0;
37 | instrument.moduleUpdated(module);
38 | }
39 | });
40 | ((View)reverbAmountBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.amountCC));
41 |
42 | SeekBar reverbDepthBar = (SeekBar) view.findViewById(R.id.reverbDepth);
43 | reverbDepthBar.setProgress((int) (Math.sqrt(module.depth) * 100.0));
44 | reverbDepthBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
45 | public void onStopTrackingTouch(SeekBar seekBar) {
46 | }
47 | public void onStartTrackingTouch(SeekBar seekBar) {
48 | }
49 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
50 | module.depth = progress / 100.0 * progress / 100.0;
51 | instrument.moduleUpdated(module);
52 | }
53 | });
54 | ((View)reverbDepthBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.depthCC));
55 |
56 | SeekBar reverbToneBar = (SeekBar) view.findViewById(R.id.reverbTone);
57 | reverbToneBar.setProgress((int) (100 * (1.0 - module.tone)));
58 | reverbToneBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
59 | public void onStopTrackingTouch(SeekBar seekBar) {
60 | }
61 | public void onStartTrackingTouch(SeekBar seekBar) {
62 | }
63 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
64 | module.tone = 1.0 - progress / 100.0;
65 | instrument.moduleUpdated(module);
66 | }
67 | });
68 | ((View)reverbToneBar.getParent()).setOnLongClickListener(MidiControlDialog.newLongClickListener(module.toneCC));
69 | }
70 |
71 | @Override
72 | public void updateCC(int cc, double value) {
73 | if (module.amountCC.cc == cc) {
74 | if (view != null) {
75 | SeekBar reverbAmountBar = (SeekBar) view.findViewById(R.id.reverbAmount);
76 | reverbAmountBar.setProgress((int) (module.amount * 100.0));
77 | }
78 | }
79 | if (module.depthCC.cc == cc) {
80 | if (view != null) {
81 | SeekBar reverbDepthBar = (SeekBar) view.findViewById(R.id.reverbDepth);
82 | reverbDepthBar.setProgress((int) (Math.sqrt(module.depth) * 100.0));
83 | }
84 | }
85 | if (module.toneCC.cc == cc) {
86 | if (view != null) {
87 | SeekBar reverbToneBar = (SeekBar) view.findViewById(R.id.reverbTone);
88 | reverbToneBar.setProgress((int) (100 * (1.0 - module.tone)));
89 | }
90 | }
91 | }
92 |
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/app/src/main/java/com/gallantrealm/modsynth/viewer/SampleHoldViewer.java:
--------------------------------------------------------------------------------
1 | package com.gallantrealm.modsynth.viewer;
2 |
3 | import com.gallantrealm.modsynth.Instrument;
4 | import com.gallantrealm.modsynth.MainActivity;
5 | import com.gallantrealm.modsynth.R;
6 | import com.gallantrealm.modsynth.module.Module;
7 | import android.graphics.Canvas;
8 |
9 | public class SampleHoldViewer extends ModuleViewer {
10 |
11 | public SampleHoldViewer(Module module, Instrument instrument) {
12 | super(module, instrument);
13 | }
14 |
15 | public void drawDiagram(Canvas canvas, float x, float y) {
16 | path.reset();
17 | path.moveTo(x - 30, y + 25);
18 | path.lineTo(x - 20, y + 25);
19 | path.lineTo(x - 20, y - 25);
20 | path.lineTo(x - 10, y - 25);
21 | path.lineTo(x - 10, y + 0);
22 | path.lineTo(x - 0, y + 0);
23 | path.lineTo(x + 0, y + 10);
24 | path.lineTo(x + 10, y + 10);
25 | path.lineTo(x + 10, y + 20);
26 | path.lineTo(x + 20, y + 20);
27 | path.lineTo(x + 20, y - 10);
28 | path.lineTo(x + 30, y - 10);
29 | canvas.drawPath(path, diagramPaint);
30 | }
31 |
32 | @Override
33 | public int getViewResource() {
34 | return R.layout.sampleholdpane;
35 | }
36 |
37 | @Override
38 | public void onViewCreate(MainActivity mainActivity) {
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/dialog_background.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/dialog_background.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/left_end.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/left_end.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/leftithumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/leftithumb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/leftthumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/leftthumb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/right_end.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/right_end.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/rightithumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/rightithumb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/rightthumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/rightthumb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/skinny_button.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/skinny_button.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/theme_button_default.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/theme_button_default.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/theme_button_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable-nodpi/theme_button_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/amp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/amp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arpeggiator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/arpeggiator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/centre_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/centre_bar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/compressor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/compressor.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/crusher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/crusher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/delay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/delay.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/divider.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/envelope.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/envelope.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/filter.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/function.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/function.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/gear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/glide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/glide.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/keyboard.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/leader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/leader.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/lfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/lfo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/melody.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/melody.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mixer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/mixer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/module.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/module.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/module1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/module1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/module2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/module2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/moduleselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/moduleselected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/multiosc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/multiosc.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/operator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/operator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/oscillator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/oscillator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/pad.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/pan.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/pcm.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress12_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 | -
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress24_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 | -
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_active.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/progress_active.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_background.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/progress_background.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_background12.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/progress_background12.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_background24.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/progress_background24.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_background_orig.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/progress_background_orig.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 | -
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/reverb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/reverb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/samplehold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/samplehold.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_thumb.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
27 |
28 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_thumb_activated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/seek_thumb_activated.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_thumb_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/seek_thumb_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/seek_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_thumb_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/seek_thumb_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sequencer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/sequencer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/spectralfilter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/spectralfilter.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tab_button.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 | -
9 |
10 |
11 | -
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tab_button_default.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/tab_button_default.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tab_button_selected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/tab_button_selected.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unison.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/drawable/unison.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/arpeggiatorpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
19 |
33 |
40 |
41 |
45 |
55 |
60 |
61 |
65 |
75 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/compressorpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
13 |
17 |
18 |
29 |
30 |
39 |
40 |
41 |
42 |
46 |
47 |
58 |
59 |
68 |
69 |
70 |
74 |
75 |
86 |
87 |
96 |
97 |
98 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/crusherpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
15 |
19 |
20 |
31 |
32 |
41 |
42 |
43 |
47 |
58 |
59 |
68 |
69 |
70 |
71 |
76 |
87 |
88 |
92 |
93 |
101 |
102 |
109 |
110 |
111 |
112 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/delaypane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
28 |
29 |
37 |
38 |
39 |
43 |
55 |
56 |
64 |
65 |
66 |
70 |
82 |
83 |
91 |
92 |
93 |
98 |
111 |
112 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/filterpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
19 |
30 |
37 |
38 |
43 |
54 |
55 |
64 |
65 |
66 |
71 |
82 |
83 |
92 |
93 |
94 |
100 |
111 |
112 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/functionpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
18 |
19 |
30 |
31 |
47 |
48 |
49 |
53 |
54 |
65 |
66 |
75 |
76 |
77 |
81 |
82 |
93 |
94 |
103 |
104 |
105 |
109 |
110 |
121 |
122 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/instrumentpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
20 |
21 |
30 |
31 |
38 |
39 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/library_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
25 |
30 |
42 |
46 |
50 |
51 |
52 |
56 |
60 |
66 |
72 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/modulatorpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
27 |
34 |
35 |
39 |
50 |
51 |
60 |
61 |
62 |
66 |
77 |
78 |
87 |
88 |
89 |
93 |
104 |
105 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/panpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
13 |
17 |
18 |
19 |
23 |
34 |
35 |
44 |
45 |
46 |
51 |
62 |
63 |
72 |
73 |
74 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recordpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
24 |
25 |
32 |
33 |
42 |
43 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/reverbpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
28 |
29 |
37 |
38 |
39 |
43 |
55 |
56 |
64 |
65 |
66 |
70 |
81 |
82 |
91 |
92 |
93 |
94 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/sampleholdpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
15 |
20 |
21 |
32 |
33 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/speakerpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/spinner_dropdown_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/spinner_dropdown_item_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/spinner_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
21 |
22 |
28 |
29 |
36 |
37 |
44 |
45 |
46 |
47 |
56 |
57 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/unisonpane.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
12 |
16 |
27 |
34 |
35 |
36 |
39 |
40 |
51 |
52 |
59 |
60 |
61 |
62 |
65 |
66 |
77 |
78 |
87 |
88 |
89 |
90 |
94 |
95 |
107 |
108 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-hdpi/ic_gear.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-mdpi/ic_gear.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-xhdpi/ic_gear.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-xxhdpi/ic_gear.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/aura_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/aura_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/aura_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/aura_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/blue_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/blue_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/blue_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/blue_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/circuit_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/circuit_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/circuit_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/circuit_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/custom_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/custom_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/green_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/green_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/green_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/green_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/ice_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/ice_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/ice_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/ice_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/keys_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/keys_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/metal_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/metal_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/metal_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/metal_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/onyx_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/onyx_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/onyx_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/onyx_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/space_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/space_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/space_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/space_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/sunset_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/sunset_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/sunset_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/sunset_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/tropical_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/tropical_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/tropical_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/tropical_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/wood_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/wood_background.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/wood_swatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/app/src/main/res/raw/wood_swatch.png
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ModSynth
4 | polyphonic, modular, unlimited
5 | com.gallantrealm.modsynth.MainActivity
6 | 4a9363b7ac3e4b3fa03f78467fbe4564
7 | piano,guitar,musicbox
8 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoBx7pMdGqdR8lhpCeEpjBUpSP31q1AV/ZRuRQi4j6vG5OxZ1O6taKMn2acfLlqyM+IHsjiIi4szOVtgZc3RneGvhJRJOxn2m1FfxPI3ih41hJNJpyy/H8H5pndzJxGv4UNgKXU1eQAadcUBds+bWPabQnhQY5TnVG4RqU8CokzAKoEIuey+hB4e2ym3KaTAShs9vOWkBdqw2E4TjKxFCiFDlWh/k9e42raF0RNOwsY6fEeyaxVaVF5yJPfVC/VdtiT6D/e50nolVgvcrBjCUzZXa7xUXwIDzIXDBSdFZUcVGOHudl+iqt3dbkuKKZO0LSDuN4gh3wOgnwPhkJJh2pwIDAQAB
9 | true
10 | 0BxYHk5JfJXk1VjN4Um5Gck5Ka2c
11 | Do you like ModSynth?
12 | If so, please consider purchasing the full version. It expands max polyphony from 3 voices to 10 and adds powerful new modules. (It also rewards the app writer for his hard work!)
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 9877000
6 |
7 |
8 | %1$s is having trouble with Google Play services. Please try again.
9 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/synth_device_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:8.5.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | task clean(type: Delete) {
16 | delete rootProject.buildDir
17 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | android.defaults.buildfeatures.buildconfig=true
21 | android.nonTransitiveRClass=false
22 | android.nonFinalResIds=false
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/owingsbj/ModSynth/c693a90fa40c792663cfc7b96357437ff1fed9b6/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Oct 09 15:48:36 PDT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-27
12 | android.library.reference.1=../MySynth
13 | android.library.reference.2=../MyAndroid
14 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | dependencyResolutionManagement {
2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3 | repositories {
4 | google()
5 | mavenCentral()
6 | jcenter() // Warning: this repository is going to shut down soon
7 | }
8 | }
9 | rootProject.name = "ModSynth"
10 | include ':app'
11 |
--------------------------------------------------------------------------------