midizap | Control your multimedia applications with MIDI | Audio Utils library

 by   agraef C Version: Current License: GPL-3.0

kandi X-RAY | midizap Summary

kandi X-RAY | midizap Summary

midizap is a C library typically used in Audio, Audio Utils, Arduino applications. midizap has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

midizap lets you control your multimedia applications using MIDI, the venerable "Musical Instrument Digital Interface" protocol which has been around since the 1980s. Modern MIDI controllers are usually USB class devices which don't require any special interface or driver, and they are often much cheaper than more specialized gear. With midizap you can leverage these devices to control just about any X11-based application. To these ends, it translates Jack MIDI input into X keyboard and mouse events, and optionally MIDI output. It does this by matching the class and title of the focused window against the regular expressions for each application section in its configuration (midizaprc) file. If a regex matches, the corresponding set of translations is used. If a matching section cannot be found, or if it doesn't define a suitable translation, the program falls back to a set of default translations. The midizaprc file is just an ordinary text file which you can edit to configure the program. The configuration language is fairly straightforward, basically the file is just a list of MIDI messages (denoted with familiar human-readable mnemonics, no hex numbers!) and their translations. An example.midizaprc file is included in the sources to get you started, and you can find more examples of configuration files for various purposes in the examples subdirectory. Even if your target application already supports MIDI, midizap's MIDI output option will be useful if your controller can't work directly with the application because of protocol incompatibilities. In particular, you can use midizap to turn any MIDI controller with enough faders and buttons into a Mackie-compatible device ready to be used with most DAW (digital audio workstation) programs. Another common use case is photo and video editing software. This kind of software often lacks built-in MIDI support, and midizap can then be used to map the faders, encoders and buttons of your MIDI controller to keyboard commands for adjusting colors, cutting, marking, playback, scrolling, zooming, etc. In other words, as long as the target application can be controlled with simple keyboard shortcuts and/or MIDI commands, chances are that midizap can make it work (at least to some extent) with your controller.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              midizap has a low active ecosystem.
              It has 14 star(s) with 1 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of midizap is current.

            kandi-Quality Quality

              midizap has 0 bugs and 0 code smells.

            kandi-Security Security

              midizap has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              midizap code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              midizap is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              midizap releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of midizap
            Get all kandi verified functions for this library.

            midizap Key Features

            No Key Features are available at this moment for midizap.

            midizap Examples and Code Snippets

            No Code Snippets are available at this moment for midizap.

            Community Discussions

            QUESTION

            How to get a smaller piece of audio from larger audio captured with browser's Web Audio Api
            Asked 2022-Mar-22 at 12:33

            I'm making a speech-to-text tool. I'm capturing audio in real time (using Web audio api from Chrome) and sending it to a server to convert the audio to text.

            I'd like to extract pieces of the whole audio cause I only want to send sentences, avoiding silences. (cause the api I use has a cost). The problem is that I don't know how to convert the whole audio into pieces.

            I was using MediaRecorder to capture the audio

            ...

            ANSWER

            Answered 2022-Mar-22 at 12:33

            I've found the answer to my own question, I was using the wrong approach.

            What I need to use to get the raw audio inputs and be able to manipulate them is the AudioWorkletProcessor.

            This video helped me to understand the theory behind:

            https://www.youtube.com/watch?v=g1L4O1smMC0

            And this article helped me understand how to make use of it: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_AudioWorklet

            Source https://stackoverflow.com/questions/71470785

            QUESTION

            Audio widget within Jupyter notebook is **not** playing. How can I get the widget to play the audio?
            Asked 2022-Mar-15 at 00:07

            I writing my code within a Jupyter notebook in VS Code. I am hoping to play some of the audio within my data set. However, when I execute the cell, the console reports no errors, produces the widget, but the widget displays 0:00 / 0:00 (see below), indicating there is no sound to play.

            Below, I have listed two ways to reproduce the error.

            1. I have acquired data from the hub data store. Looking specifically at the spoken MNIST data set, I cannot get the data from the audio tensor to play
            ...

            ANSWER

            Answered 2022-Mar-15 at 00:07

            Apologies for the late reply! In the future, please tag the questions with activeloop so it's easier to sort through (or hit us up directly in community slack -> slack.activeloop.ai).

            Regarding the Free Spoken Digit Dataset, I managed to track the error with your usage of activeloop hub and audio display.

            adding [:,0] to 9th line will help fixing display on Colab as Audio expects one-dimensional data

            Source https://stackoverflow.com/questions/71200390

            QUESTION

            FIXED Trying to Pause/Play MP3 file in HTML
            Asked 2022-Mar-10 at 21:03

            Hoping to have two buttons, one to "Pause" one to "Play" the MP3 audio file. Buttons show but do not pause/play the audio, Aswell as the audio does not play whatsoever. Here's my code I'm using. Thanks.

            HTML

            ...

            ANSWER

            Answered 2022-Mar-09 at 21:52

            have you tried using javascript for audio? such as

            Source https://stackoverflow.com/questions/71416299

            QUESTION

            Download audio file from html with javascript function
            Asked 2022-Feb-24 at 21:25

            I'm trying to download an mp3 file on the click of a button, it downloads, but the file it downloads is not correct, it's a WAY smaller file than the original one (25 bytes), while the original one is 10MB.

            It's my first time working with downloading stuff so I'm pretty clueless.

            Here's some code:

            JS function:

            ...

            ANSWER

            Answered 2022-Feb-24 at 18:15

            You can try this. Here you have to provide audio file source instead of image source. I did not try this code, But i assure you to it should work!

            https://www.codegrepper.com/code-examples/javascript/javascript+download+image+from+url

            Source https://stackoverflow.com/questions/71256246

            QUESTION

            Result from audio FFT function makes it near impossible to inspect low/mid frequencies
            Asked 2022-Feb-17 at 17:32

            I am trying to build a graphical audio spectrum analyzer on Linux. I run an FFT function on each buffer of PCM samples/frames fed to the audio hardware so I can see which frequencies are the most prevalent in the audio output. Everything works, except the results from the FFT function only allocate a few array elements (bins) to the lower and mid frequencies. I understand that audio is logarithmic, and the FFT works with linear data. But with so little allocation to low/mid frequencies, I'm not sure how I can separate things cleanly to show the frequency distribution graphically. I have tried with window sizes of 256 up to 1024 bytes, and while the larger windows give more resolution in the low/mid range, it's still not that much. I am also applying a Hann function to each chunk of data to smooth out the window boundaries.

            For example, I test using a mono audio file that plays tones at 120, 440, 1000, 5000, 15000 and 20000 Hz. These should be somewhat evenly distributed throughout the spectrum when interpreting them logarithmically. However, since FFTW works linearly, with a 256 element or 1024 element array only about 10% of the return array actually holds values up to about 5 kHz. The remainder of the array from FFTW contains frequencies above 10-15 kHz.

            Here's roughly the result I'm after:

            But this is what I'm actually getting:

            Again, I understand this is probably working as designed, but I still need a way to get more resolution in the bottom and mids so I can separate the frequencies better.

            What can I do to make this work?

            ...

            ANSWER

            Answered 2022-Feb-17 at 11:22

            What you are seeing is indeed the expected outcome of an FFT (Fourier Transform). The logarithmic f-axis that you're expecting is achieved by the Constant-Q transform.

            Now, the implementation of the Constant-Q transform is non-trivial. The Fourier Transform has become popular precisely because there is a fast implementation (the FFT). In practice, the constant-Q transform is often implemented by using an FFT, and combining multiple high-frequency bins. This discards resolution in the higher bins; it doesn't give you more resolution in the lower bins.

            To get more frequency resolution in the lower bins of the FFT, just use a longer window. But if you also want to keep the time resolution, you'll have to use a hop size that's smaller than the window size. In other words, your FFT windows will overlap.

            Source https://stackoverflow.com/questions/71155035

            QUESTION

            Play multiple tracks
            Asked 2022-Feb-08 at 18:30

            I'm trying to use the tag, and I want to have as many tracks playing as I add. But in the end, the very first track plays in a circle. How can this be fixed?

            ...

            ANSWER

            Answered 2022-Feb-08 at 12:49
            • Add a skip button
            • when clicked, call a skip function that will
              • pause if there is something playing then
              • clear the playing/paused class clist
              • increment the current to the next track
              • then play

            Source https://stackoverflow.com/questions/70957447

            QUESTION

            A problem with sound producing: How to make sound with Fourier coefficients
            Asked 2022-Feb-04 at 23:39

            I'm trying to create a sound using Fourier coefficients.

            First of all please let me show how I got Fourier coefficients.

            (1) I took a snapshot of a waveform from a microphone sound.

            • Getting microphone: getUserMedia()
            • Getting microphone sound: MediaStreamAudioSourceNode
            • Getting waveform data: AnalyserNode.getByteTimeDomainData()

            The data looks like the below: (I stringified Uint8Array, which is the return value of getByteTimeDomainData(), and added length property in order to change this object to Array later)

            ...

            ANSWER

            Answered 2022-Feb-04 at 23:39

            In golang I have taken an array ARR1 which represents a time series ( could be audio or in my case an image ) where each element of this time domain array is a floating point value which represents the height of the raw audio curve as it wobbles ... I then fed this floating point array into a FFT call which returned a new array ARR2 by definition in the frequency domain where each element of this array is a single complex number where both the real and the imaginary parts are floating points ... when I then fed this array into an inverse FFT call ( IFFT ) it gave back a floating point array ARR3 in the time domain ... to a first approximation ARR3 matched ARR1 ... needless to say if I then took ARR3 and fed it into a FFT call its output ARR4 would match ARR2 ... essentially you have this time_domain_array --> FFT call -> frequency_domain_array --> InverseFFT call -> time_domain_array ... rinse N repeat

            I know Web Audio API has a FFT call ... do not know whether it has an IFFT api call however if no IFFT ( inverse FFT ) you can write your own such function here is how ... iterate across ARR2 and for each element calculate the magnitude of this frequency ( each element of ARR2 represents one frequency and in the literature you will see ARR2 referred to as the frequency bins which simply means each element of the array holds one complex number and as you iterate across the array each successive element represents a distinct frequency starting from element 0 to store frequency 0 and each subsequent array element will represent a frequency defined by adding incr_freq to the frequency of the prior array element )

            Each index of ARR2 represents a frequency where element 0 is the DC bias which is the zero offset bias of your input ARR1 curve if its centered about the zero crossing point this value is zero normally element 0 can be ignored ... the difference in frequency between each element of ARR2 is a constant frequency increment which can be calculated using

            Source https://stackoverflow.com/questions/70974735

            QUESTION

            Get Latency of Bluetooth Headphoners UWP C++
            Asked 2022-Jan-18 at 09:08

            I want to make sure the latency between my app and the bluetooth headphones is accounted for, but I have absolutely no idea how I can get this value. The closest thing I found was: BluetoothLEPreferredConnectionParameters.ConnectionLatency which is only available on Windows 11... Otherwise there isn't much to go on.

            Any help would be appreciated.

            Thanks, Peter

            ...

            ANSWER

            Answered 2022-Jan-18 at 09:08

            It's very difficult to get the exact latency because it is affected by many parameters - but you're on the right track by guessing that the connection parameters are a factor of this equation. I don't have much knowledge on UWP, but I can give you the general parameters that affect the speed/latency, and then you can check their availability in the API or even contact Windows technical team to see if these are supported.

            When you make a connection with a remote device, the following factors impact the speed/latency of the connection:-

            • Connection Interval: this specifies the interval at which the packets are sent during a connection. The lower the value, the higher the speed. The minimum value as per the Bluetooth spec is 7.5ms.
            • Slave Latency: this is the value you originally mentioned - it specifies the number of packets that can be missed before a connection is considered lost. A value of 0 means that you have the fastest most robust connection.
            • Connection PHY: this is the modulation on which the packets are sent. If both devices support 2MPHY, then the connection should be quicker.
            • Data Length/MTU Extension: these are two separate features but I am looping them together becuase the effect is the same - more bytes are sent per packet, which results in a higher throughput. The maximum value is 251 bytes per packet.

            You can find more information about these parameters here:-

            And below are some other links that might help you understand what is supported on UWP:-

            Source https://stackoverflow.com/questions/70742321

            QUESTION

            Loading Wave File but there is random nonsense at the end of the data rather than the expected samples
            Asked 2022-Jan-11 at 19:43

            I've got a simple wav header reader i found online a long time ago, i've gotten back round to using it but it seems to replace around 1200 samples towards the end of the data chunk with a single random repeated number, eg -126800. At the end of the sample is expected silence so the number should be zero.

            Here is the simple program:

            ...

            ANSWER

            Answered 2022-Jan-07 at 21:55

            WAV is just a container for different audio sample formats.

            You're making assumptions on a wav file that would have been OK on Windows 3.11 :) These don't hold in 2021.

            Instead of rolling your own Wav file reader, simply use one of the available libraries. I personally have good experiences using libsndfile, which has been around roughly forever, is very slim, can deal with all prevalent WAV file formats, and with a lot of other file formats as well, unless you disable that.

            This looks like a windows program (one notices by the fact you're using very WIN32API style capital struct names – that's a bit oldschool); so, you can download libsndfile's installer from the github releases and directly use it in your visual studio (another blind guess).

            Source https://stackoverflow.com/questions/70627117

            QUESTION

            How do i get the audio frequency from my mic using javascript?
            Asked 2022-Jan-01 at 12:37

            I need to create a sort of like guitar tuner.. thats recognize the sound frequencies and determines in witch chord i am actually playing. Its similar to this guitar tuner that i found online: https://musicjungle.com.br/afinador-online But i cant figure it out how it works because of the webpack files..I want to make this tool app backendless.. Someone have a clue about how to do this only in the front end?

            i founded some old pieces of code that doesnt work together.. i need fresh ideas

            ...

            ANSWER

            Answered 2021-Sep-21 at 01:29

            I suppose it'll depend how you're building your application. Hard to help without much detail around specs. Though, here are a few options for you.

            There are a few stream options, for example;

            Or if you're using React;

            Or if you're wanting to go real basic with some vanilla JS;

            Source https://stackoverflow.com/questions/69237143

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install midizap

            First, make sure that you have the required dependencies installed. The program needs a few X11 libraries and Jack. And of course you need GNU make and gcc (the GNU C compiler). On Ubuntu and other Debian-based systems you should be able to get everything that's needed by running this command:. Then just run make and sudo make install. This installs the example.midizaprc file as /etc/midizaprc, and the midizap program and the manual page in the default install location. Usually this will be under /usr/local, but the installation prefix can be changed with the prefix variable in the Makefile. Also, package maintainers can use the DESTDIR variable to install into a staging directory for packaging purposes. For users of the Emacs text editor we provide a midizap mode which does syntax-highlighting of midizaprc files and also lets you launch a midizap session in an Emacs buffer. If Emacs was found during installation, the midizap-mode.el file is installed into the share/emacs/site-lisp directory along with the other files. The Makefile tries to guess the proper installation prefix, but if necessary you can also set the elispdir variable or copy the file manually to a directory on your Emacs load-path. Please check midizap-mode.el for more detailed instructions.

            Support

            Some MIDI controllers need a more elaborate setup than what we've seen so far, because they have motor faders, LEDs, etc., requiring feedback from the application. To accommodate these, you can use the -o2 option of midizap, or the JACK_PORTS 2 directive in the midizaprc file, to create a second pair of MIDI input and output ports, named midi_in2 and midi_out2. Use of this option also activates a second MIDI default section in the midizaprc file, labeled [MIDI2], which is used exclusively for translating MIDI input from the second input port and sending the resulting MIDI output to the second output port. Typically, the translations in the [MIDI2] section will be the inverse of those in the [MIDI] section, or whatever it takes to translate the MIDI feedback from the application back to MIDI data which the controller understands. You then wire up midizap's midi_in and midi_out ports to controller and application as before, but in addition you also connect the application back to midizap's midi_in2 port, and the midi_out2 port to the controller. This reverse path is what is needed to translate the feedback from the application and send it back to the controller. (The -s option a.k.a.\ SYSTEM_PASSTHROUGH directive also works on the feedback port, passing through all system messages from the second input port to the second output port unchanged.). The distribution includes a full-blown example of this kind of setup for your perusal, please check examples/APCmini.midizaprc in the sources. It shows how to emulate a Mackie controller with AKAI's APCmini device, so that it readily works with DAW software such as Ardour.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/agraef/midizap.git

          • CLI

            gh repo clone agraef/midizap

          • sshUrl

            git@github.com:agraef/midizap.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Audio Utils Libraries

            howler.js

            by goldfire

            fingerprintjs

            by fingerprintjs

            Tone.js

            by Tonejs

            AudioKit

            by AudioKit

            sonic-pi

            by sonic-pi-net

            Try Top Libraries by agraef

            purr-data

            by agraefC

            pure-lang

            by agraefC++

            pd-lua

            by agraefHTML

            raptor

            by agraefC

            pd-jacktime

            by agraefC