boats

Art - Music - Computer

  Home

 

Table of Contents

1. Setup -

1.1. Jan 2009

  • Platform
    • Athlon x86_64 dual core, 2GB RAM
    • Fedora Core 9.0 Linux
    • M-audio 1010LT (sound card and adaptors)
    • Shure PG-57 instrument mic
    • ART tube mic preamp
    • Audio-Technica ATH-M40/fs headphones
    • CASIO CT-460 MIDI Keyboard (velocity, not pressure)

  • Software
    • env24 mixer software
    • jack and qjackctl (patchbay connector)
    • qsynth and several sf2 soundfonts (midi software synth)
    • ardour2 (digital audio workstation)
    • jack-keyboard (virtual keyboard)
    • hydrogen (drum generator)
    • GNU solfege (ear training), using aplaymidi to talk to qsynth
    • audacity (sound analysis and manipulation)

I've built all these software packages from source on other machines, but in this case I installed mostly from the normal installer tools.

1.2. Jan 2010

  • Platform
    • Athlon x86_64 dual core, 2GB RAM
    • Ubuntu Studio 9.10 Linux
    • M-audio 1010LT (sound card and adaptors)
    • Shure KSM27 mic
    • ART tube mic preamp
    • Audio-Technica ATH-M40/fs headphones
    • CASIO CT-460 MIDI Keyboard (velocity, not pressure)

    The Shure KSM27 was a VAST improvement over the PG57. I went into American Music looking for a better premap, thinking that was the problem. Sean asked about my symptoms ("muddy"), explained that I probably needed a condenser mic, asked about my budget, and offered a used KSM27 for $200. I got it home, set it up, and instantly was in business. Very clean trumpet pieces. Now it's just up to the performer (me), not the recording engineer (also me).

  • Software
    • env24 mixer software
    • jack and qjackctl (patchbay connector)
    • qsynth and several sf2 soundfonts (midi software synth)
    • ardour2 (digital audio workstation)
    • jack-keyboard (virtual keyboard)
    • hydrogen (drum generator)
    • GNU solfege (ear training)
    • audacity (sound analysis and manipulation)

All installed via synaptic. This was VASTLY easier to install and configure than my previous FC system. For one thing all the software is a year more mature, and they are giving more attention on interoperability. For another, Ubuntu Studio seems more carefully debugged than 64Studio.

1.3. Hardware

Given a basic x86-style computer, the next step is to get a sound card. I chose Delta_1010LT. I don't use all the features yet, but I did want good quality chip, midi in/out, and room to grow.

It took months to learn that the chip needs Envy24. Until I got that package, my whole setup was deaf and mute.

Next add the jack patch connector and its GUI qjackctl. I fussed with all the settings, and eventually learned:

  • Set for not realtime (I don't have a realtime version of Linux installed)
  • Set for 44100 samples/sec.
  • For interface, check the pull-down and select the M-Audio card.

1.4. Achieving audio out

At this point theoretically we can connect a mic and listen to it on headphones. But when debugging, it is easier to have something generate sounds you can get to the headphones. I saw recommendations to install hydrogen drum machine and use one of its demos. That was great advice and I second it.

So...

  • Start Envy24. Go to Analog. Set its first and second sliders to mid range.

  • Start qjackctl.

  • Start Hydrogen. Check jack's connections to see if hydrogen auto connected. AUDIO: Hydrogen 1/2 to system:playback-1/2. If not, solve that.

  • Pick File...demos...(pick one). Play it using Hydrogen's play button.

Some signal should be coming out of the Delta 1010LT RCA output sockets. Plug headphones into one of them and play that drum demo. Keep trying until you find sockets sending out the left and right channels. Make labels for the sockets for 1 and 2 (they are already known to be output).

Actually, in 2008 I had a detour here. My headphones have a 1/4" male stereo plug. I bought a Y adaptor (female 1/4" to 2 male RCA). When I used it, only left would play, no matter which way I hooked up the RCA's. Naturally, I assumed I had misunderstood jack's hookup process, not that an adaptor was faulty. After a lot of confusion, I checked the adaptor with my DMM. Sure enough, only the left channel was coming out. I bought another adaptor (same brand, different store). Same results. So I went to Radio Shack, bought components, and soldered up my own Y adaptor. This worked like a charm.

1.5. Using audio out

You can listen to hydrogen. If you want to do much else, you need a source of audio signals. Typically that is a midi synth. These come in many forms.

1.5.1. qsynth

I picked fluidsynth and its GUI qsynth.

