Skip to content

Commit

Permalink
modernize the entire project to the latset aap-juce model.
Browse files Browse the repository at this point in the history
- bump aap-core and aap-juce.
- AGP/Gradle migration.
- parameterless metadata.
- native UI.
  • Loading branch information
atsushieno committed Jul 6, 2023
1 parent 0bf4f16 commit aba427a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 42 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ android {
implementation libs.aap.core
implementation libs.aap.midi.device.service
implementation libs.aap.ui.web
implementation libs.aap.ui.compose
}

externalNativeBuild {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
android:name="org.androidaudioplugin.AudioPluginService.V3#Plugins"
android:resource="@xml/aap_metadata"/>
</service>
<service android:name="org.androidaudioplugin.AudioPluginViewService" android:exported="true" />
<service android:name="org.androidaudioplugin.midideviceservice.StandaloneAudioPluginMidiDeviceService"
android:permission="android.permission.BIND_MIDI_DEVICE_SERVICE"
android:exported="true">
Expand Down
35 changes: 5 additions & 30 deletions app/src/main/res/xml/aap_metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,18 @@

<plugins xmlns="urn:org.androidaudioplugin.core">
<plugin name="DDSPSynth" category="Instrument" author="Magenta" developer="Magenta"
unique-id="juceaap:52616e62" library="libDDSPSynth_Standalone.so"
entrypoint="GetJuceAAPFactoryStandalone">
unique-id="juceaap:52616e62" library="libDDSPSynth_Standalone.so"
entrypoint="GetJuceAAPFactoryStandalone"
gui:ui-view-factory="org.androidaudioplugin.ui.compose.ComposeAudioPluginViewFactory"
xmlns:gui="urn://androidaudioplugin.org/extensions/gui" >>
<extensions>
<extension uri="urn://androidaudioplugin.org/extensions/plugin-info/v2"/>
<extension uri="urn://androidaudioplugin.org/extensions/parameters/v2.1"/>
<extension uri="urn://androidaudioplugin.org/extensions/presets/v2"/>
<extension uri="urn://androidaudioplugin.org/extensions/state/v2"/>
<extension uri="urn://androidaudioplugin.org/extensions/midi2/v2"/>
<extension uri="urn://androidaudioplugin.org/extensions/gui/v2"/>
</extensions>
<parameters xmlns="urn://androidaudioplugin.org/extensions/parameters">
<parameter id="0" name="Input Gain" direction="input" minimum="-0.5" maximum="0.5"
default="1.0" content="other"/>
<parameter id="1" name="Input Pitch" direction="input" minimum="-0.5" maximum="0.5"
default="1.0" content="other"/>
<parameter id="2" name="Pitch Shift" direction="input" minimum="-24.0" maximum="24.0"
default="0.5104166865348816" content="other"/>
<parameter id="3" name="Harmonics" direction="input" minimum="0.0" maximum="1.0"
default="1.0" content="other"/>
<parameter id="4" name="Noise" direction="input" minimum="0.0" maximum="1.0"
default="1.0" content="other"/>
<parameter id="5" name="Output Gain" direction="input" minimum="-60.0" maximum="0.0"
default="1.0" content="other"/>
<parameter id="6" name="Reverb Size" direction="input" minimum="0.0" maximum="1.0"
default="0.3999999761581421" content="other"/>
<parameter id="7" name="Reverb Damp" direction="input" minimum="0.0" maximum="1.0"
default="0.09999999403953552" content="other"/>
<parameter id="8" name="Reverb Wet" direction="input" minimum="0.0" maximum="1.0"
default="0.0" content="other"/>
<parameter id="9" name="Attack" direction="input" minimum="0.1000000014901161"
maximum="3.0" default="0.0" content="other"/>
<parameter id="10" name="Decay" direction="input" minimum="0.1000000014901161"
maximum="3.0" default="0.0" content="other"/>
<parameter id="11" name="Sustain" direction="input" minimum="0.0" maximum="1.0"
default="1.0" content="other"/>
<parameter id="12" name="Release" direction="input" minimum="0.1000000014901161"
maximum="5.0" default="0.02540607936680317" content="other"/>
</parameters>
<ports>
<port direction="output" content="audio" name="Left"/>
<port direction="output" content="audio" name="Right"/>
Expand Down
2 changes: 1 addition & 1 deletion external/aap-core
Submodule aap-core updated 87 files
+4 −4 .github/workflows/actions.yml
+20 −10 README.md
+1 −1 androidaudioplugin-midi-device-service/build.gradle.kts
+26 −0 androidaudioplugin-midi-device-service/src/main/cpp/AAPMidiProcessor.cpp
+1 −1 ...-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/AudioPluginMidiDeviceService.kt
+0 −1 androidaudioplugin-samples-host-engine/build.gradle.kts
+1 −145 androidaudioplugin-samples-host-engine/src/main/java/org/androidaudioplugin/samples/host/engine/MidiHelper.kt
+35 −2 ...idaudioplugin-samples-host-engine/src/main/java/org/androidaudioplugin/samples/host/engine/PluginPreview.kt
+3 −2 ...plugin-testing/src/main/java/org/androidaudioplugin/androidaudioplugin/testing/AudioPluginServiceTesting.kt
+1 −0 androidaudioplugin-ui-compose/build.gradle.kts
+1 −0 androidaudioplugin-ui-compose/consumer-rules.pro
+69 −0 androidaudioplugin-ui-compose/src/main/java/org/androidaudioplugin/ui/compose/ComposeAudioPluginViewFactory.kt
+246 −0 androidaudioplugin-ui-compose/src/main/java/org/androidaudioplugin/ui/compose/ComposePluginView.kt
+116 −40 androidaudioplugin-ui-compose/src/main/java/org/androidaudioplugin/ui/compose/PluginDetails.kt
+2 −0 androidaudioplugin-ui-compose/src/main/java/org/androidaudioplugin/ui/compose/PluginListActivity.kt
+48 −0 androidaudioplugin-ui-compose/src/main/java/org/androidaudioplugin/ui/compose/PluginParameterEnumSelector.kt
+ androidaudioplugin-ui-compose/src/main/res/drawable/bright_life.png
+2 −0 androidaudioplugin/build.gradle.kts
+1 −1 androidaudioplugin/src/main/cpp/CMakeLists.txt
+126 −7 androidaudioplugin/src/main/cpp/android/AAPJniFacade.cpp
+16 −0 androidaudioplugin/src/main/cpp/android/AudioPluginNatives_jni.cpp
+2 −1 androidaudioplugin/src/main/cpp/android/binder-client-as-plugin.cpp
+7 −1 androidaudioplugin/src/main/cpp/core/AAPJniFacade.h
+137 −2 androidaudioplugin/src/main/cpp/core/extensions/parameters-service.h
+108 −40 androidaudioplugin/src/main/cpp/core/hosting/audio-plugin-host.cpp
+17 −11 androidaudioplugin/src/main/java/org/androidaudioplugin/AudioPluginServiceHelper.kt
+2 −2 androidaudioplugin/src/main/java/org/androidaudioplugin/AudioPluginSystemAlertView.kt
+161 −0 androidaudioplugin/src/main/java/org/androidaudioplugin/AudioPluginViewService.kt
+9 −5 androidaudioplugin/src/main/java/org/androidaudioplugin/NativeLocalPluginInstance.kt
+12 −1 androidaudioplugin/src/main/java/org/androidaudioplugin/ParameterInformation.kt
+40 −4 androidaudioplugin/src/main/java/org/androidaudioplugin/hosting/AudioPluginHostHelper.kt
+169 −0 androidaudioplugin/src/main/java/org/androidaudioplugin/hosting/AudioPluginSurfaceControlClient.kt
+1 −1 androidaudioplugin/src/main/update-binder.sh
+3 −7 docs/HACKING.md
+77 −12 docs/design/GUI.md
+8 −3 docs/design/MIDI_DEVICE_SERVICE.md
+4 −0 docs/schemas/parameters.rnc
+5 −0 gradle.properties
+12 −9 gradle/libs.versions.toml
+1 −1 gradle/wrapper/gradle-wrapper.properties
+6 −0 include/aap/core/aapxs/extension-service.h
+6 −5 include/aap/core/host/plugin-host.h
+35 −2 include/aap/core/host/plugin-instance.h
+25 −0 include/aap/core/plugin-information.h
+38 −4 include/aap/ext/parameters.h
+1 −1 publish-pom.gradle
+0 −67 samples/aap-midi-device-service/build.gradle.kts
+0 −21 samples/aap-midi-device-service/proguard-rules.pro
+0 −41 samples/aap-midi-device-service/src/main/AndroidManifest.xml
+0 −139 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/App.kt
+0 −143 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/ApplicationModel.kt
+0 −14 ...-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/ExternalAAPMidiDeviceService.kt
+0 −18 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/MainActivity.kt
+0 −8 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/ui/theme/Color.kt
+0 −11 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/ui/theme/Shape.kt
+0 −47 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/ui/theme/Theme.kt
+0 −28 samples/aap-midi-device-service/src/main/java/org/androidaudioplugin/midideviceservice/ui/theme/Type.kt
+0 −30 samples/aap-midi-device-service/src/main/res/drawable-v24/ic_launcher_foreground.xml
+0 −170 samples/aap-midi-device-service/src/main/res/drawable/ic_launcher_background.xml
+0 −5 samples/aap-midi-device-service/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+0 −5 samples/aap-midi-device-service/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+ samples/aap-midi-device-service/src/main/res/mipmap-hdpi/ic_launcher.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-hdpi/ic_launcher_round.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-mdpi/ic_launcher.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-mdpi/ic_launcher_round.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-xhdpi/ic_launcher.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-xxhdpi/ic_launcher.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
+ samples/aap-midi-device-service/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
+0 −16 samples/aap-midi-device-service/src/main/res/values-night/themes.xml
+0 −10 samples/aap-midi-device-service/src/main/res/values/colors.xml
+0 −3 samples/aap-midi-device-service/src/main/res/values/strings.xml
+0 −25 samples/aap-midi-device-service/src/main/res/values/themes.xml
+0 −6 samples/aap-midi-device-service/src/main/res/xml/device_info.xml
+1 −0 samples/aapbarebonepluginsample/src/main/AndroidManifest.xml
+32 −0 samples/aapbarebonepluginsample/src/main/cpp/aapbarebonepluginsample.cpp
+4 −2 samples/aapbarebonepluginsample/src/main/res/xml/aap_metadata.xml
+2 −1 samples/aapinstrumentsample/build.gradle.kts
+2 −1 samples/aapinstrumentsample/src/androidTest/java/org/androidaudioplugin/aapinstrumentsample/PluginTest.kt
+2 −1 samples/aapinstrumentsample/src/main/AndroidManifest.xml
+1 −1 samples/aapinstrumentsample/src/main/res/values/styles.xml
+13 −3 samples/aapinstrumentsample/src/main/res/xml/aap_metadata.xml
+1 −0 samples/aapinstrumentsample/src/main/res/xml/device_info.xml
+1 −1 samples/aapxssample/build.gradle.kts
+0 −1 settings.gradle
21 changes: 12 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
aap-core = "0.7.7-pre"
aap-lv2 = "0.2.7-pre"

agp = "7.4.2"
agp = "8.0.2"
kotlin = "1.8.10"
ndk = "25.2.9519653"
cmake = "3.22.1"
Expand All @@ -12,7 +12,7 @@ dokka = "1.8.10"
compose = "1.4.3"
kotlin-compose-compiler-extension = "1.4.3"
androidx-test = "1.5.0"
coroutines = "1.6.4"
coroutines = "1.7.0"

[libraries]

Expand All @@ -24,13 +24,15 @@ aap-testing = { module = "org.androidaudioplugin:androidaudioplugin-testing", ve

aap-lv2 = { module = "org.androidaudioplugin:androidaudioplugin-lv2", version.ref = "aap-lv2" }

compose-audio-controls = { module = "org.androidaudioplugin:compose-audio-controls", version = "0.1.3" }

tools-build-gradle = { module = "com.android.tools.build:gradle", version.ref = "agp" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }

compose-bom = { module = "androidx.compose:compose-bom", version = "2023.05.01" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.5.3" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.10.0"}
compose-bom = { module = "androidx.compose:compose-bom", version = "2023.06.01" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.6.0" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.10.1" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" }
startup-runtime = { module = "androidx.startup:startup-runtime", version = "1.1.1" }
Expand All @@ -41,9 +43,10 @@ preference-ktx = { module = "androidx.preference:preference-ktx", version = "1.2
libcxx-provider = { module = "dev.atsushieno:libcxx-provider", version.ref = "ndk" }
material = { module = "com.google.android.material:material", version = "1.9.0" }

lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version = "2.6.1" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.6.1" }
activity-compose = { module = "androidx.activity:activity-compose", version = "1.7.1" }
webkit = { module = "androidx.webkit:webkit", version = "1.6.1" }
activity-compose = { module = "androidx.activity:activity-compose", version = "1.7.2" }
webkit = { module = "androidx.webkit:webkit", version = "1.7.0" }

compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
Expand All @@ -57,7 +60,7 @@ test-runner = { module = "androidx.test:runner", version = "1.5.2" }
test-ext-junit = { module = "androidx.test.ext:junit", version = "1.1.5" }
test-espresso-core = { module = "androidx.test.espresso:espresso-core", version = "3.5.1" }

ktmidi = { module = "dev.atsushieno:ktmidi", version = "0.4.1" }
mugene = { module = "dev.atsushieno:mugene", version = "0.3.0" }
ktmidi = { module = "dev.atsushieno:ktmidi", version = "0.5.0" }

oboe = { module = "com.google.oboe:oboe", version = "1.7.0" }
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version = "2.6.1" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Feb 15 23:16:16 JST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit aba427a

Please sign in to comment.