midi

How to generate a real bass guitar sound either in C/C++ or Java?

﹥>﹥吖頭↗ 提交于 2019-12-11 08:09:01
问题 I been doing an extensive research in the internet because I need a way to generate real bass sound (like an electric bass guitar) from a program. The thing is Ive been looking in MIDI ways to produce that sound, but Im not sure if thats the right thing to do, actually I have little knwoledge about this subject, is my first trying anything related to produce sound from raw coding. I been looking into different APIs to help me, most of them open source to see what are the doing, but I found

How to connect to ALSA server (in this case, Timidity) in Ubuntu using C++?

给你一囗甜甜゛ 提交于 2019-12-11 07:34:20
问题 I am trying to use MIDI under Linux Ubuntu with C++. After a day of using several tools (e.g., JACK) with no success (JACK lags like mad on my machine), I am now trying to use Timidity as the MIDI server. However, I am not able to find any references on the web about how to programmatically connect to Timidity using C++. Is there anyway to do this? Thanks for any suggestions! Notes: I've tried search google with the following: alsa server connect timidity connect program But no answer. 回答1:

How do I define a MIDINotifyProc in Swift?

会有一股神秘感。 提交于 2019-12-11 07:11:00
问题 I'm trying to get MIDI sessions working with swift code and am running into issues with some of the delegates. This is a working example in Objective-C . OSStatus status = MIDIClientCreate(CFSTR("MIDI Client"), MIDIStateChangedHandler, nil, &client); void MIDIStateChangedHandler(const MIDINotification *message, void *refCon) { NSLog(@"MIDIStateChanged!"); } This is what I'm trying with Swift : var status = MIDIClientCreate("the client", notifyProc: MIDIStateChangedHandler, notifyRefCon: nil,

How can I parse a tempo of midi using Java?

对着背影说爱祢 提交于 2019-12-11 06:45:29
问题 I do not understand how to catch tempo. So still use some shitty way to use tempo to my output. I really thinks that just using NOTE_ON & NOTE_OFF timings will give me real time. But this output still played too slow in C++. P.S. We use only ONE VOICE midis when playing that. (It's just for fun, some computers in our class room is playing some 2+ VOICE music synchronized). Here is my code: import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java

Dynamically updating MIDI sequences

依然范特西╮ 提交于 2019-12-11 06:41:56
问题 I have a program which dynamically creates sequences of midi events after some user input, and does that while looping the currently played sequence. It's written in scala and I'm using the java library javax.sound.midi.* Now the algorithm works as follows: create sequencer; build sequence; set sequence start the sequencer; build new sequence; when the finish event is triggered by the sequencer execute from 3 the problem with this approach is that there is a delay between two sequences, while

MusicSequenceFileLoad Returns -1 on iOS10 (AudioToolbox/MusicPlayer)

时光怂恿深爱的人放手 提交于 2019-12-11 05:54:49
问题 UPDATE 10/9/2016: I had opened up Radar #28425770 with Apple on 9/22/2016 for the following defect and they have just marked is as a duplicate (of Radar #28327056), so this appears to be a known bug within iOS10. I've encountered an error invoking the AudioToolbox / MusicPlayer API method "MusicSequenceFileLoad()" to load the contents of a MIDI file (from the given URL) into a music sequence on an iOS10 iPad Pro (wifi model) and would greatly appreciate some assistance from the community in

MidiSystem.getReceiver() freezes up JFrame

强颜欢笑 提交于 2019-12-11 05:31:52
问题 I'm making a program that involves playing MIDI sounds, and just today I encountered a problem where calling MidiSystem.getReceiver() or opening up a MidiDevice , totally prevents me from making a frame show up on the screen. And then if I try to terminate everything while everything is frozen up, Eclipse tells me that "terminate failed". Here's some sample code to show you what I mean: public static void main(String args[]) { Receiver receiver; try { receiver = MidiSystem.getReceiver(); }

select midi device in java

空扰寡人 提交于 2019-12-11 04:29:42
问题 In my program it is necessary to be able to select the midi device in java. I have tried using another sequencer that i got from MidiSystem.getDevice() . Simply using setSequence() and starting the sequencer were without success however (i.e no sound). I'm guessing that I somehow need to connect a Sequencer with a Synthesizer. How can I do this properly? 来源: https://stackoverflow.com/questions/7507046/select-midi-device-in-java

Why can't I play the MIDI files I have downloaded programmatically, but I can play them when I download them manually?

試著忘記壹切 提交于 2019-12-11 04:27:55
问题 I want to download the MIDI files from this website for a project. I have written the following code to download the files: from bs4 import BeautifulSoup import requests import re, os import urllib.request import string base_url = "http://www.midiworld.com/files/" base_path = 'path/where/I/will/save/the/downloaded/MIDI/files' os.chdir(base_path + '/MIDI Files') for i in range(1,2386): page = requests.get(base_url + str(i)) soup = BeautifulSoup(page.text, "html.parser") li_box = soup.select(

Error Code Returned when using Midi Sequencer

我的梦境 提交于 2019-12-11 01:49:46
问题 I have been playing with the Midi Sequencer and doing an exercise involving repainting squares on a panel in random colors, shapes, and locations based on the beat of the music using a ControlEventListener. When I do this on my laptop, everything works just fine. However, when I do this on my PC, I get this error: Aug 07, 2013 1:10:11 PM java.util.prefs.WindowsPreferences <init> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(.