Settings:

  • MIDI
    • MIDI Input=checked
    • Driver=alsa_seq
    • Channels=16
    • Client ID=pid
  • Audio
    • Driver=jack
    • Format=16bits
    • Rate=44100 (or match to jack's status setting)
    • Size=64
    • Count=2
    • Channels=1
    • Groups=1
    • Polyphany=256
    • Client Name ID=qsynth
    • Auto Connect jack outputs=checked
  • Soundfonts

    qsynth needs sf2 soundfonts. I got some from http://soundfonts.homemusician.net/. Some are rar files or sfArk files -- both are proprietary compression algorithms, but unrar is available for *NIX systems. By whatver means, uncompress the sf2 files and put them in a convenient directory

    NOTE There is a real need for good soundfonts and samples under Creative Commons licensing, with non-proprietary compression (e.g., zip or gzip)

    In qsynth...setup...soundfonts, open 1 or more soundfonts. NOTE: The one lowest on the list is the one that is currently selected. Use the Down button to get your current choice into place.

  • Settings -- leave them alone

If jack is running, then qsynth will autoconnect when it starts. Audio: qsynth to system:playback 1/2. ALSA: (no connection) 130 FLUID Synth. The 130 is the midi id that others can use (may be a different number on your system) to send to qsynth. It is up to you to decide who gets connected. Often you want to connect 14:MIDI-through to qsynth's MIDI input. That way if a client tries to output to system:midi-output, midi-through will mirror it and pass it to qsynth to make it into audio.

1.5.2. jack-keyboard

To see if your qsynth is working, try a virtual keyboard. I used jack-keyboard

Start it and check jack: ALSA...jack-keyboard:midi_out to system:midi_playback-1. Notice that midi_playback will also drive midi_through, and thus qsynth will pick it up, turn it into audio, and you can hear it.

You should be able to play the keyboard.

1.5.3. solfege

GNU solfege provides ear training and thus needs to output midi files of the questions.

In solfege...File...Preferences... Soundsetup: Use external midi.

In solfege...File...Preferences...External programs: MIDI file player=

  /usr/bin/pmidi -p 130:0 %s

The 130:0 means connect to Fluidsynth (id 130), on its port 0. Notice that this is a non-jack way to get to qsynth. CHeck Jack connections to see current id.

1.6. Achieving audio in

Because I wanted to do trumpet recording, I got a Shure_PG57 mic.

Microphones provide very small signals, and need to be amplified before going into the main system. Also some mics need XLR with phantom power. While the Delta 1010LT has builtin preamps available on its XLR inputs, they don't do phantom power. I therefore needed an external preamp. I set the 1010LT to bypass its preamps, and got an ART_tube_preamp.

Next, we need a way to capture and use the incoming signal. I installed ardour. If jack is running when ardour comes up, it will autoconnect. Ardour can control patch connections itself, but can also let jack do it. With a simple session, we find ardour's AUDIO connections are:

  • ardour:click (metronome) to system:playback_1. You can hear the count-in on the headphones, but it isn't part of the track.

  • ardour:master/out 1-and-2 to system:playback_1/2. Main stereo output

  • ardour:auditioner/out1/2 to system:playback_1/2. You can hear whatever is coming in (e.g., from mic) as it happens.

  • ardour:audio 1/out 1/2 to ardour:master in 1/2. Incoming audio goes to ardour's master input and from there you route it as needed.

So...

  • Start Envy24

  • Start qjackctl.

  • Connect mic to preamp to 1010LT input (using the XLR socket).

  • On preamp, set P-PWR (phamtom power) button on (pushed in).

  • To set the preamp's Input amp: Speak or play into the mic. Turn up Input amp until it is clipping (red LED), then turn down a bit. For me that was about the 2:00 position. 2010-01-24: That was giving some distortion. I backed down to 11:00.

  • To set the preamp's Output amp: Set ardour track "Audio 1" to record by clicking its red button. At this point you can see a level meter between the buttons and the track itself. Speak or play into the mic. Adjust Output amp until it is clipping at your loudest, then back off a bit. For me that was about the 2:00 position. 2010-01-24: I backed down to 12:00.

  • Try it: Turn on Ardour's top red button to enable recording (or use shift-R). Turn on Audio-1's red button to enable that track for recording. Then click the top play/record button (right-facing arrow) (or use shift-spacebar). When done recording, press the top stop button (box). Check that the recorded waveforms are not clipped, and mostly fill the available space. Adjust the preamp's Output amp as needed.

1.7. Using Audio in

1.7.1. Ardour audio recording

Given jack and ardour, the record process is as noted above for testing the mic preamp. Turn on jack, ardour, enable track for record, enable ardour for record, start record, stop when done.

1.7.2. Ardour MIDI recording

At this point it is all about jack connections. E.g., start qsynth and jack-keyboard. As usual, jack-keyboard connects to system:playback_1; midi_through connects to qsynth: port 0; and qsynth output connects to ardour's audio-1 input. Start recording, and play the keyboard.

1.8. MIDI In

Setup CASIO CT-460 keyboard with all volume sliders set to off. Set chord mode to MIDI. Use MIDI cable to connect CT-460 MIDI out to 1010LT MIDI in (tan line).

In qjackctl:

  1. MIDI:connect system:midi_capture-1 to system:midi_playback-1.
  2. ALSA:connect midi:through-1 to FLUIDSynth:input.
  3. AUDIO:connect qsynth:left/right to system:playback-1/2.

I set qsynth to use an acoustic piano SF2, and then control volume using ENVY24.


2. Trumpet tone improvements.

See trumpet

According to several texts and Shure's manual, the mic should be either directly in front of the bell, or just off to the side of it.

Ardour generates .wav files (in the interface subdir). These can be analyzed directly with various tools. They can be converted to ogg with oggconvert.

Audacity can be used to read the .wav, and analyze it (e.g., spectrum analysis). Audacity 1.3.x (dev series) is jack-aware. Build it with portaudio v19. It uses jack output, but doesn't actually appear in the jack connects.

3. Samples and Soundfonts

I'm using fluidsynth, which uses soundfont2 (sf2) files.

I've been trying to find a Linux-base, OSS sf2 editor, so I can make my own soundfonts. I'll look into Swami.

4. Free-as-in-speech Music

For a unifying project see Gutenberg-Music (http://www.gutenberg.org/wiki/Gutenberg:The_Sheet_Music_Project)

For data entry and fancy printing, see LilyPond (http://lilypond.org/web/).

 
Creator: Harry George
Updated/Created: 2012-05-12