Skip to content

Commit

Permalink
Filtro volume corretto.
Browse files Browse the repository at this point in the history
  • Loading branch information
gpicchiarelli committed Dec 9, 2023
1 parent ed63604 commit cf9c5e8
Show file tree
Hide file tree
Showing 49 changed files with 245 additions and 5 deletions.
4 changes: 2 additions & 2 deletions AccordaGUItar/Audio/Audio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Audio
public event EventHandler<double> SmoothedFrequencyDetected;

// Aggiunto un threshold per il volume minimo rilevabile
private double volumeThreshold = 0.01;
private double volumeThreshold = 0.09;

public Audio(int InputDeviceSelector = 0)
{
Expand Down Expand Up @@ -74,7 +74,7 @@ private void WaveIn_DataAvailable(object sender, WaveInEventArgs e)
if (maxVolume > volumeThreshold)
{
double frequency = CalculateFrequencyFromFFT(buffer);
float cutoffFrequency = (float)(frequency * 0.1); // filtraggio
float cutoffFrequency = (float)(frequency * 0.2); // filtraggio

BiQuadFilter filter = BiQuadFilter.LowPassFilter(sampleRate, cutoffFrequency, 1.0f);
for (int i = 0; i < buffer.Length; i++)
Expand Down
Binary file modified AccordaGUItar/bin/Debug/net8.0-windows7.0/AccordaGUItar.dll
Binary file not shown.
Binary file modified AccordaGUItar/bin/Debug/net8.0-windows7.0/AccordaGUItar.exe
Binary file not shown.
Binary file modified AccordaGUItar/bin/Debug/net8.0-windows7.0/AccordaGUItar.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a5b0afa996f9d6fd92a26721a655b961e2a972fd")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f6c159f84f48ccd128d34d7a4c8dd965aad2c28ec03fcf678bcca14bc05789b9
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Binary file modified AccordaGUItar/obj/Debug/net8.0-windows7.0/AccordaGUItar.dll
Binary file not shown.
Binary file modified AccordaGUItar/obj/Debug/net8.0-windows7.0/AccordaGUItar.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/a5b0afa996f9d6fd92a26721a655b961e2a972fd/*"}}
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]

// Generato dalla classe WriteCodeFragment di MSBuild.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows7.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AccordaGUItar_bqp2cr3i_wpftmp
build_property.ProjectDir = C:\Users\Giacomo\source\repos\accorda\AccordaGUItar\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]

// Generato dalla classe WriteCodeFragment di MSBuild.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows7.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AccordaGUItar_luc3bo14_wpftmp
build_property.ProjectDir = C:\Users\Giacomo\source\repos\accorda\AccordaGUItar\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]

// Generato dalla classe WriteCodeFragment di MSBuild.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows7.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AccordaGUItar_n2e0aqba_wpftmp
build_property.ProjectDir = C:\Users\Giacomo\source\repos\accorda\AccordaGUItar\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]

// Generato dalla classe WriteCodeFragment di MSBuild.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows7.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AccordaGUItar_qfq2dktf_wpftmp
build_property.ProjectDir = C:\Users\Giacomo\source\repos\accorda\AccordaGUItar\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]

// Generato dalla classe WriteCodeFragment di MSBuild.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows7.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AccordaGUItar_qr2kmjk1_wpftmp
build_property.ProjectDir = C:\Users\Giacomo\source\repos\accorda\AccordaGUItar\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed6360404f3dbaba83122707d74cc7216c16717d")]
[assembly: System.Reflection.AssemblyProductAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyTitleAttribute("AccordaGUItar")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]

// Generato dalla classe WriteCodeFragment di MSBuild.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f33de6d99c94549a03bb9bc92b590a7c52d394a610b21aedca9d02105e6eb23
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0-windows7.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AccordaGUItar_wglhuu3p_wpftmp
build_property.ProjectDir = C:\Users\Giacomo\source\repos\accorda\AccordaGUItar\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Users\\Giacomo\\source\\repos\\accorda\\*":"https://raw.githubusercontent.com/gpicchiarelli/accorda/ed6360404f3dbaba83122707d74cc7216c16717d/*"}}
Binary file modified AccordaGUItar/obj/Debug/net8.0-windows7.0/apphost.exe
Binary file not shown.
Binary file modified AccordaGUItar/obj/Debug/net8.0-windows7.0/ref/AccordaGUItar.dll
Binary file not shown.
Binary file not shown.
Binary file modified accorda.net/.vs/Accorda/v17/.suo
Binary file not shown.

0 comments on commit cf9c5e8

Please sign in to comment.