Posts Tagged 'audio'

hydrogen drumkits for composite sampler

Composite is will be a software application/system for real-time, in-performance sequencing, sampling, and looping. …” [Composite web site]. It comes with a LV2 plugin (called composite sampler) that allows to use its drumkits in zynjacku (“zynjacku is a nunchaku weapon for JACK audio synthesis. …” [zynjacku web site]), which means that you can use the sounds alone without running the whole sequencer. The drumkits are compatible to the ones used by hydrogen (“Hydrogen is an advanced drum machine for GNU/Linux. …” [hydrogen web site]).

The composite sampler documentation says that one needs to put the drumkits (or symlinks) into the according path and adjust the default.xml file in the composite presets (see manual). Then it is possible to change through the drumkits with MIDI program change messages. I thought an automated way of preparing this setup would be useful, so I wrote the following python script. Feel free to use/alter it, no guarantee is given for anything. Comments are welcome.

importHydrogenDrumkitsToComposite.py

"""
Generates symlinks in the composite drumkit path that point 
to the hydrogen drumkits. Creates an according xml-file with 
all drumkits with GMkit as the first entry.
"""
__author__ = "https://linuxaudiolive.wordpress.com"

from glob import glob
from os import system, path

xmlstart = "<?xml version=\"1.0\"?>\n\
<T:tritium xmlns:T=\"http://gabe.is-a-geek.org/tritium/xml/1/\">\n\
\t<T:presets>\n\\t\t<T:bank coarse=\"0\" fine=\"0\">"
xmlend = "\t\t</T:bank>\n\\t</T:presets>\n\</T:tritium>"

hydrogenDrumkitPath = "/usr/share/hydrogen/data/drumkits/"
compositeDrumkitPath = path.expanduser("~/.composite/data/drumkits/")
newDefaultFilename = "newDefault.xml"

def makeDrumkitSymlinks(hydrogenPath, compositePath):
    """Puts symlinks for all entries in hydrogenPath into compositePath"""
    print "Creating symlinks..."
    names = glob(hydrogenPath+"*")
    for n in names:
        system("ln -s '"+n+"' '"+compositePath+n.split("/")[-1]+"'")

def drumKitField(name, MIDIdevice):
    """Returns the complete xml-entry for one drumkit"""
    drumKitString = "\t\t\t<T:program>\n"
    drumKitString += "\t\t\t\t<T:midi_number>" 
    drumKitString += str(MIDIdevice) 
    drumKitString += "</T:midi_number>\n"
    drumKitString += "\t\t\t\t<T:resource>tritium:drumkits/"
    drumKitString += name
    drumKitString += "</T:resource>\n\t\t\t</T:program>"
    return drumKitString

if __name__ == '__main__':
    if path.exists(newDefaultFilename):
        print "The file '",newDefaultFilename,"' already exists."
        print "Not deleting anything."
        print "Aborting!"
    else:
        #uncomment the following to create the symlinks
        #makeDrumkitSymlinks(hydrogenDrumkitPath, compositeDrumkitPath)
        print "Creating new default file."
        drumkitnames = glob(compositeDrumkitPath+"*")
        drumkitnames.sort()
        f = open(newDefaultFilename,'w')
        f.write(xmlstart)
        f.write(drumKitField("GMkit",0)) #the default entry
        counter = 1
        for kit in drumkitnames:
            name = kit.split("/")[-1]
            if name!="GMkit": #default entry is already the first
                f.write(drumKitField(name, counter))
                counter+=1
        f.write(xmlend)
        f.close()
        print "Done. Now copy",newDefaultFilename,
        print "to your .composite/data/presets/default.xml"

ccMixter

Just stumbled upon another database of audio files under Creative Common Licenses: ccMixter. Amazing! It collects finished remixes on one hand and material to remix on the other. Instrumental tracks, drum loops, voices and the like. They can be searched by tags or filtered by BPM. A “How I did it” tab in the extras section some artists describe what tools, processes and/or samples they used.

Happy mixing! Just make sure to follow the licenses attached to the works.

using sound effects in ardour

