change source code of midi file - midi

I'm not a coder, so hopefully I can ask this in a way that makes sense to you guys! ;-)
Is there an easy way to modify the content of an individual midi file? For example, I have a midi file that lists [sets in stone, more like it] the key of the song as C, when it's really D.
I have plenty of midi programs that will let me change keys [and move notes]. That doesn’t fix my problem. The notes are in the right place the key is just mislabeled.
I thought I could just open the file in Atom and change the C to D and be done... but that didn't work. It's all gibberish in Atom.
I’m on a mac. Is there any way for me to modify the contents of my midi files?
Thanks, in advance, to any/all who respond!

Most MIDI files do not store the key.
But when they do, they use a key signature event that can be represented in hex as FF 59 02 sf mi, where sf is the number of sharps (positive) or flats (negative), and mi is 0/1 for major/minor.
If some file does not have this event, you have to add it. The easiest way to do this would be to use some SMF library for the programming language of your choice.

Related

Convert abf to atf file type. Where should I start?

I want to preface this question by first saying I am not 100% sure this is the correct place to ask.
Basically, I want to take files with the .abf (axon binary files) extension and convert them to .atf (axon text files). I was wondering if I could simply just run a script that converts binary to text or if it would be more complicated than that.
I'm making a script that takes files with the .abf extension and feeds them into the Clampex9.2 program in order to save them as .atf files. However I feel like there is a much better way than manually feeding the files into a program, then resaving them with the correct extension.
Again, if this is not the right forum for this type of question, I apologize but thank you in advance if anyone can help me with this problem!

Notepad ++ How to create a Macro to Bookmark certain lines based on 5 different values

I am wondering if it is possible to use Notepad ++ to create a macro that I can use to find the following values of "SUPP1, SUPP2, SUPP3, SUPP4, WAVSL" and bookmark the lines they are present on.
I have roughly 90 files to sift through and locate records within these files, copying them to another file. I know I can do this manually, but any time that can be saved here is appreciated. Let me know if you have any suggestions.
Thanks,
Brandon
Found out the answer here. Part of the issue was the version on the server for Notepad++ was around 5.6.9 before they had the "Mark All" feature and it was supported for scripting in macros. I found a newer version on another server that is around 6.8 or 6.9 and it worked recording the macro there for usage.
Thanks,
Brandon

Splitting Audio Files with Matlab

How do you split an audio file into multiple parts using MATLAB ? Like I have an audio file composed of ten-twenty notes of a Piano, I need to split it into individual notes and store each note in a separate variable . Is it possible to do this with MATLAB ,if so how ? Can anyone please help me on this ?
If you want to do the splitting visually you can try "Simple Audio Editor" available in the file exchange.
http://www.mathworks.com/matlabcentral/fileexchange/19873-simple-audio-editor
I am the author of this program. Let me know if something does not work with that.
You can also try a free audio editor like audacity and export individual pieces to audio files. You can read each piece in MATLAB separately.
If you are looking to achieve this automatically you might need to ask this question in a Signal processing group.

Word 2010 additional file format

I'm not sure whether this is the best approach for this or whether I perhaps should ask the question more clearer.
What I want to do is to create an additional file output - e.g. if the user uses Word to create a description consisting of known tags, I want to be able to save this as bbcode.
Now I do have an idea of how to do this, but is there a way to say add another file format to the "Save file"-dialog box and have it run a parser and file writer, that'd read the current document and export it using known bbcode-tags (that perhaps would be adjustable from some configuration window)?
The result would be a file containing bbcode as well as the text information that the user has entered.
How would I hook up my addin to the file output dialog? Is there a way to do this? I'm not sure it's custom XML since I won't be using the XML at all.
Thanks in advance and please excuse my poor English.
Edit: after having a look at the Word 2010 AddIn-project, I figured, that I'm looking for a way to define my own "export"-format. I'd like to export the BBCode to a .txt (or even .bbcode) file. The Microsoft.Office.Interop.Word.WdExportFormat seems to have its own fixed enumeration. Is there a way to add an export-format?
There is some code for this here:
phpbb.com/community/viewtopic.php?f=17&t=395554

Create Numbers file and open it with Numbers on iPad

I would like to do a task that is quite simple on other OS, but it is not so trivial on iOS. Namely, I want to create file and open it in Numbers.
I can preview the file with UIDocumentInteractionController and then offer it to user that he/she opens it.
THis seems to me quite a reasonable solution. However, I need to offer proper file format. I suppose CSV and XLS would be reasonable to implement and it would most probably work, but I would still like to do it in native Numbers format if possible. However, I can't find any info about this file format.
Basically, this task is about exporting data to another app and then working further with them.
I don't know of a library that can create native Numbers files. There are hoewever some libraries that allow creating XLS files. Since Numbers fully supports XLS, this is probably the way to go.
There is a comercial library available that might work on the iPhone (costs $200): http://www.libxl.com/
As for free XLS libraries, I only know xlwt, a Python module. You could set up a webservice that creates an XLS file for your app, using xlwt on the server side.
If you want to pass information to Numbers, you can probably also use CSV files. If you use CSV files, you must be aware of some things. There are two kinds of CSV files: the comma separated version (used in english speaking countries) and the semicolon separated (used in continental europe).
The comma separated CSV files look for example like this:
"ID","First Name","Last Name","Salary"
1,"John","Malkovich",3400.20
2,"Fred","Astaire",2000.60
The second kind of CSV files are semicolon separated and use a comma as decimal mark. They look like this:
"ID";"First Name";"Last Name";"Salary"
1;"John";"Malkovich";3400,20
2;"Fred";"Astaire";2000,60
On the Macintosh, Numbers expects a different format depending on the Region setting. If you have your Region set to the US, it will expect the first kind. If you choose Germany, it will expect the second kind.
I don't know what kind of files Numbers on the iPad expects.
Another alternative would be using copy and paste. Try to copy tab separated text into the clipboard.
I hope this may help you. I've contacted libxl team and they responded with the link to the demo version of their iPhone library: http://www.libxl.com/download/libxl-iphone.zip