My OS X Programming Blog
Mac OS X Cocoa and CoreMIDI Programming
About Andrew Choi


MIDI Programs

MIDI File Player (External Device)

MIDI Destination Pop-Up Button

MIDI File Player (Internal Synth)

MusicSequence Sample Code

MIDI File Writer

MIDI Name Document Parser

NameConfigSetup

Fish Creek MIDI Framework

MidnamUtility

SysExSenderX

Other Programs

FCBlogEditor

FCBlog and Patch

Chinese Checkers Program

jyut6 ping3 Cantonese Input Method

Cocoa Sample Programs

Syntax Coloring Using Flex

NSTextField and Undo

NSToolbar

Implementing File Import

Launch Application and Open URL

Saving Uncommitted Text Field Edits

Algorithms

Jazz Chord Analysis as Optimization

Optimal Line Breaking for Music

Optimal Chord Spacing

   

A blog where I will write mostly about programming in Cocoa and CoreMIDI, and experiences from my ports of Emacs and XEmacs to the Mac OS.

Section Marks
Friday October 8, 2004

Wrote some code to display section marks extracted from BiaB files. I’ll work on editing them and storing them in my own text format tomorrow. I’ll also need to work on generating variations in the accompaniment when a song changes sections. It shouldn’t be hard to put drum fills at the end of the sections, and, say, to switch the ride cymbal to hi-hat. More involved variations will require more design work. It is important to represent and make use of section information in tunes because this is what gives accompaniments generated by BiaB a little life (if one can call it that).

Graphic Representation of Chorus Parameters
Thursday October 7, 2004

A chorus is specified by its beginning and ending bars, and the number of times it’s repeated. A simple application for practicing improvisation (like BiaB or MiBAC Jazz) supports only one chorus per song. I wrote some code today for displaying and editing this information in my chord editor.

To specify the chorus, select the bars it contains and choose “Set Chorus” in the “Edit” menu. To specify the number of repeats, choose one of items in the “Set Chorus Repeats” submenu in the “Edit” menu. Here’s a close-up of the repeat sign at the end of the song, which shows the number of repeats (“3x” in this example).

Choruses And Sections
Wednesday October 6, 2004

Worked on some code to extract the beginning and ending bars of the chorus of a song in BiaB format. I also figured out how to determine the bars at which each section begins. Because there are a newer and an older BiaB format, I needed to repeat this detective work for both of them. Here’s a screenshot of one of the demo songs in the BiaB demo.

Note that the song has an AABA form with 8-bar sections. The chord editor reads it and displays a document window for it.

The test code I’ve added today prints out the following information about the sections and the chorus of the song.
2004-10-06 22:58:15.836 ChordEditor[1156] Section A: bar 1
2004-10-06 22:58:15.858 ChordEditor[1156] Section A: bar 9
2004-10-06 22:58:15.871 ChordEditor[1156] Section B: bar 17
2004-10-06 22:58:15.872 ChordEditor[1156] Section A: bar 25
2004-10-06 22:58:15.872 ChordEditor[1156] Section A: bar 33
2004-10-06 22:58:15.873 ChordEditor[1156] Chorus begin = 1
2004-10-06 22:58:15.873 ChordEditor[1156] Chorus end = 32
2004-10-06 22:58:15.873 ChordEditor[1156] Repeats = 3

Orange Ice Cream!!
Tuesday October 5, 2004

Oranges are sweet and juicy this time of year, so I was thinking about making orange ice cream all weekend. I found a recipe on the Epicurious web site and another one at the Joy of Baking web site. I didn’t like the idea of heating orange juice so I following the recommendation in my trusty Joy of Cooking cookbook and added the orange juice (cold) after the cream has been churned for five minutes. Here’re my ingredients, which is a combination of the above recipes: 1.5 cups whipping cream, 0.5 cup whole milk, 2 egg yolks. 0.5 cup sugar, 1 tsp. vanilla extract, juice and zest of two big naval oranges. Optionally add 1 tsp. orange extract.

Another good web site to look for recipes is American’s Test Kitchen’s. Their recipes and descriptions seem to have been derived quite scientifically and suitable for programmers and scientists. Their TV program is excellent too!

On a completely different topic, my current favorite program on public TV is Norm Abram’s New Yankee Workshop.

Drum Note Numbers and Volumes
Monday October 4, 2004

Well, some programming tasks are more interesting than others. Today I just worked on finishing the preferences panel and the use of user default values in the rest of the program. This turns out to be a bit of work because part of my program is in Objective C and the rest in C++. The same trick I’ve been using still works: passing CoreFoundation/Cocoa collections as parameters. Unmarshelling these parameters using CoreFoundation functions requires more code than doing the same thing in Cocoa though.

Anyway here’s a picture of the Drums Patch tab view item, which contains a table for specifying MIDI note numbers and individual volumes for the drum set.

October 2004
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Sep  Nov

xml

Search this blog with


Lists

Less-Known Facts About Emacs

Emacs Rants

Chinese Restaurants in Calgary

Calgary/Banff Tourist Attractions

C++ Reading List

Science Fiction Series

Top-10 Reason I Stopped Working on Emacs

Top-10 Types of Questions I Get About Emacs

10 Defining Moments as Programmer


Misc

Carbon XEmacs

Emacs for Mac OS X


Copyright © 2003, 2004, 2005 Andrew Choi (Contact Information). Created with FCBlog