Skip to content

Commit

Permalink
merge 839:861 from trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
wolkstein committed Mar 1, 2009
1 parent 6bd53b0 commit 51d100e
Show file tree
Hide file tree
Showing 20 changed files with 77 additions and 53 deletions.
3 changes: 2 additions & 1 deletion Sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def get_hydrogen_gui( lib_hydrogen , opts ):
env.Alias('programs', app)
env.Default('programs')

env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/i18n"))
for N in glob.glob('./data/i18n/hydrogen.*'):
env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data/i18n', source=N))
env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/img"))

#add every img in ./data/img to the install list.
Expand Down
Empty file modified data/img/gray/instrumentEditor/instrument_show_off.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/instrumentEditor/instrument_show_on.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/instrumentEditor/library_show_off.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/instrumentEditor/library_show_on.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/patternEditor/btn_mute_off.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/patternEditor/btn_mute_on.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/patternEditor/btn_solo_off.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/img/gray/patternEditor/btn_solo_on.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions data/new_manual/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ <h2 class="subchapter" id="download">Download</h2>

You can download precompiled packages for the following Linux distributions and systems:
<ul>
<li>Slackware </li>
<li>Debian </li>
<li>Ubuntu</li>
<li>Mac OS X</li>
</ul>

Ensure your host meets the following system requirements:
Expand All @@ -93,8 +92,8 @@ <h2 class="subchapter" id="download">Download</h2>
</ul>

Install Hydrogen according to your distribution's package instructions, then execute:
<pre>$ hydrogengui</pre>
Or run <tt>hydrogengui --help</tt> for usage options:
<pre>$ hydrogen</pre>
Or run <tt>hydrogen --help</tt> for usage options:
<pre>
Usage: hydrogen [-v] [-h] -s file
-d, --driver AUDIODRIVER - Use the selected audio driver (jack, alsa, oss, portaudio)
Expand Down Expand Up @@ -546,7 +545,7 @@ <h2 class="subchapter" id="playlist">Playlist Editor</h2>
</div>

<h2 class="subchapter" id="support">Support and troubleshooting</h2>
* Where do I find help? Forum, mailing-lists, <a target="new" href="http://hydrogen-music.org/devel/wiki">TRAC</a>?<br />
* Where do I find help? Forum, mailing-lists, <a target="new" href="http://trac.assembla.com/hydrogen/wiki">TRAC</a>?<br />
* If you like Hydrogen contribute, donate, send us your sister, etc. etc.

