C# - Change volume using external Midi controller -


in app use midi-dot-net noteon messages , naudio play audio samples / notes. in naudio i'm using asio implementation lower latency , works perfectly. have problem controlling volume. before used asio engine able controll volume way (some part of code):

    private void...()     {     int newvolume = ((ushort.maxvalue / 50) * trackwave.value);     uint newvolumeallchannels = (((uint)newvolume & 0x0000ffff) | ((uint)newvolume << 16));     waveoutsetvolume(intptr.zero, newvolumeallchannels);     volumen.text = trackwave.value.tostring();     } 

when i'm using asio implementation in naudio it's not working, can mute sounds, can't change volume.

do know how can controll volume use of volume slider placed in external midi controller? somehow works when testing steinberg or synthogy or other audio software producers asio drivers.

thank help.

with asio change volume modifying level of samples send device. there isn't concept of device volume. include volumesampleprovider or similar in signal chain, , set volume on that


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -