Song
NAME
Audio::Hydrogen::Song - description of a song
DESCRIPTION
The song file is a standalone file with the extension .h2song
which
contains the descriptions of the patterns and instruments that make up
a "song" in Hydrogen. There can be any number of patterns and these can
be arranged in groups as pattern sequences. The instruments can either
be copied from a drumkit or can be created afresh as required.
For a song file to be usable in Hydrogen it needs only at least one pattern and any instruments that may be used, the application will supply its own defaults if needed.
METHODS
attribute version
This is Version object that represents the version of Hydrogen that created the song file. This defaults to "0.9.5" which is the version I tested with, but it may have some impact on the way some values are interpreted.
attribute bpm
This is the BPM as an integer, it defaults to 120.
attribute volume
This is the global volume as a Rat, it defaults to 1.0
attribute metronome-volume
This is the volume of the built in metronome, it defaults to 0.0
attribute name
This is the user visible name of the song, it can be left blank.
attribute author
This is some text describing the author of the song, it may be blank.
attribute notes
Some free text notes regarding the song, it may be blank.
attribute license
Some license text. It may be blank.
attribute loop-enabled
A Bool which is by default not set, it appears that Hydrogen itself defaults to True though.
attribute mode
This is a string which may be "pattern" or "song" to determine the playback mode of Hydrogen, the default is "pattern".
attribute humanize-time
This is a Rat in the range 0 .. 1.0 that determines the extent to which a small random change is applied to the timing of notes. By default it isn't set which means time isn't "humanized".
attribute humanize-velocity
This is a Rat in the range 0 .. 1.0 that determines the extent to which a small random change is applied to the velocity of notes. By default it isn't set which means velocity isn't "humanized".
attribute swing-factor
This is a factor that adjusts the probability that the timing of a note will be altered by some amount. I'm not quite sure of the algorithm used. By default it isn't set which means there is no "swing". A good description of the notion of "swing" in terms of electronic sequencers can be found in this interview with Roger Linn who largely invented the idea:
https://www.attackmagazine.com/features/interview/roger-linn-swing-groove-magic-mpc-timing/
attribute patterns
This is a list of Audio::Hydrogen::Pattern objects. There should be at least one and they should all have a unique name.
attribute instruments
This is a list of Audio::Hydrogen::Instrument objects. The id attributes of the instruments should be unique and should be those referenced by the patterns. The sample filenames (either single or those in layers,) should be absolute paths (unlike those in drumkits that may be relative to the drumkit directory.)
attribute pattern-sequence
This is an ordered list of PatternGroup objects, which in turn contains a on ordered list of
pattern-id
Strs which refer to the patterns in the group.
attribute plugins
This is a list of Plugin objects that describe the LADSPA plugins that are configured for the song, there may only be four plugins per song (at least in the UI.) The Plugin object has the attributes:
attribute name
The name of the Plugin as will be displayed (determined from the plugin when it is loaded.)
attribute filename
This is the filename (a .so file typically) that the plugin was loaded from, it appears to default to '-'.
attribute enabled
A Bool indicating whether the plugin is enabled.
attribute volume
The "volume" of the plugin.
I'm not sure how it stores the plugin specific parameters.