Flutter,如何操作乐谱包?

问题描述

如何使音乐音阶变小或变大?

如何在音阶上实现一个以上的音符?

我已经尝试过这个库并且我能够将它绘制在屏幕上(这实际上是在底部示例代码中完成的),我能够更改正在显示的笔记,但我无法拥有更多显示超过 1 个音符并且既不使音乐音阶变小,也尝试将其包装在容器中,尽管当我将容器变小时,它会切掉部分音阶而不是音阶变小。

这是包中的原始示例代码

import 'package:Flutter/material.dart';
import 'package:sheet_music/sheet_music.dart'; 
import 'dart:io' show Platform; 
import 'package:Flutter/foundation.dart'; 

// The existing imports // !! Keep your existing impots here !! /// main is entry point of Flutter application 
void main() { 
  // Desktop platforms aren't a valid platform.
  _setTargetPlatformForDesktop(); 
  return runApp(MyApp()); 
} 

/// If the current platform is desktop,override the default platform to /// a supported platform (iOS for macOS,Android for Linux and Windows). /// Otherwise,do nothing. 
void _setTargetPlatformForDesktop() {
  TargetPlatform targetPlatform; 
  if (Platform.isMacOS) {
    targetPlatform = TargetPlatform.iOS; 
  } else if (Platform.isLinux || Platform.isWindows) { 
    targetPlatform = TargetPlatform.android; 
  } 
  if (targetPlatform != null) { 
    debugDefaultTargetPlatformOverride = targetPlatform; } 
} 

class MyApp extends StatefulWidget { 
  @override _MyAppState createState() => _MyAppState();
} 

class _MyAppState extends State<MyApp> {
  @override Widget build(BuildContext context) { 
    return MaterialApp(
      home: SheetMusic( scale: "C Major",pitch: "C4",trebleClef: true,),); 
  } 
}

我还在 dart 包中找到了 tonic 包,它的自述文件说 "元数据

表示和处理音乐理论概念的类和方法:音高、音高类、音程、音阶、和弦。”

有谁知道这个包可以用来在屏幕上绘制音阶和音符吗?

https://pub.dev/packages/tonic/example

谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)