I want to manually have a function that creates a MIDI file according to users demands, for example.
User write 2 patches that contain 8 bars of 4 quarters of A4 (Concert A - 440hz) and C4 (each as a seperated channel) on 120 speed, at velocity 100, instrument piano (01) and patch 49 or whatever.
How should the MIDI file look like according to the above.
My goal is to learn how to create a function that generates MIDI data, then write everything to a MIDI file.
So first I have to understand how to create this function or to understand 'MIDI-file language' so I can write it.
Thanks in advance.
Other good links on the MIDI file format can be found here:
(.mid) Standard MIDI File Format
The MIDI Technical Fanatic's Brainwashing Center (really nice resource)
Essentials of the MIDI protocol
From all the MIDI info I read recently, this seems to be the most comprehensive tutorial, in the other hand the following link is a good place to get started:
MIDI structure at the official MIDI website
Also, NAudio is a .NET library that works with MIDI files by Mark Heath.
I've also found this link very useful, I thought why not share it with people here.
I think this is the best .NET API for messing with MIDI files.
Just wanted to add that Somascape has a very comprehensive and well-laid out resource for MIDI file structure and MIDI protocol. (Check out the drop-down menu on their site for additional resource pages). It helped me a lot recently while writing a MIDI framework for Swift.
Related
I work with *.one files using [MS-ONE]: OneNote File Format, [MS-ONESTORE]: OneNote Revision Store File Format and I am stuck in parsing drawing elements.
I found several unknown JCID codes (0x00060014, 0x0002003b, 0x00020047, 0x00120048) and PropertyIds (0x00001daa, 0x00001d4f, 0x00003415, 0x00001d4e, 0x00003416, 0x00003409, 0x0000340b, 0x0000340a, etc) which are not described in the official specification. I was trying to find some accordance between these codes, their content and Ink Serialization Format, but almost any good results.
Maybe, someone could give some tips to direct me in a correct way of parsing OneNote drawings.
I have a problematic situation that I wish to expose you because it contains some opposites constraints. Maybe someone will have an idea on how to unlock my problem.
I'm going to make a mobile application with ActionScript 3 and Air for iOS and Android. This application has to download zip file which it uses to display text, bitmap and sound.
This last one is the problem.
After some research, one of the best way I found to check a zip file is FZip, but it allows us to get data from zip on a ByteArray form. And a Sound can't be converted from ByteArray. ( That's what a lots of results about it appear to say. )
One of the solution proposed is to put the ByteArray of a sound and put it in a SWF. Then take the SWF from the zip to get the Sound.
I can't do that because this zip will be uploaded from a admin interface used by anybody. I can't force them to use Flash.
I have few potential direction where I ask for your advices :
• Use Code or Native Extension ( iOS and Android ) to check a zip without files read in ByteArray
• Convert a ByteArray into Sound without have to pass it in a SWF
• Dynamicly create a SWF with the ByteArray of a Sound
• In the last possibility, another way to drag and download few files together which can be consulted in another format than ByteArray ( Like a iOS Bundle but with android too )
Thanks a lot to help me,
You can simply write the ByteArray on a local mp3 (or mp4) file and then play it, to write a ByteArray to file see documentation here.
Hi all I'm fairly new to handling voice / mic in AS3 but I am currently in a situation where I need to retrieve a voice input via the mic, and then I'd have to be able to get it as a FLAC audio format then POST it to our server.
Would be nice if I wouldn't need to write the binary FLAC data to a file before POSTing but if that's something unavoidable, I guess it's all okay.
I will be developing it for a Mac and a PC on the Adobe AIR platform. NOT FOR THE MOBILE (yet).
Thanks!
You can use this library. According to the authors, you can convert raw data (retrieved directly from micro, here, they use the term rawPCMByteArray - Pulse-code modulation), to .flac file.
I am trying to import data from past NFL games in the form of Play-by-play tables and am mostly working in R to collect the data and create a data set.
An example of the data I am after is on this page: http://www.nfl.com/gamecenter/2012020500/2011/POST22/giants#patriots#menu=gameinfo&tab=analyze&analyze=playbyplay
I know that NFL.com uses JSON and much of the necessary data are in JSON files attached to the site. My efforts at extracting data from these files using the JSON package in R have been pretty feeble. Any advice y'all have is appreciated.
Would I just be better off using PHP to farm the data?
I don't know if you have already succeeded loading the JSON files into R, but here is an example of that:
library(rjson)
json=fromJSON(file='http://www.nfl.com/liveupdate/game-center/2012020500/2012020500_gtd.json')
json$`2012020500`$home$stats
If you are having trouble finding the URL of the JSON file, use Firebug (an extension for Firefox) and you can see the webpage requesting the JSON file.
The JSON file, is, of course, huge and complicated. But it is complicated data. Whatever you are looking for should be in there. If you are just looking for a straight dump of the play-by-play text, then you can use this URL:
http://www.nfl.com/widget/gc/2011/tabs/cat-post-playbyplay?gameId=2012020500
I extracted all the data for one team for one season more-or-less manually. If you want data for a lot of games consider emailing the league and asking for the files you mentioned. They publish the data, so maybe they will give you the files. The NFL spokesman is Greg Aiello. I suspect you could find his email address with Google.
Sorry this is not a suggested programming solution. If this answer is not appropriate for the forum please delete it. It is my first posted answer.
Is it possible, via Adobe Air, to save multiple types of data in a single file? For example, an application would allow the user to load in external images, position them on stage and label them. This data would be then be stored in a ByteArray (I guess) using BitmapData for the images and probably XML for the metadata.
I would then like to write this to a single file, with a bespoke file extension that could be associated with said Air app.
I've asked this on various forums and never received a single reply.
You can add everything to a byte array and write it to file - but defining boundaries and extracting individual entities back from the file would take some effort. How about writing them to normal files, zipping them to a single file and deleting the originals? This way you can still have a single file and deal with the individual items more easily.
This article describes some ActionScript zip libraries. I've used nochump in the past and it was easy - this page has some sample code
If you want some individuality for your files, you can rename the zipped file to whatever extension you want - that's what Firefox extensions do, they have .xpi extension, but they're plain zip files renamed.