Pipe creation workflow

From Fernseher
Revision as of 15:54, 3 March 2009 by 129.42.161.36 (talk)
Jump to navigationJump to search

Creating a pipe and rank has several steps and possible intermediate file formats and editing tools.

1: Create the spectrum for a pipe

The spectrum needs to be created for a pipe. This can be done in octave, and then viewed in gnuplot. It could be created with a C program. It would be nice to have a javascript editor to create these a bit more dynamically so you can see what the spectrum will look like, and also to see what the the resulting pipe would sound like.

The file format for the spectrum is nice and simple, to aid in creation and use by the various tools. There is no header, just a list of records, each one holding a complex value associated with a given frequency in the response. It's likely that all frequencies from 0 up to 22050 would be present at uniform spacing, but this wouldn't be necessarily the case. Format for each record is:

float float float

First float is the frequency in hertz, second is the real part of the DFT value at that frequency, and third is the imaginary part of the DFT value at that frequency.

All frequencies above 22050 should be chopped to prevent aliasing. File should be named as:

<rank name>_<fundamental frequency>.dft

Gnuplot can easily read this format for plotting, as can C files for later conversion. C files and octave can write this format easily.

Tools:

  • octave - to create a spectrum from scratch and known theoretical concepts
  • nameless javascript tool - to interactively edit the spectrum
  • gnuplot - to display the spectrum for analysis
  • wavdft - to convert a recording of a pipe to a spectrum file for clean up and re-dissection.

2: Convert from spectrum to pipe waveform

Once the spectrum is created, the pipe waveform data can be created by using FFT on the data in the spectrum file, or the slow sinusoid summation manually. Once the waveform data is generated, its normalized and using input parameters to specify envelope characteristics, appropriate subsets are taken of the waveform and placed into a pipe file, named:

<rank name>_<fundamental frequency>.pipe

The format of that file is a pipe header, specifying the fundamental frequency, the lengths of each portion of the waveform data, and arrays of floats for the sustain, attack, and release portions, is from rankfile.H

The tool that will be used to do this processing is "pipegen" which will take the .dft and some envelope parameters, and generate a .pipe file.

This pipe file can then be played back using the "playpipe" utility. Also, a "playset" utility can be used to play multiple pipes at once, for testing how a pipe set sounds together, to see how a chord in a given rank will sound, or to see how a note or chord sounds when played with multiple stops pulled.

Tools:

  • pipegen - to generate a pipe file from a spectrum file
  • playpipe - to listen to the pipe to make sure it sounds as expected
  • playset - to listen to a set of pipes to make sure they sound good together

3: Combine pipe files into a rank file

The rank file will be created according to rankfile.H, consisting of a rank header, an index to find each pipe data section, and the data from each pipe data file, all combined into one rank file, with a name of form:

<rank name>_<pitch length in rounded feet>.rank

This file will be generated by "rankgen", which will take parameters to specify the name and length of this rank, as well as how many pipes are in each set, and a list of all the pipes to add to the rank, in the order to put them into the file, with each set preceded by the written note that will cause this rank to play that set of pipes.

A rankfile can be played using the "playrank" tool, which will cause each pipe set in the rank to play, one after the other. All pipes in a given set will sound simultaneously here, to get an accurate affect of what this rank will sound like when played on the organ. A "playbar" tool will take a set of ranks that should be un-stopped, and a sequence of midi notes to play using those ranks. All the notes will use the ranks specified.

Tools:

  • rankgen - to generate the rank file from the given sets of pipes
  • playrank - to listen to all the pipes of a rank to verify they all sound alike and of similar volumes and timbres.
  • playbar - to listen to a simple midi sequence on a given set of ranks to make sure we are interpreting notes correctly.

4: Play the organ

Once all the ranks are complete, "organ-emu" would listen for midi events from the organ and play the right pipes from the right ranks for each division. "midi-test" just listens for midi events from the organ and displays them on screen, or records them to a file. "organ-midi" is similar to "playbar" in that it takes in a midi file, but this will interpret stop keys correctly, and set the proper ranks on for each manual/pedal, and interpret the midi channels correctly to play back the song using the full organ abilities.

Tools:

  • midi-test - to listen to midi events from the organ and display or record them
  • organ-midi - to playback a recorded stream of midi events for the organ, including stops and multiple divisions
  • organ-emu - to listen for midi events and play the resulting ranks and pipes in real-time.