Added mozart and a project

This commit is contained in:
2025-08-11 13:51:04 +02:00
committed by personal name
commit 47305404a8
1130 changed files with 8175 additions and 0 deletions

34
SoundHandler.cs Normal file
View File

@@ -0,0 +1,34 @@
using System.Diagnostics;
namespace Mozart
{
public class SoundHandler
{
public async Task PlayAudioAsync(string path)
{
var process = Process.Start("paplay", path);
await process.WaitForExitAsync();
}
public string getPath(Instrument instrument, SoundType type, int i, int s)
{
var currentDirectory = Directory.GetCurrentDirectory();
var path = Path.Join(currentDirectory, "Data", instrument.ToString(), type.ToString() + i + "-" + s + ".wav");
return path;
}
}
public enum Instrument
{
clarinet,
flute_harp,
mbira,
piano
}
public enum SoundType {
minuet,
trio
}
}