-
Notifications
You must be signed in to change notification settings - Fork 0
Development
Thiago Fernando Rech edited this page Jul 6, 2025
·
2 revisions
- Android Studio Hedgehog or newer
- Android SDK API 27+
- NDK (Native Development Kit)
- Android device with microphone
# Clone the repository
git clone <repository-url>
cd ToneForge
# Open in Android Studio or build via command line
./gradlew assembleDebugThe project has been completely refactored to use:
- MVP Pattern: Model-View-Presenter for clean architecture
- Repository Pattern: Unified data access layer
- Navigation Controller: Decoupled navigation system
- Responsive Layouts: ConstraintLayout with adaptive dimensions
- Comprehensive Testing: Unit, integration, and UI tests
- Gradle: Build system
- CMake: Native code build
- JNI: Java-C++ interface
- AudioRecord/AudioTrack: Android audio API
- Fragments: Multi-screen navigation with MVP
- RecyclerView: Drag-and-drop interface
- SharedPreferences: Data persistence
- ConstraintLayout: Modern responsive layouts
- Espresso/JUnit: Testing framework
- Minimum Android: 8.1 (API 27)
- Architectures: ARM64, ARM32, x86, x86_64
- Sample rate: 48kHz
- Format: PCM Float 32-bit
- Channels: Mono (input and output)
Follow the MVP pattern established in the project:
- Create the Contract:
public interface MyContract {
interface View extends BaseView {
void updateData(String data);
void showProgress();
void hideProgress();
}
interface Presenter extends BasePresenter<View> {
void loadData();
void onUserAction();
}
}- Implement the Presenter:
public class MyPresenter implements MyContract.Presenter {
private WeakReference<MyContract.View> viewRef;
private AudioRepository audioRepository;
public MyPresenter(Context context, AudioRepository repository) {
this.audioRepository = repository;
}
@Override
public void loadData() {
ifViewAttached(view -> {
view.showProgress();
// Load data and update view
view.updateData("Loaded data");
view.hideProgress();
});
}
}- Create the Fragment:
public class MyFragment extends BaseFragment<MyContract.Presenter>
implements MyContract.View {
@Override
protected MyContract.Presenter createPresenter() {
return new MyPresenter(
requireContext(),
AudioRepository.getInstance(requireContext())
);
}
@Override
public void updateData(String data) {
// Update UI with data
}
}Write comprehensive tests for your presenter:
@Test
public void testPresenter_loadData() {
// Arrange
MyPresenter presenter = new MyPresenter(context, mockRepository);
presenter.attachView(mockView);
// Act
presenter.loadData();
// Assert
verify(mockView).showProgress();
verify(mockView).updateData(anyString());
verify(mockView).hideProgress();
}Follow responsive design principles:
<!-- Use responsive dimensions -->
android:layout_margin="@dimen/margin_medium"
android:textSize="@dimen/text_size_large"
<!-- Use ConstraintLayout for complex layouts -->
<androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:layout_width="0dp"
app:layout_constraintWidth_percent="0.3" />
</androidx.constraintlayout.widget.ConstraintLayout>- Audio not working: Check microphone permissions
- High latency: Use device with low audio latency
- Crash on startup: Verify NDK is installed
- Effects not applying: Restart audio
- Presets not saving: Check disk space
- Order not persisting: Restart app
- π MVP Navigation issues: Check NavigationController initialization
- π Test failures: Ensure all dependencies are mocked properly
Use adb logcat to see detailed logs:
adb logcat | grep ToneForgeRun the test suite:
# Unit tests
./gradlew testDebugUnitTest
# UI tests
./gradlew connectedAndroidTest
# Validation script
./scripts/functional-validation.sh- Real-time audio pipeline
- Basic effects (Gain, Distortion, Delay, Reverb)
- Real-time tuner
- Preset system
- Customizable effect order
- Modulation effects (Chorus, Flanger, Phaser)
- Advanced controls (dry/wet mix, distortion types)
- Multi-screen interface with navigation
- 3-band Equalizer (EQ)
- Compressor with advanced controls
- Informative tooltips system
- Quick parameter reset
- Export/import presets
- Favorites system
- Visual effect chain representation
- Oversampling for better quality
- Background processing with ForegroundService
- Persistent notification with quick controls
- Robust permission management
- Automatic state recovery
- Pipeline system with automatic recovery
- Latency adjustment: Choose between lower latency or greater stability
- MIDI Learn for external control
- Automation system: Record and playback parameter changes
- Metronome (UI + basic C++ integration)
- Looper (UI + basic C++ integration)
- Recorder (UI ready, basic functionality)
- Metronome improvements (animations, visualization)
- Looper improvements (timer, duration visualization)
- Complete recorder functionality
- Complete automation persistence (save/load)
- Automation editing interface
- Automation synchronization with metronome
- Customizable response curves
- Interface improvements (animations, transitions)
- Support for different sample rates
- Integration with external DAWs
This project is open source. Feel free to contribute!
- Code style: Follow Android and C++ best practices
- Testing: Test on multiple devices and Android versions
- Documentation: Update documentation for new features
- Performance: Consider audio latency and CPU usage
- Compatibility: Ensure backward compatibility
For comprehensive information about the modern architecture:
- MVP Architecture - Complete guide to MVP implementation
- Testing Strategy - Testing approach and examples
- Layout Guidelines - Responsive design standards
- Refactoring Summary - Overview of all improvements
- Architecture - Technical architecture details
Transform your Android into a professional pedalboard with real-time audio processing!
- Documentation: This Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [thiagorech.1997@gmail.com]
Built with β€οΈ by Thiago Fernando Rech
- Architecture
- MVP Architecture π
- Testing Strategy π
- Layout Guidelines π
- Development
- Refactoring Summary π
- Documentation Updates
Quick Links: