Compare commits

..

68 Commits

Author SHA1 Message Date
Tobias Doerffel
af3d57b67f fixed critical bugs and made 0.1.4 release
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@75 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-02-02 14:20:07 +00:00
Tobias Doerffel
7df6381800 made 0.1.3 release
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@74 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-02-01 16:35:45 +00:00
Tobias Doerffel
f0cfa20676 heavy changes in VST-support-layer
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@73 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-31 08:10:43 +00:00
Tobias Doerffel
bce6158cb7 bugfixes with VST-SDK-stuff
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@72 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-30 14:12:40 +00:00
Tobias Doerffel
66d18659a4 Improved buffer-allocator
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@71 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-30 10:50:02 +00:00
Andreas Brandmaier
422e4364e6 fixed BitInvader presets compile error
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@70 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-30 10:16:36 +00:00
Tobias Doerffel
2542a66675 bugfixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@69 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-27 12:23:12 +00:00
Andreas Brandmaier
452b7a200f bugfix: loading presets
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@68 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 22:18:12 +00:00
Andreas Brandmaier
564a1e48ac minor bugfix
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@67 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 19:17:04 +00:00
Andreas Brandmaier
55045b7017 changed sample encoding in presets to base64
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@66 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 17:31:00 +00:00
Andreas Brandmaier
8325ad2991 added BitInvader presets
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@65 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 17:29:40 +00:00
Tobias Doerffel
ae7034653e added base64-support functions
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@64 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 09:09:56 +00:00
Andreas Brandmaier
22d1915a4e added user-loadable waveform - code cleanup
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@63 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 00:27:10 +00:00
Andreas Brandmaier
b0d91d48e9 added user-loadable waveform
code cleanup


git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@62 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-24 00:26:07 +00:00
Andreas Brandmaier
dce587c7af added BitInvader information
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@61 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-23 20:44:46 +00:00
Andreas Brandmaier
458304016e replaced wave-generation methods by static methods of oscillator.h
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@60 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-23 20:15:56 +00:00
Tobias Doerffel
86b37628d5 corrected links to VST-SDK in configure
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@59 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-23 14:32:10 +00:00
Andreas Brandmaier
28673e7a80 added own cursor drawing
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@58 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-23 14:03:13 +00:00
Tobias Doerffel
2f4059ed15 Bugfixes in BitInvader and AudioFileProcessor
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@57 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-23 12:50:07 +00:00
Tobias Doerffel
b762ad706f lot of bugfixes, UI-improvements and more
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@56 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-23 09:25:49 +00:00
Andreas Brandmaier
7e6538d9b3 improved mouse handling
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@55 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-22 21:16:13 +00:00
Andreas Brandmaier
a0b758887e updated background image
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@54 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-22 12:05:02 +00:00
Andreas Brandmaier
1f275d562e added smooth button
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@53 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-21 21:12:27 +00:00
Andreas Brandmaier
3d8f7f6985 fixed background image - still needs an image with higher quality!
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@52 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-21 21:11:52 +00:00
Andreas Brandmaier
858449d9bd updated copyright information
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@51 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-21 16:50:10 +00:00
Tobias Doerffel
164a2f7a01 added BitInvader-plugin
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@50 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-20 12:11:31 +00:00
Tobias Doerffel
8a1d9788a9 many bugfixes and updated projects
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@49 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-17 13:24:41 +00:00
Tobias Doerffel
eed996742f updated Russian translation and fixed bug in piano-roll
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@48 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-11 13:19:44 +00:00
Tobias Doerffel
f1a0214cda added two switches in setup-dialog
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@47 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-10 12:55:42 +00:00
Tobias Doerffel
36b6540f0b qt4 compat fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@46 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-09 12:48:55 +00:00
Tobias Doerffel
4804108a1d bugfixes and some small new features
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@45 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-09 10:31:28 +00:00
Tobias Doerffel
052224c8e2 lot of bugfixes, especially in VST-support-layer and some nice new features
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@44 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-01-03 13:15:42 +00:00
Tobias Doerffel
f049e70334 preparations for 0.1.2 release
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@43 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-22 13:08:04 +00:00
Tobias Doerffel
181f9b56f6 small bug-fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@42 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-22 12:57:51 +00:00
Tobias Doerffel
f543cd8f4e update of libtool-related files and other small improvements (see ChangeLog)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@41 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-21 17:15:35 +00:00
Tobias Doerffel
ffb654bc05 drag'n'drop for knobs
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@40 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-20 11:14:59 +00:00
Tobias Doerffel
156ad36850 load and save/load sample-data which doesn't come from sample in/from XML-node (base64-encoded)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@39 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-19 13:01:36 +00:00
Tobias Doerffel
5e6a719b7c drag'n'drop-support everywhere
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@38 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-19 12:17:23 +00:00
Tobias Doerffel
f700c16c33 fixed critical bug in ALSA-driver
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@37 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-16 13:00:00 +00:00
Tobias Doerffel
bcef7b0b82 added missing pixmaps
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@36 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-15 10:06:48 +00:00
Tobias Doerffel
e1f5d4e13b bugfixes, GUI-improvements
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@35 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-15 10:04:24 +00:00
Tobias Doerffel
0e7cb9a0c8 small fixes for Qt4
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@34 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-14 16:51:07 +00:00
Tobias Doerffel
6ca71a2637 made LMMS working with Qt4 again
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@33 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-14 10:19:04 +00:00
Tobias Doerffel
746ec155a5 GUI-improvements
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@32 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-12 14:29:43 +00:00
Tobias Doerffel
d5a5f3abca bug fixes, GUI-improvements and more
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@31 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-12 14:25:32 +00:00
Tobias Doerffel
f67bf64acb some improvements on MIDI-tab-widget
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@30 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-09 08:36:24 +00:00
Tobias Doerffel
457c39ccdf added support for easy MIDI-port-subscription inside LMMS
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@29 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-08 10:31:29 +00:00
Tobias Doerffel
9c899fe33f MIDI-system-bugfixes/enhancements + small GUI improvements
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@28 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-07 13:04:34 +00:00
Tobias Doerffel
31b480b60f fixed bug in configure.in
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@27 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-05 12:48:20 +00:00
Tobias Doerffel
614b106752 heavy improvements on mixer-system and GUI
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@26 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-12-05 12:26:16 +00:00
Tobias Doerffel
ab719618f7 new audio-mixing system and new VST-support-framework
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@25 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-11-30 10:19:11 +00:00
Tobias Doerffel
7587d7c1f6 bugfixes in ALSA-sequencer-client
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@24 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-11-08 13:58:38 +00:00
Tobias Doerffel
22de18909a added ALSA-sequencer support
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@23 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-11-07 13:44:52 +00:00
Tobias Doerffel
4952f23917 made LMMS capable of managing its windows like GIMP (no MDI) and fixed some small bugs
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@22 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-28 15:58:35 +00:00
Tobias Doerffel
da6b2e1904 Small fixes for making current CVS-version compilable
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@21 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-26 11:06:36 +00:00
Tobias Doerffel
40d8b3c4f6 completely new MIDI-subsystem and other bugfixes, see ChangeLog for details
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@20 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-24 09:13:39 +00:00
Tobias Doerffel
d959938370 added missing pixmaps
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@19 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-20 13:33:37 +00:00
Tobias Doerffel
f55c124be6 fundamental changes in plugin-architecture, added plugin-browser, bug-fixes - see ChangeLog for further details
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@18 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-20 13:02:26 +00:00
Tobias Doerffel
58fe360793 added LADSPA-support and some fixed lockup-bugs
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@17 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-14 11:37:16 +00:00
Tobias Doerffel
2d0bcc7140 Fixed bug in LED-checkbox
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@16 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-13 12:29:20 +00:00
Tobias Doerffel
315839ff8e added missing icons
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@15 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-11 05:28:23 +00:00
Tobias Doerffel
5d9e7fe0ed - faster oscillator
- tempo-based arpeggiator and LFOs
- bug-fixes
- added another Moog-filter


git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@14 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-10-06 08:24:23 +00:00
Tobias Doerffel
6ba478ff6b made all sound-generator-plugins shared libraries which are loaded at runtime when needed; removed obsolete files and fixed bugs in tabWidget
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@13 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-09-30 10:31:55 +00:00
Tobias Doerffel
b3754454cd GUI-improvements, zooming-selectboxes in piano-roll and song-editor and more
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@12 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-09-29 07:18:55 +00:00
Tobias Doerffel
f64b25ba44 added missing files
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@11 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-09-28 07:42:40 +00:00
Tobias Doerffel
00e9f34b20 more compat hacks
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@10 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-09-28 07:40:40 +00:00
Tobias Doerffel
99dfdc3f46 bug-fixes, compatibility-patches, ... see ChangeLog for details
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@9 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-09-27 13:10:34 +00:00
Tobias Doerffel
3a2536e269 Added missing files because for some reason, they weren't imported at initial port...
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@7 0778d3d1-df1d-0410-868b-ea421aaaa00d
2005-09-27 12:58:19 +00:00
327 changed files with 40427 additions and 3191 deletions

19
AUTHORS
View File

@@ -1,12 +1,19 @@
Tobias Doerffel
<tobydox@users.sourceforge.net>
Maintainer, main-development, artwork etc.
<tobydox/at/users.sourceforge.net>
Maintainer, main-development, artwork etc.
Danny McRae
<khjklujn/at/yahoo.com>
development
Sebastian Tilsch
<djcompilation@gmx.de>
recording of many samples
<djcompilation/at/gmx.de>
recording of many samples
gabriel
<kryos1/at/shaw.ca>
additional artwork
...may be there're more here in the future...
Andreas Brandmaier
<andy/at/brandmaier.de>
BitInvader plugin

1984
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -19,57 +19,64 @@ rpm: $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE).spec
endif
noinst_PROGRAMS= bin2res
bin2res_SOURCES = buildtools/bin2res.cpp
SUBDIRS = artwork buildtools locale midi-maps plugins presets projects samples
INCLUDES = -I$(srcdir)/include -I.
INCLUDES = -I$(srcdir)/include -I. -I/usr/include/wine -I/usr/include/wine/windows
bin_PROGRAMS = lmms
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS)
%.moc: $(srcdir)/include/%.h
$(MOC) -o $@ $<
%.ts:
$(LUPDATE) $(lmms_SOURCES) -ts locale/$@
$(LUPDATE) $(lmms_SOURCES) `find plugins/ -type f -name *.cpp` -ts locale/$@
%.qm: %.ts
$(LRELEASE) $<
man1_MANS = lmms.1
lmms_MOC = \
./about_dialog.moc \
./arp_and_chords_tab_widget.moc \
./audio_file_processor.moc \
./bb_editor.moc \
./bb_track.moc \
./browser.moc \
./channel_track.moc \
./combobox.moc \
./config_mgr.moc \
./crystal_button.moc \
./cpuload_widget.moc \
./envelope_and_lfo_widget.moc \
./envelope_tab_widget.moc \
./export_project_dialog.moc \
./kmultitabbar.moc \
./fade_button.moc \
./file_browser.moc \
./group_box.moc \
./kmultitabbar.moc \
./kmultitabbar-qt3.moc \
./knob.moc \
./lcd_spinbox.moc \
./led_checkbox.moc \
./lmms_main_win.moc \
./midi_out.moc \
./mixer.moc \
./name_label.moc \
./nstate_button.moc \
./midi_alsa_seq.moc \
./midi_tab_widget.moc \
./pattern.moc \
./piano_roll.moc \
./piano_widget.moc \
./pixmap_button.moc \
./plucked_string_synth.moc \
./plugin_browser.moc \
./project_notes.moc \
./rubberband.moc \
./qxembed.moc \
./rename_dialog.moc \
./sample_buffer.moc \
./sample_track.moc \
@@ -77,26 +84,24 @@ lmms_MOC = \
./side_bar.moc \
./side_bar_widget.moc \
./song_editor.moc \
./sound_generator.moc \
./surround_area.moc \
./tab_bar.moc \
./tab_button.moc \
./tab_widget.moc \
./tab_widget.moc \
./tempo_sync_knob.moc \
./timeline.moc \
./tool_button.moc \
./track_container.moc \
./track.moc \
./triple_oscillator.moc \
./visualization_widget.moc
BUILT_SOURCES = $(lmms_MOC)
#lmms_TRANSLATIONS = $(wildcard $(srcdir)/locale/*.qm $(srcdir)/locale/*.ts)
lmms_EMBEDDED_RESOURCES = $(wildcard $(srcdir)/resources/*png AUTHORS COPYING)
./embedded_resources.h: $(lmms_EMBEDDED_RESOURCES) bin2res
$(top_builddir)/bin2res $(lmms_EMBEDDED_RESOURCES) > $@
./embedded_resources.h: $(lmms_EMBEDDED_RESOURCES)
$(top_builddir)/buildtools/bin2res $(lmms_EMBEDDED_RESOURCES) > $@
./embed.o: ./embedded_resources.h
@@ -109,54 +114,60 @@ lmms_SOURCES = \
$(srcdir)/src/audio/audio_file_wave.cpp \
$(srcdir)/src/audio/audio_jack.cpp \
$(srcdir)/src/audio/audio_oss.cpp \
$(srcdir)/src/audio/audio_port.cpp \
$(srcdir)/src/audio/audio_sample_recorder.cpp \
$(srcdir)/src/audio/audio_sdl.cpp \
$(srcdir)/src/core/about_dialog.cpp \
$(srcdir)/src/core/arp_and_chords_tab_widget.cpp \
$(srcdir)/src/core/bb_editor.cpp \
$(srcdir)/src/core/browser.cpp \
$(srcdir)/src/core/config_mgr.cpp \
$(srcdir)/src/core/envelope_and_lfo_widget.cpp \
$(srcdir)/src/core/envelope_tab_widget.cpp \
$(srcdir)/src/core/export_project_dialog.cpp \
$(srcdir)/src/core/file_browser.cpp \
$(srcdir)/src/core/instrument.cpp \
$(srcdir)/src/core/lmms_main_win.cpp \
$(srcdir)/src/core/main.cpp \
$(srcdir)/src/core/midi_tab_widget.cpp \
$(srcdir)/src/core/mixer.cpp \
$(srcdir)/src/core/name_label.cpp \
$(srcdir)/src/core/note.cpp \
$(srcdir)/src/core/note_play_handle.cpp \
$(srcdir)/src/core/piano_roll.cpp \
$(srcdir)/src/core/piano_widget.cpp \
$(srcdir)/src/core/plugin_management.cpp \
$(srcdir)/src/core/plugin.cpp \
$(srcdir)/src/core/plugin_browser.cpp \
$(srcdir)/src/core/preset_preview_play_handle.cpp \
$(srcdir)/src/core/sample_play_handle.cpp \
$(srcdir)/src/core/setup_dialog.cpp \
$(srcdir)/src/core/song_editor.cpp \
$(srcdir)/src/core/sound_generator.cpp \
$(srcdir)/src/core/track.cpp \
$(srcdir)/src/core/track_container.cpp \
$(srcdir)/src/core/surround_area.cpp \
$(srcdir)/src/core/timeline.cpp \
$(srcdir)/src/lib/base64.cpp \
$(srcdir)/src/lib/buffer_allocator.cpp \
$(srcdir)/src/lib/clipboard.cpp \
$(srcdir)/src/lib/embed.cpp \
$(srcdir)/src/lib/ladspa_manager.cpp \
$(srcdir)/src/lib/mmp.cpp \
$(srcdir)/src/lib/oscillator.cpp \
$(srcdir)/src/lib/sample_buffer.cpp \
$(srcdir)/src/lib/string_pair_drag.cpp \
$(srcdir)/src/midi/midi_alsa_raw.cpp \
$(srcdir)/src/midi/midi_device.cpp \
$(srcdir)/src/midi/midi_alsa_seq.cpp \
$(srcdir)/src/midi/midi_client.cpp \
$(srcdir)/src/midi/midi_file.cpp \
$(srcdir)/src/midi/midi_mapper.cpp \
$(srcdir)/src/midi/midi_oss.cpp \
$(srcdir)/src/soundgenerators/audio_file_processor.cpp \
$(srcdir)/src/soundgenerators/midi_out.cpp \
$(srcdir)/src/soundgenerators/plucked_string_synth.cpp \
$(srcdir)/src/soundgenerators/triple_oscillator.cpp \
$(srcdir)/src/midi/midi_port.cpp \
$(srcdir)/src/tracks/bb_track.cpp \
$(srcdir)/src/tracks/channel_track.cpp \
$(srcdir)/src/tracks/pattern.cpp \
$(srcdir)/src/tracks/sample_track.cpp \
$(srcdir)/src/widgets/crystal_button.cpp \
$(srcdir)/src/widgets/combobox.cpp \
$(srcdir)/src/widgets/cpuload_widget.cpp \
$(srcdir)/src/widgets/fade_button.cpp \
$(srcdir)/src/widgets/group_box.cpp \
$(srcdir)/src/widgets/kmultitabbar.cpp \
$(srcdir)/src/widgets/knob.cpp \
@@ -165,11 +176,15 @@ lmms_SOURCES = \
$(srcdir)/src/widgets/nstate_button.cpp \
$(srcdir)/src/widgets/pixmap_button.cpp \
$(srcdir)/src/widgets/project_notes.cpp \
$(srcdir)/src/widgets/rubberband.cpp \
$(srcdir)/src/widgets/qxembed.cpp \
$(srcdir)/src/widgets/rename_dialog.cpp \
$(srcdir)/src/widgets/side_bar_widget.cpp \
$(srcdir)/src/widgets/tab_bar.cpp \
$(srcdir)/src/widgets/tab_widget.cpp \
$(srcdir)/src/widgets/text_float.cpp \
$(srcdir)/src/widgets/tempo_sync_knob.cpp \
$(srcdir)/src/widgets/tool_button.cpp \
$(srcdir)/src/widgets/tooltip.cpp \
$(srcdir)/src/widgets/visualization_widget.cpp \
$(srcdir)/include/pch.h \
@@ -193,16 +208,13 @@ lmms_SOURCES = \
$(srcdir)/include/volume.h \
$(srcdir)/include/panning.h \
$(srcdir)/include/song_editor.h \
$(srcdir)/include/sound_generator.h \
$(srcdir)/include/audio_file_processor.h \
$(srcdir)/include/midi_time.h \
$(srcdir)/include/plugin.h \
$(srcdir)/include/instrument.h \
$(srcdir)/include/bb_editor.h \
$(srcdir)/include/piano_widget.h \
$(srcdir)/include/effect_board.h \
$(srcdir)/include/pixmap_button.h \
$(srcdir)/include/triple_oscillator.h \
$(srcdir)/include/settings.h \
$(srcdir)/include/plucked_string_synth.h \
$(srcdir)/include/rename_dialog.h \
$(srcdir)/include/export_project_dialog.h \
$(srcdir)/include/note_play_handle.h \
@@ -212,16 +224,18 @@ lmms_SOURCES = \
$(srcdir)/include/envelope_and_lfo_widget.h \
$(srcdir)/include/about_dialog.h \
$(srcdir)/include/oscillator.h \
$(srcdir)/include/crystal_button.h \
$(srcdir)/include/arp_and_chords_tab_widget.h \
$(srcdir)/include/export.h \
$(srcdir)/include/group_box.h \
$(srcdir)/include/tab_widget.h \
$(srcdir)/include/knob.h \
$(srcdir)/include/browser.h \
$(srcdir)/include/file_browser.h \
$(srcdir)/include/plugin_browser.h \
$(srcdir)/include/templates.h \
$(srcdir)/include/gui_templates.h \
$(srcdir)/include/surround_area.h \
$(srcdir)/include/kmultitabbar.h \
$(srcdir)/include/kmultitabbar-qt3.h \
$(srcdir)/include/side_bar.h \
$(srcdir)/include/side_bar_widget.h \
$(srcdir)/include/track.h \
@@ -232,10 +246,14 @@ lmms_SOURCES = \
$(srcdir)/include/name_label.h \
$(srcdir)/include/play_handle.h \
$(srcdir)/include/mmp.h \
$(srcdir)/include/midi_device.h \
$(srcdir)/include/midi_file.h \
$(srcdir)/include/midi.h \
$(srcdir)/include/midi_alsa_raw.h \
$(srcdir)/include/midi_client.h \
$(srcdir)/include/midi_event_processor.h \
$(srcdir)/include/midi_file.h \
$(srcdir)/include/midi_oss.h \
$(srcdir)/include/midi_port.h \
$(srcdir)/include/midi_time.h \
$(srcdir)/include/clipboard.h \
$(srcdir)/include/types.h \
$(srcdir)/include/qt3support.h \
@@ -250,8 +268,6 @@ lmms_SOURCES = \
$(srcdir)/include/endian_handling.h \
$(srcdir)/include/preset_preview_play_handle.h \
$(srcdir)/include/sample_play_handle.h \
$(srcdir)/include/midi.h \
$(srcdir)/include/midi_out.h \
$(srcdir)/include/nstate_button.h \
$(srcdir)/include/midi_dummy.h \
$(srcdir)/include/midi_mapper.h \
@@ -260,12 +276,28 @@ lmms_SOURCES = \
$(srcdir)/include/tooltip.h \
$(srcdir)/include/led_checkbox.h \
$(srcdir)/include/text_float.h \
$(srcdir)/include/setup_dialog.h
$(srcdir)/include/tempo_sync_knob.h \
$(srcdir)/include/setup_dialog.h \
$(srcdir)/include/dummy_plugin.h \
$(srcdir)/include/dummy_instrument.h \
$(srcdir)/include/instrument_play_handle.h \
$(srcdir)/include/string_pair_drag.h \
$(srcdir)/include/ladspa_manager.h \
$(srcdir)/include/midi_tab_widget.h \
$(srcdir)/include/audio_port.h \
$(srcdir)/include/tool_button.h \
$(srcdir)/include/cpuload_widget.h \
$(srcdir)/include/midi_alsa_seq.h \
$(srcdir)/include/micro_timer.h \
$(srcdir)/include/fade_button.h \
$(srcdir)/include/combobox.h \
$(srcdir)/include/rubberband.h \
$(srcdir)/include/base64.h \
$(srcdir)/include/qxembed.h
EXTRA_DIST = \
$(lmms_EMBEDDED_RESOURCES) \
$(srcdir)/include/sgs
EXTRA_DIST = $(lmms_EMBEDDED_RESOURCES) vst_sdk23_headers.diff lmms.1
CLEANFILES = $(lmms_MOC) ./embedded_resources.h
@@ -298,7 +330,7 @@ if HAVE_LIBSF
LIB_SF_LDADD = -lsndfile
endif
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD)
SUBDIRS = artwork locale midi-maps presets projects samples
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) $(LIB_FST_LDADD) -ldl
lmms_LDFLAGS = -rdynamic
#-rpath $(pkglibdir)

81
README
View File

@@ -1,10 +1,10 @@
Linux MultiMedia Studio 0.1.0
=============================
Linux MultiMedia Studio 0.1.2
==============================
Copyright (c) 2004-2005 by Tobias Doerffel
Copyright (c) 2004-2006 by Tobias Doerffel and others.
The whole program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your option)
any later version.
@@ -26,9 +26,9 @@ What is LMMS??
LMMS aims to be a free alternative to popular (but commercial and closed-
source) programs like FruityLoops, Cubase and Logic giving you the ability of
producing music with your computer by creating/synthesizing sounds, arranging
samples, playing live with keyboard and much more...
samples, using effects, playing live with keyboard and much more...
LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/
LMMS combines the features of a sequencer-program (pattern-/channel-/
sample-/song-/effect-management) and those of powerful synthesizers and
samplers in a modern, user-friendly and easy to use graphical user-interface.
@@ -41,25 +41,29 @@ Requirements
------------
The most important requirement is for sure a fast computer, so don't try to get
LMMS working on a pentium one with 60 MHz... ;-) So you should have at least
500 MHz, but for really enjoying LMMS less than 1 GHz makes no sense...
(LMMS is currently developed on a PIII 450 MHz...!!)
LMMS working on a pentium I with 60 MHz... ;-) Therefore you should have at
least 500 MHz, but for really enjoying LMMS less than 1 GHz makes no sense...
Required libraries are:
- Qt 3.2 or higher (tested up to 4.0.0) with devel-files
- SDL_sound (tested with 0.1.5 & 1.0.1) with devel-files
Required libraries:
- multithreaded version of Qt 3.0 (at least 3.2 recommended) or higher (tested
up to 4.1.0) with devel-files
Optional, but strongly recommended:
- JACK with devel-files
- libvorbis with devel-files
- libalsa with devel-files
- SDL_sound (tested with 0.1.5 & 1.0.1) with devel-files
- SDL with devel-files
- libsamplerate with devel-files
- libsndfile with devel-files
- WINE, WINE-devel-files + header-files from Steinberg SDK
For compiling you should have an up to date GCC with g++.
LMMS has been (successfully) tested under Debian Sarge 3.1, Fedora Core 2-4,
and SuSE Linux 9.0-9.3 with Qt 3.[23].x and Qt 4.0.0.
It was compiled using GCC 3.3.x, GCC 3.4.x and GCC 4.0.0.
LMMS has been (successfully) tested under Debian Sarge 3.1 / unstable,
Fedora Core 2-4, and SuSE Linux 9.0-9.3 with Qt 3.[23].x and Qt 4.0.0.
It was compiled using GCC 2.95, 3.3.x, GCC 3.4.x and GCC 4.0.x.
If you have problems with compiling or running LMMS, find any bug or have
suggestions and so on, please feel free to e-mail me (for mail-address see
@@ -67,31 +71,44 @@ below)!
Building
--------
Help developing LMMS
--------------------
See INSTALL for information on how to build LMMS.
Please also take a look at
./configure --help
There you'll see a lot of options which partly might be interesting for you.
For example if you want to build LMMS with VST-support, you have to run
configure with --with-vst switch. Otherwise LMMS support won't be built!
Join LMMS-development
----------------------
If you are interested in LMMS, it's programming, artwork, testing, writing
demo-songs, (and improving this f**** README...) or something like that,
you're welcome to participate on the development of LMMS!
Just e-mail me: tobydox@users.sourceforge.net
The project-homepage of LMMS, mailingslists and a list of things you can do
can be found at
The project-homepage of LMMS and mailingslists can be found at
http://lmms.sourceforge.net
Before coding a new big feature, please always post your idea and suggestions
Details on development can be found at
http://lmms.sourceforge.net/development.php
or in the Wiki:
http://wiki.mindrules.net
Before coding a new big feature, please ALWAYS post your idea and suggestions
about your feature and about the actual implementation to the
LMMS-devel-mailinglist (lmms-devel@lists.sourceforge.net) and wait for replies
or email me! Maybe there're different ideas, improvements, hints or maybe your
feature is not welcome/needed at the moment (but for sure this will be very
seldom).
If you coded your feature, make sure, that it is running properly with the
newest available version of LMMS and that it also runs with different
configurations (e.g. different latency, disabled surround-support, missing
package(s) etc.). Important is also, that you comment your
source so that other people can fix bugs or improve your feature!
LMMS-devel-mailinglist (lmms-devel@lists.sourceforge.net) and wait for replies!
Maybe there're different ideas, improvements, hints or maybe your feature is
not welcome/needed at the moment (but for sure this will be very seldom).

42
TODO
View File

@@ -1,40 +1,40 @@
- make usable with Qt4
- make LMMS an ALSA-sequencer-client
- adchannel-toolbutton -> popup-menu with available soundgenerator-plugins
- tempo-based arpeggio
- pre-listen when opening sample with QFileDialog
to be done as soon as possible:
- autosave every 30s (configurable!) and offer recovery at startup after crash
- make piano-roll use rubberband instead of implementing a simple one on it's own
- level-meters in output-graph and channel-track
- do not skip samples because of rounding-errors when resampling in src/lib/sample_buffer.cpp
- MIDI-program/MIDI-mapping/process program-/channel-change-events from MIDI-files
- add note-len- and note-alignment-selectbox to piano-roll
- DSSI-support
- somehow avoid hidden plugin-descriptor-widgets plugin-browser if height of window is too small -> add scrollbar
- use drawLineF() for drawing notes in pattern::paintEvent() in qt4-version
- only redraw region given by paint-event in pattern, bbTCO, sampleTCO etc.
- pre-listen when opening sample with QFileDialog
- panning-editing in piano-roll
- use midi-maps
- process program-/channel-change-events from MIDI-files
- setup MIDI-channel and -program in MIDI-Out
- speed up painting of sampleTCO
- save window-positions, -states and -sizes in files
- solve problems with different keyboard-layouts when playing channel-track with pc-keyboard
- balance env+lfo
- autosave every 1 minute
- audioDummy: always wait until the stuff normally would have been written (=simulate blocking IO)
- solve problems with different keyboard-layouts when playing channel-track with pc-keyboard -> use tr()
- panning env+lfo
- plucked-string-synth: knob for metallic -> use noise as wave-shape
- finish qt4-port and make LMMS usable when compiling with Qt4
- rewrite export-project-dialog using layout-mechanism
- dynamic pitch-change
- make piano-roll use the global clipboard??
- add languages:
- Dutch
- Italian
- ...any other welcome
- add more localizations:
- Swedish
- Norwegian
- Greece
- ...
Things to be done anytime in the future
to be done somewhen in the future:
- effect-board -> live-fx from input
- event-system
- event/automation-system
- chord-editor?
- WAVE/OGG/MP3-Import -> FFT-analysis -> write notes
- FLP-Import
- classical note-edit-window -> also ability of printing and maybe later scanning & recognition of notes
- add FLAC as export-format?
- support of LADSPA for all plugins
- better commented source...
- optimize, optimize, optimize.....

View File

@@ -9,7 +9,7 @@ AC_ARG_WITH([qtdir], [ --with-qtdir=DIR Qt installation directory [defau
# Check that QTDIR is defined or that --with-qtdir given
if test x"$QTDIR" = x ; then
# some usual Qt-locations
QT_SEARCH="/usr /usr/lib/qt /usr/lib/qt3 /usr/lib/qt31 /usr/lib/qt32 /usr/lib/qt33 /usr/lib/qt-3.0 /usr/lib/qt-3.1 /usr/lib/qt-3.2 /usr/lib/qt-3.3 usr/local/qt /usr/local/qt3 /usr/local/qt31/ /usr/local/qt32 /usr/local/qt33 /usr/X11R6 /usr/local/Trolltech/Qt-4.0.0"
QT_SEARCH="/usr /usr/lib/qt /usr/lib/qt3 /usr/lib/qt31 /usr/lib/qt32 /usr/lib/qt33 /usr/lib/qt-3.0 /usr/lib/qt-3.1 /usr/lib/qt-3.2 /usr/lib/qt-3.3 usr/local/qt /usr/local/qt3 /usr/local/qt31/ /usr/local/qt32 /usr/local/qt33 /usr/share/qt3 /usr/X11R6 /usr/share/qt4 /usr/local/Trolltech/Qt-4.0.0 /usr/local/Trolltech/Qt-4.0.1 /usr/local/Trolltech/Qt-4.1.0"
else
QT_SEARCH=$QTDIR
QTDIR=""
@@ -141,6 +141,7 @@ case "${host}" in
QT_IS_MT="yes"
QT_LIB="-lQtCore -lQtGui -lQtXml -lQt3Support"
else
QT_CXXFLAGS="-DQT3 $QT_CXXFLAGS"
if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
QT_LIB="-lqt-mt"
QT_IS_MT="yes"
@@ -264,3 +265,4 @@ AC_SUBST(QT_GUILINK)
AC_SUBST(QASSISTANTCLIENT_LDADD)
])

5
buildtools/Makefile.am Normal file
View File

@@ -0,0 +1,5 @@
AUTOMAKE_OPTIONS = foreign 1.4
noinst_PROGRAMS= bin2res
bin2res_SOURCES = bin2res.cpp

View File

@@ -1,7 +1,7 @@
/*
* bin2res.cpp - generate embedded resources from binary data (based on qembed)
*
* Copyright (c) 2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -97,7 +97,7 @@ int main( int argc, char * * argv )
e->cname = convertFileNameToCIdentifier( e->name );
embedded_data.push_back( e );
std::string s;
std::cout << "static const unsigned char " << e->cname <<
std::cout << "const unsigned char " << e->cname <<
"_data[] = {";
embedData( data, fsize, std::cout );
std::cout << std::endl << "};" << std::endl << std::endl;
@@ -106,7 +106,7 @@ int main( int argc, char * * argv )
if( embedded_data.size() > 0 )
{
std::cout << "static const unsigned char dummy_data[] ="
std::cout << "const unsigned char dummy_data[] ="
"{ 0x00 };" << std::endl << std::endl;
embed * dummy = new embed;
dummy->size = 1;
@@ -114,14 +114,15 @@ int main( int argc, char * * argv )
dummy->cname = convertFileNameToCIdentifier( "dummy" );
embedded_data.push_back( dummy );
std::cout << "#include <string.h>" << std::endl;
std::cout << "static struct embedDesc" << std::endl
<< "{" << std::endl
std::cout << "#include <string.h>" << std::endl << std::endl;
std::cout << "#include \"embed.h\"" << std::endl << std::endl;
std::cout << "embed::descriptor embed_vec[] = {" << std::endl;
/* << "{" << std::endl
<< " int size;" << std::endl
<< " const unsigned char * data;" <<
std::endl
<< " const char * name;" << std::endl
<< "} embed_vec[] = {" << std::endl;
<< "} embed_vec[] = {" << std::endl;*/
while( embedded_data.size() > 0 )
{
embed * e = embedded_data[0];
@@ -133,9 +134,9 @@ int main( int argc, char * * argv )
}
std::cout << " { 0, 0, 0 }" << std::endl << "};" << std::endl
<< std::endl
<< "static const embedDesc & findEmbeddedData( "
"const char * _name )" << std::endl
<< "{" << std::endl
<< "const embed::descriptor & "
"findEmbeddedData( const char * _name )"
<< std::endl << "{" << std::endl
<< " for( int i = 0; embed_vec[i].data; "
"i++ )" << std::endl
<< " {" << std::endl

View File

@@ -2,9 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.1.1, tobydox@users.sourceforge.net)
#AC_INIT(acinclude.m4)
AM_INIT_AUTOMAKE(lmms, 0.1.1)
AC_INIT(lmms, 0.1.4, tobydox/at/users/dot/sourceforge/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.1.4)
AM_CONFIG_HEADER(config.h)
@@ -12,6 +11,8 @@ AM_CONFIG_HEADER(config.h)
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_GCC_TRADITIONAL
AC_PROG_LIBTOOL
AC_PATH_XTRA
@@ -21,7 +22,7 @@ gw_CHECK_QT
# checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h memory.h string.h sys/ioctl.h unistd.h stdlib.h])
AC_CHECK_HEADERS([fcntl.h memory.h string.h sys/ioctl.h unistd.h stdlib.h pthread.h sys/ipc.h sys/shm.h sys/time.h sys/select.h sys/types.h stdarg.h signal.h])
# checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -31,15 +32,16 @@ AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
AC_C_BIGENDIAN
AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long])
# checks for library functions.
AC_FUNC_ALLOCA
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([usleep])
AC_CHECK_FUNCS([usleep pipe sprintf])
# search for include-path of SDL (just for supporting the FreeBSD-guys.... ;-)
@@ -54,7 +56,7 @@ done
AH_TEMPLATE(SDL_SDL_H, [Define to location of SDL.h])
AH_TEMPLATE(SDL_SDL_AUDIO_H, [Define to location of SD_audio.h])
AH_TEMPLATE(SDL_SDL_AUDIO_H, [Define to location of SDL_audio.h])
AH_TEMPLATE(SDL_SDL_SOUND_H, [Define to location of SDL_sound.h])
OLD_LIBS="$LIBS"
@@ -65,7 +67,7 @@ AC_ARG_WITH(sdl,
AS_HELP_STRING([--without-sdl],
[disable support for SDL-audio-output]), ,
[ with_sdlaudio=yes ])
AH_TEMPLATE(HAVE_SDL_SDL_AUDIO_H, [Define to 1 if you have the $SDL_INC_PATH/SDL_audio.h header file.])
AH_TEMPLATE(HAVE_SDL_SDL_AUDIO_H, [Define to 1 if you have the <$SDL_INC_PATH/SDL_audio.h> header file.])
if test "x$with_sdlaudio" = "xyes" -a ! -z "$SDL_INC_PATH"; then
AC_CHECK_HEADER($SDL_INC_PATH/SDL_audio.h, HAVE_SDL_SDL_AUDIO_H="true")
AC_CHECK_LIB([SDL], [SDL_OpenAudio], HAVE_LIBSDL="true", HAVE_SDL_SDL_AUDIO_H="")
@@ -83,7 +85,7 @@ AC_ARG_WITH(sdlsound,
AS_HELP_STRING([--without-sdlsound],
[disable support for reading samples via SDL_sound]), ,
[ with_sdlsound=yes ])
AH_TEMPLATE(HAVE_SDL_SDL_SOUND_H, [Define to 1 if you have the $SDL_INCL_PATH/SDL_sound.h header file.])
AH_TEMPLATE(HAVE_SDL_SDL_SOUND_H, [Define to 1 if you have the <$SDL_INCL_PATH/SDL_sound.h> header file.])
if test "x$with_sdlsound" = "xyes" -a ! -z "$SDL_INC_PATH"; then
AC_CHECK_HEADER($SDL_INC_PATH/SDL_sound.h, HAVE_SDL_SDL_SOUND_H="true")
AC_CHECK_LIB([SDL_sound], [Sound_Init], HAVE_LIBSDL_SOUND="true", HAVE_SDL_SDL_SOUND_H="")
@@ -103,7 +105,7 @@ AC_ARG_WITH(asound,
AS_HELP_STRING([--without-asound],
[disable support for ALSA-sound-output]), ,
[ with_asound=yes ])
AH_TEMPLATE(HAVE_ALSA_ASOUNDLIB_H, [Define to 1 if you have the alsa/asoundlib.h header file.])
AH_TEMPLATE(HAVE_ALSA_ASOUNDLIB_H, [Define to 1 if you have the <alsa/asoundlib.h> header file.])
if test "x$with_asound" = "xyes" ; then
AC_CHECK_HEADER(alsa/asoundlib.h, HAVE_ALSA_ASOUNDLIB_H="true")
AC_CHECK_LIB([asound], [snd_pcm_open], HAVE_LIBASOUND="true", HAVE_ALSA_ASOUNDLIB_H="")
@@ -114,12 +116,31 @@ fi
AM_CONDITIONAL(HAVE_LIBASOUND, test ! -z "$HAVE_ALSA_ASOUNDLIB_H")
# check for OSS
AC_ARG_WITH(oss,
AS_HELP_STRING([--without-oss],
[disable support for OSS-sound-output]), ,
[ with_oss=yes ])
AH_TEMPLATE(HAVE_SYS_SOUNDCARD_H, [Define to 1 if you have the <sys/soundcard.h> header file.])
AH_TEMPLATE(HAVE_SOUNDCARD_H, [Define to 1 if you have the <soundcard.h> header file.])
if test "x$with_oss" = "xyes" ; then
AC_CHECK_HEADER(sys/soundcard.h, HAVE_SYS_SOUNDCARD_H="true")
AC_CHECK_HEADER(soundcard.h, HAVE_SOUNDCARD_H="true")
fi
if test ! -z "$HAVE_SYS_SOUNDCARD_H" ; then
AC_DEFINE(HAVE_SYS_SOUNDCARD_H)
fi
if test ! -z "$HAVE_SOUNDCARD_H" ; then
AC_DEFINE(HAVE_SOUNDCARD_H)
fi
# check for JACK
AC_ARG_WITH(jack,
AS_HELP_STRING([--without-jack],
[disable support for JACK-transport]), ,
[ with_jack=yes ])
AH_TEMPLATE(HAVE_JACK_JACK_H, [Define to 1 if you have the jack/jack.h header file.])
AH_TEMPLATE(HAVE_JACK_JACK_H, [Define to 1 if you have the <jack/jack.h> header file.])
AH_TEMPLATE(OLD_JACK, [Define to 1 if your JACK-version doesnt know about jack_client_open() etc.])
if test "x$with_jack" = "xyes" ; then
AC_CHECK_HEADER(jack/jack.h, HAVE_JACK_JACK_H="true")
@@ -135,14 +156,57 @@ fi
AM_CONDITIONAL(HAVE_LIBJACK, test ! -z "$HAVE_JACK_JACK_H")
# check for proper WINE-installation and existing Steinberg headers
AC_ARG_WITH(vst,
AS_HELP_STRING([--with-vst],
[enable support for builtin VST-plugin-hosting]), [ with_vst=yes ], [ with_vst=no ])
AH_TEMPLATE(HAVE_VST_AEFFECTX_H, [Define to 1 if you have the <aeffectx.h> header file.])
if test "x$with_vst" = "xyes" ; then
ORIG_CFLAGS=$CFLAGS
ORIG_CPPFLAGS=$CPPFLAGS
CFLAGS="$CLFAGS -I./include"
CPPFLAGS="$CPPFLAGS -I./include"
AC_CHECK_HEADER(aeffectx.h, HAVE_VST_AEFFECTX_H="true")
CFLAGS="$ORIG_CFLAGS"
CPPFLAGS="$ORIG_CPPFLAGS"
AC_CHECK_PROG(WINEGCC, winegcc, /usr/bin/winegcc,,/usr/bin)
AC_CHECK_LIB([wine], [wine_init])
if test ! -z "$WINEGCC" ; then
if test ! -z "$HAVE_VST_AEFFECTX_H" ; then
WINE_OK_BUT_VST_INCOMPLETE=""
AC_DEFINE(HAVE_VST_AEFFECTX_H)
else
WINE_OK_BUT_VST_INCOMPLETE="true"
fi
fi
fi
AM_CONDITIONAL(VST_SUPPORT, test ! -z "$WINEGCC")
# check for LADSPA-SDK
AC_ARG_WITH(src,
AS_HELP_STRING([--without-ladspa],
[disable support for LADSPA-support]), ,
[ with_ladspa=yes ])
AH_TEMPLATE(HAVE_LADSPA_H, [Define to 1 if you have the <ladspa.h> header file.])
if test "x$with_ladspa" = "xyes" ; then
AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA_H="true")
fi
if test ! -z "$HAVE_LADSPA_H" ; then
AC_DEFINE(HAVE_LADSPA_H)
fi
# check for vorbis-lib
AC_ARG_WITH(vorbis,
AS_HELP_STRING([--without-vorbis],
[disable support for exporting song to OGG-files]), ,
[ with_vorbis=yes ])
AH_TEMPLATE(HAVE_VORBIS_CODEC_H, [Define to 1 if you have the vorbis/codec.h header file.])
AH_TEMPLATE(HAVE_VORBIS_VORBISENC_H, [Define to 1 if you have the vorbis/vorbisenc.h header file.])
AH_TEMPLATE(HAVE_VORBIS_VORBISFILE_H, [Define to 1 if you have the vorbis/vorbisfile.h header file.])
AH_TEMPLATE(HAVE_VORBIS_CODEC_H, [Define to 1 if you have the <vorbis/codec.h> header file.])
AH_TEMPLATE(HAVE_VORBIS_VORBISENC_H, [Define to 1 if you have the <vorbis/vorbisenc.h> header file.])
AH_TEMPLATE(HAVE_VORBIS_VORBISFILE_H, [Define to 1 if you have the <vorbis/vorbisfile.h> header file.])
if test "x$with_vorbis" = "xyes" ; then
OGG_SUPPORT="true"
AC_CHECK_HEADER(vorbis/codec.h, HAVE_VORBIS_CODEC_H="true",OGG_SUPPORT="")
@@ -158,12 +222,31 @@ fi
AM_CONDITIONAL(HAVE_LIBVORBIS, test ! -z "$OGG_SUPPORT")
# check for libFLAC
AC_ARG_WITH(flac,
AS_HELP_STRING([--without-flac],
[disable support for internal encoding/decoding with FLAC]), ,
[ with_flac=yes ])
AH_TEMPLATE(HAVE_FLAC_STREAM_ENCODER_H, [Define to 1 if you have the <FLAC/stream_encoder.h> header file.])
AH_TEMPLATE(HAVE_FLAC_STREAM_DECODER_H, [Define to 1 if you have the <FLAC/stream_decoder.h> header file.])
if test "x$with_flac" = "xyes" ; then
AC_CHECK_HEADER(FLAC/stream_encoder.h, HAVE_FLAC_STREAM_ENCODER_H="true")
AC_CHECK_HEADER(FLAC/stream_decoder.h, HAVE_FLAC_STREAM_DECODER_H="true")
AC_CHECK_LIB([FLAC], [FLAC__stream_encoder_new], HAVE_LIBFLAC="true")
fi
if test ! -z "$HAVE_FLAC_STREAM_ENCODER_H" -a ! -z "$HAVE_FLAC_STREAM_DECODER_H" -a ! -z "$HAVE_LIBFLAC"; then
AC_DEFINE(HAVE_FLAC_STREAM_ENCODER_H)
AC_DEFINE(HAVE_FLAC_STREAM_DECODER_H)
fi
AM_CONDITIONAL(HAVE_LIBFLAC, test ! -z "$HAVE_LIBFLAC")
# check for libsamplerate
AC_ARG_WITH(src,
AC_ARG_WITH(libsrc,
AS_HELP_STRING([--without-libsrc],
[disable support for resampling via libsamplerate]), ,
[ with_libsrc=yes ])
AH_TEMPLATE(HAVE_SAMPLERATE_H, [Define to 1 if you have the samplerate.h header file.])
AH_TEMPLATE(HAVE_SAMPLERATE_H, [Define to 1 if you have the <samplerate.h> header file.])
if test "x$with_libsrc" = "xyes" ; then
AC_CHECK_HEADER(samplerate.h, HAVE_SAMPLERATE_H="true")
AC_CHECK_LIB([samplerate], [src_simple], HAVE_LIBSRC="true", HAVE_SAMPLERATE_H="")
@@ -175,11 +258,11 @@ AM_CONDITIONAL(HAVE_LIBSRC, test ! -z "$HAVE_SAMPLERATE_H")
# libsndfile-stuff
AC_ARG_WITH(src,
AC_ARG_WITH(sndfile,
AS_HELP_STRING([--without-libsf],
[disable support for importing files via libsndfile]), ,
[ with_libsf=yes ])
AH_TEMPLATE(HAVE_SNDFILE_H, [Define to 1 if you have the sndfile.h header file.])
AH_TEMPLATE(HAVE_SNDFILE_H, [Define to 1 if you have the <sndfile.h> header file.])
if test "x$with_libsf" = "xyes" ; then
AC_CHECK_HEADER(sndfile.h, HAVE_SNDFILE_H="true")
AC_CHECK_LIB([sndfile], [sf_command], HAVE_LIBSF="true", HAVE_SNDFILE_H="")
@@ -207,11 +290,11 @@ AM_CONDITIONAL(HAVE_LIBSF, test ! -z "$HAVE_SNDFILE_H")
AC_ARG_WITH(nosmpdecs,
AS_HELP_STRING([--without-sample-decoders],
[force compiling LMMS even if libraries for sample-decoding were found]),
[force compiling LMMS even if no usable libraries for sample-decoding were found]),
[ with_smpdecs=yes ])
if test -z "$HAVE_SND_FILE" -a -z "$HAVE_SDL_SDL_SOUND_H" -a -z "$OGG_SUPPORT" -a ! -z "$with_smpdecs"; then
AC_MSG_ERROR([*** neither libsndfile nor SDL_sound nor libvorbis (or according devel-files) were found which would make LMMS unable to load any samples, so please install at least one of the packages and try again! Use --without-sample-decoders to force compiling LMMS.])
AC_MSG_ERROR([*** neither libsndfile nor SDL_sound nor libvorbis (or according devel-files) were found which would make LMMS unable to load any samples so please install at least one of the packages and try again! Use --without-sample-decoders to force compiling without any sample-decoding-libraries.])
fi
@@ -283,6 +366,14 @@ AC_TRY_LINK([#include <math.h>], [ fabsf ],
AC_DEFINE(fabsf, fabs)
)
AC_MSG_CHECKING([whether logf is known by compiler])
AH_TEMPLATE(logf, [Define to lof if logf is not known])
AC_TRY_LINK([#include <math.h>], [ logf ],
AC_MSG_RESULT(yes),
AC_MSG_RESULT([no - will use log instead])
AC_DEFINE(logf, log)
)
# check whether to enable debugging-code
AC_MSG_CHECKING([whether to enable debugging-code])
@@ -314,7 +405,7 @@ lmmsdatadir="$datadir/$PACKAGE"
AC_SUBST(lmmsdatadir)
CXXFLAGS="$CXXFLAGS -g0"
# CXXFLAGS="$CXXFLAGS -g0"
if test $CXX == "g++" ; then
CXXFLAGS="$CXXFLAGS -ansi -Wall -fno-exceptions"
fi
@@ -322,13 +413,22 @@ fi
AC_CONFIG_FILES([Makefile
artwork/Makefile
artwork/track_icons/Makefile
buildtools/Makefile
locale/Makefile
midi-maps/Makefile
plugins/Makefile
plugins/audio_file_processor/Makefile
plugins/bit_invader/Makefile
plugins/plucked_string_synth/Makefile
plugins/triple_oscillator/Makefile
plugins/vestige/Makefile
presets/Makefile
presets/AudioFileProcessor/Makefile
presets/MIDI-Out/Makefile
presets/BitInvader/Makefile
presets/PluckedStringSynth/Makefile
presets/TripleOscillator/Makefile
presets/VeSTige/Makefile
projects/Makefile
projects/cool_songs/Makefile
projects/covers/Makefile
@@ -356,21 +456,7 @@ with_warnings="false"
echo
echo
if test -z "$OGG_SUPPORT" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You don't seem to have libvorbis installed and/or libvorbis-development-"
echo " = package is missing. This will disable support for exporting songs to"
echo " = OGG-files! If also SDL_sound is missing, you'll not be able to use the "
echo " = samples coming with LMMS since libsndfile currently has no OGG-support!"
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
fi
PLUGINS_TO_BUILD=""
if test -z "$HAVE_ALSA_ASOUNDLIB_H" ; then
@@ -380,10 +466,11 @@ if test -z "$HAVE_ALSA_ASOUNDLIB_H" ; then
echo " ="
echo " = You don't seem to have ALSA-library installed and/or ALSA-lib-development-"
echo " = package is missing. This will disable support for sound-output via ALSA!"
echo " = If you use ALSA-driver for your soundcard there will be no sound-output!"
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* ALSA for audio- and MIDI-input/output"
fi
@@ -400,10 +487,32 @@ if test -z "$HAVE_JACK_JACK_H" ; then
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* JACK for audio-input/output"
fi
if test -z "$HAVE_SOUNDCARD_H" -a -z "$HAVE_SYS_SOUNDCARD_H" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You don't seem to have soundcard.h which is neccessary for outputting "
echo " = sound via OSS under Linux/BSD/Solaris."
echo " = This will also disable support for MIDI using OSS."
echo " = If you're building for a different platform or do not need OSS-support, you"
echo " = can ignore this warning."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* OSS for audio- and MIDI-input/output"
fi
if test -z "$HAVE_SDL_SDL_AUDIO_H" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
@@ -411,16 +520,35 @@ if test -z "$HAVE_SDL_SDL_AUDIO_H" ; then
echo " ="
echo " = You don't seem to have SDL-library installed and/or SDL-lib-development-"
echo " = package is missing. This will disable support for sound-output via SDL, "
echo " = which is important, if you're using sound-daemons (arts, ESD, JACK etc.)"
echo " = which is important, if you're using sound-daemons (arts, ESD etc.)"
echo " = When compiling without SDL, you'll always have to kill your sound-daemon"
echo " = before using LMMS...!"
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* SDL for audio-output"
fi
if test -z "$OGG_SUPPORT" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You don't seem to have libvorbis installed and/or libvorbis-development-"
echo " = package is missing. This will disable support for exporting songs to"
echo " = OGG-files! If SDL_sound is missing too, you'll not be able to use the "
echo " = samples coming with LMMS since libsndfile currently has no OGG-support!"
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libvorbis for encoding/decoding OGG-files"
fi
if test -z "$HAVE_SDL_SDL_SOUND_H" ; then
echo " ========================"
@@ -433,6 +561,8 @@ if test -z "$HAVE_SDL_SDL_SOUND_H" ; then
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* SDL_sound for sample-decoding"
fi
@@ -450,10 +580,30 @@ if test -z "$HAVE_SNDFILE_H" ; then
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libsndfile for sample-decoding"
fi
# not yet...
#if test -z "$HAVE_LADSPA_H" ; then
# echo " ========================"
# echo " === LMMS - WARNING ======================================================="
# echo " ========================"
# echo " ="
# echo " = You don't seem to have installed LADSPA-SDK which is neccessary for"
# echo " = building LMMS with LADSPA support. LADSPA-support is very useful"
# echo " = as you're able to use a lot of LADSPA-effects inside LMMS."
# echo " = Consider installing the missing packages for using the full power of LMMS."
# echo " ="
# with_warnings="true"
#else
# PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* LADSPA-plugins"
#fi
if test -z "$HAVE_SAMPLERATE_H" ; then
echo " ========================"
@@ -467,11 +617,69 @@ if test -z "$HAVE_SAMPLERATE_H" ; then
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libsamplerate for internal samplerate-conversion"
fi
if test "x$with_vst" = "xno" ; then
echo " ========================"
echo " === LMMS - INFORMATION ==================================================="
echo " ========================"
echo " ="
echo " = If you want VST-support within LMMS, please pass"
echo " ="
echo " = --with-vst"
echo " ="
echo " = to configure, since it is disabled per default!"
echo " ="
else
if test ! -z "$WINE_OK_BUT_VST_INCOMPLETE" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You seem to have a proper WINE-installation, but the header-files"
echo " = (AEffect.h and aeffectx.h) from Steinberg-VST-SDK are missing or not present"
echo " = in /usr/include/ or ./include. We cannot distribute them as they're licensed under"
echo " = a GPL-incompatible license, so you'll have to download them at"
echo " ="
echo " = http://www.steinberg.de/Steinberg/ygrabit/vstsdk/OnlineDoc/source/common/AEffect.h"
echo " = http://www.steinberg.de/Steinberg/ygrabit/vstsdk/OnlineDoc/source/common/aeffectx.h"
echo " ="
echo " = and put the mentioned files into /usr/include/ or ./include. Make sure,"
echo "= they're patched with file vst_sdk23_headers.diff!"
echo " = Otherwise (now!) configure will disable LMMS's support for built-in VST-"
echo " = plugin-usage. If you do not intend to use VST-plugins with LMMS you can "
echo " = ignore this warning."
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
if test ! -z "$HAVE_VST_AEFFECTX_H" ; then
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* it's own VST-server for hosting VST-plugins"
else
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You don't seem to have installed WINE or it's development-packages (headers,"
echo " = winegcc etc.) which are neccessary for building LMMS with built-in"
echo " = VST-support."
echo " = If you do not intend to use VST-plugins with LMMS you can ignore this "
echo " = warning."
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
fi
fi
fi
echo
echo
echo "LMMS will be able to use $PLUGINS_TO_BUILD" | sed -e "s/\\\n/\n/g" | sed -e "s/\\\t/\t/g" | sed -e "s/\\\\\*/\*/g"
echo
echo
echo " ============================"
@@ -490,7 +698,7 @@ else
fi
echo " ="
echo " = If there're problems while compiling LMMS, please send a mail to "
echo " = tobydox@users.sourceforge.net!"
echo " = tobydox [at] users.sourceforge.net!"
echo " ="
echo

View File

@@ -1,8 +1,9 @@
/*
* about_dialog.h - declaration of class aboutDialog
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -52,8 +53,8 @@ public:
protected:
void keyPressEvent( QKeyEvent * _ke );
void resizeEvent( QResizeEvent * _re );
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void resizeEvent( QResizeEvent * _re );
private:

View File

@@ -2,8 +2,9 @@
* arp_and_chords_tab_widget.h - declaration of class arpAndChordWidget which
* provides code for using arpeggio and chords
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -46,13 +47,16 @@
#include "types.h"
class QPixmap;
class channelTrack;
class comboBox;
class groupBox;
class knob;
class pixmapButton;
class QComboBox;
class QPixmap;
class ledCheckBox;
class notePlayHandle;
class pixmapButton;
class tempoSyncKnob;
const int MAX_CHORD_POLYPHONY = 10;
@@ -62,9 +66,8 @@ class arpAndChordsTabWidget : public QWidget, public settings
{
Q_OBJECT
public:
arpAndChordsTabWidget( channelTrack * _channel_track,
QWidget * _parent );
~arpAndChordsTabWidget();
arpAndChordsTabWidget( channelTrack * _channel_track );
virtual ~arpAndChordsTabWidget();
static struct chord
{
@@ -95,7 +98,6 @@ public:
protected slots:
// void arpOffToggled( bool );
void arpUpToggled( bool );
void arpDownToggled( bool );
void arpUpAndDownToggled( bool );
@@ -113,26 +115,34 @@ private:
RANDOM
} m_arpDirection;
channelTrack * m_channelTrack;
enum arpModes
{
FREE,
SORT,
SYNC
} ;
// chord-stuff
groupBox * m_chordsGroupBox;
QComboBox * m_chordsComboBox;
comboBox * m_chordsComboBox;
knob * m_chordRangeKnob;
// arpeggio-stuff
groupBox * m_arpGroupBox;
QComboBox * m_arpComboBox;
comboBox * m_arpComboBox;
knob * m_arpRangeKnob;
knob * m_arpTimeKnob;
tempoSyncKnob * m_arpTimeKnob;
knob * m_arpGateKnob;
QLabel * m_arpDirectionLbl;
//pixmapButton * m_arpOffBtn;
pixmapButton * m_arpUpBtn;
pixmapButton * m_arpDownBtn;
pixmapButton * m_arpUpAndDownBtn;
pixmapButton * m_arpRandomBtn;
comboBox * m_arpModeComboBox;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* audio_alsa.h - device-class that implements ALSA-PCM-output
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -35,6 +36,9 @@
#define ALSA_SUPPORT
#endif
// older ALSA-versions might require this
#define ALSA_PCM_NEW_HW_PARAMS_API
#include <alsa/asoundlib.h>
#include "audio_device.h"
@@ -44,7 +48,7 @@ class lcdSpinBox;
class QLineEdit;
class audioALSA : public audioDevice
class audioALSA : public audioDevice, public QThread
{
public:
audioALSA( Uint32 _sample_rate, bool & _success_ful );
@@ -75,9 +79,9 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
virtual void startProcessing( void );
virtual void stopProcessing( void );
virtual void run( void );
int FASTCALL setHWParams( Uint32 _sample_rate, Uint32 _channels,
snd_pcm_access_t _access );
@@ -94,6 +98,7 @@ private:
snd_pcm_sw_params_t * m_swParams;
bool m_littleEndian;
volatile bool m_quit;
} ;

View File

@@ -1,8 +1,9 @@
/*
* audio_device.h - base-class for audio-devices, used by LMMS-mixer
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -29,11 +30,15 @@
#ifdef QT4
#include <QPair>
#include <QMutex>
#include <QThread>
#else
#include <qpair.h>
#include <qmutex.h>
#include <qthread.h>
#endif
@@ -50,6 +55,11 @@
#include "tab_widget.h"
class audioPort;
class audioDevice
{
public:
@@ -66,9 +76,15 @@ public:
m_devMutex.unlock();
}
void FASTCALL writeBuffer( surroundSampleFrame * _ab, Uint32 _frames,
Uint32 _src_sample_rate,
float _master_output );
// if audio-driver supports ports, classes inherting audioPort
// (e.g. channel-tracks) can register themselves for making
// audio-driver able to collect their individual output and provide
// them at a specific port - currently only supported by JACK
virtual void registerPort( audioPort * _port );
virtual void unregisterPort( audioPort * _port );
virtual void renamePort( audioPort * _port );
inline Uint32 sampleRate( void ) const
{
@@ -80,6 +96,15 @@ public:
return( m_channels );
}
void processNextBuffer( void );
virtual void startProcessing( void )
{
}
virtual void stopProcessing( void )
{
}
class setupWidget : public tabWidget
@@ -87,7 +112,7 @@ public:
public:
setupWidget( const QString & _caption, QWidget * _parent ) :
tabWidget( tabWidget::tr( "Settings for %1" ).arg(
_caption ), _parent )
_caption ).toUpper(), _parent )
{
}
@@ -102,14 +127,21 @@ public:
protected:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
// subclasses can overload this for being used in conjunction with
// processNextBuffer()
virtual void FASTCALL writeBuffer( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output ) = 0;
float _master_gain )
{
}
// called by according driver for fetching new sound-data
Uint32 FASTCALL getNextBuffer( surroundSampleFrame * _ab );
// convert a given audio-buffer to a buffer in signed 16-bit samples
// returns num of bytes in outbuf
int FASTCALL convertToS16( surroundSampleFrame * _ab, Uint32 _frames,
float _master_output,
float _master_gain,
outputSampleType * _output_buffer,
bool _convert_endian = FALSE );
@@ -118,9 +150,11 @@ protected:
Uint32 _frames );
// resample given buffer from samplerate _src_src to samplerate _dst_src
void FASTCALL resample( surroundSampleFrame * _src, Uint32 _frames,
void FASTCALL resample( const surroundSampleFrame * _src,
Uint32 _frames,
surroundSampleFrame * _dst,
Uint32 _src_sr, Uint32 _dst_sr );
inline void setSampleRate( Uint32 _new_sr )
{
m_sampleRate = _new_sr;
@@ -137,6 +171,8 @@ private:
SRC_STATE * m_srcState;
#endif
surroundSampleFrame * m_buffer;
} ;

View File

@@ -1,8 +1,9 @@
/*
* audio_dummy.h - dummy-audio-device
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -26,19 +27,22 @@
#define _AUDIO_DUMMY_H
#include "audio_device.h"
#include "micro_timer.h"
class audioDummy : public audioDevice
class audioDummy : public audioDevice, public QThread
{
public:
audioDummy( Uint32 _sample_rate, bool & _success_ful ) :
audioDevice( _sample_rate, DEFAULT_CHANNELS )
audioDevice( _sample_rate, DEFAULT_CHANNELS ),
m_quit( FALSE )
{
_success_ful = TRUE;
}
virtual ~audioDummy()
{
stopProcessing();
}
inline static QString name( void )
@@ -67,13 +71,43 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame *,
Uint32 /*_frames*/, float )
virtual void startProcessing( void )
{
//usleep( (Uint32)( _frames * 1000.0f * 1000.0f /
// DEFAULT_SAMPLE_RATE ) );
start();
}
virtual void stopProcessing( void )
{
if( isRunning() )
{
m_quit = TRUE;
wait( 1000 );
terminate();
}
}
virtual void run( void )
{
microTimer timer;
while( m_quit == FALSE )
{
timer.reset();
processNextBuffer();
const Sint32 microseconds = static_cast<Sint32>(
mixer::inst()->framesPerAudioBuffer() *
1000000.0f /
mixer::inst()->sampleRate() -
timer.elapsed() );
if( microseconds > 0 )
{
usleep( microseconds );
}
}
}
volatile bool m_quit;
} ;

View File

@@ -2,8 +2,9 @@
* audio_file_device.h - base-class for audio-device-classes which write
* their output into a file
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -53,6 +54,7 @@ public:
virtual ~audioFileDevice();
protected:
int FASTCALL writeData( const void * _data, int _len );
void seekToBegin( void );

View File

@@ -2,8 +2,9 @@
* audio_file_ogg.h - Audio-device which encodes wave-stream and writes it
* into an OGG-file. This is used for song-export.
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -47,7 +48,7 @@ public:
Uint16 _min_bitrate, Uint16 _max_bitrate );
~audioFileOgg();
static audioDevice * getInst( Uint32 _sample_rate, Uint32 _channels,
static audioFileDevice * getInst( Uint32 _sample_rate, Uint32 _channels,
bool & _success_ful,
const QString & _file,
bool _use_vbr,
@@ -62,9 +63,9 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
virtual void FASTCALL writeBuffer( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
float _master_gain );
bool startEncoding( void );
void finishEncoding( void );

View File

@@ -2,8 +2,9 @@
* audio_file_wave.h - Audio-device which encodes wave-stream and writes it
* into an WAVE-file. This is used for song-export.
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -40,7 +41,7 @@ public:
Uint16 _min_bitrate, Uint16 _max_bitrate );
virtual ~audioFileWave();
static audioDevice * getInst( Uint32 _sample_rate, Uint32 _channels,
static audioFileDevice * getInst( Uint32 _sample_rate, Uint32 _channels,
bool & _success_ful,
const QString & _file, bool _use_vbr,
Uint16 _nom_bitrate,
@@ -55,9 +56,9 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
virtual void FASTCALL writeBuffer( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
float _master_gain );
bool startEncoding( void );
void finishEncoding( void );
@@ -82,8 +83,6 @@ private:
Uint32 data_bytes; // total size of sample-data
} m_waveFileHeader;
//outputSampleType * m_outputBuffer;
} ;

View File

@@ -1,8 +1,9 @@
/*
* audio_jack.h - support for JACK-transport
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -43,12 +44,14 @@
#include <QMutex>
#include <QVector>
#include <QList>
#include <QMap>
#else
#include <qmutex.h>
#include <qvaluevector.h>
#include <qvaluelist.h>
#include <qmap.h>
#endif
@@ -69,7 +72,7 @@ public:
inline static QString name( void )
{
return( setupWidget::tr( "JACK (Jack Audio Connection Kit)" ) );
return( setupWidget::tr( "JACK (JACK Audio Connection Kit)" ) );
}
@@ -89,31 +92,38 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
virtual void startProcessing( void );
virtual void stopProcessing( void );
void clearBuffer( void );
virtual void registerPort( audioPort * _port );
virtual void unregisterPort( audioPort * _port );
virtual void renamePort( audioPort * _port );
static int processCallback( jack_nframes_t _nframes, void * _udata );
static int bufSizeCallback( jack_nframes_t _nframes, void * _udata );
static void shutdownCallback( void * _udata );
jack_client_t * m_client;
bool m_stopped;
QMutex m_processCallbackMutex;
vvector<jack_port_t *> m_outputPorts;
struct bufset
surroundSampleFrame * m_outBuf;
Uint32 m_framesDoneInCurBuf;
Uint32 m_framesToDoInCurBuf;
struct stereoPort
{
sampleType * buf;
Uint32 frames;
jack_port_t * ports[2];
} ;
vlist<vvector<bufset> > m_bufferSets;
Uint32 m_framesDoneInCurBuf;
volatile Uint32 m_frameSync;
Uint32 m_jackBufSize;
QMutex m_bufMutex;
typedef QMap<audioPort *, stereoPort> jackPortMap;
jackPortMap m_portMap;
} ;

View File

@@ -1,8 +1,9 @@
/*
* audio_oss.h - device-class that implements OSS-PCM-output
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -25,17 +26,25 @@
#ifndef _AUDIO_OSS_H
#define _AUDIO_OSS_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if defined HAVE_SYS_SOUNDCARD_H || defined HAVE_SOUNDCARD_H
#define OSS_SUPPORT
#include "audio_device.h"
#include "tab_widget.h"
#define OSS_SUPPORT
class lcdSpinBox;
class QLineEdit;
class audioOSS : public audioDevice
class audioOSS : public audioDevice, public QThread
{
public:
audioOSS( Uint32 _sample_rate, bool & _success_ful );
@@ -65,15 +74,18 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
virtual void startProcessing( void );
virtual void stopProcessing( void );
virtual void run( void );
int m_audioFD;
bool m_convertEndian;
volatile bool m_quit;
} ;
#endif
#endif

107
include/audio_port.h Normal file
View File

@@ -0,0 +1,107 @@
/*
* audio_port.h - base-class for objects providing sound at a port
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _AUDIO_PORT_H
#define _AUDIO_PORT_H
#include "qt3support.h"
#ifdef QT4
#include <QString>
#else
#include <qstring.h>
#endif
#include "mixer.h"
#include "effect_board.h"
class audioPort
{
public:
audioPort( const QString & _name );
~audioPort();
inline surroundSampleFrame * firstBuffer( void )
{
return( m_firstBuffer );
}
inline surroundSampleFrame * secondBuffer( void )
{
return( m_secondBuffer );
}
void nextPeriod( void );
// indicate whether JACK & Co should provide output-buffer at ext. port
inline bool extOutputEnabled( void ) const
{
return( m_extOutputEnabled );
}
void FASTCALL setExtOutputEnabled( bool _enabled );
// next effect-channel after this audio-port
// (-1 = none 0 = master)
inline fxChnl nextFxChannel( void ) const
{
return( m_nextFxChannel );
}
void setNextFxChannel( fxChnl _chnl )
{
m_nextFxChannel = _chnl;
}
const QString & name( void ) const
{
return( m_name );
}
void setName( const QString & _new_name );
enum bufferUsages
{
NONE, FIRST, BOTH
} m_bufferUsage;
private:
surroundSampleFrame * m_firstBuffer;
surroundSampleFrame * m_secondBuffer;
bool m_extOutputEnabled;
fxChnl m_nextFxChannel;
QString m_name;
} ;
#endif

View File

@@ -3,8 +3,9 @@
* surround-audio-buffers into RAM, maybe later
* also harddisk
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -61,9 +62,9 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
virtual void FASTCALL writeBuffer( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
float _master_gain );
typedef vvector<QPair<sampleFrame *, Uint32> > bufferVector;
bufferVector m_buffers;

View File

@@ -1,8 +1,9 @@
/*
* audio_sdl.h - device-class that performs PCM-output via SDL
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -36,18 +37,6 @@
#endif
#include "qt3support.h"
#ifdef QT4
#include <QMutex>
#else
#include <qmutex.h>
#endif
#include SDL_SDL_H
#include SDL_SDL_AUDIO_H
@@ -86,20 +75,14 @@ public:
private:
virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
Uint32 _frames,
float _master_output );
void clearBuffer( void );
virtual void startProcessing( void );
virtual void stopProcessing( void );
static void sdlAudioCallback( void * _udata, Uint8 * _buf, int _len );
SDL_AudioSpec m_audioHandle;
outputSampleType * m_buffer;
QMutex m_bufMutex;
QMutex m_callbackMutex;
surroundSampleFrame * m_outBuf;
bool m_convertEndian;

60
include/base64.h Normal file
View File

@@ -0,0 +1,60 @@
/*
* base64.h - namespace base64 with methods for encoding/decoding binary data
* to/from base64
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _BASE64_H
#define _BASE64_H
#include "qt3support.h"
#ifndef QT3
#include <QByteArray>
#endif
namespace base64
{
#ifndef QT3
inline void encode( const char * _data, const int _size, QString & _dst )
{
_dst = QByteArray( _data, _size ).toBase64();
}
inline void decode( const QString & _b64, char * * _data, int * _size )
{
QByteArray data = QByteArray::fromBase64( _b64.toAscii() );
*_size = data.size();
*_data = new char[*_size];
memcpy( _data, data.constData(), *_size );
}
#else
void encode( const char * _data, const int _size, QString & _dst );
void decode( const QString & _b64, char * * _data, int * _size );
#endif
} ;
#endif

View File

@@ -4,8 +4,9 @@
* original file by ???
* modified and enhanced by Tobias Doerffel, 2004
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -38,6 +39,7 @@
#include "mixer.h"
#include "templates.h"
const int MOOG_VOLTAGE = 40000;
template<Uint8 CHANNELS = DEFAULT_CHANNELS>
class basicFilters
@@ -53,10 +55,21 @@ public:
NOTCH,
ALLPASS,
MOOG,
DOUBLE_LOWPASS,
DOUBLE_MOOG
SIMPLE_FLT_CNT,
DOUBLE_LOWPASS = 16+LOWPASS,
DOUBLE_MOOG = 16+MOOG
} ;
static inline filterTypes getFilterType( const int _idx )
{
if( _idx < SIMPLE_FLT_CNT )
{
return( static_cast<filterTypes>( _idx ) );
}
return( static_cast<filterTypes>( DOUBLE_LOWPASS + _idx -
SIMPLE_FLT_CNT ) );
}
inline basicFilters( const float _sampleRate ) :
m_b0a0( 0.0f ),
m_b1a0( 0.0f ),
@@ -87,40 +100,112 @@ public:
inline sampleType update( sampleType _in0, Uint8 _chnl )
{
sampleType out;
if( m_type != MOOG )
switch( m_type )
{
// filter
out = m_b0a0*_in0 + m_b1a0*m_in1[_chnl] +
m_b2a0*m_in2[_chnl] - m_a1a0*m_ou1[_chnl] -
m_a2a0*m_ou2[_chnl];
// push in/out buffers
m_in2[_chnl] = m_in1[_chnl];
m_in1[_chnl] = _in0;
m_ou2[_chnl] = m_ou1[_chnl];
m_ou1[_chnl] = out;
}
else
{
sampleType x = _in0 - m_r*m_y4[_chnl];
case MOOG:
case DOUBLE_MOOG:
{
sampleType x = _in0 - m_r*m_y4[_chnl];
// Four cascaded onepole filters (bilinear transform)
m_y1[_chnl] = x*m_p + m_oldx[_chnl]*m_p -
// four cascaded onepole filters
// (bilinear transform)
m_y1[_chnl] = x*m_p + m_oldx[_chnl]*m_p -
m_k*m_y1[_chnl];
m_y2[_chnl] = m_y1[_chnl]*m_p+m_oldy1[_chnl]*m_p -
m_k*m_y2[_chnl];
m_y3[_chnl] = m_y2[_chnl]*m_p+m_oldy2[_chnl]*m_p -
m_k*m_y3[_chnl];
m_y4[_chnl] = m_y3[_chnl]*m_p+m_oldy3[_chnl]*m_p -
m_k*m_y4[_chnl];
m_y2[_chnl] = m_y1[_chnl]*m_p+m_oldy1[_chnl]*
m_p - m_k*m_y2[_chnl];
m_y3[_chnl] = m_y2[_chnl]*m_p+m_oldy2[_chnl]*
m_p - m_k*m_y3[_chnl];
m_y4[_chnl] = m_y3[_chnl]*m_p+m_oldy3[_chnl]*
m_p - m_k*m_y4[_chnl];
m_oldx[_chnl] = x;
m_oldy1[_chnl] = m_y1[_chnl];
m_oldy2[_chnl] = m_y2[_chnl];
m_oldy3[_chnl] = m_y3[_chnl];
out = m_y4[_chnl] - m_y4[_chnl] * m_y4[_chnl] *
m_y4[_chnl] * ( 1.0f/6.0f );
m_oldx[_chnl] = x;
m_oldy1[_chnl] = m_y1[_chnl];
m_oldy2[_chnl] = m_y2[_chnl];
m_oldy3[_chnl] = m_y3[_chnl];
out = m_y4[_chnl] - m_y4[_chnl] * m_y4[_chnl] *
m_y4[_chnl] * ( 1.0f / 6.0f );
break;
}
/* case MOOG2:
case DOUBLE_MOOG2:
{
const float x1 = ( _in0 - m_r *
m_oldx[_chnl] ) / MOOG_VOLTAGE;
const float tanh1 = tanhf( x1 );
const float x2 = m_oldy1[_chnl] / MOOG_VOLTAGE;
const float tanh2 = tanhf( x2 );
m_y1[_chnl] = m_oldy1[_chnl] + m_p *
( tanh1 - tanh2 );
m_oldy1[_chnl] = m_y1[_chnl];
m_y2[_chnl] = m_oldy2[_chnl] + m_p *
( tanhf( m_y1[_chnl] /
MOOG_VOLTAGE ) -
tanhf( m_oldy2[_chnl] /
MOOG_VOLTAGE ) );
m_oldy2[_chnl] = m_y2[_chnl];
m_y3[_chnl] = m_oldy3[_chnl] + m_p *
( tanhf( m_y2[_chnl] /
MOOG_VOLTAGE ) -
tanhf( m_oldy3[_chnl] /
MOOG_VOLTAGE ) );
m_oldy3[_chnl] = m_y3[_chnl];
m_y4[_chnl] = m_ou1[_chnl] + m_p *
( tanhf( m_y3[_chnl] /
MOOG_VOLTAGE ) -
tanhf( m_ou1[_chnl] /
MOOG_VOLTAGE ) );
m_ou1[_chnl] = m_y4[_chnl];
m_oldx[_chnl] = ( m_y4[_chnl] +
m_ou2[_chnl] ) * 0.5f;
m_ou2[_chnl] = m_y4[_chnl];
// the same code again...
m_y1[_chnl] = m_oldy1[_chnl] + m_p *
( tanh1 - tanh2 );
m_oldy1[_chnl] = m_y1[_chnl];
m_y2[_chnl] = m_oldy2[_chnl] + m_p *
( tanhf( m_y1[_chnl] /
MOOG_VOLTAGE ) -
tanhf( m_oldy2[_chnl] /
MOOG_VOLTAGE ) );
m_oldy2[_chnl] = m_y2[_chnl];
m_y3[_chnl] = m_oldy3[_chnl] + m_p *
( tanhf( m_y2[_chnl] /
MOOG_VOLTAGE ) -
tanhf( m_oldy3[_chnl] /
MOOG_VOLTAGE ) );
m_oldy3[_chnl] = m_y3[_chnl];
m_y4[_chnl] = m_ou1[_chnl] + m_p *
( tanhf( m_y3[_chnl] /
MOOG_VOLTAGE ) -
tanhf( m_ou1[_chnl] /
MOOG_VOLTAGE ) );
m_ou1[_chnl] = m_y4[_chnl];
m_oldx[_chnl] = ( m_y4[_chnl] +
m_ou2[_chnl] ) * 0.5f;
m_ou2[_chnl] = m_y4[_chnl];
out = m_oldx[_chnl];
break;
}*/
default:
// filter
out = m_b0a0*_in0 +
m_b1a0*m_in1[_chnl] +
m_b2a0*m_in2[_chnl] -
m_a1a0*m_ou1[_chnl] -
m_a2a0*m_ou2[_chnl];
// push in/out buffers
m_in2[_chnl] = m_in1[_chnl];
m_in1[_chnl] = _in0;
m_ou2[_chnl] = m_ou1[_chnl];
m_ou1[_chnl] = out;
break;
}
if( m_subFilter != NULL )
{
@@ -140,13 +225,9 @@ public:
_freq = tMax( _freq, 0.01f );// limit freq for not getting
// bad noise out of the filter...
if( m_type == MOOG || m_type == DOUBLE_MOOG )
switch( m_type )
{
const float f = 2 * _freq / m_sampleRate; // [0 - 1]
m_k = 3.6f*f - 1.6f*f*f - 1; // (Empirical tunning)
m_p = (m_k+1)*0.5f;
m_r = _q*powf( M_E, ( ( 1-m_p ) * 1.386249f ) );
if( m_type == DOUBLE_MOOG )
case DOUBLE_MOOG:
{
if( m_subFilter == NULL )
{
@@ -157,78 +238,121 @@ public:
m_subFilter->calcFilterCoeffs( MOOG, _freq,
_q );
}
}
else
{
// other filters
const float omega = 2.0f * M_PI * _freq /
m_sampleRate;
const float tsin = sinf( omega );
const float tcos = cosf( omega );
//float alpha;
//if (q_is_bandwidth)
//alpha = tsin*sinhf(logf(2.0f)/2.0f*q*omega/tsin);
//else
const float alpha = tsin / ( 2.0f*_q );
const float a0 = 1.0f / ( 1.0f+alpha );
if( m_type == LOWPASS || m_type == DOUBLE_LOWPASS )
case MOOG:
{
m_b0a0 = ((1.0f-tcos)/2.0f)*a0;
m_b1a0 = (1.0f-tcos)*a0;
m_b2a0 = m_b0a0;//((1.0f-tcos)/2.0f)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
if( m_type == DOUBLE_LOWPASS )
// [ 0 - 1 ]
const float f = 2 * _freq / m_sampleRate;
// (Empirical tunning)
m_k = 3.6f*f - 1.6f*f*f - 1;
m_p = (m_k+1)*0.5f;
m_r = _q*powf( M_E, ( ( 1-m_p ) * 1.386249f ) );
break;
}
/* case DOUBLE_MOOG2:
{
if( m_subFilter == NULL )
{
if( m_subFilter == NULL )
m_subFilter =
new basicFilters<CHANNELS>(
m_sampleRate );
}
m_subFilter->calcFilterCoeffs( MOOG2, _freq,
_q );
}
case MOOG2:
{
const float kfc = 2 * _freq / m_sampleRate;
const float kf = _freq / m_sampleRate;
const float kfcr = 1.8730 * ( kfc*kfc*kfc ) +
0.4955 * ( kfc*kfc ) +
0.6490 * kfc + 0.9988;
const float kacr = -3.9364 * ( kfc*kfc ) +
1.8409 * kfc + 0.9968;
m_p = MOOG_VOLTAGE * ( 1 - expf( -2.0 * M_PI *
kfcr * kf ) );
m_r = 4 * _q * kacr;
break;
}*/
default:
{
// other filters
const float omega = 2.0f * M_PI * _freq /
m_sampleRate;
const float tsin = sinf( omega );
const float tcos = cosf( omega );
//float alpha;
//if (q_is_bandwidth)
//alpha = tsin*sinhf(logf(2.0f)/2.0f*q*omega/
// tsin);
//else
const float alpha = tsin / ( 2.0f * _q );
const float a0 = 1.0f / ( 1.0f+alpha );
if( m_type == LOWPASS ||
m_type == DOUBLE_LOWPASS )
{
m_b0a0 = ((1.0f-tcos)/2.0f)*a0;
m_b1a0 = (1.0f-tcos)*a0;
m_b2a0 = m_b0a0;//((1.0f-tcos)/2.0f)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
if( m_type == DOUBLE_LOWPASS )
{
m_subFilter =
if( m_subFilter == NULL )
{
m_subFilter =
new basicFilters<CHANNELS>( m_sampleRate );
}
m_subFilter->calcFilterCoeffs( LOWPASS,
}
m_subFilter->calcFilterCoeffs(
LOWPASS,
_freq,
_q );
}
}
else if( m_type == HIPASS )
{
m_b0a0 = ((1.0f+tcos)/2.0f)*a0;
m_b1a0 = (-1.0f-tcos)*a0;
m_b2a0 = m_b0a0;//((1.0f+tcos)/2.0f)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
}
else if( m_type == BANDPASS_CSG )
{
m_b0a0 = (tsin/2.0f)*a0;
m_b1a0 = 0.0f;
m_b2a0 = (-tsin/2.0f)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
}
else if( m_type == BANDPASS_CZPG )
{
m_b0a0 = alpha*a0;
m_b1a0 = 0.0f;
m_b2a0 = (-alpha)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
}
else if( m_type == NOTCH )
{
m_b0a0 = a0;
m_b1a0 = (-2.0f*tcos)*a0;
m_b2a0 = a0;
m_a1a0 = m_b1a0;//(-2.0f*tcos)*a0;
}
else if( m_type == ALLPASS )
{
m_b0a0 = (1.0f-alpha)*a0;
m_b1a0 = (-2.0f*tcos)*a0;
m_b2a0 = 1.0;//(1.0f+alpha)*a0;
m_a1a0 = m_b1a0;//(-2.0f*tcos)*a0;
//m_a2a0 = m_b0a0;//(1.0f-alpha)*a0;
}
m_a2a0 = (1.0f-alpha)*a0;
break;
}
else if( m_type == HIPASS )
{
m_b0a0 = ((1.0f+tcos)/2.0f)*a0;
m_b1a0 = (-1.0f-tcos)*a0;
m_b2a0 = m_b0a0;//((1.0f+tcos)/2.0f)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
}
else if( m_type == BANDPASS_CSG )
{
m_b0a0 = (tsin/2.0f)*a0;
m_b1a0 = 0.0f;
m_b2a0 = (-tsin/2.0f)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
}
else if( m_type == BANDPASS_CZPG )
{
m_b0a0 = alpha*a0;
m_b1a0 = 0.0f;
m_b2a0 = (-alpha)*a0;
m_a1a0 = (-2.0f*tcos)*a0;
}
else if( m_type == NOTCH )
{
m_b0a0 = a0;
m_b1a0 = (-2.0f*tcos)*a0;
m_b2a0 = a0;
m_a1a0 = m_b1a0;//(-2.0f*tcos)*a0;
}
else if( m_type == ALLPASS )
{
m_b0a0 = (1.0f-alpha)*a0;
m_b1a0 = (-2.0f*tcos)*a0;
m_b2a0 = 1.0;//(1.0f+alpha)*a0;
m_a1a0 = m_b1a0;//(-2.0f*tcos)*a0;
//m_a2a0 = m_b0a0;//(1.0f-alpha)*a0;
}
m_a2a0 = (1.0f-alpha)*a0;
}
}

View File

@@ -1,8 +1,9 @@
/*
* bb_editor.h - declaration of class bbEditor, a basic-component of LMMS
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -32,10 +33,12 @@
#include "lmms_main_win.h"
class pixmapButton;
class songEditor;
class QPixmap;
class comboBox;
class songEditor;
class toolButton;
class bbEditor : public trackContainer
{
@@ -70,7 +73,6 @@ public:
}
csize currentBB( void ) const;
void FASTCALL setCurrentBB( csize _bb );
tact FASTCALL lengthOfBB( csize _bb );
inline tact lengthOfCurrentBB( void )
{
@@ -81,13 +83,20 @@ public:
void FASTCALL swapBB( csize _bb1, csize _bb2 );
void updateBBTrack( trackContentObject * _tco );
public slots:
void updateComboBox( void );
void setCurrentBB( int _bb );
protected:
void closeEvent( QCloseEvent * _ce );
void keyPressEvent (QKeyEvent * _ke);
void wheelEvent( QWheelEvent * _we );
void resizeEvent( QResizeEvent * _re );
void updateBackground( void );
virtual void closeEvent( QCloseEvent * _ce );
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void resizeEvent( QResizeEvent * _re );
virtual QRect scrollAreaRect( void ) const;
protected slots:
@@ -104,10 +113,13 @@ private:
static bbEditor * s_instanceOfMe;
static QPixmap * s_titleArtwork;
pixmapButton * m_playButton;
pixmapButton * m_stopButton;
QWidget * m_toolBar;
toolButton * m_playButton;
toolButton * m_stopButton;
comboBox * m_bbComboBox;
friend class songEditor;

View File

@@ -2,8 +2,9 @@
* bb_track.h - class bbTrack, a wrapper for using bbEditor
* (which is a singleton-class) as track
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -54,9 +55,6 @@ public:
bbTCO( track * _track, const QColor & _c = QColor() );
virtual ~bbTCO();
virtual void FASTCALL movePosition( const midiTime & _pos );
virtual void FASTCALL changeLength( const midiTime & _length );
virtual void FASTCALL saveSettings( QDomDocument & _doc,
QDomElement & _parent );
virtual void FASTCALL loadSettings( const QDomElement & _this );
@@ -100,7 +98,7 @@ public:
bbTrack( trackContainer * _tc );
virtual ~bbTrack();
virtual trackTypes trackType( void ) const;
virtual trackTypes type( void ) const;
virtual bool FASTCALL play( const midiTime & _start,
Uint32 _start_frame, Uint32 _frames,
Uint32 _frame_base,
@@ -137,12 +135,8 @@ protected:
private:
nameLabel * m_trackLabel;
struct bbInfoStruct
{
csize num;
QString name;
} ;
static QMap<bbTrack *, bbInfoStruct> s_bbNums;
typedef QMap<bbTrack *, csize> infoMap;
static infoMap s_infoMap;
} ;

View File

@@ -2,8 +2,9 @@
* buffer_allocator.h - namespace bufferAllocator providing routines for own
* optimized memory-management for audio-buffers
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -45,10 +46,15 @@ namespace bufferAllocator
return( (T *) allocBytes( sizeof( T ) * _n ) );
}
// free given buffer
void FASTCALL free( void * _buf );
// try to cleanup _level unused buffers
void FASTCALL cleanUp( Uint16 _level );
// disable autocleanup-mechanisms
void FASTCALL disableAutoCleanup( bool _disabled );
// simple class for automatically freeing buffer in complex functions
template<class T = void>

View File

@@ -1,8 +1,9 @@
/*
* clipboard.h - the clipboard for patterns, notes etc.
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

117
include/combobox.h Normal file
View File

@@ -0,0 +1,117 @@
/*
* combobox.h - class comboBox, a very cool combo-box
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _COMBOBOX_H
#define _COMBOBOX_H
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#include <QVector>
#include <QMenu>
#include <QPixmap>
#include <QPair>
#else
#include <qwidget.h>
#include <qvaluevector.h>
#include <qpopupmenu.h>
#include <qpixmap.h>
#include <qpair.h>
#endif
class QAction;
class comboBox : public QWidget
{
Q_OBJECT
public:
comboBox( QWidget * _parent );
virtual ~comboBox();
void addItem( const QString & _item, const QPixmap & _pixmap =
QPixmap() );
inline void clear( void )
{
m_currentIndex = 0;
m_items.clear();
update();
}
int findText( const QString & _txt ) const;
int currentIndex( void ) const
{
return( m_currentIndex );
}
QString currentText( void ) const
{
return( m_items[m_currentIndex].first );
}
public slots:
void setCurrentIndex( int _idx );
protected:
virtual void mousePressEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _pe );
virtual void wheelEvent( QWheelEvent * _we );
private:
static QPixmap * s_background;
static QPixmap * s_arrow;
QMenu m_menu;
typedef QPair<QString, QPixmap> item;
vvector<item> m_items;
int m_currentIndex;
bool m_pressed;
private slots:
void setItem( QAction * _item );
void setItem( int _item );
signals:
void activated( const QString & );
void currentIndexChanged( int );
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* config_mgr.h - class configManager, a class for managing LMMS-configuration
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -65,6 +66,7 @@ const QString PROJECTS_PATH = "projects/";
const QString PRESETS_PATH = "presets/";
const QString SAMPLES_PATH = "samples/";
const QString ARTWORK_PATH = "artwork/";
const QString TRACK_ICON_PATH = "artwork/track_icons/";
const QString LOCALE_PATH = "locale/";
@@ -81,29 +83,49 @@ public:
return( s_instanceOfMe );
}
const QString & lmmsWorkingDir( void ) const
const QString & workingDir( void ) const
{
return( m_lmmsWorkingDir );
return( m_workingDir );
}
QString projectsDir( void ) const
{
return( m_lmmsWorkingDir + PROJECTS_PATH );
return( m_workingDir + PROJECTS_PATH );
}
QString presetsDir( void ) const
{
return( m_lmmsWorkingDir + PRESETS_PATH );
return( m_workingDir + PRESETS_PATH );
}
QString samplesDir( void ) const
{
return( m_lmmsWorkingDir + SAMPLES_PATH );
return( m_workingDir + SAMPLES_PATH );
}
QString artworkDir( void ) const
{
return( m_lmmsDataDir + ARTWORK_PATH );
return( m_dataDir + ARTWORK_PATH );
}
QString trackIconsDir( void ) const
{
return( m_dataDir + TRACK_ICON_PATH );
}
QString localeDir( void ) const
{
return( m_lmmsDataDir + LOCALE_PATH );
return( m_dataDir + LOCALE_PATH );
}
const QString & pluginDir( void ) const
{
return( m_pluginDir );
}
const QString & vstDir( void ) const
{
return( m_vstDir );
}
const QString & value( const QString & _class,
@@ -115,9 +137,13 @@ public:
void saveConfigFile( void );
public slots:
void setWorkingDir( const QString & _wd );
void setVSTDir( const QString & _wd );
protected slots:
void openWorkingDir( void );
void setWorkingDir( const QString & _wd );
virtual void accept( void );
@@ -146,8 +172,10 @@ private:
const QString m_lmmsRcFile;
QString m_lmmsWorkingDir;
QString m_lmmsDataDir;
QString m_workingDir;
QString m_dataDir;
QString m_pluginDir;
QString m_vstDir;
typedef vvector<QPair<QString, QString> > stringPairVector;
typedef QMap<QString, stringPairVector> settingsMap;

79
include/cpuload_widget.h Normal file
View File

@@ -0,0 +1,79 @@
/*
* cpuload_widget.h - widget for displaying CPU-load (partly based on
* Hydrogen's CPU-load-widget)
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _CPULOAD_WIDGET_H
#define _CPULOAD_WIDGET_H
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#include <QPixmap>
#include <QTimer>
#else
#include <qwidget.h>
#include <qpixmap.h>
#include <qtimer.h>
#endif
#include "types.h"
class cpuloadWidget : public QWidget
{
Q_OBJECT
public:
cpuloadWidget( QWidget * _parent );
~cpuloadWidget();
protected:
void paintEvent( QPaintEvent * _ev );
protected slots:
void updateCpuLoad();
private:
Uint8 m_currentLoad;
QPixmap m_temp;
QPixmap m_background;
QPixmap m_leds;
bool m_changed;
QTimer m_updateTimer;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* debug.h - header file to be included for debugging purposes
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -0,0 +1,62 @@
/*
* dummy_instrument.h - instrument used as fallback if an instrument couldn't
* be loaded
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _DUMMY_INSTRUMENT_H
#define _DUMMY_INSTRUMENT_H
#include "instrument.h"
class dummyInstrument : public instrument
{
public:
inline dummyInstrument( channelTrack * _channel_track ) :
instrument( _channel_track, NULL )
{
}
inline virtual ~dummyInstrument()
{
}
inline virtual void saveSettings( QDomDocument &, QDomElement & )
{
}
inline virtual void loadSettings( const QDomElement & )
{
}
inline virtual QString nodeName( void ) const
{
return( "dummyinstrument" );
}
} ;
#endif

62
include/dummy_plugin.h Normal file
View File

@@ -0,0 +1,62 @@
/*
* dummy_plugin.h - empty plugin which is used as fallback if a plugin couldn't
* be found
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _DUMMY_PLUGIN_H
#define _DUMMY_PLUGIN_H
#include "plugin.h"
class dummyPlugin : public plugin
{
public:
inline dummyPlugin( void ) :
plugin( NULL )
{
}
inline virtual ~dummyPlugin()
{
}
inline virtual void saveSettings( QDomDocument &, QDomElement & )
{
}
inline virtual void loadSettings( const QDomElement & )
{
}
inline virtual QString nodeName( void ) const
{
return( "dummyplugin" );
}
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* effect_board.h - stuff for effect-board
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -24,8 +25,12 @@
#ifndef _EFFECT_BOARD_H
#define _EFFECT_BOARD_H
const int MIN_EFFECT_CHANNEL = 0;
const int MAX_EFFECT_CHANNEL = 63;
const int DEFAULT_EFFECT_CHANNEL = (MIN_EFFECT_CHANNEL);
const int DEFAULT_EFFECT_CHANNEL = MIN_EFFECT_CHANNEL;
typedef Sint8 fxChnl;
#endif

View File

@@ -1,8 +1,9 @@
/*
* embed.h - misc. stuff for using embedded data (resources linked into binary)
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -42,10 +43,31 @@
namespace embed
{
struct descriptor
{
int size;
const unsigned char * data;
const char * name;
} ;
QPixmap getIconPixmap( const char * _name, int _w = -1, int _h = -1 );
QString getText( const char * _name );
void loadTranslation( const QString & _tname );
}
#ifdef PLUGIN_NAME
namespace PLUGIN_NAME
{
QPixmap getIconPixmap( const char * _name, int _w = -1, int _h = -1 );
QString getText( const char * _name );
void loadTranslation( const QString & _tname );
}
#endif
#endif

View File

@@ -1,8 +1,9 @@
/*
* endian.h - handle endianess-problems
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -3,8 +3,9 @@
* is used by envelope/lfo/filter-tab of
* channel-window
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -47,14 +48,18 @@
#include "settings.h"
#include "types.h"
#include "spc_bg_hndl_widget.h"
#include "sample_buffer.h"
class envelopeTabWidget;
class pixmapButton;
class knob;
class QPaintEvent;
class QPixmap;
class envelopeTabWidget;
class knob;
class ledCheckBox;
class pixmapButton;
class tempoSyncKnob;
class envelopeAndLFOWidget : public QWidget, public settings,
@@ -95,8 +100,10 @@ public slots:
protected:
void paintEvent( QPaintEvent * _pe );
void mousePressEvent( QMouseEvent * _me );
virtual void dragEnterEvent( QDragEnterEvent * _dee );
virtual void dropEvent( QDropEvent * _de );
virtual void mousePressEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _pe );
float FASTCALL lfoLevel( Uint32 _frame, Uint32 _frame_offset ) const;
@@ -107,10 +114,14 @@ protected slots:
void lfoTriangleWaveCh( bool );
void lfoSawWaveCh( bool );
void lfoSquareWaveCh( bool );
void lfoUserWaveCh( bool );
void x100Toggled( bool );
private:
static QPixmap * s_envGraph;
static QPixmap * s_lfoGraph;
static Uint32 s_lfoFrame;
bool m_used;
@@ -123,7 +134,6 @@ private:
knob * m_sustainKnob;
knob * m_releaseKnob;
knob * m_amountKnob;
static QPixmap * s_envGraph;
float m_sustainLevel;
float m_amount;
@@ -137,16 +147,16 @@ private:
// LFO-stuff
knob * m_lfoPredelayKnob;
knob * m_lfoAttackKnob;
knob * m_lfoSpeedKnob;
tempoSyncKnob * m_lfoSpeedKnob;
knob * m_lfoAmountKnob;
pixmapButton * m_sinLfoBtn;
pixmapButton * m_triangleLfoBtn;
pixmapButton * m_sawLfoBtn;
pixmapButton * m_sqrLfoBtn;
static QPixmap * s_lfoGraph;
pixmapButton * m_usrLfoBtn;
pixmapButton * m_x100Btn;
pixmapButton * m_controlEnvAmountBtn;
ledCheckBox * m_x100Cb;
ledCheckBox * m_controlEnvAmountCb;
Uint32 m_lfoPredelayFrames;
Uint32 m_lfoAttackFrames;
@@ -154,13 +164,15 @@ private:
float m_lfoAmount;
bool m_lfoAmountIsZero;
float * m_lfoShapeData;
sampleBuffer m_userWave;
enum lfoShapes
{
SIN,
TRIANGLE,
SAW,
SQUARE
SQUARE,
USER
} m_lfoShape;
volatile bool m_busy;

View File

@@ -3,8 +3,9 @@
* provides UI- and DSP-code for using envelopes, LFOs
* and a filter
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -45,22 +46,23 @@
#include "envelope_and_lfo_widget.h"
class QComboBox;
class groupBox;
class tabWidget;
class QLabel;
class knob;
class pixmapButton;
class channelTrack;
class comboBox;
class groupBox;
class knob;
class notePlayHandle;
class pixmapButton;
class tabWidget;
class envelopeTabWidget : public QWidget, public settings
{
Q_OBJECT
public:
envelopeTabWidget( channelTrack * _channel_track, QWidget * parent );
~envelopeTabWidget();
envelopeTabWidget( channelTrack * _channel_track );
virtual ~envelopeTabWidget();
void FASTCALL processAudioBuffer( sampleFrame * _ab, Uint32 _frames,
notePlayHandle * _n );
@@ -91,14 +93,12 @@ public:
private:
channelTrack * m_channelTrack;
tabWidget * m_targetsTabWidget;
envelopeAndLFOWidget * m_envLFOWidgets[TARGET_COUNT];
// filter-stuff
groupBox * m_filterGroupBox;
QComboBox * m_filterComboBox;
comboBox * m_filterComboBox;
knob * m_filterCutKnob;
knob * m_filterResKnob;

View File

@@ -1,8 +1,9 @@
/*
* export.h - header which is needed for song-export
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -26,10 +27,11 @@
#include "types.h"
class audioDevice;
class audioFileDevice;
typedef audioDevice * ( * getDeviceInst)( Uint32 _sample_rate,
typedef audioFileDevice * ( * getDeviceInst)( Uint32 _sample_rate,
Uint32 _channels,
bool & _success_ful,
const QString & _file,
@@ -47,6 +49,7 @@ enum fileTypes
} ;
struct fileEncodeDevice
{
fileTypes m_fileType;
@@ -55,6 +58,7 @@ struct fileEncodeDevice
getDeviceInst m_getDevInst;
} ;
extern fileEncodeDevice fileEncodeDevices[];

View File

@@ -2,8 +2,9 @@
* export_project_dialog.h - declaration of class exportProjectDialog which is
* responsible for exporting project
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -30,7 +31,6 @@
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
@@ -43,15 +43,15 @@
#endif
#include "export.h"
class QLabel;
class QPushButton;
class QComboBox;
class QProgressBar;
class QCheckBox;
class comboBox;
class ledCheckBox;
class pixmapButton;
@@ -61,7 +61,6 @@ class exportProjectDialog : public QDialog
public:
exportProjectDialog( const QString & _file_name, QWidget * _parent );
~exportProjectDialog();
void FASTCALL updateProgressBar( int _new_val );
public slots:
@@ -76,35 +75,30 @@ protected:
private slots:
void changedType( const QString & );
void cancelBtnClicked( void );
void redrawProgressBar( void );
private:
QString m_fileName;
QLabel * m_typeLbl;
QComboBox * m_typeCombo;
QLabel * m_kbpsLbl;
QComboBox * m_kbpsCombo;
QCheckBox * m_vbrCb;
QCheckBox * m_hqmCb;
QLabel * m_hourglassLbl;
QPushButton * m_exportBtn;
QPushButton * m_cancelBtn;
QProgressBar * m_exportProgressBar;
fileTypes m_fileType;
bool m_deleteFile;
int m_oldProgressVal;
int m_progressVal;
QTimer * m_progressBarUpdateTimer;
static Sint16 s_availableBitrates[];
void finishProjectExport( void );
void abortProjectExport( void );
static fileTypes FASTCALL getFileTypeFromExtension( const QString &
_ext );
static Sint16 s_availableBitrates[];
QString m_fileName;
QLabel * m_typeLbl;
comboBox * m_typeCombo;
QLabel * m_kbpsLbl;
comboBox * m_kbpsCombo;
ledCheckBox * m_vbrCb;
ledCheckBox * m_hqmCb;
QLabel * m_hourglassLbl;
QPushButton * m_exportBtn;
QPushButton * m_cancelBtn;
QProgressBar * m_exportProgressBar;
fileTypes m_fileType;
bool m_deleteFile;
} ;

77
include/fade_button.h Normal file
View File

@@ -0,0 +1,77 @@
/*
* fade_button.h - declaration of class fadeButton
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _FADE_BUTTON_H
#define _FADE_BUTTON_H
#include "qt3support.h"
#ifdef QT4
#include <QAbstractButton>
#include <QColor>
#else
#include <qbutton.h>
#include <qcolor.h>
#endif
class fadeButton : public QAbstractButton
{
Q_OBJECT
public:
fadeButton( const QColor & _normal_color, const QColor &
_activated_color, QWidget * _parent );
virtual ~fadeButton();
public slots:
void activate( void );
void reset( void );
protected:
virtual void paintEvent( QPaintEvent * _pe );
private slots:
void nextState( void );
private:
float m_state;
QColor m_normalColor;
QColor m_activatedColor;
} ;
#endif

219
include/file_browser.h Normal file
View File

@@ -0,0 +1,219 @@
/*
* file_browser.h - include file for fileBrowser
*
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _FILE_BROWSER_H
#define _FILE_BROWSER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QDir>
#else
#include <qlistview.h>
#include <qdir.h>
#endif
#include "side_bar_widget.h"
class fileItem;
class listView;
class playHandle;
class QPixmap;
class trackContainer;
class fileBrowser : public sideBarWidget
{
Q_OBJECT
public:
fileBrowser( const QString & _path, const QString & _filter,
const QString & _title, const QPixmap & _pm,
QWidget * _parent );
virtual ~fileBrowser();
public slots:
void reloadTree( void );
protected slots:
#ifdef QT4
void contextMenuRequest( Q3ListViewItem * _i, const QPoint & _pos,
int _col );
#else
void contextMenuRequest( QListViewItem * _i, const QPoint & _pos,
int _col );
#endif
void sendToActiveChannel( void );
void openInNewChannelSE( void );
void openInNewChannelBBE( void );
private:
virtual void keyPressEvent( QKeyEvent * _ke );
void openInNewChannel( trackContainer * _tc );
listView * m_l;
fileItem * m_contextMenuItem;
QString m_path;
QString m_filter;
} ;
class listView : public Q3ListView
{
Q_OBJECT
public:
listView( QWidget * _parent );
~listView();
protected:
virtual void contentsMouseDoubleClickEvent( QMouseEvent * _me );
virtual void contentsMousePressEvent( QMouseEvent * _me );
virtual void contentsMouseMoveEvent( QMouseEvent * _me );
virtual void contentsMouseReleaseEvent( QMouseEvent * _me );
private:
bool m_mousePressed;
QPoint m_pressPos;
playHandle * m_previewPlayHandle;
} ;
class directory : public Q3ListViewItem
{
public:
directory( Q3ListView * _parent, const QString & _filename,
const QString & _path, const QString & _filter );
directory( directory * _parent, const QString & _filename,
const QString & _path, const QString & _filter );
void setOpen( bool );
void setup( void );
inline QString fullName( void )
{
#ifdef QT4
return( QDir::cleanPath( m_path + "/" + text( 0 ) + "/" ) );
#else
return( QDir::cleanDirPath( m_path + "/" + text( 0 ) + "/" ) );
#endif
}
inline const QPixmap * pixmap( int ) const
{
return( m_pix );
}
private:
void initPixmapStuff( void );
//using Q3ListViewItem::setPixmap;
void FASTCALL setPixmap( QPixmap * _px );
static QPixmap * s_folderPixmap;
static QPixmap * s_folderOpenedPixmap;
static QPixmap * s_folderLockedPixmap;
directory * m_p;
QPixmap * m_pix;
QString m_path;
QString m_filter;
} ;
class fileItem : public Q3ListViewItem
{
public:
fileItem( Q3ListView * _parent, const QString & _name,
const QString & _path );
fileItem( Q3ListViewItem * _parent, const QString & _name,
const QString & _path );
inline QString fullName( void ) const
{
return( m_path + "/" + text( 0 ) );
}
inline const QPixmap * pixmap( int ) const
{
return( m_pix );
}
enum fileTypes
{
PROJECT_FILE, PRESET_FILE, SAMPLE_FILE, MIDI_FILE, UNKNOWN
} ;
inline fileTypes type( void )
{
return( m_type );
}
private:
void initPixmapStuff( void );
void determineFileType( void );
static QPixmap * s_projectFilePixmap;
static QPixmap * s_presetFilePixmap;
static QPixmap * s_sampleFilePixmap;
static QPixmap * s_midiFilePixmap;
static QPixmap * s_unknownFilePixmap;
QPixmap * m_pix;
QString m_path;
fileTypes m_type;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* group_box.h - LMMS-groupbox
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

78
include/gui_templates.h Normal file
View File

@@ -0,0 +1,78 @@
/*
* gui_templates.h - GUI-specific templates
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _GUI_TEMPLATES_H
#define _GUI_TEMPLATES_H
#include "qt3support.h"
#ifdef QT4
#include <QApplication>
#include <QFont>
#include <QDesktopWidget>
#else
#include <qpaintdevicemetrics.h>
#include <qfont.h>
#include <qapplication.h>
#include <qdesktopwidget.h>
#endif
// return DPI-independent font-size - font with returned font-size has always
// the same size in pixels
template<int SIZE>
inline QFont pointSize( QFont _f )
{
static const int DPI = 96;
#ifdef QT4
_f.setPointSizeF( (float) SIZE * DPI /
QApplication::desktop()->logicalDpiY() );
#else
_f.setPointSizeFloat( (float) SIZE * DPI /
QPaintDeviceMetrics( qApp->desktop() ).logicalDpiY() );
#endif
return( _f );
}
inline QFont pointSizeF( QFont _f, float SIZE )
{
static const int DPI = 96;
#ifdef QT4
_f.setPointSizeF( SIZE * DPI /
QApplication::desktop()->logicalDpiY() );
#else
_f.setPointSizeFloat( SIZE * DPI /
QPaintDeviceMetrics( qApp->desktop() ).logicalDpiY() );
#endif
return( _f );
}
#endif

124
include/instrument.h Normal file
View File

@@ -0,0 +1,124 @@
/*
* instrument.h - declaration of class instrument, which provides a
* standard interface for all instrument plugins
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _INSTRUMENT_H
#define _INSTRUMENT_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#include <QVector>
#else
#include <qwidget.h>
#include <qvaluevector.h>
#endif
#include "plugin.h"
#include "mixer.h"
// forward-declarations
class channelTrack;
class notePlayHandle;
class instrument : public QWidget, public plugin
{
public:
instrument( channelTrack * _channel_track,
const descriptor * _descriptor );
virtual ~instrument();
// if the plugin doesn't play each note, it can create an instrument-
// play-handle and re-implement this method, so that it mixes it's
// output buffer only once per mixer-period
virtual void play( void );
// to be overloaded by actual plugin
virtual void FASTCALL playNote( notePlayHandle * note_to_play );
// needed for deleting plugin-specific-data of a note - plugin has to
// cast void-ptr so that the plugin-data is deleted properly
// (call of dtor if it's a class etc.)
virtual void FASTCALL deleteNotePluginData( notePlayHandle *
_note_to_play );
// Get number of sample-frames that should be used when playing beat
// (note with unspecified length)
// Per default this function returns 0. In this case, channel is using
// the length of the longest envelope (if one active).
virtual Uint32 FASTCALL beatLen( notePlayHandle * _n ) const;
// instrument-play-handles use this for checking whether they can mark
// themselves as done, so that mixer trashes them
inline virtual bool valid( void ) const
{
return( m_valid );
}
// instantiate instrument-plugin with given name or return NULL
// on failure
static instrument * FASTCALL instantiate( const QString & _plugin_name,
channelTrack * _channel_track );
protected:
inline channelTrack * getChannelTrack( void ) const
{
return( m_channelTrack );
}
// instruments can use this for invalidating themselves, which is for
// example neccessary when being destroyed and having instrument-play-
// handles running
inline void invalidate( void )
{
m_valid = FALSE;
mixer::inst()->checkValidityOfPlayHandles();
}
private:
channelTrack * m_channelTrack;
bool m_valid;
} ;
#endif

View File

@@ -0,0 +1,75 @@
/*
* instrument_play_handle.h - play-handle for playing an instrument
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _INSTRUMENT_PLAY_HANDLE_H
#define _INSTRUMENT_PLAY_HANDLE_H
#include "play_handle.h"
#include "instrument.h"
class instrumentPlayHandle : public playHandle
{
public:
inline instrumentPlayHandle( instrument * _instrument ) :
playHandle( INSTRUMENT_PLAY_HANDLE ),
m_instrument( _instrument )
{
}
inline virtual ~instrumentPlayHandle()
{
}
inline virtual void play( void )
{
if( m_instrument != NULL )
{
m_instrument->play();
}
}
inline virtual bool done( void ) const
{
return( m_instrument == NULL );
}
inline virtual void checkValidity( void )
{
if( m_instrument != NULL && !m_instrument->valid() )
{
m_instrument = NULL;
}
}
private:
instrument * m_instrument;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* interpolation.h - fast implementations of several interpolation-algorithms
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

296
include/kmultitabbar-qt3.h Normal file
View File

@@ -0,0 +1,296 @@
/***************************************************************************
kmultitabbar.h - description
-------------------
begin : 2001
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
***************************************************************************/
/***************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
***************************************************************************/
#ifndef _KMultitabbar_qt3_h_
#define _KMultitabbar_qt3_h_
#include "qt3support.h"
#include <qscrollview.h>
#include <qvbox.h>
#include <qhbox.h>
#include <qabstractlayout.h>
#include <qstring.h>
#include <qptrlist.h>
#include <qpushbutton.h>
class KMultiTabBarButton;
class KMultiTabBarTab;
typedef QPtrList<KMultiTabBarButton> buttonList;
typedef QPtrList<KMultiTabBarTab> tabList;
class QPixmap;
class QPainter;
class QFrame;
class KMultiTabBarPrivate;
class KMultiTabBarTabPrivate;
class KMultiTabBarButtonPrivate;
class KMultiTabBarInternal;
/**
* A Widget for horizontal and vertical tabs.
* It is possible to add normal buttons to the top/left
* The handling if only one tab at a time or multiple tabs
* should be raisable is left to the "user".
*@author Joseph Wenninger
*/
class KMultiTabBar: public QWidget
{
Q_OBJECT
public:
enum KMultiTabBarMode{ Horizontal, Vertical };
enum KMultiTabBarPosition{Left, Right, Top, Bottom};
/**
* VSNET == Visual Studio .Net like (only show the text of active tabs
* KDEV3 == Kdevelop 3 like (always show the text)
* KONQSBC == konqy's classic sidebar style (unthemed), this one is disabled
* at the moment, but will be renabled soon too
*/
enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff};
KMultiTabBar(KMultiTabBarMode m,QWidget *parent=0);
virtual ~KMultiTabBar();
/**
* append a new button to the button area. The button can later on be accessed with button(ID)
* eg for connecting signals to it
* @param pic a pixmap for the button
* @param id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button
* if more than one button is connected to a signals.
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
int appendButton(const QPixmap &pic,int id=-1,QMenu* popup=0,const QString& not_used_yet=QString::null);
/**
* remove a button with the given ID
*/
void removeButton(int id);
/**
* append a new tab to the tab area. It can be accessed lateron with tabb(id);
* @param pic a bitmap for the tab
* @param id an arbitrary ID which can be used later on to identify the tab
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
*/
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
/**
* remove a tab with a given ID
*/
void removeTab(int id);
/**
* set a tab to "raised"
* @param id The ID of the tab to manipulate
* @param state true == activated/raised, false == not active
*/
void setTab(int id ,bool state);
/**
* return the state of a tab, identified by it's ID
*/
bool isTabRaised(int id) const;
/**
* get a pointer to a button within the button area identified by its ID
*/
class KMultiTabBarButton *button(int id) const;
/**
* get a pointer to a tab within the tab area, identiifed by its ID
*/
class KMultiTabBarTab *tab(int id) const;
/**
* set the real position of the widget.
* @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
*/
void setPosition(KMultiTabBarPosition pos);
/**
* set the display style of the tabs
*/
void setStyle(KMultiTabBarStyle style);
/**
* be carefull, don't delete tabs yourself and don't delete the list itself
*/
tabList * tabs();
/**
* be carefull, don't delete buttons yourself and don't delete the list itself
*/
buttonList * buttons();
/**
* might vanish, not sure yet
*/
void showActiveTabTexts(bool show=true);
protected:
friend class KMultiTabBarButton;
virtual void fontChange( const QFont& );
void updateSeparator();
private:
class KMultiTabBarInternal *m_internal;
QBoxLayout *m_l;
QFrame *m_btnTabSep;
buttonList m_buttons;
KMultiTabBarPosition m_position;
KMultiTabBarPrivate *d;
};
/**
* This class should never be created except with the appendButton call of KMultiTabBar
*/
class KMultiTabBarButton: public QPushButton
{
Q_OBJECT
public:
KMultiTabBarButton(const QPixmap& pic,const QString&, QMenu *popup,
int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
KMultiTabBarButton(const QString&, QMenu *popup,
int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
virtual ~KMultiTabBarButton();
int id() const;
public slots:
/**
* this is used internaly, but can be used by the user, if (s)he wants to
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
*/
void setPosition(KMultiTabBar::KMultiTabBarPosition);
/**
* this is used internaly, but can be used by the user, if (s)he wants to
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
*/
void setStyle(KMultiTabBar::KMultiTabBarStyle);
/**
* modify the text of the button
*/
void setText(const QString &);
QSize sizeHint() const;
protected:
KMultiTabBar::KMultiTabBarPosition m_position;
KMultiTabBar::KMultiTabBarStyle m_style;
QString m_text;
virtual void hideEvent( class QHideEvent*);
virtual void showEvent( class QShowEvent*);
private:
int m_id;
KMultiTabBarButtonPrivate *d;
signals:
/**
* this is emitted if the button is clicked
* @param id the ID identifying the button
*/
void clicked(int id);
protected slots:
virtual void slotClicked();
};
/**
* This class should never be created except with the appendTab call of KMultiTabBar
*/
class KMultiTabBarTab: public KMultiTabBarButton
{
Q_OBJECT
public:
KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
virtual ~KMultiTabBarTab();
/**
* set the active state of the tab
* @param state true==active false==not active
*/
void setState(bool state);
/**
* choose if the text should always be displayed
* this is only used in classic mode if at all
*/
void showActiveTabText(bool show);
void resize(){ setSize( neededSize() ); }
virtual inline const QColorGroup & palette( void ) const
{
return( colorGroup() );
}
private:
bool m_showActiveTabText;
int m_expandedSize;
KMultiTabBarTabPrivate *d;
protected:
friend class KMultiTabBarInternal;
void setSize(int);
int neededSize();
void updateState();
virtual void drawButton(QPainter *);
virtual void drawButtonLabel(QPainter *);
void drawButtonStyled(QPainter *);
void drawButtonClassic(QPainter *);
protected slots:
virtual void slotClicked();
void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
public slots:
virtual void setIcon(const QString&);
virtual void setIcon(const QPixmap&);
};
class KMultiTabBarInternal: public Q3ScrollView
{
Q_OBJECT
public:
KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode m);
int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
KMultiTabBarTab *tab(int) const;
void removeTab(int);
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
void showActiveTabTexts(bool show);
tabList * tabs(){return &m_tabs;}
virtual inline const QColorGroup & palette( void ) const
{
return( colorGroup() );
}
private:
friend class KMultiTabBar;
QWidget *box;
QBoxLayout *mainLayout;
tabList m_tabs;
enum KMultiTabBar::KMultiTabBarPosition m_position;
bool m_showActiveTabTexts;
enum KMultiTabBar::KMultiTabBarStyle m_style;
int m_expandedTabSize;
int m_lines;
protected:
/**
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
* in order to ignore all mouseEvents on the viewport, so that the
* parent can handle them.
*/
virtual void contentsMousePressEvent(QMouseEvent *);
virtual void mousePressEvent(QMouseEvent *);
virtual void resizeEvent(QResizeEvent *);
};
#endif

View File

@@ -1,8 +1,8 @@
/***************************************************************************
kmultitabbar.h - description
-------------------
begin : 2001
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
begin : 2001
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
***************************************************************************/
/***************************************************************************
@@ -18,51 +18,24 @@
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
***************************************************************************/
#ifndef _KMultitabbar_h_
#define _KMultitabbar_h_
#include "qt3support.h"
#ifndef QT3
class KMultiTabBarButton;
class KMultiTabBarTab;
#ifdef QT4
#include <QWidget>
#include <QMenu>
//#include <QVBoxWidget>
#include <QLayout>
#include <QString>
#include <QBoxLayout>
#include <QList>
#include <QScrollArea>
#include <QPushButton>
typedef QList<KMultiTabBarButton *> buttonList;
typedef QList<KMultiTabBarTab *> tabList;
#else
#include <qscrollview.h>
#include <qvbox.h>
#include <qhbox.h>
#include <qabstractlayout.h>
#include <qstring.h>
#include <qptrlist.h>
#include <qpushbutton.h>
typedef QPtrList<KMultiTabBarButton> buttonList;
typedef QPtrList<KMultiTabBarTab> tabList;
#endif
class QPixmap;
class QPainter;
class QFrame;
class QMenu;
class KMultiTabBarPrivate;
class KMultiTabBarTabPrivate;
@@ -80,18 +53,18 @@ class KMultiTabBar: public QWidget
{
Q_OBJECT
public:
//enum KMultiTabBarMode{ Horizontal, Vertical };
enum KMultiTabBarPosition{DockLeft, DockRight, DockTop, DockBottom};
enum KMultiTabBarMode{Horizontal, Vertical};
enum KMultiTabBarPosition{Left, Right, Top, Bottom};
/**
* VSNET == Visual Studio .Net like (only show the text of active tabs
* KDEV3 == Kdevelop 3 like (always show the text)
* KONQSBC == konqy's classic sidebar style (unthemed), this one is disabled
* at the moment, but will be renabled soon too
* The list of available styles for KMultiTabBar
* - VSNET - Visual Studio .Net like (only show the text of active tabs
* - KDEV3 - Kdevelop 3 like (always show the text)
* - KONQSBC - konqy's classic sidebar style (unthemed) (currently disabled)
*/
enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff};
KMultiTabBar(Qt::Orientation o,QWidget *parent=0);
KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0 );
virtual ~KMultiTabBar();
/**
@@ -103,8 +76,8 @@ public:
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
int appendButton(const QPixmap &pic,int id=-1,QMenu* popup=0,const QString& not_used_yet=QString::null);
/**
int appendButton(const QPixmap &pic,int id=-1,QMenu* popup=0,const QString& not_used_yet=QString());
/**
* remove a button with the given ID
*/
void removeButton(int id);
@@ -114,7 +87,7 @@ public:
* @param id an arbitrary ID which can be used later on to identify the tab
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
*/
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString());
/**
* remove a tab with a given ID
*/
@@ -143,18 +116,28 @@ public:
* @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
*/
void setPosition(KMultiTabBarPosition pos);
/**
* get the tabbar position.
* @return position
*/
KMultiTabBarPosition position() const;
/**
* set the display style of the tabs
*/
void setStyle(KMultiTabBarStyle style);
/**
* get the display style of the tabs
* @return display style
*/
KMultiTabBarStyle tabStyle() const;
/**
* be carefull, don't delete tabs yourself and don't delete the list itself
*/
tabList * tabs();
QList<KMultiTabBarTab *>* tabs();
/**
* be carefull, don't delete buttons yourself and don't delete the list itself
*/
buttonList * buttons();
QList<KMultiTabBarButton *>* buttons();
/**
* might vanish, not sure yet
@@ -168,7 +151,7 @@ private:
class KMultiTabBarInternal *m_internal;
QBoxLayout *m_l;
QFrame *m_btnTabSep;
buttonList m_buttons;
QList<KMultiTabBarButton *> m_buttons;
KMultiTabBarPosition m_position;
KMultiTabBarPrivate *d;
};
@@ -246,12 +229,6 @@ public:
*/
void showActiveTabText(bool show);
void resize(){ setSize( neededSize() ); }
#ifndef QT4
virtual inline const QColorGroup & palette( void ) const
{
return( colorGroup() );
}
#endif
private:
bool m_showActiveTabText;
int m_expandedSize;
@@ -261,6 +238,7 @@ protected:
void setSize(int);
int neededSize();
void updateState();
virtual void paintEvent(QPaintEvent *);
virtual void drawButton(QPainter *);
virtual void drawButtonLabel(QPainter *);
void drawButtonStyled(QPainter *);
@@ -273,48 +251,66 @@ public slots:
virtual void setIcon(const QString&);
virtual void setIcon(const QPixmap&);
};
/***************************************************************************
kmultitabbar_p.h - description
-------------------
begin : 2003
copyright : (C) 2003 by Joseph Wenninger <jowenn@kde.org>
***************************************************************************/
/***************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
***************************************************************************/
class KMultiTabBarInternal: public Q3ScrollView
class KMultiTabBarInternal: public QWidget
{
Q_OBJECT
public:
KMultiTabBarInternal(QWidget *parent,Qt::Orientation o);
int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
int appendTab(const QPixmap &,int=-1,const QString& =QString());
KMultiTabBarTab *tab(int) const;
void removeTab(int);
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
void showActiveTabTexts(bool show);
tabList * tabs(){return &m_tabs;}
#ifndef QT4
virtual inline const QColorGroup & palette( void ) const
{
return( colorGroup() );
}
#endif
QList<KMultiTabBarTab *>* tabs(){return &m_tabs;}
private:
friend class KMultiTabBar;
QWidget *box;
QBoxLayout *mainLayout;
tabList m_tabs;
QList<KMultiTabBarTab *> m_tabs;
enum KMultiTabBar::KMultiTabBarPosition m_position;
bool m_showActiveTabTexts;
enum KMultiTabBar::KMultiTabBarStyle m_style;
int m_expandedTabSize;
int m_lines;
KMultiTabBar::KMultiTabBarMode m_barMode;
protected:
virtual void drawContents ( QPainter *, int, int, int, int);
virtual bool eventFilter(QObject *,QEvent*);
// virtual void paintEvent( QPaintEvent * );
/**
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
* in order to ignore all mouseEvents on the viewport, so that the
* parent can handle them.
*/
virtual void contentsMousePressEvent(QMouseEvent *);
virtual void mousePressEvent(QMouseEvent *);
virtual void resizeEvent(QResizeEvent *);
};
#else
#include "kmultitabbar-qt3.h"
#endif
#endif

View File

@@ -1,10 +1,12 @@
/*
* knob.h - powerful knob-widget
*
* This file is based on the knob-widget of the Qwt Widget Library by Josef Wilgen
* This file is based on the knob-widget of the Qwt Widget Library by
* Josef Wilgen
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -42,9 +44,6 @@
#endif
#include "templates.h"
class QPixmap;
class textFloat;
@@ -63,16 +62,7 @@ public:
knob( int _knob_num, QWidget * _parent, const QString & _name );
virtual ~knob();
enum ScrollMode
{
ScrNone,
ScrMouse,
ScrTimer,
ScrDirect,
ScrPage
} ;
void setTracking( bool _enable );
void setHintText( const QString & _txt_before,
const QString & _txt_after );
void setLabel( const QString & _txt );
@@ -112,6 +102,7 @@ public slots:
void reset( void );
void copyValue( void );
void pasteValue( void );
void enterValue( void );
void connectToMidiDevice( void );
void displayHelp( void );
@@ -124,23 +115,27 @@ signals:
protected:
virtual void paintEvent( QPaintEvent * _me );
virtual void resizeEvent( QResizeEvent * _me );
virtual void contextMenuEvent( QContextMenuEvent * _me );
virtual void dragEnterEvent( QDragEnterEvent * _dee );
virtual void dropEvent( QDropEvent * _de );
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseReleaseEvent( QMouseEvent * _me );
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _me );
virtual void resizeEvent( QResizeEvent * _me );
virtual void wheelEvent( QWheelEvent * _me );
virtual void contextMenuEvent( QContextMenuEvent * _me );
void drawKnob( QPainter * _p );
void setPosition( const QPoint & _p );
private:
// TODO: Need to figure out what is really used by tempoSyncKnob
// to get the private/protected attributes sorted out. Right
// now, just make everything protected.
//private:
void layoutKnob( bool _update = TRUE );
float getValue( const QPoint & _p );
void getScrollMode( const QPoint & _p, int & _scroll_mode,
int & _direction );
void recalcAngle( void );
void valueChange( void );
@@ -149,25 +144,20 @@ private:
void buttonReleased( void );
void setNewValue( float x, int align = 0 );
void setNewValue( float _x, bool _align = FALSE );
static float s_copiedValue;
static textFloat * s_textFloat;
int m_knobWidth;
int m_scrollMode;
float m_mouseOffset;
int m_direction;
int m_tracking;
QPoint m_origMousePos;
bool m_buttonPressed;
float m_angle;
float m_oldAngle;
float m_totalAngle;
float m_nTurns;
QPixmap * m_knobPixmap;
int m_knobNum;

345
include/ladspa_manager.h Normal file
View File

@@ -0,0 +1,345 @@
/*
* ladspa_manager.h - declaration of class ladspaManager
* a class to manage loading and instantiation
* of ladspa plugins
*
* Copyright (c) 2005 Danny McRae <khjklujn@netscape.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _LADSPA_MANAGER_H
#define _LADSPA_MANAGER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_LADSPA_H
#define LADSPA_SUPPORT
#include <ladspa.h>
#include "qt3support.h"
#ifdef QT4
#include <QString>
#include <QStringList>
#include <QMap>
#include <QPair>
#else
#include <qstring.h>
#include <qstringlist.h>
#include <qmap.h>
#include <qpair.h>
#endif
#include "types.h"
typedef QPair<QString, QString> ladspaKey;
/* ladspaManager provides a database of LADSPA plug-ins. Upon instantiation,
it loads all of the plug-ins found in the LADSPA_PATH environmental variable
and stores their access descriptors according in a dictionary keyed on
the filename the plug-in was loaded from and the label of the plug-in.
The can be retrieved by using ladspaKey. For example, to get the
"Phase Modulated Voice" plug-in from the cmt library, you would perform the
calls using:
ladspaKey( "cmt.so", "phasemod" )
as the plug-in key. */
class ladspaManager
{
public:
/* Provides access to the single instance of the class. */
static inline ladspaManager * inst( void )
{
if( s_instanceOfMe == NULL )
{
s_instanceOfMe = new ladspaManager();
}
return( s_instanceOfMe );
}
/* This identifier can be used as a unique, case-sensitive
identifier for the plugin type within the plugin file. Plugin
types should be identified by file and label rather than by index
or plugin name, which may be changed in new plugin
versions. Labels must not contain white-space characters. */
QString FASTCALL getLabel( const ladspaKey & _plugin );
/* Indicates that the plugin has a real-time dependency
(e.g. listens to a MIDI device) and so its output must not
be cached or subject to significant latency. */
bool FASTCALL hasRealTimeDependency( const ladspaKey & _plugin );
/* Indicates that the plugin may cease to work correctly if the
host elects to use the same data location for both input and output
(see connectPort). */
bool FASTCALL isInplaceBroken( const ladspaKey & _plugin );
/* Indicates that the plugin is capable of running not only in a
conventional host but also in a 'hard real-time' environment. */
bool FASTCALL isRealTimeCapable( const ladspaKey & _plugin );
/* Returns the name of the plug-in */
QString FASTCALL getName( const ladspaKey & _plugin );
/* Returns the the plug-in's author */
QString FASTCALL getMaker( const ladspaKey & _plugin );
/* Returns the copyright for the plug-in */
QString FASTCALL getCopyright( const ladspaKey & _plugin );
/* This indicates the number of ports (input AND output) present on
the plugin. */
Uint32 FASTCALL getPortCount( const ladspaKey & _plugin );
/* Indicates that the port is an input. */
bool FASTCALL isPortInput( const ladspaKey & _plugin, Uint32 _port );
/* Indicates that the port is an output. */
bool FASTCALL isPortOutput( const ladspaKey & _plugin, Uint32 _port );
/* Indicates that the port is an audio. */
bool FASTCALL isPortAudio( const ladspaKey & _plugin, Uint32 _port );
/* Indicates that the port is an control. */
bool FASTCALL isPortControl( const ladspaKey & _plugin, Uint32 _port );
/* Indicates that any bounds specified should be interpreted as
multiples of the sample rate. For instance, a frequency range from
0Hz to the Nyquist frequency (half the sample rate) could be requested
by this hint in conjunction with LowerBound = 0 and UpperBound = 0.5.
Hosts that support bounds at all must support this hint to retain
meaning. */
bool FASTCALL areHintsSampleRateDependent( const ladspaKey & _plugin,
Uint32 _port );
/* Returns the lower boundary value for the given port. If
no lower bound is provided by the plug-in, returns -999e-99. When
areHintsSampleRateDependent() is also true then this value should be
multiplied by the relevant sample rate. */
float FASTCALL getLowerBound( const ladspaKey & _plugin, Uint32 _port );
/* Returns the upper boundary value for the given port. If
no upper bound is provided by the plug-in, returns -999e-99. When
areHintsSampleRateDependent() is also true then this value should be
multiplied by the relevant sample rate. */
float FASTCALL getUpperBound( const ladspaKey & _plugin, Uint32 _port );
/* Indicates whether the given port should be considered 0 or 1
boolean switch. */
bool FASTCALL isPortToggled( const ladspaKey & _plugin, Uint32 _port );
/* Retrieves any default setting hints offered by the plug-in for
the given port. */
float FASTCALL getDefaultSetting( const ladspaKey & _plugin,
Uint32 _port );
/* Indicates that it is likely that the user will find it more
intuitive to view values using a logarithmic scale. This is
particularly useful for frequencies and gains. */
bool FASTCALL isLogarithmic( const ladspaKey & _plugin, Uint32 _port );
/* Indicates that a user interface would probably wish to provide a
stepped control taking only integer values. Any bounds set should be
slightly wider than the actual integer range required to avoid floating
point rounding errors. For instance, the integer set {0,1,2,3} might
be described as [-0.1, 3.1]. */
bool FASTCALL isInteger( const ladspaKey & _plugin, Uint32 _port );
/* Returns the name of the port. */
QString FASTCALL getPortName( const ladspaKey & _plugin, Uint32 _port );
/* This may be used by the plugin developer to pass any custom
implementation data into an instantiate call. It must not be used
or interpreted by the host. It is expected that most plugin
writers will not use this facility as LADSPA_Handle should be
used to hold instance data. */
const void * FASTCALL getImplementationData(
const ladspaKey & _plugin );
/* Returns a pointer to the plug-in's descriptor from which control
of the plug-in is accessible */
const LADSPA_Descriptor * FASTCALL getDescriptor(
const ladspaKey & _plugin );
/* The following methods are convenience functions for use during
development. A real instrument should use the getDescriptor()
method and implement the plug-in manipulations internally to avoid
the overhead associated with QMap lookups. */
/* Returns a handle to an instantiation of the given plug-in. */
LADSPA_Handle FASTCALL instantiate( const ladspaKey & _plugin,
Uint32 _sample_rate );
/* This method calls a function pointer that connects a port on an
instantiated plugin to a memory location at which a block of data
for the port will be read/written. The data location is expected
to be an array of LADSPA_Data for audio ports or a single
LADSPA_Data value for control ports. Memory issues will be
managed by the host. The plugin must read/write the data at these
locations every time run() or runAdding() is called and the data
present at the time of this connection call should not be
considered meaningful.
connectPort() may be called more than once for a plugin instance
to allow the host to change the buffers that the plugin is
reading or writing. These calls may be made before or after
activate() or deactivate() calls.
connectPort() must be called at least once for each port before
run() or runAdding() is called. */
void FASTCALL connectPort( const ladspaKey & _plugin,
LADSPA_Handle _instance,
Uint32 _port,
LADSPA_Data * _data_location );
/* This method calls a function pointer that initialises a plugin
instance and activates it for use. This is separated from
instantiate() to aid real-time support and so that hosts can
reinitialise a plugin instance by calling deactivate() and then
activate(). In this case the plugin instance must reset all state
information dependent on the history of the plugin instance
except for any data locations provided by connectPort() and any
gain set by setRunAddingGain(). If there is nothing for
activate() to do then the plugin writer may provide a NULL rather
than an empty function.
When present, hosts must call this function once before run() (or
runAdding()) is called for the first time. This call should be
made as close to the run() call as possible and indicates to
real-time plugins that they are now live. Plugins should not rely
on a prompt call to run() after activate(). activate() may not be
called again unless deactivate() is called first. Note that
connectPort() may be called before or after a call to
activate(). */
void FASTCALL activate( const ladspaKey & _plugin,
LADSPA_Handle _instance );
/* This method calls a function pointer that runs an instance of a
plugin for a block. Two parameters are required: the first is a
handle to the particular instance to be run and the second
indicates the block size (in samples) for which the plugin
instance may run.
Note that if an activate() function exists then it must be called
before run() or run_adding(). If deactivate() is called for a
plugin instance then the plugin instance may not be reused until
activate() has been called again. */
void FASTCALL run( const ladspaKey & _plugin, LADSPA_Handle _instance,
Uint32 _sample_count );
/* This method calls a function pointer that runs an instance of a
plugin for a block. This has identical behaviour to run() except
in the way data is output from the plugin. When run() is used,
values are written directly to the memory areas associated with
the output ports. However when runAdding() is called, values
must be added to the values already present in the memory
areas. Furthermore, output values written must be scaled by the
current gain set by setRunAddingGain() (see below) before
addition.
runAdding() is optional. When it is not provided by a plugin,
this function pointer must be set to NULL. When it is provided,
the function setRunAddingGain() must be provided also. */
void FASTCALL runAdding( const ladspaKey & _plugin,
LADSPA_Handle _instance,
Uint32 _sample_count );
/* This method calls a function pointer that sets the output gain for
use when runAdding() is called (see above). If this function is
never called the gain is assumed to default to 1. Gain
information should be retained when activate() or deactivate()
are called.
This function should be provided by the plugin if and only if the
runAdding() function is provided. When it is absent this
function pointer must be set to NULL. */
void FASTCALL setRunAddingGain( const ladspaKey & _plugin,
LADSPA_Handle _instance,
LADSPA_Data _gain );
/* This is the counterpart to activate() (see above). If there is
nothing for deactivate() to do then the plugin writer may provide
a NULL rather than an empty function.
Hosts must deactivate all activated units after they have been
run() (or run_adding()) for the last time. This call should be
made as close to the last run() call as possible and indicates to
real-time plugins that they are no longer live. Plugins should
not rely on prompt deactivation. Note that connect_port() may be
called before or after a call to deactivate().
Deactivation is not similar to pausing as the plugin instance
will be reinitialised when activate() is called to reuse it. */
void FASTCALL deactivate( const ladspaKey & _plugin,
LADSPA_Handle _instance );
/* Once an instance of a plugin has been finished with it can be
deleted using the following function. The instance handle passed
ceases to be valid after this call.
If activate() was called for a plugin instance then a
corresponding call to deactivate() must be made before cleanup()
is called. */
void FASTCALL cleanup( const ladspaKey & _plugin,
LADSPA_Handle _instance );
private:
void FASTCALL addPlugins( LADSPA_Descriptor_Function _descriptor_func,
const QString & _file );
ladspaManager( void );
~ladspaManager();
static ladspaManager * s_instanceOfMe;
typedef struct ladspaManagerStorage
{
LADSPA_Descriptor_Function descriptorFunction;
Uint32 index;
} ladspaManagerDescription;
typedef QMap<ladspaKey, ladspaManagerDescription *> ladspaManagerMapType;
ladspaManagerMapType m_ladspaManagerMap;
} ;
#endif
#endif

View File

@@ -1,8 +1,9 @@
/*
* lcd_spinbox.h - class lcdSpinBox, an improved QLCDNumber
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -30,14 +31,18 @@
#ifdef QT4
#include <QLCDNumber>
#include <QMap>
#else
#include <qlcdnumber.h>
#include <qmap.h>
#endif
class QLabel;
class lcdSpinBox : public QWidget
{
@@ -53,9 +58,18 @@ public:
return( m_number->intValue() );
}
void setValue( int _value );
void setLabel( const QString & _txt );
inline void addTextForValue( int _val, const QString & _text )
{
m_textForValue[_val] = _text;
}
public slots:
void setValue( int _value );
virtual void setEnabled( bool _on );
protected:
virtual void mousePressEvent( QMouseEvent * _me );
@@ -65,6 +79,8 @@ protected:
private:
QMap<int, QString> m_textForValue;
int m_value;
int m_minValue;
int m_maxValue;

View File

@@ -1,8 +1,9 @@
/*
* led_checkbox.h - class ledCheckBox, an improved QCheckBox
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -29,11 +30,11 @@
#ifdef QT4
#include <QCheckBox>
#include <QWidget>
#else
#include <qcheckbox.h>
#include <qwidget.h>
#endif
@@ -41,8 +42,9 @@
class QPixmap;
class ledCheckBox : public QCheckBox
class ledCheckBox : public QWidget
{
Q_OBJECT
public:
enum ledColors
{
@@ -54,13 +56,36 @@ public:
virtual ~ledCheckBox();
inline bool isChecked( void ) const
{
return( m_checked );
}
inline const QString & text( void )
{
return( m_text );
}
public slots:
void toggle( void );
void setChecked( bool _on );
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void mousePressEvent( QMouseEvent * _me );
private:
QPixmap * m_ledOnPixmap;
QPixmap * m_ledOffPixmap;
bool m_checked;
QString m_text;
signals:
void toggled( bool );
} ;

70
include/micro_timer.h Normal file
View File

@@ -0,0 +1,70 @@
/*
* micro_timer.h - simple high-precision timer
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MICRO_TIMER
#define _MICRO_TIMER
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
class microTimer
{
public:
inline microTimer( void )
{
reset();
}
inline ~microTimer()
{
}
inline void reset( void )
{
gettimeofday( &begin, NULL );
}
inline Uint32 elapsed( void ) const
{
struct timeval now;
gettimeofday( &now, NULL );
return( ( now.tv_sec - begin.tv_sec ) * 1000 * 1000 +
( now.tv_usec - begin.tv_usec ) );
}
private:
struct timeval begin;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* midi.h - constants, structs etc. concerning MIDI
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -61,11 +62,13 @@ enum midiEventTypes
} ;
const Sint8 MIDI_CHANNEL_COUNT = 16;
struct midiEvent
{
midiEvent( midiEventTypes _type = MIDI_ACTIVE_SENSING,
Uint8 _channel = 0,
Sint8 _channel = 0,
Uint16 _param1 = 0,
Uint16 _param2 = 0 ) :
m_type( _type ),
@@ -75,7 +78,8 @@ struct midiEvent
m_data.m_param[0] = _param1;
m_data.m_param[1] = _param2;
}
midiEvent( midiEventTypes _type, char * _sysex_data, int _data_len ) :
midiEvent( midiEventTypes _type, const char * _sysex_data,
int _data_len ) :
m_type( _type ),
m_channel( 0 ),
m_sysExData( _sysex_data )
@@ -92,14 +96,14 @@ struct midiEvent
}
midiEventTypes m_type; // MIDI event type
Uint8 m_channel; // MIDI channel
Sint8 m_channel; // MIDI channel
union
{
Uint16 m_param[2]; // first/second parameter (key/velocity)
int m_sysExDataLen; // len of m_sysExData
Uint32 m_sysExDataLen; // len of m_sysExData
} m_data;
char * m_sysExData;
const char * m_sysExData;
} ;

View File

@@ -1,8 +1,9 @@
/*
* midi_alsa_raw.h - midi-device-driver for RawMIDI via ALSA
* midi_alsa_raw.h - midi-client for RawMIDI via ALSA
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -50,17 +51,17 @@
#endif
#include "midi_device.h"
#include "midi_client.h"
struct pollfd;
class QLineEdit;
class midiALSARaw : public midiDevice, public QThread
class midiALSARaw : public midiClientRaw, public QThread
{
public:
midiALSARaw( channelTrack * _ct = NULL );
midiALSARaw( void );
~midiALSARaw();
static QString probeDevice( void );
@@ -73,7 +74,7 @@ public:
}
class setupWidget : public midiDevice::setupWidget
class setupWidget : public midiClientRaw::setupWidget
{
public:
setupWidget( QWidget * _parent );
@@ -88,8 +89,8 @@ public:
protected:
virtual void FASTCALL sendByte( Uint8 _c );
virtual void FASTCALL run( void );
virtual void FASTCALL sendByte( const Uint8 _c );
virtual void run( void );
private:

180
include/midi_alsa_seq.h Normal file
View File

@@ -0,0 +1,180 @@
/*
* midi_alsa_seq.h - ALSA-sequencer-client
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MIDI_ALSA_SEQ_H
#define _MIDI_ALSA_SEQ_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_ALSA_ASOUNDLIB_H
#ifndef ALSA_SUPPORT
#define ALSA_SUPPORT
#endif
#include <alsa/asoundlib.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QThread>
#include <QTimer>
#else
#include <qobject.h>
#include <qthread.h>
#include <qtimer.h>
#endif
#include "midi_client.h"
struct pollfd;
class QLineEdit;
class midiALSASeq :
#ifndef QT4
public QObject,
#endif
public midiClient, public QThread
{
Q_OBJECT
public:
midiALSASeq( void );
~midiALSASeq();
static QString probeDevice( void );
inline static QString name( void )
{
return( setupWidget::tr( "ALSA-Sequencer (Advanced Linux Sound "
"Architecture)" ) );
}
virtual void FASTCALL processOutEvent( const midiEvent & _me,
const midiTime & _time,
const midiPort * _port );
virtual void FASTCALL applyPortMode( midiPort * _port );
virtual void FASTCALL applyPortName( midiPort * _port );
virtual void FASTCALL removePort( midiPort * _port );
// list seq-ports from ALSA
inline virtual const QStringList & readablePorts( void ) const
{
return( m_readablePorts );
}
virtual const QStringList & writeablePorts( void ) const
{
return( m_writeablePorts );
}
// (un)subscribe given midiPort to/from destination-port
virtual void subscribeReadablePort( midiPort * _port,
const QString & _dest,
bool _unsubscribe = FALSE );
virtual void subscribeWriteablePort( midiPort * _port,
const QString & _dest,
bool _unsubscribe = FALSE );
virtual void connectRPChanged( QObject * _receiver,
const char * _member )
{
connect( this, SIGNAL( readablePortsChanged() ),
_receiver, _member );
}
virtual void connectWPChanged( QObject * _receiver,
const char * _member )
{
connect( this, SIGNAL( writeablePortsChanged() ),
_receiver, _member );
}
class setupWidget : public midiClient::setupWidget
{
public:
setupWidget( QWidget * _parent );
virtual ~setupWidget();
virtual void saveSettings( void );
private:
QLineEdit * m_device;
} ;
private slots:
void changeQueueTempo( int _bpm );
void updatePortList( void );
private:
virtual void run( void );
#ifdef ALSA_SUPPORT
snd_seq_t * m_seqHandle;
struct ports
{
ports() { p[0] = -1; p[1] = -1; }
int & operator[]( const int _i ) { return( p[_i] ); }
private: int p[2];
} ;
QMap<midiPort *, ports> m_portIDs;
int m_queueID;
volatile bool m_quit;
#endif
QTimer m_portListUpdateTimer;
QStringList m_readablePorts;
QStringList m_writeablePorts;
signals:
void readablePortsChanged( void );
void writeablePortsChanged( void );
} ;
#endif

197
include/midi_client.h Normal file
View File

@@ -0,0 +1,197 @@
/*
* midi_client.h - base-class for MIDI-clients like ALSA-sequencer-client
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MIDI_CLIENT_H
#define _MIDI_CLIENT_H
#include "qt3support.h"
#ifdef QT4
#include <QVector>
#include <QStringList>
#else
#include <qvaluevector.h>
#include <qstringlist.h>
#endif
#include "midi.h"
#include "midi_event_processor.h"
#include "tab_widget.h"
class midiPort;
// base-class for all MIDI-clients
class midiClient
{
public:
midiClient( void );
virtual ~midiClient();
// to be implemented by sub-classes
virtual void FASTCALL processOutEvent( const midiEvent & _me,
const midiTime & _time,
const midiPort * _port ) = 0;
// inheriting classes can re-implement this for being able to update
// their internal port-structures etc.
virtual void FASTCALL applyPortMode( midiPort * _port );
virtual void FASTCALL applyPortName( midiPort * _port );
// inheriting classes can re-implement this although it's actually not
// neccessary, because they can catch port-mode-changes and do their
// stuff as soon as port-mode changes from DUMMY to something else
// re-implemented methods HAVE to call addPort() of base-class!!
virtual midiPort * FASTCALL addPort( midiEventProcessor * _mep,
const QString & _name );
// re-implemented methods HAVE to call removePort() of base-class!!
virtual void FASTCALL removePort( midiPort * _port );
// returns whether client works with raw-MIDI, only needs to be
// re-implemented by midiClientRaw for returning TRUE
inline virtual bool isRaw( void ) const
{
return( FALSE );
}
// if not raw-client, return all readable/writeable ports
virtual const QStringList & readablePorts( void ) const;
virtual const QStringList & writeablePorts( void ) const;
// (un)subscribe given midiPort to/from destination-port
virtual void subscribeReadablePort( midiPort * _port,
const QString & _dest,
bool _unsubscribe = FALSE );
virtual void subscribeWriteablePort( midiPort * _port,
const QString & _dest,
bool _unsubscribe = FALSE );
// qobject-derived classes can use this for make a slot being
// connected to signal of non-raw-MIDI-client if port-lists change
virtual void connectRPChanged( QObject *, const char * )
{
}
virtual void connectWPChanged( QObject *, const char * )
{
}
// tries to open either MIDI-driver from config-file or (if it fails)
// any other working
static midiClient * openMidiClient( void );
class setupWidget : public tabWidget
{
public:
setupWidget( const QString & _caption, QWidget * _parent ) :
tabWidget( tabWidget::tr( "Settings for %1" ).arg(
_caption ).toUpper(), _parent )
{
}
virtual ~setupWidget()
{
}
virtual void saveSettings( void ) = 0;
} ;
protected:
vvector<midiPort *> m_midiPorts;
} ;
const Uint8 RAW_MIDI_PARSE_BUF_SIZE = 16;
class midiClientRaw : public midiClient
{
public:
midiClientRaw( void );
virtual ~midiClientRaw();
// we are raw-clients for sure!
inline virtual bool isRaw( void ) const
{
return( TRUE );
}
protected:
// generic raw-MIDI-parser which generates appropriate MIDI-events
void FASTCALL parseData( const Uint8 _c );
// to be implemented by actual client-implementation
virtual void FASTCALL sendByte( const Uint8 _c ) = 0;
private:
// this does MIDI-event-process
void processParsedEvent();
virtual void FASTCALL processOutEvent( const midiEvent & _me,
const midiTime & _time,
const midiPort * _port );
// small helper function returning length of a certain event - this
// is neccessary for parsing raw-MIDI-data
static Uint8 FASTCALL eventLength( const Uint8 _event );
// data being used for parsing
struct midiParserData
{
Uint8 m_status; // identifies the type of event, that
// is currently received ('Noteon',
// 'Pitch Bend' etc).
Uint8 m_channel; // The channel of the event that is
// received (in case of a channel event)
Uint32 m_bytes; // How many bytes have been read for
// the current event?
Uint32 m_bytesTotal; // How many bytes does the current
// event type include?
Uint32 m_buffer[RAW_MIDI_PARSE_BUF_SIZE];
// buffer for incoming data
midiEvent m_midiEvent; // midi-event
} m_midiParseData;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* midi_dummy.h - dummy MIDI-driver
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -26,15 +27,16 @@
#define _MIDI_DUMMY_H
#include "midi_device.h"
#include "midi_client.h"
#include "midi_port.h"
#include "tab_widget.h"
class midiDummy : public midiDevice
class midiDummy : public midiClientRaw
{
public:
midiDummy() :
midiDevice()
midiClientRaw()
{
}
~midiDummy()
@@ -47,11 +49,11 @@ public:
}
class setupWidget : public midiDevice::setupWidget
class setupWidget : public midiClient::setupWidget
{
public:
setupWidget( QWidget * _parent ) :
midiDevice::setupWidget( midiDummy::name(), _parent )
midiClientRaw::setupWidget( midiDummy::name(), _parent )
{
}
@@ -67,7 +69,7 @@ public:
protected:
virtual void FASTCALL sendByte( Uint8 )
virtual void FASTCALL sendByte( const Uint8 )
{
}

View File

@@ -0,0 +1,60 @@
/*
* midi_event_processor.h - base-class for midi-processing classes
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MIDI_EVENT_PROCESSOR_H
#define _MIDI_EVENT_PROCESSOR_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "midi_time.h"
class midiEvent;
// all classes being able to process MIDI-events should inherit from this
class midiEventProcessor
{
public:
inline midiEventProcessor( void )
{
}
virtual inline ~midiEventProcessor()
{
}
// to be implemented by inheriting classes
virtual void FASTCALL processInEvent( const midiEvent & _me,
const midiTime & _time ) = 0;
virtual void FASTCALL processOutEvent( const midiEvent & _me,
const midiTime & _time ) = 0;
} ;
#endif

View File

@@ -1,8 +1,9 @@
/*
* midi_mapper.h - MIDI-mapper for any midiDevice
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -34,6 +35,7 @@
#else
#include <qmap.h>
#include <qpair.h>
#include <qfile.h>

View File

@@ -1,8 +1,9 @@
/*
* midi_oss.h - OSS-driver for MIDI-port
* midi_oss.h - OSS-raw-midi-client
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -25,19 +26,24 @@
#ifndef _MIDI_OSS_H
#define _MIDI_OSS_H
#include "audio_oss.h"
#ifdef OSS_SUPPORT
#include <qthread.h>
#include <qfile.h>
#include "midi_device.h"
#include "midi_client.h"
class QLineEdit;
class midiOSS : public midiDevice, public QThread
class midiOSS : public midiClientRaw, public QThread
{
public:
midiOSS( channelTrack * _ct = NULL );
midiOSS( void );
~midiOSS();
static QString probeDevice( void );
@@ -49,7 +55,7 @@ public:
}
class setupWidget : public midiDevice::setupWidget
class setupWidget : public midiClientRaw::setupWidget
{
public:
setupWidget( QWidget * _parent );
@@ -64,8 +70,8 @@ public:
protected:
virtual void FASTCALL sendByte( Uint8 _c );
virtual void FASTCALL run( void );
virtual void FASTCALL sendByte( const Uint8 _c );
virtual void run( void );
private:
@@ -75,5 +81,7 @@ private:
} ;
#endif
#endif

125
include/midi_port.h Normal file
View File

@@ -0,0 +1,125 @@
/*
* midi_port.h - abstraction of MIDI-ports which are part of LMMS's MIDI-
* sequencing system
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MIDI_PORT_H
#define _MIDI_PORT_H
#include "qt3support.h"
#ifdef QT4
#include <QString>
#else
#include <qstring.h>
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "types.h"
#include "midi.h"
#include "midi_time.h"
class midiClient;
class midiEventProcessor;
// class for abstraction of MIDI-port
class midiPort
{
public:
enum modes
{
DUMMY, // don't route any MIDI-events (default)
INPUT, // from MIDI-client to MIDI-event-processor
OUTPUT, // from MIDI-event-processor to MIDI-client
DUPLEX // both directions
} ;
midiPort( midiClient * _mc, midiEventProcessor * _mep,
const QString & _name, modes _mode = DUMMY );
~midiPort();
inline const QString & name( void ) const
{
return( m_name );
}
void FASTCALL setName( const QString & _name );
inline modes mode( void ) const
{
return( m_mode );
}
void FASTCALL setMode( modes _mode );
inline Sint8 inputChannel( void ) const
{
return( m_inputChannel );
}
inline void setInputChannel( Sint8 _chnl )
{
m_inputChannel = _chnl;
}
inline Sint8 outputChannel( void ) const
{
return( m_outputChannel );
}
inline void setOutputChannel( Sint8 _chnl )
{
m_outputChannel = _chnl;
}
void FASTCALL processInEvent( const midiEvent & _me,
const midiTime & _time );
void FASTCALL processOutEvent( const midiEvent & _me,
const midiTime & _time );
private:
midiClient * m_midiClient;
midiEventProcessor * m_midiEventProcessor;
QString m_name;
modes m_mode;
Sint8 m_inputChannel;
Sint8 m_outputChannel;
} ;
#endif

110
include/midi_tab_widget.h Normal file
View File

@@ -0,0 +1,110 @@
/*
* midi_tab_widget.h - tab-widget in channel-track-window for setting up
* MIDI-related stuff
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MIDI_TAB_WIDGET_H
#define _MIDI_TAB_WIDGET_H
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#else
#include <qwidget.h>
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "settings.h"
class QMenu;
class QPixmap;
class QAction;
class channelTrack;
class tabWidget;
class ledCheckBox;
class lcdSpinBox;
class midiPort;
class midiTabWidget : public QWidget, public settings
{
Q_OBJECT
public:
midiTabWidget( channelTrack * _channel_track, midiPort * _port );
~midiTabWidget();
virtual void FASTCALL saveSettings( QDomDocument & _doc,
QDomElement & _parent );
virtual void FASTCALL loadSettings( const QDomElement & _this );
inline virtual QString nodeName( void ) const
{
return( "midi" );
}
public slots:
void midiPortModeToggled( bool = FALSE );
protected slots:
void inputChannelChanged( int );
void outputChannelChanged( int );
void readablePortsChanged( void );
void writeablePortsChanged( void );
void activatedReadablePort( QAction * _item );
void activatedWriteablePort( QAction * _item );
// Qt3-version
void activatedReadablePort( int _id );
void activatedWriteablePort( int _id );
private:
channelTrack * m_channelTrack;
midiPort * m_midiPort;
tabWidget * m_setupTabWidget;
lcdSpinBox * m_inputChannelSpinBox;
lcdSpinBox * m_outputChannelSpinBox;
ledCheckBox * m_receiveCheckBox;
ledCheckBox * m_sendCheckBox;
QMenu * m_readablePorts;
QMenu * m_writeablePorts;
friend class channelTrack;
} ;
#endif

View File

@@ -2,8 +2,9 @@
* midi_time.h - declaration of class midiTime which provides data-type for
* position- and length-variables
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -32,13 +33,13 @@
class midiTime
{
public:
inline midiTime( tact _tact, tact64th _tact_64th ) :
inline midiTime( const tact _tact, const tact64th _tact_64th ) :
m_tact( _tact ),
m_tact64th( _tact_64th )
{
}
inline midiTime( Sint32 _abs = 0 ) :
inline midiTime( const Sint32 _abs = 0 ) :
m_tact( _abs / 64 ),
m_tact64th( _abs % 64 )
{
@@ -97,7 +98,7 @@ public:
}
// calculate number of frame that are needed this time
inline Uint32 frames( float _frames_per_tact ) const
inline Uint32 frames( const float _frames_per_tact ) const
{
if( m_tact >= 0 )
{
@@ -110,6 +111,13 @@ public:
return( 0 );
}
static inline midiTime fromFrames( Uint32 _frames,
const float _frames_per_tact )
{
return( midiTime( static_cast<Sint32>( _frames * 64.0f /
_frames_per_tact ) ) );
}
private:
tact m_tact;

View File

@@ -1,8 +1,9 @@
/*
* mixer.h - audio-device-independent mixer for LMMS
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -33,14 +34,12 @@
#ifdef QT4
#include <QThread>
#include <QMutex>
#include <QVector>
#else
#include <qobject.h>
#include <qthread.h>
#include <qmutex.h>
#include <qvaluevector.h>
@@ -52,19 +51,18 @@
#include "panning.h"
#include "note.h"
#include "play_handle.h"
#include "effect_board.h"
class audioDevice;
class midiDevice;
class midiClient;
class lmmsMainWin;
class plugin;
class audioPort;
const int DEFAULT_BUFFER_SIZE = 512;
const Uint16 MAX_SAMPLE_PACKETS = 256; // how many parallel audio-samples-
// buffers shall be maximal exist and
// mixed together?
const Uint8 DEFAULT_CHANNELS = 2;
const Uint8 SURROUND_CHANNELS =
@@ -78,7 +76,7 @@ const Uint8 QUALITY_LEVELS = 2;
const Uint32 DEFAULT_QUALITY_LEVEL = 0;
const Uint32 HIGH_QUALITY_LEVEL = DEFAULT_QUALITY_LEVEL+1;
extern Uint32 SAMPLE_RATES[QUALITY_LEVELS];
const Uint32 DEFAULT_SAMPLE_RATE = 44100;//SAMPLE_RATES[DEFAULT_QUALITY_LEVEL];
const Uint32 DEFAULT_SAMPLE_RATE = 44100;
typedef sampleType sampleFrame[DEFAULT_CHANNELS];
@@ -104,11 +102,7 @@ const octaves BASE_OCTAVE = OCTAVE_4;
class mixer :
#ifndef QT4
public QObject,
#endif
public QThread
class mixer : public QObject
{
Q_OBJECT
public:
@@ -122,14 +116,19 @@ public:
}
void FASTCALL addBuffer( sampleFrame * _buf, Uint32 _frames,
void FASTCALL bufferToPort( sampleFrame * _buf, Uint32 _frames,
Uint32 _framesAhead,
volumeVector & _volumeVector );
volumeVector & _volumeVector,
audioPort * _port );
inline Uint32 framesPerAudioBuffer( void ) const
{
return( m_framesPerAudioBuffer );
}
inline Uint8 cpuLoad( void ) const
{
return( m_cpuLoad );
}
inline bool highQuality( void ) const
{
@@ -150,17 +149,40 @@ public:
void FASTCALL setAudioDevice( audioDevice * _dev, bool _hq );
void restoreAudioDevice( void );
// MIDI-device-stuff
inline const QString & midiDevName( void ) const
inline audioDevice * audioDev( void )
{
return( m_midiDevName );
return( m_audioDev );
}
inline midiDevice * getMIDIDevice( void )
// audio-port-stuff
inline void addAudioPort( audioPort * _port )
{
return( m_midiDev );
pause();
m_audioPorts.push_back( _port );
play();
}
inline void removeAudioPort( audioPort * _port )
{
vvector<audioPort *>::iterator it = qFind( m_audioPorts.begin(),
m_audioPorts.end(),
_port );
if( it != m_audioPorts.end() )
{
m_audioPorts.erase( it );
}
}
// MIDI-client-stuff
inline const QString & midiClientName( void ) const
{
return( m_midiClientName );
}
inline midiClient * getMIDIClient( void )
{
return( m_midiClient );
}
@@ -174,23 +196,29 @@ public:
m_playHandlesToRemove.push_back( _ph );
}
void FASTCALL checkValidityOfPlayHandles( void );
inline const playHandleVector & playHandles( void ) const
{
return( m_playHandles );
}
void checkValidityOfPlayHandles( void );
inline int sampleRate( void )
inline Uint32 sampleRate( void )
{
return( SAMPLE_RATES[m_qualityLevel] );
}
inline float masterOutput( void ) const
inline float masterGain( void ) const
{
return( m_masterOutput );
return( m_masterGain );
}
inline void setMasterOutput( float _mo )
inline void setMasterGain( float _mo )
{
m_masterOutput = _mo;
m_masterGain = _mo;
}
@@ -208,18 +236,18 @@ public:
}
inline void pause( void )
void pause( void )
{
m_safetySyncMutex.lock();
m_mixMutex.lock();
}
inline void play( void )
void play( void )
{
m_safetySyncMutex.unlock();
m_mixMutex.unlock();
}
void clear( void );
void FASTCALL clear( bool _everything = FALSE );
void FASTCALL clearAudioBuffer( sampleFrame * _ab, Uint32 _frames );
@@ -234,6 +262,8 @@ public:
}
const surroundSampleFrame * renderNextBuffer( void );
public slots:
void setHighQuality( bool _hq_on = FALSE );
@@ -244,80 +274,43 @@ signals:
private:
struct samplePacket
{
surroundSampleFrame * m_buffer; // actual buffer for
// wave-data
Uint32 m_frames;
Uint32 m_framesDone;
Uint32 m_framesAhead; // number of frames, the buffer
// should be mixed ahead
volume m_vol;
panning m_pan;
enum samplePacketStates
{
READY, FILLING, UNUSED
} m_state;
} ;
static mixer * s_instanceOfMe;
mixer();
~mixer();
void quitThread( void );
void stopProcessing( void );
// we don't allow to create mixer by using copy-ctor
mixer( const mixer & ) :
#ifndef QT4
QObject(),
#endif
QThread(),
m_curBuf( m_buffer1 ),
m_nextBuf( m_buffer2 )
mixer( const mixer & )
{
}
virtual void run( void );
void FASTCALL mixSamplePacket( samplePacket * _sp );
audioDevice * tryAudioDevices( void );
midiDevice * tryMIDIDevices( void );
midiClient * tryMIDIClients( void );
void processBuffer( surroundSampleFrame * _buf, fxChnl _fx_chnl );
sampleFrame * m_silence;
#ifndef DISABLE_SURROUND
surroundSampleFrame * m_surroundSilence;// cool, silence in surround ;-)
#endif
samplePacket m_samplePackets[MAX_SAMPLE_PACKETS];
vvector<audioPort *> m_audioPorts;
Uint32 m_framesPerAudioBuffer;
surroundSampleFrame * m_buffer1;
surroundSampleFrame * m_buffer2;
surroundSampleFrame * m_curBuf;
surroundSampleFrame * m_nextBuf;
bool m_discardCurBuf;
Uint8 m_cpuLoad;
playHandleVector m_playHandles;
playHandleVector m_playHandlesToRemove;
Uint8 m_qualityLevel;
volatile float m_masterOutput;
volatile bool m_quit;
float m_masterGain;
audioDevice * m_audioDev;
@@ -325,12 +318,11 @@ private:
QString m_audioDevName;
midiDevice * m_midiDev;
QString m_midiDevName;
midiClient * m_midiClient;
QString m_midiClientName;
QMutex m_safetySyncMutex;
QMutex m_devMutex;
QMutex m_mixMutex;
friend class lmmsMainWin;

View File

@@ -1,8 +1,9 @@
/*
* mmp.h - class for reading and writing multimedia-project-files
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -48,7 +49,9 @@ public:
{
UNKNOWN,
SONG_PROJECT,
SONG_PROJECT_TEMPLATE,
CHANNEL_SETTINGS,
DRAG_N_DROP_DATA,
EFFECT_SETTINGS,
VIDEO_PROJECT, // will come later...
BURN_PROJECT, // will come later...
@@ -57,7 +60,8 @@ public:
} ;
multimediaProject( const QString & _in_file_name );
multimediaProject( const QString & _in_file_name,
bool _is_filename = TRUE );
multimediaProject( projectTypes _project_type );
~multimediaProject();

View File

@@ -2,8 +2,9 @@
* name_label.h - class nameLabel, a label which is renamable by
* double-clicking it
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -45,20 +46,32 @@ class nameLabel : public QLabel
{
Q_OBJECT
public:
nameLabel( const QString & _initial_name, QWidget * _parent,
const QPixmap & _pm = QPixmap() );
nameLabel( const QString & _initial_name, QWidget * _parent );
~nameLabel();
const QPixmap * pixmap( void ) const;
const QPixmap & pixmap( void ) const
{
return( m_pixmap );
}
const QString & pixmapFile( void ) const
{
return( m_pixmapFile );
}
public slots:
void setPixmap( const QPixmap & _pm );
void setPixmap( const QPixmap & _pixmap );
void setPixmapFile( const QString & _file );
void rename( void );
void selectPixmap( void );
signals:
void nameChanged( const QString & _new_name );
void clicked( void );
void nameChanged( void );
void nameChanged( const QString & _new_name );
void pixmapChanged( void );
protected:
@@ -68,7 +81,8 @@ protected:
private:
QPixmap m_pm;
QPixmap m_pixmap;
QString m_pixmapFile;
} ;

View File

@@ -2,8 +2,9 @@
* note.h - declaration of class note which contains all informations about a
* note + definitions of several constants and enums
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -95,7 +96,9 @@ public:
tones _tone = A, octaves _octave = DEFAULT_OCTAVE,
volume _volume = DEFAULT_VOLUME,
panning _panning = DEFAULT_PANNING ) FASTCALL;
~note();
void FASTCALL setLength( const midiTime & _length );
void FASTCALL setPos( const midiTime & _pos );
void FASTCALL setTone( tones _tone = C );
@@ -103,38 +106,47 @@ public:
void FASTCALL setKey( int _key );
void FASTCALL setVolume( volume _volume = DEFAULT_VOLUME );
void FASTCALL setPanning( panning _panning = DEFAULT_PANNING );
inline midiTime endPos( void ) const
{
return( m_pos + m_length);
}
inline const midiTime & length( void ) const
{
return( m_length );
}
inline const midiTime & pos( void ) const
{
return( m_pos );
}
inline midiTime pos( midiTime _base_pos ) const
{
return( m_pos - _base_pos );
}
inline tones tone( void ) const
{
return( m_tone );
}
inline octaves octave( void ) const
{
return( m_octave );
}
inline int key( void ) const
{
return( m_octave * NOTES_PER_OCTAVE + m_tone );
}
inline volume getVolume( void ) const
{
return( m_volume );
}
inline panning getPanning( void ) const
{
return( m_panning );

View File

@@ -2,8 +2,9 @@
* note_play_handle.h - declaration of class notePlayHandle which is needed
* by LMMS-Play-Engine
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -37,6 +38,7 @@ class channelTrack;
class notePlayHandle;
typedef vvector<notePlayHandle *> notePlayHandleVector;
typedef vvector<const notePlayHandle *> constNotePlayHandleVector;
class notePlayHandle : public playHandle, public note
@@ -45,9 +47,9 @@ public:
void * m_pluginData;
basicFilters<> * m_filter;
notePlayHandle( channelTrack * _chnl_trk, Uint32 _frames_ahead,
Uint32 _frames, note * n,
bool _arp_note = FALSE ) FASTCALL;
notePlayHandle( channelTrack * _chnl_trk, const Uint32 _frames_ahead,
const Uint32 _frames, note * _n,
const bool _arp_note = FALSE ) FASTCALL;
~notePlayHandle();
@@ -137,6 +139,11 @@ public:
return( m_arpNote );
}
inline void setArpNote( bool _on )
{
m_arpNote = _on;
}
// returns whether note is base-note for arpeggio
inline bool arpBaseNote( void ) const
{
@@ -150,6 +157,17 @@ public:
void mute( void );
// returns index of note-play-handle in vector of note-play-handles
// belonging to this channel
int index( void ) const;
// note-play-handles belonging to given channel
static constNotePlayHandleVector nphsOfChannelTrack(
const channelTrack * _ct );
// return whether given note-play-handle is equal to *this
bool operator==( const notePlayHandle & _nph ) const;
private:
channelTrack * m_channelTrack; // needed for calling

View File

@@ -1,8 +1,9 @@
/*
* nstate_button.h - declaration of class nStateButton
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -33,22 +34,22 @@
#ifdef QT4
#include <QWidget>
#include <QPixmap>
#include <QVector>
#include <QPair>
#else
#include <qwidget.h>
#include <qpixmap.h>
#include <qvaluevector.h>
#include <qpair.h>
#endif
#include "tool_button.h"
class nStateButton : public QWidget
class nStateButton : public toolButton
{
Q_OBJECT
public:
@@ -72,16 +73,15 @@ public slots:
signals:
void stateChanged( int _n );
void changedState( int _n );
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void mousePressEvent( QMouseEvent * _me );
private:
vvector<QPair<QPixmap *, QString> > m_states;
vvector<QPair<QPixmap, QString> > m_states;
QString m_generalToolTip;
int m_curState;

View File

@@ -1,8 +1,9 @@
/*
* oscillator.h - header-file for oscillator.cpp, a powerful oscillator-class
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -44,6 +45,8 @@ typedef void ( oscillator:: * oscFuncPtr )
( sampleFrame * _ab, Uint32 _frames, Uint8 _chnl );
const sampleFrame ZERO_FRAME = { 0.0f, 0.0f } ;
class oscillator
{
@@ -74,8 +77,16 @@ public:
}
inline void setUserWave( const sampleFrame * _data, Uint32 _frames )
{
m_userWaveData = _data;
m_userWaveFrames = _frames;
if( m_userWaveFrames > 0 )
{
m_userWaveData = _data;
m_userWaveFrames = _frames;
}
else
{
m_userWaveData = &ZERO_FRAME;
m_userWaveFrames = 1;
}
}
inline void update( sampleFrame * _ab, Uint32 _frames, Uint8 _chnl )
{
@@ -87,14 +98,13 @@ public:
// phase (otherwise we'll get clicks in the audio-stream)
const float v = m_sample * m_oscCoeff;
m_freq = _new_freq;
recalcOscCoeff( phase( v ) );
recalcOscCoeff( fraction( v ) );
}
static oscillator * FASTCALL createNewOsc( waveShapes _wave_shape,
static oscillator * FASTCALL createOsc( waveShapes _wave_shape,
modulationAlgos _modulation_algo, float _freq,
Sint16 _phase_offset, float _volume_factor,
oscillator * _m_subOsc = NULL );
oscillator * _m_subOsc = NULL );
inline bool syncOk( void )
{
const float v1 = m_sample * m_oscCoeff;
@@ -102,13 +112,20 @@ public:
// check whether v2 is in next period
return( floorf( v2 ) > floorf( v1 ) );
}
static inline float phase( float _sample )
/*#define FLOAT_TO_INT(in,out) \
register const float round_const = -0.5f; \
__asm__ __volatile__ ("fadd %%st,%%st(0)\n" \
"fadd %2\n" \
"fistpl %0\n" \
"shrl $1,%0" : "=m" (out) : "t" (in),"m"(round_const) : "st") ;*/
static inline float fraction( const float _sample )
{
float t;
return( modff( _sample, &t ) );
//return( _sample - floorf( _sample ) );
return( _sample - static_cast<int>( _sample ) );
}
// now follow the wave-shape-routines...
static inline sampleType sinSample( float _sample )
{
return( sinf( _sample * static_cast<sampleType>( 2.0f * M_PI
@@ -117,7 +134,7 @@ public:
static inline sampleType triangleSample( float _sample )
{
const float ph = phase( _sample );
const float ph = fraction( _sample );
if( ph <= 0.25f )
{
return( ph * 4.0f );
@@ -131,17 +148,17 @@ public:
static inline sampleType sawSample( float _sample )
{
return( -1.0f + phase( _sample ) * 2.0f );
return( -1.0f + fraction( _sample ) * 2.0f );
}
static inline sampleType squareSample( float _sample )
{
return( ( phase( _sample ) > 0.5f ) ? -1.0f : 1.0f );
return( ( fraction( _sample ) > 0.5f ) ? -1.0f : 1.0f );
}
static inline sampleType moogSawSample( float _sample )
{
const float ph= phase( _sample );
const float ph = fraction( _sample );
if( ph < 0.5f )
{
return( -1.0f + ph * 4.0f );
@@ -151,7 +168,7 @@ public:
static inline sampleType expSample( float _sample )
{
float ph = phase( _sample );
float ph = fraction( _sample );
if( ph > 0.5f )
{
ph = 1.0f - ph;
@@ -164,14 +181,20 @@ public:
return( 1.0f - 2.0f * ( ( float )rand() * ( 1.0f /
RAND_MAX ) ) );
}
static inline sampleType userWaveSample( float _sample,
const sampleFrame * _user_wave, Uint32 _user_wave_frames )
{
const float frame = fraction( _sample ) * _user_wave_frames;
const Uint32 f1 = static_cast<Uint32>( frame );
const Uint32 f2 = ( f1 + 1 ) % _user_wave_frames;
return( linearInterpolate( _user_wave[f1][0],
_user_wave[f2][0],
fraction( frame ) ) );
}
inline sampleType userWaveSample( float _sample )
{
const float frame = phase( _sample ) * m_userWaveFrames;
const Uint32 f1 = static_cast<Uint32>( frame );
const Uint32 f2 = ( f1 + 1 ) % m_userWaveFrames;
return( linearInterpolate( m_userWaveData[f1][0],
m_userWaveData[f2][0],
frame - floorf( frame ) ) );
return( userWaveSample( _sample, m_userWaveData,
m_userWaveFrames ) );
}

View File

@@ -2,8 +2,9 @@
* panning.h - declaration of some constants and types, concerning the
* panning of a note
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -2,8 +2,9 @@
* pattern.h - declaration of class pattern, which contains all informations
* about a pattern
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -34,6 +35,8 @@
#include <QWidget>
#include <QMutex>
#include <QDialog>
#include <QThread>
#include <QPixmap>
#else
@@ -41,6 +44,8 @@
#include <qwidget.h>
#include <qmutex.h>
#include <qdialog.h>
#include <qthread.h>
#include <qpixmap.h>
#endif
@@ -50,19 +55,18 @@
#include "mixer.h"
class channelTrack;
class sampleBuffer;
class audioSampleRecorder;
class QTimer;
class QAction;
class QProgressBar;
class QPushButton;
class QPixmap;
class patternFreezeStatusDialog;
class channelTrack;
class patternFreezeThread;
class sampleBuffer;
const int DEFAULT_STEPS_PER_TACT = 16;
const int BEATS_PER_TACT = 4;
const int MAX_BEATS_PER_TACT = 16;
const int MAIN_BEATS_PER_TACT = 4;
class pattern : public trackContentObject
@@ -71,20 +75,24 @@ class pattern : public trackContentObject
public:
enum patternTypes
{
BEAT_PATTERN, MELODY_PATTERN/*, EVENT_PATTERN*/
BEAT_PATTERN, MELODY_PATTERN/*, AUTOMATION_PATTERN*/
} ;
pattern( channelTrack * _channel_track );
pattern( const pattern & _pat_to_copy ) FASTCALL;
virtual ~pattern();
virtual void FASTCALL movePosition( const midiTime & _pos );
void init( void );
virtual midiTime length( void ) const;
note * FASTCALL addNote( const note & _new_note );
void FASTCALL removeNote( const note * _note_to_del );
note * FASTCALL rearrangeNote( const note * _note_to_proc );
void clearNotes( void );
inline noteVector & notes( void )
@@ -92,43 +100,49 @@ public:
return( m_notes );
}
note * FASTCALL noteAt( int _note_num );
void FASTCALL setNoteAt( int _note_num, note _new_note );
// pattern-type stuff
inline patternTypes type( void ) const
{
return( m_patternType );
}
void FASTCALL setType( patternTypes _new_pattern_type );
void checkType( void );
// pattern-name functions
inline const QString & name( void ) const
{
return( m_name );
}
inline void setName( const QString & _name )
{
m_name = _name;
update();
}
inline channelTrack * getChannelTrack( void )
{
return( m_channelTrack );
}
// functions which are part of freezing-feature
inline bool freezing( void ) const
{
return( m_freezing );
}
inline bool frozen( void ) const
{
return( m_frozenPattern != NULL );
}
// if channel-track recognizes that this pattern is frozen, it calls
// this instead of playing all the notes
void FASTCALL playFrozenData( sampleFrame * _ab, Uint32 _start_frame,
Uint32 _frames );
inline bool isFreezing( void ) const
{
return( m_freezeRecorder != NULL );
}
void finishFreeze( void );
note * FASTCALL noteAt( int _note_num );
void FASTCALL setNoteAt( int _note_num, note _new_note );
void checkType( void );
// settings-management
virtual void FASTCALL saveSettings( QDomDocument & _doc,
QDomElement & _parent );
virtual void FASTCALL loadSettings( const QDomElement & _this );
@@ -137,48 +151,82 @@ public:
return( "pattern" );
}
inline channelTrack * getChannelTrack( void )
{
return( m_channelTrack );
}
public slots:
virtual void update( void );
protected slots:
void openInPianoRoll( bool _c );
void openInPianoRoll( void );
void clear( void );
void resetName( void );
void changeName( void );
void freeze( void );
void unfreeze( void );
void updateFreezeStatusDialog( void );
void abortFreeze( void );
void addSteps( QAction * _item );
void removeSteps( QAction * _item );
void addSteps( int _n );
void removeSteps( int _n );
protected:
void paintEvent( QPaintEvent * _pe );
void mousePressEvent( QMouseEvent * _me );
void mouseDoubleClickEvent( QMouseEvent * _me );
virtual void constructContextMenu( QMenu * );
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
virtual void mousePressEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _pe );
virtual void resizeEvent( QResizeEvent * _re )
{
m_needsUpdate = TRUE;
trackContentObject::resizeEvent( _re );
}
virtual void wheelEvent( QWheelEvent * _we );
void ensureBeatNotes( void );
void updateBBTrack( void );
private:
static QPixmap * s_patternBg;
static QPixmap * s_stepBtnOn;
static QPixmap * s_stepBtnOverlay;
static QPixmap * s_stepBtnOff;
static QPixmap * s_stepBtnOffLight;
static QPixmap * s_frozen;
static void initPixmaps( void );
QPixmap m_paintPixmap;
bool m_needsUpdate;
// general stuff
channelTrack * m_channelTrack;
patternTypes m_patternType;
QString m_name;
noteVector m_notes;
// data-stuff
noteVector m_notes;
int m_steps;
// pattern freezing
QMutex m_frozenPatternMutex;
sampleBuffer * m_frozenPattern;
audioSampleRecorder * m_freezeRecorder;
patternFreezeStatusDialog * m_freezeStatusDialog;
QTimer * m_freezeStatusUpdateTimer;
bool m_freezing;
volatile bool m_freezeAborted;
// as in Qt4 QThread is inherits from QObject and our base
// trackContentObject is a QWidget (=QObject), we cannot inherit from
// QThread. That's why we have to put pattern-freezing into separate
// thread-class -> patternFreezeThread
friend class patternFreezeThread;
} ;
@@ -188,7 +236,7 @@ class patternFreezeStatusDialog : public QDialog
{
Q_OBJECT
public:
patternFreezeStatusDialog();
patternFreezeStatusDialog( QThread * _thread );
~patternFreezeStatusDialog();
void FASTCALL setProgress( int _p );
@@ -200,12 +248,17 @@ protected:
protected slots:
void cancelBtnClicked( void );
void updateProgress( void );
private:
QProgressBar * m_progressBar;
QPushButton * m_cancelBtn;
QThread * m_freezeThread;
int m_progress;
signals:
void aborted( void );
@@ -213,4 +266,25 @@ signals:
} ;
class patternFreezeThread : public QThread
{
public:
patternFreezeThread( pattern * _pattern );
virtual ~patternFreezeThread();
protected:
virtual void run( void );
private:
pattern * m_pattern;
patternFreezeStatusDialog * m_statusDlg;
} ;
#endif

View File

@@ -2,8 +2,9 @@
* piano_roll.h - declaration of class pianoRoll which is a window where you
* can set and edit notes in an easy way
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -32,11 +33,13 @@
#include <QWidget>
#include <QVector>
#include <QPixmap>
#else
#include <qwidget.h>
#include <qvaluevector.h>
#include <qpixmap.h>
#endif
@@ -44,16 +47,16 @@
#include "note.h"
class QScrollBar;
class QPainter;
class QPixmap;
class QScrollBar;
class crystalButton;
class pattern;
class comboBox;
class lmmsMainWin;
class notePlayHandle;
class pixmapButton;
class pattern;
class timeLine;
class toolButton;
class pianoRoll : public QWidget
@@ -70,30 +73,44 @@ public:
}
void FASTCALL setCurrentPattern( pattern * _new_pattern );
inline bool isRecording( void ) const
{
return( m_recording );
}
inline const pattern * currentPattern( void ) const
{
return( m_pattern );
}
inline bool validPattern( void ) const
{
return( m_pattern != NULL );
}
public slots:
virtual void update( void );
protected:
void closeEvent( QCloseEvent * _ce );
void paintEvent( QPaintEvent * _pe );
void resizeEvent( QResizeEvent * _re );
void mousePressEvent( QMouseEvent * _me );
void mouseReleaseEvent( QMouseEvent * _me );
void mouseMoveEvent( QMouseEvent * _me );
void keyPressEvent( QKeyEvent * _ke );
void keyReleaseEvent( QKeyEvent * _ke );
void wheelEvent( QWheelEvent * _we );
virtual void closeEvent( QCloseEvent * _ce );
virtual void enterEvent( QEvent * _e );
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void leaveEvent( QEvent * _e );
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseReleaseEvent( QMouseEvent * _me );
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _pe );
virtual void resizeEvent( QResizeEvent * _re );
virtual void wheelEvent( QWheelEvent * _we );
int FASTCALL getKey( int _y );
inline void drawNoteRect( QPainter & _p, Uint16 _x, Uint16 _y,
Sint16 _width, bool _is_selected );
static inline void drawNoteRect( QPainter & _p, Uint16 _x, Uint16 _y,
Sint16 _width,
const bool _is_selected,
const bool _is_step_note );
void removeSelection( void );
void selectAll( void );
void FASTCALL getSelectedNotes( noteVector & _selected_notes );
@@ -109,10 +126,10 @@ protected slots:
void horScrolled( int _new_pos );
void verScrolled( int _new_pos );
void drawButtonToggled( bool = FALSE );
void eraseButtonToggled( bool = FALSE );
void selectButtonToggled( bool = FALSE );
void moveButtonToggled( bool = FALSE );
void drawButtonToggled( void );
void eraseButtonToggled( void );
void selectButtonToggled( void );
void moveButtonToggled( void );
void copySelectedNotes( void );
void cutSelectedNotes( void );
@@ -121,6 +138,8 @@ protected slots:
void updatePosition( const midiTime & _t );
void zoomingChanged( const QString & _zfac );
private:
@@ -151,12 +170,16 @@ private:
} ;
pianoRoll( void );
pianoRoll( const pianoRoll & );
~pianoRoll();
static pianoRoll * s_instanceOfMe;
static QPixmap * s_whiteKeyBigPm;
static QPixmap * s_whiteKeySmallPm;
static QPixmap * s_artwork1;
static QPixmap * s_artwork2;
static QPixmap * s_blackKeyPm;
static QPixmap * s_toolDraw;
static QPixmap * s_toolErase;
@@ -166,18 +189,26 @@ private:
static pianoRollKeyTypes prKeyOrder[];
pixmapButton * m_playButton;
pixmapButton * m_recordButton;
pixmapButton * m_stopButton;
QWidget * m_toolBar;
crystalButton * m_drawButton;
crystalButton * m_eraseButton;
crystalButton * m_selectButton;
crystalButton * m_moveButton;
toolButton * m_playButton;
toolButton * m_recordButton;
toolButton * m_stopButton;
toolButton * m_drawButton;
toolButton * m_eraseButton;
toolButton * m_selectButton;
toolButton * m_moveButton;
toolButton * m_cutButton;
toolButton * m_copyButton;
toolButton * m_pasteButton;
comboBox * m_zoomingComboBox;
QPixmap m_paintPixmap;
bool m_cursorInside;
crystalButton * m_cutButton;
crystalButton * m_copyButton;
crystalButton * m_pasteButton;
pattern * m_pattern;
QScrollBar * m_leftRightScroll;
@@ -204,11 +235,8 @@ private:
midiTime m_lenOfNewNotes;
bool m_shiftPressed;
bool m_controlPressed;
int m_startKey; // first key when drawing
int m_keyMouseOver;
int m_lastKey;
noteVector m_notesToCopy;
@@ -222,9 +250,8 @@ private:
bool m_scrollBack;
pianoRoll( void );
pianoRoll( const pianoRoll & );
~pianoRoll();
friend class lmmsMainWin;
signals:

View File

@@ -2,8 +2,9 @@
* piano_widget.h - declaration of class pianoWidget, a widget which provides
* an interactive piano/keyboard-widget
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -44,6 +45,7 @@
#include "note.h"
#include "templates.h"
class channelTrack;
@@ -62,18 +64,24 @@ class pianoWidget : public QWidget
Q_OBJECT
public:
pianoWidget( channelTrack * _channel_track );
~pianoWidget();
virtual ~pianoWidget();
inline void setKeyState( int _key, bool _on = FALSE )
{
m_pressedKeys[tLimit( _key, 0, NOTES_PER_OCTAVE *
OCTAVES -1 )] = _on;
update();
}
protected:
void paintEvent( QPaintEvent * );
void mousePressEvent( QMouseEvent * me );
void mouseReleaseEvent( QMouseEvent * me );
void mouseMoveEvent( QMouseEvent * me );
void keyPressEvent( QKeyEvent * ke );
void keyReleaseEvent( QKeyEvent * ke );
void focusInEvent( QFocusEvent * _fe );
void focusOutEvent( QFocusEvent * _fe );
virtual void paintEvent( QPaintEvent * );
virtual void mousePressEvent( QMouseEvent * me );
virtual void mouseReleaseEvent( QMouseEvent * me );
virtual void mouseMoveEvent( QMouseEvent * me );
virtual void keyPressEvent( QKeyEvent * ke );
virtual void keyReleaseEvent( QKeyEvent * ke );
virtual void focusOutEvent( QFocusEvent * _fe );
private:
@@ -86,6 +94,8 @@ private:
static QPixmap * s_whiteKeyPressedPm;
static QPixmap * s_blackKeyPressedPm;
bool m_pressedKeys[NOTES_PER_OCTAVE * OCTAVES];
QScrollBar * m_pianoScroll;
channelTrack * m_channelTrack;
tones m_startTone; // first key when drawing

View File

@@ -1,8 +1,9 @@
/*
* pixmap_button.h - declaration of class pixmapButton
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -51,11 +52,23 @@ class pixmapButton : public QPushButton
public:
pixmapButton( QWidget * _parent );
virtual ~pixmapButton();
virtual void FASTCALL setActiveGraphic( const QPixmap & _pm );
virtual void FASTCALL setInactiveGraphic( const QPixmap & _pm,
void FASTCALL setActiveGraphic( const QPixmap & _pm );
void FASTCALL setInactiveGraphic( const QPixmap & _pm,
bool _update = TRUE );
void FASTCALL setBgGraphic( const QPixmap & _pm );
#ifdef QT3
inline void setChecked( bool _on )
{
setOn( _on );
}
inline bool isChecked( void ) const
{
return( isOn() );
}
#endif
signals:
void doubleClicked( void );

View File

@@ -1,9 +1,10 @@
/*
* play_handle.h - base-class playHandle which is needed by
* LMMS-Play-Engine
* LMMS-Player-Engine
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -46,12 +47,26 @@
class playHandle
{
public:
inline playHandle( void )
enum types
{
NOTE_PLAY_HANDLE, INSTRUMENT_PLAY_HANDLE, SAMPLE_PLAY_HANDLE,
PRESET_PREVIEW_PLAY_HANDLE
} ;
inline playHandle( types _type ) :
m_type( _type )
{
}
virtual inline ~playHandle()
{
}
inline types type( void ) const
{
return( m_type );
}
virtual void play( void ) = 0;
virtual bool done( void ) const = 0;
@@ -66,11 +81,13 @@ public:
private:
types m_type;
} ;
typedef vvector<playHandle *> playHandleVector;
typedef vvector<const playHandle *> constPlayHandleVector;
#endif

137
include/plugin.h Normal file
View File

@@ -0,0 +1,137 @@
/*
* plugin.h - class plugin, the base-class and generic interface for all plugins
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _PLUGIN_H
#define _PLUGIN_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QString>
#include <QVector>
#else
#include <qstring.h>
#include <qvaluevector.h>
#endif
#include "types.h"
#include "settings.h"
#include "embed.h"
#define STRINGIFY_PLUGIN_NAME(s) STR(s)
#define STR(PN) #PN
class QPixmap;
class plugin : public settings
{
public:
enum pluginTypes
{
INSTRUMENT, // instrument being used in channel-track
EFFECT, // effect-plugin for effect-board
IMPORT_FILTER, // filter for importing a file
EXPORT_FILTER, // filter for exporting a file
UNDEFINED = 255
} ;
// descriptor holds information about a plugin - every external plugin
// has to instantiate such a descriptor in an extern "C"-section so that
// the plugin-loader is able to access information about the plugin
struct descriptor
{
const char * name;
const char * public_name;
const char * description;
const char * author;
int version;
pluginTypes type;
embed::descriptor logo;
} ;
// contructor of a plugin
plugin( const descriptor * _descriptor );
virtual ~plugin();
// returns public-name out of descriptor
inline QString publicName( void ) const
{
return( m_descriptor->public_name );
}
// return plugin-type
inline pluginTypes type( void ) const
{
return( m_descriptor->type );
}
// return plugin-descriptor for further information
inline const descriptor * getDescriptor( void ) const
{
return( m_descriptor );
}
// plugins can overload this for making other classes able to change
// settings of the plugin without knowing the actual class
virtual void FASTCALL setParameter( const QString & _param,
const QString & _value );
// plugins can overload this for making other classes able to query
// settings of the plugin without knowing the actual class
virtual QString FASTCALL getParameter( const QString & _param );
// returns an instance of a plugin whose name matches to given one
// if specified plugin couldn't be loaded, it creates a dummy-plugin
static plugin * FASTCALL instantiate( const QString & _plugin_name,
void * _data );
// fills given vector with descriptors for all available plugins
static void FASTCALL getDescriptorsOfAvailPlugins(
vvector<descriptor> & _plugin_descs );
private:
const descriptor * m_descriptor;
// pointer to instantiation-function in plugin
typedef plugin * ( * instantiationHook )( void * );
} ;
#endif

97
include/plugin_browser.h Normal file
View File

@@ -0,0 +1,97 @@
/*
* plugin_browser.h - include file for pluginBrowser
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _PLUGIN_BROWSER_H
#define _PLUGIN_BROWSER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QVector>
#include <QPixmap>
#else
#include <qvaluevector.h>
#include <qpixmap.h>
#endif
#include "side_bar_widget.h"
#include "plugin.h"
class trackContainer;
class pluginBrowser : public sideBarWidget
{
Q_OBJECT
public:
pluginBrowser( QWidget * _parent );
virtual ~pluginBrowser();
private:
vvector<plugin::descriptor> m_pluginDescriptors;
QWidget * m_view;
} ;
class pluginDescWidget : public QWidget
{
public:
pluginDescWidget( const plugin::descriptor & _pd, QWidget * _parent );
virtual ~pluginDescWidget();
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void mouseReleaseEvent( QMouseEvent * _me );
private:
const plugin::descriptor & m_pluginDescriptor;
QPixmap m_logo;
bool m_mouseOver;
} ;
#endif

View File

@@ -2,8 +2,9 @@
* preset_preview_play_handle.h - play-handle for playing a short preview-sound
* of a preset
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -26,11 +27,11 @@
#ifndef _PRESET_PREVIEW_PLAY_HANDLE_H
#define _PRESET_PREVIEW_PLAY_HANDLE_H
#include "play_handle.h"
#include "note_play_handle.h"
#include <qmutex.h>
class channelTrack;
class notePlayHandle;
class QMutex;
@@ -40,17 +41,17 @@ public:
presetPreviewPlayHandle( const QString & _preset_file );
virtual ~presetPreviewPlayHandle();
static void cleanUp( void );
virtual void play( void );
virtual bool done( void ) const;
static void cleanUp( void );
static constNotePlayHandleVector nphsOfChannelTrack(
const channelTrack * _ct );
private:
static channelTrack * s_globalChannelTrack;
static notePlayHandle * s_globalPreviewNote;
static QMutex * s_globalDataMutex;
static QMutex s_globalDataMutex;
notePlayHandle * m_previewNote;

View File

@@ -1,8 +1,9 @@
/*
* project_notes.h - header for project-notes-editor
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -1,8 +1,9 @@
/*
* qt3support.h - layer for supporting Qt3
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -30,12 +31,20 @@
//#include <qmap.h>
#include <qglobal.h>
//#include <qpair.h>
#include <qpair.h>
#if QT_VERSION >= 0x040000
#ifndef QT4
#define QT4
#endif
#else
#ifndef QT3
#define QT3
#endif
#endif
@@ -51,8 +60,16 @@ typedef int csize;
#define vvector QVector
#define vlist QList
#include <QFileInfo>
#else
inline QString baseName( const QString & _file )
{
return( QFileInfo( _file ).absolutePath() + "/" +
QFileInfo( _file ).completeBaseName() );
}
#else /* QT3 */
#define vvector QValueVector
@@ -62,9 +79,19 @@ typedef int csize;
#define QAbstractButton QButton
#define QScrollArea QScrollView
#define Q3ListView QListView
#define Q3ListViewItem QListViewItem
#define Q3ScrollView QScrollView
#define QMatrix QWMatrix
#define QIcon QIconSet
#define QAbstractButton QButton
// QWidget
#define setWindowTitle setCaption
#define setWindowIcon setIcon
#define windowIcon icon
#define isExplicitlyHidden isHidden
#define accessibleName name
#define ensurePolished constPolish
@@ -72,7 +99,6 @@ typedef int csize;
// QMenu/QPopupMenu
#define addAction insertItem
//#define addSeparator insertSeparator
// QFile/QIODevice
@@ -91,6 +117,7 @@ typedef int csize;
// QScrollView/QScrollArea
#define setHorizontalScrollBarPolicy setHScrollBarMode
#define setVerticalScrollBarPolicy setVScrollBarMode
// QScrollBar
@@ -100,6 +127,8 @@ typedef int csize;
// QAbstractButton/QButton
#define setCheckable setToggleButton
#define isCheckable isToggleButton
#define setShortcut setAccel
// QInputEvent/QKeyEvent
@@ -114,19 +143,13 @@ typedef int csize;
#define setTextVisible setPercentageVisible
// QFileInfo
//#define completeSuffix extension
//#define suffix() extension( FALSE )
// QComboBox
#define addItem insertItem
//#define currentIndex currentItem
//#define setCurrentIndex setCurrentItem
// QString
#define toLower lower
#define toUpper upper
// QTextEdit
@@ -147,7 +170,10 @@ typedef int csize;
#define NoFilter DefaultFilter
#define homePath homeDirPath
#define rootPath rootDirPath
//#define absolutePath absPath
// QFileInfo
#define absoluteFilePath absFilePath
// QToolButton
@@ -158,18 +184,67 @@ typedef int csize;
#define transformed xForm
#define Q3ListView QListView
#define Q3ListViewItem QListViewItem
#define Q3ScrollView QScrollView
// QGridLayout
#define setColumnStretch setColStretch
#define columnCount numCols
#define setColumnMinimumWidth setColSpacing
#define QMatrix QWMatrix
#define QIcon QIconSet
// QRect
#define normalized normalize
// Qt-namespace
#define ShiftModifier ShiftButton
#define ControlModifier ControlButton
typedef unsigned int csize;
// some compat-stuff for older qt-versions...
#if QT_VERSION < 0x030200
#define wasCanceled wasCancelled
#endif
#include <qfileinfo.h>
inline QString baseName( const QString & _file )
{
return( QFileInfo( _file ).dirPath() + "/" +
QFileInfo( _file ).baseName( TRUE ) );
}
#if QT_VERSION < 0x030100
#include <qmutex.h>
// Qt 3.0.x doesn't have QMutexLocker, so we implement it on our own...
class QMutexLocker
{
public:
QMutexLocker( QMutex * _m ) :
m_mutex( _m )
{
m_mutex->lock();
}
~QMutexLocker()
{
m_mutex->unlock();
}
private:
QMutex * m_mutex;
} ;
#endif
#endif

238
include/qxembed.h Normal file
View File

@@ -0,0 +1,238 @@
/****************************************************************************
Definition of QXEmbed class
Copyright (C) 1999-2000 Troll Tech AS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*****************************************************************************/
#ifndef QXEMBED_H
#define QXEMBED_H
#include "qt3support.h"
#ifndef QT4
#include <qwidget.h>
#ifdef Q_WS_X11
class QXEmbedData;
/**
* A QXEmbed widget serves as an embedder that can manage one single embedded
* X-window. These so-called client windows can be arbitrary Qt or non Qt
* applications.
*
* There are two different ways of using QXEmbed,
* from the client side or from the embedder's side.
*
* Embedding from the client's side requires that the client knows the
* window identifier of the respective embedder widget. Use either
* embedClientIntoWindow() or the high-level wrapper processClientCmdline().
* This is only possible when the client is a Qt application.
*
* When using it from the embedder's side, you must know the window
* identifier of the window that should be embedded. Simply call embed()
* with this identifier as parameter. If the client is a Qt application,
* make sure it has called QXEmbed::initialize(). Otherwise you should
* probably call setProtocol(XPLAIN) before embed().
*
* Reimplement the change handler windowChanged() to catch embedding or
* the destruction of embedded windows. In the latter case, the
* embedder also emits a signal embeddedWindowDestroyed() for
* convenience.
*
* @short The QXEmbed widget is a graphical socket that can embed an external X-Window.
*/
class QXEmbed : public QWidget
{
Q_OBJECT
public:
/**
*
* Constructs a xembed widget.
*
* The parent, name and f arguments are passed to the QFrame
* constructor.
*/
QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
/**
* Destructor. Cleans up the focus if necessary.
*/
~QXEmbed();
/**
* Embedded applications should call this function to make sure
* they support the XEMBED protocol. It is called automatically
* when you use embedClientIntoWindow() or
* processClientCmdline(). Clients might have to call it
* manually when you use embed().
*/
static void initialize();
enum Protocol { XEMBED, XPLAIN };
/**
* Sets the protocol used for embedding windows.
* This function must be called before embedding a window.
* Protocol XEMBED provides maximal functionality (focus, tabs, etc)
* but requires explicit cooperation from the embedded window.
* Protocol XPLAIN provides maximal compatibility with
* embedded applications that do not support the XEMBED protocol.
* The default is XEMBED.
*
* Non KDE applications should be embedded with protocol XPLAIN.
* This does not happen automatically yet.
* You must call setProtocol() explicitly.
*/
void setProtocol( Protocol proto );
/**
* Returns the protocol used for embedding the current window.
*
* @return the protocol used by QXEmbed.
*/
Protocol protocol();
/**
* Embeds the window with the identifier w into this xembed widget.
*
* This function is useful if the embedder knows about the client window
* that should be embedded. Often it is vice versa: the client knows
* about its target embedder. In that case, it is not necessary to call
* embed(). Instead, the client will call the static function
* embedClientIntoWindow().
*
* @param w the identifier of the window to embed
* @see embeddedWinId()
*/
void embed( WId w );
/**
* Returns the window identifier of the embedded window, or 0 if no
* window is embedded yet.
*
* @return the id of the embedded window (0 if no window is embedded)
*/
WId embeddedWinId() const;
/**
* A function for clients that embed themselves. The widget
* client will be embedded in the window window. The application has
* to ensure that window is the handle of the window identifier of
* an QXEmbed widget.
*
* @short #processClientCmdline()
*/
static void embedClientIntoWindow( QWidget* client, WId window );
/**
* A utility function for clients that embed theirselves. The widget
* client will be embedded in the window that is passed as
* -embed command line argument.
*
* The function returns true on success or false if no such command line
* parameter is specified.
*
* @see embedClientIntoWindow()
*/
static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
/**
* Sends a WM_DELETE_WINDOW message to the embedded window. This is what
* typically happens when you click on the close button of a window
* manager decoration. This should cause the embedded application to
* cleanly close the window. Signal embeddedWindowDestroyed() can be used
* to monitor the status of the embedded window.
*/
void sendDelete( void );
/**
* Selects what shoud be done with the embedded window when the embedding
* window is destroyed. When the argument is true, the embedded window is
* kept alive, is hidden, and receives a WM_DELETE_WINDOW message using
* sendDelete(). This is the default. Otherwise, the destruction of the
* QXEmbed object simply destroys the embedded window.
*
* @see sendDelete()
*/
void setAutoDelete( bool );
/**
* Returns the value of flag indicating what shoud be done with the
* embedded window when the embedding window is destroyed.
*
* @see setAutoDelete()
*/
bool autoDelete() const;
/* Reimp */
QSize sizeHint() const;
QSize minimumSizeHint() const;
QSizePolicy sizePolicy() const;
bool eventFilter( QObject *, QEvent * );
bool customWhatsThis() const;
void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 )
virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
signals:
/**
* This signal is emitted when the embedded window has been lost (destroyed or reparented away)
*
* @see embeddedWinId()
*/
// KDE4 rename to embeddedWindowLost()
void embeddedWindowDestroyed();
protected:
bool event( QEvent * );
void keyPressEvent( QKeyEvent * );
void keyReleaseEvent( QKeyEvent * );
void focusInEvent( QFocusEvent * );
void focusOutEvent( QFocusEvent * );
void resizeEvent(QResizeEvent *);
void showEvent( QShowEvent * );
bool x11Event( XEvent* );
/**
* A change handler that indicates that the embedded window has been
* changed. The window handle can also be retrieved with
* embeddedWinId().
*
* @param w the handle of the window that changed
*/
virtual void windowChanged( WId w );
bool focusNextPrevChild( bool next );
private:
WId window;
QXEmbedData* d;
void checkGrab();
void sendSyntheticConfigureNotifyEvent();
};
#endif
#endif
#endif

View File

@@ -2,8 +2,9 @@
* rename_dialog.h - declaration of class renameDialog, a simple dialog for
* changing the content of a string
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

125
include/rubberband.h Normal file
View File

@@ -0,0 +1,125 @@
/*
* rubberband.h - rubberband - either own implementation for Qt3 or wrapper for
* Qt4
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _RUBBERBAND_H
#define _RUBBERBAND_H
#include "qt3support.h"
#ifndef QT3
#include <QRubberBand>
#include <QVector>
#else
#include <qwidget.h>
#include <qvaluevector.h>
#endif
class selectableObject : public QWidget
{
Q_OBJECT
public:
selectableObject( QWidget * _parent
#ifdef QT3
, WFlags _f
#endif
) :
QWidget( _parent
#ifdef QT3
, NULL, _f
#endif
),
m_selected( FALSE )
{
}
virtual ~selectableObject()
{
}
inline void setSelected( bool _selected )
{
m_selected = _selected;
update();
}
inline bool isSelected( void ) const
{
return( m_selected );
}
public slots:
virtual void update( void )
{
QWidget::update();
}
private:
bool m_selected;
} ;
typedef
#ifndef QT3
QRubberBand
#else
QWidget
#endif
rubberBandBase;
class rubberBand : public rubberBandBase
{
public:
rubberBand( QWidget * _parent );
virtual ~rubberBand();
vvector<selectableObject *> selectedObjects( void ) const;
protected:
virtual void resizeEvent( QResizeEvent * _re );
#ifdef QT3
virtual bool event( QEvent * _e );
void updateMask( void );
#endif
private:
vvector<selectableObject *> selectableObjects( void ) const;
};
#endif

View File

@@ -1,8 +1,9 @@
/*
* sample_buffer.h - container-class sampleBuffer
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -66,8 +67,12 @@ public:
DOTS
} ;
sampleBuffer( const QString & _audio_file = "" );
// constructor which either loads sample _audio_file or decodes
// base64-data out of string
sampleBuffer( const QString & _audio_file = "",
bool _is_base64_data = FALSE );
sampleBuffer( const sampleFrame * _data, Uint32 _frames );
sampleBuffer( Uint32 _frames );
~sampleBuffer();
@@ -76,32 +81,40 @@ public:
mixer::inst()->framesPerAudioBuffer(),
float _freq = BASE_FREQ, bool _looped = FALSE,
void * * _resampling_data = NULL );
void FASTCALL drawWaves( QPainter & _p, QRect _dr,
drawMethods _dm = LINE_CONNECT );
inline const QString & audioFile( void ) const
{
return( m_audioFile );
}
inline Uint32 startFrame( void ) const
{
return( m_startFrame );
}
inline Uint32 endFrame( void ) const
{
return( m_endFrame );
}
inline Uint32 frames( void ) const
{
return( m_frames );
}
inline float amplification( void ) const
{
return( m_amplification );
}
inline bool reversed( void ) const
{
return( m_reversed );
}
inline const sampleFrame * data( void ) const
{
return( m_data );
@@ -111,10 +124,27 @@ public:
QString openAudioFile( void ) const;
QString & toBase64( QString & _dst ) const;
static sampleBuffer * FASTCALL resample( sampleFrame * _data,
const Uint32 _frames,
const Uint32 _src_sr,
const Uint32 _dst_sr );
static inline sampleBuffer * FASTCALL resample(
sampleBuffer * _buf,
const Uint32 _src_sr,
const Uint32 _dst_sr )
{
return( resample( _buf->m_data, _buf->m_frames, _src_sr,
_dst_sr ) );
}
public slots:
void setAudioFile( const QString & _audio_file );
void loadFromBase64( const QString & _data );
void setStartFrame( Uint32 _s );
void setEndFrame( Uint32 _e );
void setAmplification( float _a );
@@ -126,15 +156,18 @@ private:
#ifdef SDL_SDL_SOUND_H
Uint32 FASTCALL decodeSampleSDL( const char * _f, Sint16 * & _buf,
Uint8 & _channels );
Uint8 & _channels,
Uint32 & _sample_rate );
#endif
#ifdef HAVE_SNDFILE_H
Uint32 FASTCALL decodeSampleSF( const char * _f, Sint16 * & _buf,
Uint8 & _channels );
Uint8 & _channels,
Uint32 & _sample_rate );
#endif
#ifdef HAVE_VORBIS_VORBISFILE_H
Uint32 FASTCALL decodeSampleOGG( const char * _f, Sint16 * & _buf,
Uint8 & _channels );
Uint32 FASTCALL decodeSampleOGGVorbis( const char * _f, Sint16 * & _buf,
Uint8 & _channels,
Uint32 & _sample_rate );
#endif
QString m_audioFile;

View File

@@ -1,8 +1,9 @@
/*
* sample_play_handle.h - play-handle for playing a sample
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -30,6 +31,7 @@
class sampleBuffer;
class audioPort;
class samplePlayHandle : public playHandle
@@ -60,6 +62,8 @@ private:
Uint32 m_frame;
audioPort * m_audioPort;
} ;

View File

@@ -2,8 +2,9 @@
* sample_track.h - class sampleTrack, a track which provides arrangement of
* samples
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -44,6 +45,7 @@
class nameLabel;
class audioPort;
class QLabel;
//class sampleTCOSettingsDialog;
@@ -75,8 +77,11 @@ public slots:
protected:
void paintEvent( QPaintEvent * );
void mouseDoubleClickEvent( QMouseEvent * );
virtual void dragEnterEvent( QDragEnterEvent * _dee );
virtual void dropEvent( QDropEvent * _de );
virtual void mouseDoubleClickEvent( QMouseEvent * );
virtual void paintEvent( QPaintEvent * );
midiTime getSampleLength( void ) const;
@@ -120,7 +125,7 @@ public:
sampleTrack( trackContainer * _tc );
virtual ~sampleTrack();
virtual trackTypes trackType( void ) const;
virtual trackTypes type( void ) const;
virtual bool FASTCALL play( const midiTime & _start,
Uint32 _start_frame, Uint32 _frames,
Uint32 _frame_base,
@@ -144,6 +149,7 @@ public slots:
private:
nameLabel * m_trackLabel;
audioPort * m_audioPort;
} ;

View File

@@ -1,8 +1,9 @@
/*
* setup_dialog.h - dialog for setting up LMMS
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -39,12 +40,14 @@
#endif
#include "audio_device.h"
#include "midi_device.h"
#include "midi_client.h"
class QComboBox;
class QLabel;
class QLineEdit;
class QSlider;
class tabBar;
@@ -56,11 +59,12 @@ class setupDialog : public QDialog
public:
enum configTabs
{
GENERAL_SETTINGS, AUDIO_SETTINGS, MIDI_SETTINGS
GENERAL_SETTINGS, DIRECTORY_SETTINGS, PERFORMANCE_SETTINGS,
AUDIO_SETTINGS, MIDI_SETTINGS
} ;
setupDialog( configTabs _tab_to_open = GENERAL_SETTINGS );
~setupDialog();
virtual ~setupDialog();
protected slots:
@@ -73,6 +77,10 @@ private slots:
void resetBufSize( void );
void displayBufSizeHelp( void );
// directory settings widget
void setWorkingDir( const QString & _wd );
void setVSTDir( const QString & _vd );
// audio settings widget
void audioInterfaceChanged( const QString & _driver );
void displayAudioHelp( void );
@@ -84,6 +92,17 @@ private slots:
void toggleToolTips( bool _disabled );
void toggleKnobUsability( bool _classical );
void toggleGIMPLikeWindows( bool _enabled );
void toggleNoWizard( bool _enabled );
void toggleNoMsgAfterSetup( bool _enabled );
void openWorkingDir( void );
void openVSTDir( void );
void toggleDisableChActInd( bool _disabled );
void toggleManualChPiano( bool _enabled );
private:
@@ -95,10 +114,24 @@ private:
bool m_disableToolTips;
bool m_classicalKnobUsability;
bool m_gimpLikeWindows;
bool m_noWizard;
bool m_noMsgAfterSetup;
QLineEdit * m_wdLineEdit;
QLineEdit * m_vdLineEdit;
QString m_workingDir;
QString m_vstDir;
bool m_disableChActInd;
bool m_manualChPiano;
typedef QMap<QString, audioDevice::setupWidget *> aswMap;
typedef QMap<QString, midiDevice::setupWidget *> mswMap;
typedef QMap<QString, midiClient::setupWidget *> mswMap;
QComboBox * m_audioInterfaces;
aswMap m_audioIfaceSetupWidgets;

View File

@@ -1,8 +1,9 @@
/*
* side_bar.h - code for side-bar in LMMS
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -46,10 +47,11 @@ class sideBar : public KMultiTabBar
{
Q_OBJECT
public:
sideBar( Qt::Orientation _o, QWidget * _parent ) :
KMultiTabBar( _o, _parent )
sideBar( KMultiTabBarMode _m, QWidget * _parent ) :
KMultiTabBar( _m, _parent )
{
}
virtual ~sideBar()
{
}

View File

@@ -1,8 +1,9 @@
/*
* side_bar_widget.h - base-class for all side-bar-widgets
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -48,7 +49,7 @@ class sideBarWidget : public QWidget
public:
sideBarWidget( const QString & _title, const QPixmap & _icon,
QWidget * _parent );
~sideBarWidget();
virtual ~sideBarWidget();
inline const QPixmap & icon( void ) const
{
return( m_icon );
@@ -60,9 +61,9 @@ public:
protected:
void paintEvent( QPaintEvent * _pe );
void resizeEvent( QResizeEvent * _re );
inline void contextMenuEvent( QContextMenuEvent * )
virtual void paintEvent( QPaintEvent * _pe );
virtual void resizeEvent( QResizeEvent * _re );
inline virtual void contextMenuEvent( QContextMenuEvent * )
{
}

View File

@@ -2,8 +2,9 @@
* song_editor.h - declaration of class songEditor, a window where you can
* setup your songs
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -26,46 +27,30 @@
#ifndef _SONG_EDITOR_H
#define _SONG_EDITOR_H
#include "qt3support.h"
#ifdef QT4
#include <QMap>
#else
#include <qmap.h>
#endif
#include "lmms_main_win.h"
#include "track_container.h"
#include "types.h"
#include "tool_button.h"
class QLabel;
class QPixmap;
class QPushButton;
class QScrollBar;
class QSlider;
class QToolButton;
class exportProjectDialog;
class comboBox;
class lcdSpinBox;
class lmmsMainWin;
class pattern;
class projectNotes;
class textFloat;
class timeLine;
class visualizationWidget;
const int MIN_BPM = 10;
const int DEFAULT_BPM = 140;
const int MAX_BPM = 1000;
const int MAX_BPM = 999;
const Uint16 MAX_SONG_LENGTH = 9999;
class songEditor : public trackContainer
{
Q_OBJECT
@@ -139,19 +124,22 @@ public:
return( m_exporting == TRUE &&
m_playPos[PLAY_SONG].getTact() >= lengthInTacts() + 1 );
}
inline void setExportProjectDialog( exportProjectDialog * _epd )
{
m_epd = _epd;
}
inline playModes playMode( void ) const
{
return( m_playMode );
}
inline playPos & getPlayPos( playModes _pm )
{
return( m_playPos[_pm] );
}
tact lengthInTacts( void ) const;
int getBPM( void );
// every function that replaces current file (e.g. creates new file,
// opens another file...) has to call this before and may only process
// if this function returns true
@@ -215,17 +203,23 @@ public slots:
protected:
void closeEvent( QCloseEvent * _ce );
void resizeEvent( QResizeEvent * _re );
void keyPressEvent( QKeyEvent * _ke );
void wheelEvent( QWheelEvent * _we );
void paintEvent( QPaintEvent * _pe );
virtual void closeEvent( QCloseEvent * _ce );
virtual void resizeEvent( QResizeEvent * _re );
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void wheelEvent( QWheelEvent * _we );
virtual void paintEvent( QPaintEvent * _pe );
virtual QRect scrollAreaRect( void ) const;
virtual bool allowRubberband( void ) const
{
return( m_editModeButton->isChecked() );
}
protected slots:
void insertTact( void );
void removeTact( void );
void addChannelTrack( void );
void insertBar( void );
void removeBar( void );
void addBBTrack( void );
void addSampleTrack( void );
void scrolled( int _new_pos );
@@ -239,10 +233,13 @@ protected slots:
void masterPitchPressed( void );
void masterPitchMoved( int _new_val );
void masterPitchReleased( void );
void toggleHQMode( void );
void updatePosition( const midiTime & _t );
void zoomingChanged( const QString & _zfac );
void doActions( void );
private:
songEditor();
@@ -258,7 +255,6 @@ private:
}
midiTime length( void ) const;
tact lengthInTacts( void ) const;
inline tact64th currentTact64th( void ) const
{
return( m_playPos[m_playMode].getTact64th() );
@@ -272,22 +268,24 @@ private:
QScrollBar * m_leftRightScroll;
QToolButton * m_playButton;
QToolButton * m_stopButton;
QWidget * m_toolBar;
toolButton * m_playButton;
toolButton * m_stopButton;
lcdSpinBox * m_bpmSpinBox;
QSlider * m_masterVolumeSlider;
QSlider * m_masterPitchSlider;
textFloat * m_mvsStatus;
textFloat * m_mpsStatus;
visualizationWidget * m_masterOutputGraph;
toolButton * m_addBBTrackButton;
toolButton * m_addSampleTrackButton;
toolButton * m_drawModeButton;
toolButton * m_editModeButton;
QToolButton * m_addChannelTrackButton;
QToolButton * m_addBBTrackButton;
QToolButton * m_addSampleTrackButton;
QToolButton * m_insertTactButton;
QToolButton * m_removeTactButton;
comboBox * m_zoomingComboBox;
QString m_fileName;
@@ -298,6 +296,8 @@ private:
volatile bool m_playing;
volatile bool m_paused;
bool m_loadingProject;
playModes m_playMode;
playPos m_playPos[PLAY_MODE_CNT];
@@ -307,8 +307,6 @@ private:
bool m_scrollBack;
exportProjectDialog * m_epd;
projectNotes * m_projectNotes;
@@ -321,15 +319,8 @@ private:
} ;
vvector<ACTIONS> m_actions;
void doActions( void );
bool m_shiftPressed;
bool m_controlPressed;
friend lmmsMainWin::~lmmsMainWin();
friend class lmmsMainWin;

View File

@@ -1,8 +1,9 @@
/*
* spc_bg_hndl_widget.h - class specialBgHandlingWidget
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -0,0 +1,65 @@
/*
* string_pair_drag.h - class stringPairDrag which provides general support
* for drag'n'drop of string-pairs
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _STRING_PAIR_DRAG_H
#define _STRING_PAIR_DRAG_H
#include "qt3support.h"
#ifdef QT4
#include <QDrag>
#else
#include <qdragobject.h>
#endif
class QPixmap;
class stringPairDrag : public
#ifdef QT4
QDrag
#else
QStoredDrag
#endif
{
public:
stringPairDrag( const QString & _key, const QString & _value,
const QPixmap & _icon, QWidget * _w );
~stringPairDrag();
static bool processDragEnterEvent( QDragEnterEvent * _dee,
const QString & _allowed_keys );
static QString decodeKey( QDropEvent * _de );
static QString decodeValue( QDropEvent * _de );
} ;
#endif

View File

@@ -3,8 +3,9 @@
* position of a channel + calculation of volume for each
* speaker
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -1,8 +1,9 @@
/*
* tab_bar.h - class tabBar
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public

View File

@@ -1,8 +1,9 @@
/*
* tab_button.h - declaration of class tabButton
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -51,10 +52,22 @@ public:
connect( this, SIGNAL( clicked() ), this,
SLOT( slotClicked() ) );
}
virtual ~tabButton()
~tabButton()
{
}
#ifdef QT3
inline void setChecked( bool _on )
{
setOn( _on );
}
inline bool isChecked( void ) const
{
return( isOn() );
}
#endif
signals:
void clicked( int );

View File

@@ -1,8 +1,9 @@
/*
* tab_widget.h - LMMS-tabwidget
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -25,35 +26,52 @@
#ifndef _TAB_WIDGET_H
#define _TAB_WIDGET_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#include <QVector>
#include <QMap>
#else
#include <qwidget.h>
#include <qvaluevector.h>
#include <qmap.h>
#endif
class tabWidget : public QWidget
#include "spc_bg_hndl_widget.h"
class tabWidget : public QWidget, public specialBgHandlingWidget
{
Q_OBJECT
public:
tabWidget( const QString & _caption, QWidget * _parent );
~tabWidget();
void addTab( QWidget * _w, const QString & _name );
void FASTCALL addTab( QWidget * _w, const QString & _name,
int _idx = -1 );
void FASTCALL setActiveTab( int _idx );
inline int activeTab( void ) const
{
return( m_activeTab );
}
protected:
virtual void mousePressEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _pe );
virtual void resizeEvent( QResizeEvent * _re );
virtual void wheelEvent( QWheelEvent * _we );
private:
@@ -63,10 +81,10 @@ private:
QString name; // name for widget
int nwidth; // width of name when painting
} ;
typedef vvector<widgetDesc> widgetStack;
typedef QMap<int, widgetDesc> widgetStack;
widgetStack m_widgets;
int m_curWidget;
int m_activeTab;
QString m_caption;
} ;

Some files were not shown because too many files have changed in this diff Show More