residuum / jacksharp Goto Github PK
View Code? Open in Web Editor NEWC# bindings for Jackd
License: Other
C# bindings for Jackd
License: Other
Hi, thank for this project.
My idea is get sound of the micro of my computer, distortion it and send the distortion sound to the output (Speaker).
This is my code:
private Jack.CSCore.AudioIn _soundIn;
private Jack.CSCore.AudioOut _soundOut;
private JackSharp.Processor _client;
CSCore.Streams.Effects.DmoDistortionEffect _distortionEffect;
private CSCore.Streams.SoundInSource _source;
private void StartProcess()
{
try
{
_client = new JackSharp.Processor("TESTING", 2, 2, 0, 0, true);
_soundIn = new Jack.CSCore.AudioIn(_client);
_soundIn.Initialize();
_source = new CSCore.Streams.SoundInSource(_soundIn);
_distortionEffect = new CSCore.Streams.Effects.DmoDistortionEffect(_source);
_distortionEffect.Edge = 10;
_distortionEffect.PreLowpassCutoff = 4800;
_soundOut = new Jack.CSCore.AudioOut(_client);
_soundOut.Initialize(_distortionEffect);
_client.Start();
_soundOut.Play();
}
catch (Exception ex)
{
Console.WriteLine("Exception in StartProcess: " + ex.Message);
}
}
private void StopFullDuplex()
{
if (_client != null)
{
_client.Stop();
_client.Dispose();
}
if (_soundOut != null) _soundOut.Dispose();
if (_soundIn != null) _soundIn.Dispose();
}
These are the JAckAudio connections:
This code don't work. I don't listen the micro by the Blackwire (headphones) output.
Only listen the sound by the output if I add the event CopyInToOut to the Processor (without distortion)
JackSharpTest.Dummies.ClientReceiver receiver = new JackSharpTest.Dummies.ClientReceiver();
_client.ProcessFunc += receiver.CopyInToOutAction;
void CopyInToOut (ProcessBuffer processItems)
{
for (int i = 0; i < Math.Min (processItems.AudioIn.Length, processItems.AudioOut.Length); i++) {
Array.Copy (processItems.AudioIn [i].Audio, processItems.AudioOut [i].Audio, processItems.AudioIn [i].BufferSize);
}
Called++;
}
How must I process the sound through CSCore for distorsion the input and send the result to the output of the 'TESTING' JackSharp.Processor?
Thanks!
I would like to reroute output of some applications to selected device. For example the output from game to headphones, output from browser to loudspeakers, etc. How I can realize that idea, and this possible with this library or not?
Bug reported via email:
Hi,
is MIDI-in working with JackSharp? I'm trying to just receive MIDI
from my controller. I receive events, but they don't contain any data.
Here is what I do:
foreach (MidiEventCollection<MidiInEvent> eventCollection in items.MidiIn)
{
foreach (MidiInEvent midiEvent in eventCollection)
{
if (midiEvent.MidiData.Length > 0)
{
Console.WriteLine ("Hurray!");
}
Console.WriteLine( BitConverter.ToString (midiEvent.MidiData) );
}
}
midiEvent.MidiData
is always empty (and 0 bytes long).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.