Giter VIP home page Giter VIP logo

jacksharp's People

Contributors

residuum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jacksharp's Issues

Process Audio

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:
image 1

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!

Rerouting audio output of some applications

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?

MIDI-In not working correctly.

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.