Skip to content

tomassasovsky/loopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

297 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loopy

coverage style: very good analysis License: GPL v3

Generated by the Very Good CLI 🤖

Loopy — a cross-platform desktop loopstation with a native low-latency audio engine

It can be driven hands-free from a USB MIDI foot controller — see docs/MIDI_FOOT_CONTROLLER.md.


Getting Started 🚀

This project contains 3 flavors:

  • development
  • staging
  • production

To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:

# Development
$ flutter run --flavor development --target lib/main_development.dart

# Staging
$ flutter run --flavor staging --target lib/main_staging.dart

# Production
$ flutter run --flavor production --target lib/main_production.dart

*Loopy runs natively on macOS, Windows, and Linux.

On desktop, flavors select the entrypoint via --target; --flavor only namespaces the build-output directory (there is no per-flavor app identity). Pass the matching --target lib/main_<flavor>.dart as shown above.

Linux notes (PipeWire backend, Focusrite/scarlett2 routing, renderer): see docs/RUNNING_ON_LINUX.md.


Running Tests 🧪

To run all unit and widget tests use the following command:

$ very_good test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

Bloc Lints 🔍

This project uses the bloc_lint package to enforce best practices using bloc.

To validate linter errors, run

dart run bloc_tools:bloc lint .

You can also validate with VSCode-based IDEs using the official bloc extension.

To learn more, visit https://bloclibrary.dev/lint/


Working with Translations 🌐

This project follows the official internationalization guide for Flutter using ARB files for translations.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb and add a new key/value pair with the relevant description (optional):
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World greeting."
    }
}
  1. Use the new string:
import 'package:loopy/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.helloWorld);
}

Adding Supported Locales

Update the CFBundleLocalizations array in the Info.plist at ios/Runner/Info.plist to include the new locale.

    ...

    <key>CFBundleLocalizations</key>
	<array>
		<string>en</string>
		<string>es</string>
	</array>

    ...

Adding Translations

  1. For each supported locale, add a new ARB file in lib/l10n/arb:
├── l10n
│   ├── arb
│   │   ├── app_en.arb
│   │   └── app_es.arb
  1. Add the translated strings to the new .arb file:

app_es.arb

{
    "@@locale": "es",
    "counterAppBarTitle": "Contador",
    "@counterAppBarTitle": {
        "description": "Texto mostrado en la AppBar de la página del contador"
    },
    "helloWorld": "Hola Mundo",
    "@helloWorld": {
        "description": "Saludo Hola Mundo."
    }    
}

Generating Translations

To use the latest translations changes, you will need to generate them:

flutter gen-l10n --arb-dir="lib/l10n/arb"

Alternatively, run flutter run and code generation will take place automatically.

About

Loopy — a cross-platform desktop loopstation with a native low-latency miniaudio audio engine (Flutter + Dart FFI)

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors