Skip to content

Commit

Permalink
Merge pull request audacity#4364 from Paul-Licameli/extract-lib-note-…
Browse files Browse the repository at this point in the history
…track

Extract lib note track

Toolkit neutral library for saving and loading MIDI data, and MIDI playback.

But not only the minimal work to enable the library to build:

Also moving mutable members of NoteTrack, used only in display, into ClientData attachments
managed in the proper UI layer, like what was done for WaveTrack at 7caf7b0.
  • Loading branch information
Paul-Licameli authored Nov 21, 2023
2 parents 53c7abf + 20d8300 commit 1cf1717
Show file tree
Hide file tree
Showing 39 changed files with 738 additions and 530 deletions.
1 change: 0 additions & 1 deletion cmake-proxies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if (NOT USE_MIDI AND
message(FATAL_ERROR "EXPERIMENTAL_MIDI_OUT requires USE_MIDI")
endif ()

addlib( portsmf portsmf PORTSMF NO YES "portSMF >= 0.1" )
addlib( libsbsms sbsms SBSMS NO YES "sbsms >= 2.2.0" )
addlib( soundtouch soundtouch SOUNDTOUCH NO YES "soundtouch >= 1.7.1" )
addlib( twolame twolame LIBTWOLAME NO YES "twolame >= 0.3.13" )
2 changes: 1 addition & 1 deletion cmake-proxies/portsmf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set( SOURCES

set( INCLUDES
PUBLIC
${TARGET_ROOT}/include
${TARGET_ROOT}
)

organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
Expand Down
1 change: 1 addition & 0 deletions libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ set( LIBRARIES
lib-channel
lib-stretching-sequence
lib-menus
lib-note-track
)

if ( ${_OPT}has_networking )
Expand Down
24 changes: 24 additions & 0 deletions libraries/lib-note-track/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#[[
A track that holds MIDI data. Playback of MIDI.
]]

if( NOT TARGET portsmf )
addlib( portsmf portsmf PORTSMF NO YES "portSMF >= 0.1" )
endif()

set( SOURCES
MIDIPlay.cpp
MIDIPlay.h
NoteTrack.cpp
NoteTrack.h
WrapAllegro.h
)
set( LIBRARIES
lib-audio-io-interface
lib-playable-track-interface
portmidi::portmidi
portsmf
)
audacity_library( lib-note-track "${SOURCES}" "${LIBRARIES}"
"" ""
)
File renamed without changes.
2 changes: 1 addition & 1 deletion src/MIDIPlay.h → libraries/lib-note-track/MIDIPlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Paul Licameli split from AudIOBase.h

#include "AudioIOExt.h"
#include <optional>
#include "../lib-src/header-substitutes/allegro.h"
#include "WrapAllegro.h"

typedef void PmStream;
typedef int32_t PmTimestamp;
Expand Down
Loading

0 comments on commit 1cf1717

Please sign in to comment.