</body>
Expand Down
3 changes: 2 additions & 1 deletion gui/src/MainForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ if ( Preferences::getInstance()->useLash() ){
string songFilename = "";
QString filenameSong = "";
Song *song = Hydrogen::get_instance()->getSong();
while (event = client->getNextEvent()) {
// Extra parentheses for -Wparentheses
while ( (event = client->getNextEvent()) ) {

switch (lash_event_get_type(event)) {

Expand Down
7 changes: 5 additions & 2 deletions gui/src/PatternEditor/DrumPatternEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ void DrumPatternEditor::mousePressEvent(QMouseEvent *ev)
m_bRightBtnPressed = true;
m_pDraggedNote = NULL;

int nRealColumn = (ev->x() - 20) / static_cast<float>(m_nGridWidth);
unsigned nRealColumn = 0;
if( ev->x() > 20 ) {
nRealColumn = (ev->x() - 20) / static_cast<float>(m_nGridWidth);
}

AudioEngine::get_instance()->lock( "DrumPatternEditor::mousePressEvent" );

Expand Down Expand Up @@ -247,7 +250,7 @@ void DrumPatternEditor::mousePressEvent(QMouseEvent *ev)
///
}
// potrei essere sulla coda di una nota precedente..
for ( int nCol = 0; nCol < nRealColumn; ++nCol ) {
for ( int nCol = 0; unsigned(nCol) < nRealColumn; ++nCol ) {
if ( m_pDraggedNote ) break;
for ( pos = m_pPattern->note_map.lower_bound( nCol ); pos != m_pPattern->note_map.upper_bound( nCol ); ++pos ) {
Note *pNote = pos->second;
Expand Down
8 changes: 3 additions & 5 deletions gui/src/PlayerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,20 +871,18 @@ void PlayerControl::bctButtonClicked( Button* tBtn)
{
float tmp = m_pEngine->getNoteLength() * 4;

char tmpt[2]; // m_pBCBUpBtn
if ( tBtn == m_pBCTUpBtn) {
tmp = tmp / 2 ;
if (tmp < 1)
tmp = 8;
sprintf(tmpt, "%01f", tmp );
m_pBCDisplayT->setText( QString( tmpt ) );

m_pBCDisplayT->setText( QString::number( tmp ) );
m_pEngine->setNoteLength( (tmp) / 4 );
} else {
tmp = tmp * 2;
if (tmp > 8 )
tmp = 1;
sprintf(tmpt, "%01f", tmp );
m_pBCDisplayT->setText( QString( tmpt ) );
m_pBCDisplayT->setText( QString::number(tmp) );
m_pEngine->setNoteLength( (tmp) / 4 );
}
}
Expand Down
12 changes: 0 additions & 12 deletions gui/src/widgets/Fader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,9 @@ float MasterFader::getValue()
void MasterFader::setPeak_L( float peak )
{
if ( peak < 0.01f ) {
// char tmp[200];
// sprintf( tmp, "[setPeak_L] Error: peak < 0.01 (peak = %f)", peak );
// ERRORLOG( tmp );
peak = 0.01f;
}
else if (peak > 1.0f ) {
// char tmp[200];
// sprintf( tmp, "[setPeak_L] Error: peak > 1 (peak = %f)", peak );
// ERRORLOG( tmp );
peak = 1.0f;
}

Expand All @@ -421,15 +415,9 @@ void MasterFader::setPeak_L( float peak )
void MasterFader::setPeak_R( float peak )
{
if ( peak < 0.01f ) {
// char tmp[200];
// sprintf( tmp, "[setPeak_R] Error: peak < 0.01 (peak = %f)", peak );
// ERRORLOG( tmp );
peak = 0.01f;
}
else if ( peak > 1.0f ) {
// char tmp[200];
// sprintf( tmp, "[setPeak_R] Error: peak > 1 (peak = %f)", peak );
// ERRORLOG( tmp );
peak = 1.0f;
}

Expand Down
6 changes: 3 additions & 3 deletions gui/src/widgets/LCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ void LCDSpinBox::setValue( float nValue )
case FLOAT:
if ( nValue != m_fValue ) {
m_fValue = nValue;
char tmp[20];
sprintf( tmp, "%#.2f", m_fValue );
m_pDisplay->setText( QString( "%1" ).arg( tmp ) );
QString floatString;
floatString.setNum( m_fValue , 'f' , 6 );
m_pDisplay->setText( floatString );
}
break;
}
Expand Down
12 changes: 8 additions & 4 deletions libs/hydrogen/src/IO/jack_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ JackOutput *jackDriverInstance = NULL;
int jackDriverSampleRate( jack_nframes_t nframes, void *arg )
{
UNUSED( arg );
char msg[100];
sprintf( msg, "Jack SampleRate changed: the sample rate is now %d/sec", ( int )nframes );
QString msg = QString("Jack SampleRate changed: the sample rate is now %1/sec").arg( QString::number( (int) nframes ) );
_INFOLOG( msg );
jack_server_sampleRate = nframes;
return 0;
Expand Down Expand Up @@ -234,10 +233,15 @@ void JackOutput::locateInNCycles( unsigned long frame, int cycles_to_wait )
locate_frame = frame;
}

/// Take beat-bar-tick info from the Jack system, and translate it to a new internal frame position and ticksize.
// Take beat-bar-tick info from the Jack system and translate it to a
// new internal frame position and ticksize.
//
// This is primarily for when Hydrogen is a JACK Transport SLAVE.
// When JACK is the master, we already know the BBT.
void JackOutput::relocateBBT()
{
//wolke if hydrogen is jack time master this is not relevant
// If Hydrogen is the JACK Timebase Master, then relocateBBT()
// doesn't need to do much at all.
if( Preferences::getInstance()->m_bJackMasterMode == Preferences::USE_JACK_TIME_MASTER && m_transport.m_status != TransportInfo::ROLLING) {
m_transport.m_nFrames = Hydrogen::get_instance()->getHumantimeFrames() - getArdourTransportAdjustment();
WARNINGLOG( "Relocate: Call it off" );
Expand Down
5 changes: 2 additions & 3 deletions libs/hydrogen/src/hydrogen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,9 +1408,8 @@ inline int findPatternInTick( int nTick, bool bLoopMode, int *pPatternStartTick
}
}

char tmp[200];
sprintf( tmp, "[findPatternInTick] tick = %d. No pattern found", nTick );
_ERRORLOG( tmp );
QString err = QString( "[findPatternInTick] tick = %1. No pattern found" ).arg( QString::number(nTick) );
_ERRORLOG( err );
return -1;
}

Expand Down
6 changes: 4 additions & 2 deletions linux/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ hydrogen (0.9.4beta3) unstable; urgency=low
* fix broken lead / lag
* several fixes into soundlibrary import
* download class now supports http redirect correctly
* config option 'adjust beatcounter offset' to get exact results with different hardware
* new statusbar message to display longer messages than 30 chars setScrollStatusBarMessage( QString message, int ms )
* config option 'adjust beatcounter offset' to get exact results
with different hardware
* new statusbar message to display longer messages than 30 chars
setScrollStatusBarMessage( QString message, int ms )

-- Alessandro Cominu <[email protected]> Mon, 15 Sep 2008 12:00:00 +0200

7 changes: 5 additions & 2 deletions linux/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Package: hydrogen
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Drum machine/step sequencer
Hydrogen is an advanced drum machine. It's main goal is to bring professional yet simple and intuitive pattern-based drum programming. See http://www.hydrogen-music.org for details.
Hydrogen is an advanced drum machine. It's main goal is to bring
professional yet simple and intuitive pattern-based drum
programming. See http://www.hydrogen-music.org for details.
.
Warning: this package contains the development version (potentially unstable) released for testing purpose only.
Warning: this package contains the development version (potentially
unstable) released for testing purpose only.

52 changes: 39 additions & 13 deletions linux/debian/rules
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
# Debian 'rules' file for the Hydrogen Drum Machine.
#
# To make the build more verbose, uncomment the following line:
#export DH_VERBOSE=1

#
# To enable scons PARALLEL BUILDS (e.g. -j 4), run like this:
# $ H2_PARALLEL=4 dpkg-buildpackage -rfakeroot
# ...or uncomment the following line:
#H2_PARALLEL=4
# ...or invoke dpkg-buildpackage like this:
# $ dpkg-buildpackage -j4 -rfakeroot
# However, the -j4 here will run more than gcc in parallel.

# Check for parallel builds.
# NUMJOBS script goodie courtesy of http://lists.debian.org/debian-policy/2007/08/msg00005.html
, := ,
NUMJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(subst $(,), ,$(DEB_BUILD_OPTIONS))))
ifneq ("$(H2_PARALLEL)","")
H2_PARALLEL_BUILDS=-j $(H2_PARALLEL)
else
ifneq ("$(NUMJOBS)","")
H2_PARALLEL_BUILDS=-j $(NUMJOBS)
endif
endif

configure:
# Add here commands to configure the package.

build:
# Add here commands to compile the package.
#cd ..; scons
build: build-stamp

build-stamp:
dh_testdir

mkdir -p $(CURDIR)/debian/hydrogen/usr/bin
cd ..; scons $(H2_PARALLEL_BUILDS) --no-cache DESTDIR=$(CURDIR)/debian/hydrogen/ prefix=/usr/

touch $@

clean:
dh_testdir
dh_testroot

# Add here commands to clean up after the build process.
cd ..; scons -c

dh_clean


Expand All @@ -26,18 +51,19 @@ install: build
dh_testroot
dh_clean -k
dh_installdirs

mkdir -p $(CURDIR)/debian/hydrogen/usr/bin
cd ..; scons install
# Clean out subversion's working copy folders (if accidentally copied
# into the target).
find $(CURDIR)/debian/hydrogen -type d -name '.svn' -print0 | xargs --null rm -rf

cd ..; scons --no-cache DESTDIR=$(CURDIR)/debian/hydrogen/ prefix=/usr/ install
touch $@

find $(CURDIR)/debian/hydrogen -name '.svn' | xargs rm -rf
docs:


docs_install:



# Build architecture-independent files here.
binary-indep: build install docs docs_install
# We have nothing to do by default.
Expand All @@ -54,7 +80,7 @@ binary-arch: build install
dh_compress
dh_compress -X.py
dh_fixperms
#dh_python
# dh_python
dh_installdeb
dh_shlibdeps
dh_gencontrol
Expand Down

0 comments on commit 51d100e

Please sign in to comment.