midi

Introduction to Web MIDI

旧街凉风 提交于 2020-01-03 09:00:23
获得midi设备 navigator.requestMIDIAccess if ( navigator . requestMIDIAccess ) { console . log ( 'Browser supports MIDI!' ) ; } if ( navigator . requestMIDIAccess ) { navigator . requestMIDIAccess ( ) . then ( success , failure ) ; } navigator.requestMIDIAccess() returns a promise, function success ( midi ) { console . log ( 'Got midi!' , midi ) ; } function failure ( ) { console . error ( 'No access to your midi devices.' ) } success function takes a MIDI parameter in the form of a MIDIAccess object. MIDIAccess object is the key to receiving midi data. Inputs represent any MIDI devices you have

Java send midi message to device

烂漫一生 提交于 2020-01-02 12:20:37
问题 I have an APC40 MkII connected to a raspberry pi. On the pi, I have java running. With the java.sound.midi package, I can establish a connection to the APC and receive its midi messages without a problem. But after a lot of research I somehow still don't get how I can send midi messages to the APC. Here is the code I have so far: package lightorgansandbox; import javax.sound.midi.*; import java.util.List; public class MidiHandler { public MidiHandler() { MidiDevice device; MidiDevice.Info[]

Browsers in 2013 with Web MIDI API?

爱⌒轻易说出口 提交于 2020-01-02 10:30:14
问题 Does anybody knows if there's a browser whith Web MIDI support? ... I've tried the samples on http://webaudio.github.io/web-midi-api/ but they throw me an error that my navigator has not such properties. Im working on google-chrome and firefox. If, there's no browsers that support MIDI, when do u estimate we will have one, maybe in the next 2 years? 回答1: According to this posting (dated June 28th 2013), "initial experimental support" for Web MIDI is now available in Chrome Canary. 回答2: As of

Soundfonts on Android

社会主义新天地 提交于 2020-01-02 07:28:27
问题 I'm having trouble figuring out how to use soundfonts on android (that have a .sf2 extension). I looked into JET Creator but it seems really complicated for simply playing soundfonts. I don't need to have interactive music as provided by JET, I just need to be able to play different notes of the soundfont on command when necessary. Any advice/suggestions? 回答1: This is not possible. You can playback midi files with mediaplayer, but you'll have to generate them yourselves, and you cannot supply

Reading piano notes on Python

£可爱£侵袭症+ 提交于 2020-01-02 04:34:30
问题 I'd like to listen to the port having my midi output device (a piano) with my RPi, running on Debian. I've looked into pygame.midi, I managed to listen to the port, but somehow can not extract all midi information. Please find code below [edited code snippet] EDIT: Fixed, thanks a lot! 回答1: First of all you need to find out which device-id your keyboard has inside pygame. I wrote this little function to find out: import pygame.midi def print_devices(): for n in range(pygame.midi.get_count()):

Generating a FileDescriptor on Android without first opening a file

◇◆丶佛笑我妖孽 提交于 2020-01-01 16:23:31
问题 In Android, is it possible to generate a FileDescriptor directly from a byte array, without having to open a file first? In Android 2.2, I am generating a MIDI file on the fly, and then playing it back using MediaPlayer. I've included the text of the Main.java file that does this successfully below. So far so good. However, this process first calls... FileOutputStream outputStream = openFileOutput(file, MODE_PRIVATE); outputStream.write(byteStream); outputStream.close(); ... to write out the

C++ Undefined reference to MIDI function

こ雲淡風輕ζ 提交于 2019-12-31 07:34:06
问题 I simply want to print the amount of connected MIDI inputs. What in the world am I doing wrong? Using Code::Blocks and GNU GCC Compiler. #include <windows.h> #include <mmsystem.h> #include <stdio.h> int main() { printf("%d", midiInGetNumDevs()); return 0; } I get undefined reference to `midiInGetNumDevs@0' upon compiling. midiInGetNumDevs 回答1: You need to link with with winmm.lib . In Visual Studio, you do this by adding it to the Additional Dependencies in your project properties. Right

What's the method to control volume in an MIDI sequencer?

别等时光非礼了梦想. 提交于 2019-12-30 10:43:21
问题 Can someone show me how to control the volume of an MIDI sequencer without using a sound bank or synthesizer? I want to make the MIDI fade out before continuing to the next MIDI in sequence if(midiplay) { midi = s + savereq; try { //System.out.println("Play MIDI " + midi); if (musicSr != null) { /* This is where I want it to fade out*/ musicSr.stop(); //stop sequencer musicSr.close(); //close sequencer } musicSr = null; musicS = null; File music = new File(midi); if(music.exists()) { musicS =

What's the method to control volume in an MIDI sequencer?

我的梦境 提交于 2019-12-30 10:42:28
问题 Can someone show me how to control the volume of an MIDI sequencer without using a sound bank or synthesizer? I want to make the MIDI fade out before continuing to the next MIDI in sequence if(midiplay) { midi = s + savereq; try { //System.out.println("Play MIDI " + midi); if (musicSr != null) { /* This is where I want it to fade out*/ musicSr.stop(); //stop sequencer musicSr.close(); //close sequencer } musicSr = null; musicS = null; File music = new File(midi); if(music.exists()) { musicS =

How would I go about programmatically interacting with VST(i) Plugins to synthesize audio?

老子叫甜甜 提交于 2019-12-30 02:13:05
问题 Take, for example, the VSTi Triforce, by Tweakbench. When loaded up in any VST host on the market, it allows the host to send a (presumably MIDI) signal to the VSTi. The VSTi will then process that signal and output synthesized audio as created by a software instrument within the VSTi. For example, sending an A4 (MIDI note, I believe) to the VSTi will cause it to synthesize the A above Middle C. It sends the audio data back to the VST Host, which then could either play it on my speakers or