To use LADSPA effects in ARDOUR projects one can just add one from the list by double-clicking in the field above the volume control in the mixer panel. But sometimes you want to use the same effect on different tracks or mix the original with the effect. If there is no Dry/Wet-mix control in the effect plug-in the latter can be done via SEND-effects. Adding the same effect to different tracks through a SEND plug-in, CPU usage is smaller than adding it to every single track. Although, once you know how it works it is quite straightforward, but I struggled a lot getting it to work.

To do so one adds a bus to the mixer panel. Then a SEND plugin is chosen by right-clicking in the effect field of the desired audio track. This plug-in can be attached to another track or bus  where one can add effects in the usual way. The important trick which finally does the job and which took  me a while to figure out is to activate the SEND connection in its context menu.by right-clicking on it. In the menu you find a activate command.

From now on all pre-fader signals from the chosen track go into the chosen bus where effects can be added. Pre fader means that you can change the volume of the original track (or even turn it down to mute) and he signal is still received by the effect bus. If the SEND is added into the field below the volume control it is a post fader send and the signal goes to the effect bus filtered.

The picture shows an actived SEND in an audio track. The levels of Bus 3 show that the signal is received.

The picture shows the mixer panel with an actived SEND plugin (pre-fader) in an audio track. The levels of Bus 3 show that the signal is received.

Sound Transit – a different kind of sound database

A few months ago I already posted links to some sound databases on the internet. This time I want to present you another place which has – apart from the recordings –  a very nice feature to explore them. But one after the other.

soundtransit.nl

Rather than just sounds of opening doors or dogs making love, soundtransit.nl collects field recordings from around the world “with an emphasis on the unintentional sounds which often go unnoticed in our daily lives”. The user is invited to upload their files and one can search and download everything under a Creative Commons-license.

What makes this site special in my opinion is the part where you can book sound transits: Since the recordings are filed with the place where they were taken you can enter two locations and a number of stops in between. As a result a mix of  corresponding sounds is generated and can be heard or downloaded. One example I like very much is a journey from Berlin (Germany) to Palma de Mallorca (Spain), via Egypt, India and Albania.

eeepc as a linux audio workstation

A few days ago I told you about the first steps into using an eeepc as a real-time audio tool. jack runs up fine. I chose the internal audio card with the combination 48kHz,  256frames, 4buffers (which gives a latency of  21.3msec) and running on its  own  it doesn’t cough up any xrun.

I couldn’t get sooperlooper working yet. Sooperlooper works (see solution)! freqtweak works  (A nice little thing!), too.  Ardour works very nice, too. Sometimes the screen is a bit small for the whole window, but  I was using ardour a bit today and it wasn’t too much of  a hassle. Audacity is buggy (converting to mono + playing results in a segmentation fault).

I will try and find out about sooperlooper and audacity. Other programs and how an external audio card  connects  (I hope  my older posts will tell me what to do), a midi interface and all that will come up soon…

sound databases

Well, before going on to the promised topics I’ll tell you something else. When you are looking for samples, sound bites, weird noises or any other piece of sonic experience you might go out and record at your will. But you might not have recording equipment or there is no chance for you to find a suitable source. Then you will probably search the internet for help. There are a few resources where one can find samples for free but to me the most intriguing is freesound.org.

the freesound project
At freesound.org one finds a growing number of Creative Commons-licensed samples. Anybody can listen to them, downloading is only possible after registration. This, however, is free of charge and easily done in an instant. You need a valid e-mail adress to do so.
The sounds are documented by the uploading user and furthermore tagged with single words. The site has a section with geo-tagged sounds to find the sound of a Waikiki thunderbolt or of a Greenland river.

not-so-free sound projects
Apart from above database, there are many more resources, but it is not always clear if the material is free to use or not. So it will be up to you to find it out. There is a sound search engine which will find a lot of links to sounds throughout the internet but you cannot be sure about the license. One would have to ask the provider of the samples concerned.

probably-copyrighted sound project
A different kind of resource is the wav planet where you find lots of quotes from movies and TV shows. This service is probably not legal in many countries of the world, so check with your lawyer or with your government.